pipedrive_rs/models/
organization_item.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 OrganizationItem {
16    /// The ID of the organization
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i32>,
19    /// The ID of the company related to the organization
20    #[serde(rename = "company_id", skip_serializing_if = "Option::is_none")]
21    pub company_id: Option<i32>,
22    #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")]
23    pub owner_id: Option<Box<crate::models::Owner>>,
24    /// The name of the organization
25    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
26    pub name: Option<String>,
27    /// Whether the organization is active or not
28    #[serde(rename = "active_flag", skip_serializing_if = "Option::is_none")]
29    pub active_flag: Option<bool>,
30    #[serde(rename = "picture_id", skip_serializing_if = "Option::is_none")]
31    pub picture_id: Option<Box<crate::models::BaseOrganizationItemAllOfPictureId>>,
32    /// The country code of the organization
33    #[serde(rename = "country_code", skip_serializing_if = "Option::is_none")]
34    pub country_code: Option<String>,
35    /// The first character of the organization name
36    #[serde(rename = "first_char", skip_serializing_if = "Option::is_none")]
37    pub first_char: Option<String>,
38    /// The creation date and time of the organization
39    #[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
40    pub add_time: Option<String>,
41    /// The last updated date and time of the organization
42    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
43    pub update_time: Option<String>,
44    /// The visibility group ID of who can see the organization
45    #[serde(rename = "visible_to", skip_serializing_if = "Option::is_none")]
46    pub visible_to: Option<String>,
47    /// The label assigned to the organization
48    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
49    pub label: Option<i32>,
50    /// The name of the organization owner
51    #[serde(rename = "owner_name", skip_serializing_if = "Option::is_none")]
52    pub owner_name: Option<String>,
53    /// The BCC email associated with the organization
54    #[serde(rename = "cc_email", skip_serializing_if = "Option::is_none")]
55    pub cc_email: Option<String>,
56    /// The count of email messages related to the organization
57    #[serde(rename = "email_messages_count", skip_serializing_if = "Option::is_none")]
58    pub email_messages_count: Option<i32>,
59    /// The count of persons related to the organization
60    #[serde(rename = "people_count", skip_serializing_if = "Option::is_none")]
61    pub people_count: Option<i32>,
62    /// The count of activities related to the organization
63    #[serde(rename = "activities_count", skip_serializing_if = "Option::is_none")]
64    pub activities_count: Option<i32>,
65    /// The count of done activities related to the organization
66    #[serde(rename = "done_activities_count", skip_serializing_if = "Option::is_none")]
67    pub done_activities_count: Option<i32>,
68    /// The count of undone activities related to the organization
69    #[serde(rename = "undone_activities_count", skip_serializing_if = "Option::is_none")]
70    pub undone_activities_count: Option<i32>,
71    /// The count of files related to the organization
72    #[serde(rename = "files_count", skip_serializing_if = "Option::is_none")]
73    pub files_count: Option<i32>,
74    /// The count of notes related to the organization
75    #[serde(rename = "notes_count", skip_serializing_if = "Option::is_none")]
76    pub notes_count: Option<i32>,
77    /// The count of followers related to the organization
78    #[serde(rename = "followers_count", skip_serializing_if = "Option::is_none")]
79    pub followers_count: Option<i32>,
80    /// The full address of the organization
81    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
82    pub address: Option<String>,
83    /// The sub-premise of the organization location
84    #[serde(rename = "address_subpremise", skip_serializing_if = "Option::is_none")]
85    pub address_subpremise: Option<String>,
86    /// The street number of the organization location
87    #[serde(rename = "address_street_number", skip_serializing_if = "Option::is_none")]
88    pub address_street_number: Option<String>,
89    /// The route of the organization location
90    #[serde(rename = "address_route", skip_serializing_if = "Option::is_none")]
91    pub address_route: Option<String>,
92    /// The sub-locality of the organization location
93    #[serde(rename = "address_sublocality", skip_serializing_if = "Option::is_none")]
94    pub address_sublocality: Option<String>,
95    /// The locality of the organization location
96    #[serde(rename = "address_locality", skip_serializing_if = "Option::is_none")]
97    pub address_locality: Option<String>,
98    /// The level 1 admin area of the organization location
99    #[serde(rename = "address_admin_area_level_1", skip_serializing_if = "Option::is_none")]
100    pub address_admin_area_level_1: Option<String>,
101    /// The level 2 admin area of the organization location
102    #[serde(rename = "address_admin_area_level_2", skip_serializing_if = "Option::is_none")]
103    pub address_admin_area_level_2: Option<String>,
104    /// The country of the organization location
105    #[serde(rename = "address_country", skip_serializing_if = "Option::is_none")]
106    pub address_country: Option<String>,
107    /// The postal code of the organization location
108    #[serde(rename = "address_postal_code", skip_serializing_if = "Option::is_none")]
109    pub address_postal_code: Option<String>,
110    /// The formatted organization location
111    #[serde(rename = "address_formatted_address", skip_serializing_if = "Option::is_none")]
112    pub address_formatted_address: Option<String>,
113    /// The count of open deals related with the item
114    #[serde(rename = "open_deals_count", skip_serializing_if = "Option::is_none")]
115    pub open_deals_count: Option<i32>,
116    /// The count of related open deals related with the item
117    #[serde(rename = "related_open_deals_count", skip_serializing_if = "Option::is_none")]
118    pub related_open_deals_count: Option<i32>,
119    /// The count of closed deals related with the item
120    #[serde(rename = "closed_deals_count", skip_serializing_if = "Option::is_none")]
121    pub closed_deals_count: Option<i32>,
122    /// The count of related closed deals related with the item
123    #[serde(rename = "related_closed_deals_count", skip_serializing_if = "Option::is_none")]
124    pub related_closed_deals_count: Option<i32>,
125    /// The count of won deals related with the item
126    #[serde(rename = "won_deals_count", skip_serializing_if = "Option::is_none")]
127    pub won_deals_count: Option<i32>,
128    /// The count of related won deals related with the item
129    #[serde(rename = "related_won_deals_count", skip_serializing_if = "Option::is_none")]
130    pub related_won_deals_count: Option<i32>,
131    /// The count of lost deals related with the item
132    #[serde(rename = "lost_deals_count", skip_serializing_if = "Option::is_none")]
133    pub lost_deals_count: Option<i32>,
134    /// The count of related lost deals related with the item
135    #[serde(rename = "related_lost_deals_count", skip_serializing_if = "Option::is_none")]
136    pub related_lost_deals_count: Option<i32>,
137    /// The date of the next activity associated with the deal
138    #[serde(rename = "next_activity_date", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
139    pub next_activity_date: Option<Option<String>>,
140    /// The time of the next activity associated with the deal
141    #[serde(rename = "next_activity_time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
142    pub next_activity_time: Option<Option<String>>,
143    /// The ID of the next activity associated with the deal
144    #[serde(rename = "next_activity_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
145    pub next_activity_id: Option<Option<i32>>,
146    /// The ID of the last activity associated with the deal
147    #[serde(rename = "last_activity_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
148    pub last_activity_id: Option<Option<i32>>,
149    /// The date of the last activity associated with the deal
150    #[serde(rename = "last_activity_date", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
151    pub last_activity_date: Option<Option<String>>,
152    /// If the company ID of the organization and company ID of the request is same or not
153    #[serde(rename = "edit_name", skip_serializing_if = "Option::is_none")]
154    pub edit_name: Option<bool>,
155    /// Please refer to response schema of <a href=\"https://developers.pipedrive.com/docs/api/v1/Activities#getActivity\">Activity</a>
156    #[serde(rename = "last_activity", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
157    pub last_activity: Option<Option<serde_json::Value>>,
158    /// Please refer to response schema of <a href=\"https://developers.pipedrive.com/docs/api/v1/Activities#getActivity\">Activity</a>
159    #[serde(rename = "next_activity", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
160    pub next_activity: Option<Option<serde_json::Value>>,
161}
162
163impl OrganizationItem {
164    pub fn new() -> OrganizationItem {
165        OrganizationItem {
166            id: None,
167            company_id: None,
168            owner_id: None,
169            name: None,
170            active_flag: None,
171            picture_id: None,
172            country_code: None,
173            first_char: None,
174            add_time: None,
175            update_time: None,
176            visible_to: None,
177            label: None,
178            owner_name: None,
179            cc_email: None,
180            email_messages_count: None,
181            people_count: None,
182            activities_count: None,
183            done_activities_count: None,
184            undone_activities_count: None,
185            files_count: None,
186            notes_count: None,
187            followers_count: None,
188            address: None,
189            address_subpremise: None,
190            address_street_number: None,
191            address_route: None,
192            address_sublocality: None,
193            address_locality: None,
194            address_admin_area_level_1: None,
195            address_admin_area_level_2: None,
196            address_country: None,
197            address_postal_code: None,
198            address_formatted_address: None,
199            open_deals_count: None,
200            related_open_deals_count: None,
201            closed_deals_count: None,
202            related_closed_deals_count: None,
203            won_deals_count: None,
204            related_won_deals_count: None,
205            lost_deals_count: None,
206            related_lost_deals_count: None,
207            next_activity_date: None,
208            next_activity_time: None,
209            next_activity_id: None,
210            last_activity_id: None,
211            last_activity_date: None,
212            edit_name: None,
213            last_activity: None,
214            next_activity: None,
215        }
216    }
217}
218
219