pipedrive_rs/models/
deal_non_strict.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 DealNonStrict {
16    /// The ID of the deal
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i32>,
19    #[serde(rename = "creator_user_id", skip_serializing_if = "Option::is_none")]
20    pub creator_user_id: Option<Box<crate::models::DealNonStrictAllOfCreatorUserId>>,
21    #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
22    pub user_id: Option<Box<crate::models::DealUserDataWithId>>,
23    #[serde(rename = "person_id", skip_serializing_if = "Option::is_none")]
24    pub person_id: Option<Box<crate::models::DealPersonDataWithId>>,
25    #[serde(rename = "org_id", skip_serializing_if = "Option::is_none")]
26    pub org_id: Option<Box<crate::models::DealOrganizationDataWithId>>,
27    /// The ID of the deal stage
28    #[serde(rename = "stage_id", skip_serializing_if = "Option::is_none")]
29    pub stage_id: Option<i32>,
30    /// The title of the deal
31    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
32    pub title: Option<String>,
33    /// The value of the deal
34    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
35    pub value: Option<f32>,
36    /// The currency associated with the deal
37    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
38    pub currency: Option<String>,
39    /// The creation date and time of the deal
40    #[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
41    pub add_time: Option<String>,
42    /// The last updated date and time of the deal
43    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
44    pub update_time: Option<String>,
45    /// The last updated date and time of the deal stage
46    #[serde(rename = "stage_change_time", skip_serializing_if = "Option::is_none")]
47    pub stage_change_time: Option<String>,
48    /// Whether the deal is active or not
49    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
50    pub active: Option<bool>,
51    /// Whether the deal is deleted or not
52    #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")]
53    pub deleted: Option<bool>,
54    /// The status of the deal
55    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
56    pub status: Option<String>,
57    /// The success probability percentage of the deal
58    #[serde(rename = "probability", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
59    pub probability: Option<Option<f32>>,
60    /// The date of the next activity associated with the deal
61    #[serde(rename = "next_activity_date", skip_serializing_if = "Option::is_none")]
62    pub next_activity_date: Option<String>,
63    /// The time of the next activity associated with the deal
64    #[serde(rename = "next_activity_time", skip_serializing_if = "Option::is_none")]
65    pub next_activity_time: Option<String>,
66    /// The ID of the next activity associated with the deal
67    #[serde(rename = "next_activity_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
68    pub next_activity_id: Option<Option<i32>>,
69    /// The ID of the last activity associated with the deal
70    #[serde(rename = "last_activity_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
71    pub last_activity_id: Option<Option<i32>>,
72    /// The date of the last activity associated with the deal
73    #[serde(rename = "last_activity_date", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
74    pub last_activity_date: Option<Option<String>>,
75    /// The reason for losing the deal
76    #[serde(rename = "lost_reason", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
77    pub lost_reason: Option<Option<String>>,
78    /// The visibility of the deal
79    #[serde(rename = "visible_to", skip_serializing_if = "Option::is_none")]
80    pub visible_to: Option<String>,
81    /// The date and time of closing the deal
82    #[serde(rename = "close_time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
83    pub close_time: Option<Option<String>>,
84    /// The ID of the pipeline associated with the deal
85    #[serde(rename = "pipeline_id", skip_serializing_if = "Option::is_none")]
86    pub pipeline_id: Option<i32>,
87    /// The date and time of changing the deal status as won
88    #[serde(rename = "won_time", skip_serializing_if = "Option::is_none")]
89    pub won_time: Option<String>,
90    /// The date and time of the first time changing the deal status as won
91    #[serde(rename = "first_won_time", skip_serializing_if = "Option::is_none")]
92    pub first_won_time: Option<String>,
93    /// The date and time of changing the deal status as lost
94    #[serde(rename = "lost_time", skip_serializing_if = "Option::is_none")]
95    pub lost_time: Option<String>,
96    /// The number of products associated with the deal
97    #[serde(rename = "products_count", skip_serializing_if = "Option::is_none")]
98    pub products_count: Option<i32>,
99    /// The number of files associated with the deal
100    #[serde(rename = "files_count", skip_serializing_if = "Option::is_none")]
101    pub files_count: Option<i32>,
102    /// The number of notes associated with the deal
103    #[serde(rename = "notes_count", skip_serializing_if = "Option::is_none")]
104    pub notes_count: Option<i32>,
105    /// The number of followers associated with the deal
106    #[serde(rename = "followers_count", skip_serializing_if = "Option::is_none")]
107    pub followers_count: Option<i32>,
108    /// The number of emails associated with the deal
109    #[serde(rename = "email_messages_count", skip_serializing_if = "Option::is_none")]
110    pub email_messages_count: Option<i32>,
111    /// The number of activities associated with the deal
112    #[serde(rename = "activities_count", skip_serializing_if = "Option::is_none")]
113    pub activities_count: Option<i32>,
114    /// The number of completed activities associated with the deal
115    #[serde(rename = "done_activities_count", skip_serializing_if = "Option::is_none")]
116    pub done_activities_count: Option<i32>,
117    /// The number of incomplete activities associated with the deal
118    #[serde(rename = "undone_activities_count", skip_serializing_if = "Option::is_none")]
119    pub undone_activities_count: Option<i32>,
120    /// The number of participants associated with the deal
121    #[serde(rename = "participants_count", skip_serializing_if = "Option::is_none")]
122    pub participants_count: Option<i32>,
123    /// The expected close date of the deal
124    #[serde(rename = "expected_close_date", skip_serializing_if = "Option::is_none")]
125    pub expected_close_date: Option<String>,
126    /// The date and time of the last incoming email associated with the deal
127    #[serde(rename = "last_incoming_mail_time", skip_serializing_if = "Option::is_none")]
128    pub last_incoming_mail_time: Option<String>,
129    /// The date and time of the last outgoing email associated with the deal
130    #[serde(rename = "last_outgoing_mail_time", skip_serializing_if = "Option::is_none")]
131    pub last_outgoing_mail_time: Option<String>,
132    /// The label or multiple labels assigned to the deal
133    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
134    pub label: Option<String>,
135    /// The order number of the deal stage associated with the deal
136    #[serde(rename = "stage_order_nr", skip_serializing_if = "Option::is_none")]
137    pub stage_order_nr: Option<i32>,
138    /// The name of the person associated with the deal
139    #[serde(rename = "person_name", skip_serializing_if = "Option::is_none")]
140    pub person_name: Option<String>,
141    /// The name of the organization associated with the deal
142    #[serde(rename = "org_name", skip_serializing_if = "Option::is_none")]
143    pub org_name: Option<String>,
144    /// The subject of the next activity associated with the deal
145    #[serde(rename = "next_activity_subject", skip_serializing_if = "Option::is_none")]
146    pub next_activity_subject: Option<String>,
147    /// The type of the next activity associated with the deal
148    #[serde(rename = "next_activity_type", skip_serializing_if = "Option::is_none")]
149    pub next_activity_type: Option<String>,
150    /// The duration of the next activity associated with the deal
151    #[serde(rename = "next_activity_duration", skip_serializing_if = "Option::is_none")]
152    pub next_activity_duration: Option<String>,
153    /// The note of the next activity associated with the deal
154    #[serde(rename = "next_activity_note", skip_serializing_if = "Option::is_none")]
155    pub next_activity_note: Option<String>,
156    /// The deal value formatted with selected currency. E.g. US$500
157    #[serde(rename = "formatted_value", skip_serializing_if = "Option::is_none")]
158    pub formatted_value: Option<String>,
159    /// Probability times deal value. Probability can either be deal probability or if not set, then stage probability.
160    #[serde(rename = "weighted_value", skip_serializing_if = "Option::is_none")]
161    pub weighted_value: Option<f32>,
162    /// The weighted_value formatted with selected currency. E.g. US$500
163    #[serde(rename = "formatted_weighted_value", skip_serializing_if = "Option::is_none")]
164    pub formatted_weighted_value: Option<String>,
165    /// The currency associated with the deal
166    #[serde(rename = "weighted_value_currency", skip_serializing_if = "Option::is_none")]
167    pub weighted_value_currency: Option<String>,
168    /// The date and time of changing the deal status as rotten
169    #[serde(rename = "rotten_time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
170    pub rotten_time: Option<Option<String>>,
171    /// The name of the deal owner
172    #[serde(rename = "owner_name", skip_serializing_if = "Option::is_none")]
173    pub owner_name: Option<String>,
174    /// The BCC email of the deal
175    #[serde(rename = "cc_email", skip_serializing_if = "Option::is_none")]
176    pub cc_email: Option<String>,
177    /// If the organization that is associated with the deal is hidden or not
178    #[serde(rename = "org_hidden", skip_serializing_if = "Option::is_none")]
179    pub org_hidden: Option<bool>,
180    /// If the person that is associated with the deal is hidden or not
181    #[serde(rename = "person_hidden", skip_serializing_if = "Option::is_none")]
182    pub person_hidden: Option<bool>,
183}
184
185impl DealNonStrict {
186    pub fn new() -> DealNonStrict {
187        DealNonStrict {
188            id: None,
189            creator_user_id: None,
190            user_id: None,
191            person_id: None,
192            org_id: None,
193            stage_id: None,
194            title: None,
195            value: None,
196            currency: None,
197            add_time: None,
198            update_time: None,
199            stage_change_time: None,
200            active: None,
201            deleted: None,
202            status: None,
203            probability: None,
204            next_activity_date: None,
205            next_activity_time: None,
206            next_activity_id: None,
207            last_activity_id: None,
208            last_activity_date: None,
209            lost_reason: None,
210            visible_to: None,
211            close_time: None,
212            pipeline_id: None,
213            won_time: None,
214            first_won_time: None,
215            lost_time: None,
216            products_count: None,
217            files_count: None,
218            notes_count: None,
219            followers_count: None,
220            email_messages_count: None,
221            activities_count: None,
222            done_activities_count: None,
223            undone_activities_count: None,
224            participants_count: None,
225            expected_close_date: None,
226            last_incoming_mail_time: None,
227            last_outgoing_mail_time: None,
228            label: None,
229            stage_order_nr: None,
230            person_name: None,
231            org_name: None,
232            next_activity_subject: None,
233            next_activity_type: None,
234            next_activity_duration: None,
235            next_activity_note: None,
236            formatted_value: None,
237            weighted_value: None,
238            formatted_weighted_value: None,
239            weighted_value_currency: None,
240            rotten_time: None,
241            owner_name: None,
242            cc_email: None,
243            org_hidden: None,
244            person_hidden: None,
245        }
246    }
247}
248
249