Skip to main content

ghl_models/v2/
locations.rs

1//! `locations` data models for GoHighLevel API V2 (47 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Locations** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`locations` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/locations.md).
7//!
8//! Enable with `features = ["locations"]`.
9// @generated by xtask/generate_models.py — do not edit by hand.
10// Source: https://github.com/GoHighLevel/highlevel-api-docs
11// Doc comments are HighLevel's own field descriptions, reflowed verbatim, so
12// they aren't held to rustdoc's markdown conventions.
13#![allow(
14    missing_docs,
15    clippy::doc_lazy_continuation,
16    clippy::doc_overindented_list_items
17)]
18
19use serde::{Deserialize, Serialize};
20
21/// `BusinessSchema` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct BusinessSchema {
24    #[serde(default, skip_serializing_if = "Option::is_none")]
25    pub name: Option<String>,
26    #[serde(default, skip_serializing_if = "Option::is_none")]
27    pub address: Option<String>,
28    #[serde(default, skip_serializing_if = "Option::is_none")]
29    pub city: Option<String>,
30    #[serde(default, skip_serializing_if = "Option::is_none")]
31    pub state: Option<String>,
32    #[serde(default, skip_serializing_if = "Option::is_none")]
33    pub country: Option<String>,
34    #[serde(
35        rename = "postalCode",
36        default,
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub postal_code: Option<String>,
40    #[serde(default, skip_serializing_if = "Option::is_none")]
41    pub website: Option<String>,
42    #[serde(default, skip_serializing_if = "Option::is_none")]
43    pub timezone: Option<String>,
44    #[serde(rename = "logoUrl", default, skip_serializing_if = "Option::is_none")]
45    pub logo_url: Option<String>,
46}
47
48/// `CreateCustomFieldsDTO` from the GoHighLevel OpenAPI spec.
49#[derive(Debug, Clone, Default, Serialize, Deserialize)]
50pub struct CreateCustomFieldsDTO {
51    /// Required by the API.
52    pub name: String,
53    /// Required by the API.
54    #[serde(rename = "dataType")]
55    pub data_type: String,
56    #[serde(default, skip_serializing_if = "Option::is_none")]
57    pub placeholder: Option<String>,
58    #[serde(
59        rename = "acceptedFormat",
60        default,
61        skip_serializing_if = "Vec::is_empty"
62    )]
63    pub accepted_format: Vec<String>,
64    #[serde(
65        rename = "isMultipleFile",
66        default,
67        skip_serializing_if = "Option::is_none"
68    )]
69    pub is_multiple_file: Option<bool>,
70    #[serde(
71        rename = "maxNumberOfFiles",
72        default,
73        skip_serializing_if = "Option::is_none"
74    )]
75    pub max_number_of_files: Option<f64>,
76    /// Multiple possible shapes in the spec; raw JSON.
77    #[serde(
78        rename = "textBoxListOptions",
79        default,
80        skip_serializing_if = "Vec::is_empty"
81    )]
82    pub text_box_list_options: Vec<serde_json::Value>,
83    #[serde(default, skip_serializing_if = "Option::is_none")]
84    pub position: Option<f64>,
85    /// Model of the custom field you want to create
86    /// Allowed values: `contact`, `opportunity`.
87    #[serde(default, skip_serializing_if = "Option::is_none")]
88    pub model: Option<String>,
89}
90
91/// `CreateLocationDto` from the GoHighLevel OpenAPI spec.
92#[derive(Debug, Clone, Default, Serialize, Deserialize)]
93pub struct CreateLocationDto {
94    /// The name for the sub-account/location
95    /// Required by the API.
96    pub name: String,
97    /// The phone number of the business for which sub-account is created with the appropriate
98    /// country-code
99    #[serde(default, skip_serializing_if = "Option::is_none")]
100    pub phone: Option<String>,
101    /// Company/Agency Id
102    /// Required by the API.
103    #[serde(rename = "companyId")]
104    pub company_id: String,
105    /// The address of the business for which sub-account is created
106    #[serde(default, skip_serializing_if = "Option::is_none")]
107    pub address: Option<String>,
108    /// The city where the business is located for which sub-account is created
109    #[serde(default, skip_serializing_if = "Option::is_none")]
110    pub city: Option<String>,
111    /// The state in which the business operates for which sub-account is created
112    #[serde(default, skip_serializing_if = "Option::is_none")]
113    pub state: Option<String>,
114    /// The 2 letter country-code in which the business is present for which sub-account is
115    /// created
116    /// Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`.
117    #[serde(default, skip_serializing_if = "Option::is_none")]
118    pub country: Option<String>,
119    /// The postal code of the business for which sub-account is created
120    #[serde(
121        rename = "postalCode",
122        default,
123        skip_serializing_if = "Option::is_none"
124    )]
125    pub postal_code: Option<String>,
126    /// The website of the business for which sub-account is created
127    #[serde(default, skip_serializing_if = "Option::is_none")]
128    pub website: Option<String>,
129    /// The timezone of the business for which sub-account is created
130    #[serde(default, skip_serializing_if = "Option::is_none")]
131    pub timezone: Option<String>,
132    #[serde(
133        rename = "prospectInfo",
134        default,
135        skip_serializing_if = "Option::is_none"
136    )]
137    pub prospect_info: Option<ProspectInfoDto>,
138    /// The default settings for location
139    #[serde(default, skip_serializing_if = "Option::is_none")]
140    pub settings: Option<SettingsSchema>,
141    /// The social media links for location
142    #[serde(default, skip_serializing_if = "Option::is_none")]
143    pub social: Option<SocialSchema>,
144    /// The twilio credentials for location
145    #[serde(default, skip_serializing_if = "Option::is_none")]
146    pub twilio: Option<TwilioSchema>,
147    /// The mailgun credentials for location
148    #[serde(default, skip_serializing_if = "Option::is_none")]
149    pub mailgun: Option<MailgunSchema>,
150    /// The snapshot ID to be loaded into the location.
151    #[serde(
152        rename = "snapshotId",
153        default,
154        skip_serializing_if = "Option::is_none"
155    )]
156    pub snapshot_id: Option<String>,
157}
158
159/// `CreateLocationSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
160#[derive(Debug, Clone, Default, Serialize, Deserialize)]
161pub struct CreateLocationSuccessfulResponseDto {
162    /// Location Id
163    #[serde(default, skip_serializing_if = "Option::is_none")]
164    pub id: Option<String>,
165    /// Company/Agency Id
166    #[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
167    pub company_id: Option<String>,
168    /// The name for the sub-account/location
169    #[serde(default, skip_serializing_if = "Option::is_none")]
170    pub name: Option<String>,
171    /// The phone number of the business for which sub-account is created
172    #[serde(default, skip_serializing_if = "Option::is_none")]
173    pub phone: Option<String>,
174    /// The email for the sub-account/location
175    #[serde(default, skip_serializing_if = "Option::is_none")]
176    pub email: Option<String>,
177    /// The address of the business for which sub-account is created
178    #[serde(default, skip_serializing_if = "Option::is_none")]
179    pub address: Option<String>,
180    /// The city where the business is located for which sub-account is created
181    #[serde(default, skip_serializing_if = "Option::is_none")]
182    pub city: Option<String>,
183    /// The state in which the business operates for which sub-account is created
184    #[serde(default, skip_serializing_if = "Option::is_none")]
185    pub state: Option<String>,
186    #[serde(default, skip_serializing_if = "Option::is_none")]
187    pub domain: Option<String>,
188    /// The country in which the business is present for which sub-account is created
189    /// Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`.
190    #[serde(default, skip_serializing_if = "Option::is_none")]
191    pub country: Option<String>,
192    /// The postal code of the business for which sub-account is created
193    #[serde(
194        rename = "postalCode",
195        default,
196        skip_serializing_if = "Option::is_none"
197    )]
198    pub postal_code: Option<String>,
199    /// The website of the business for which sub-account is created
200    #[serde(default, skip_serializing_if = "Option::is_none")]
201    pub website: Option<String>,
202    /// The timezone of the business for which sub-account is created
203    #[serde(default, skip_serializing_if = "Option::is_none")]
204    pub timezone: Option<String>,
205    /// The default settings for location
206    #[serde(default, skip_serializing_if = "Option::is_none")]
207    pub settings: Option<SettingsSchema>,
208    /// The social media links for location
209    #[serde(default, skip_serializing_if = "Option::is_none")]
210    pub social: Option<SocialSchema>,
211}
212
213/// `CustomFieldDeleteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
214#[derive(Debug, Clone, Default, Serialize, Deserialize)]
215pub struct CustomFieldDeleteSuccessfulResponseDto {
216    #[serde(default, skip_serializing_if = "Option::is_none")]
217    pub succeded: Option<bool>,
218}
219
220/// `CustomFieldSchema` from the GoHighLevel OpenAPI spec.
221#[derive(Debug, Clone, Default, Serialize, Deserialize)]
222pub struct CustomFieldSchema {
223    #[serde(default, skip_serializing_if = "Option::is_none")]
224    pub id: Option<String>,
225    #[serde(default, skip_serializing_if = "Option::is_none")]
226    pub name: Option<String>,
227    #[serde(rename = "fieldKey", default, skip_serializing_if = "Option::is_none")]
228    pub field_key: Option<String>,
229    #[serde(default, skip_serializing_if = "Option::is_none")]
230    pub placeholder: Option<String>,
231    #[serde(rename = "dataType", default, skip_serializing_if = "Option::is_none")]
232    pub data_type: Option<String>,
233    #[serde(default, skip_serializing_if = "Option::is_none")]
234    pub position: Option<f64>,
235    #[serde(
236        rename = "picklistOptions",
237        default,
238        skip_serializing_if = "Vec::is_empty"
239    )]
240    pub picklist_options: Vec<String>,
241    #[serde(
242        rename = "picklistImageOptions",
243        default,
244        skip_serializing_if = "Vec::is_empty"
245    )]
246    pub picklist_image_options: Vec<String>,
247    #[serde(
248        rename = "isAllowedCustomOption",
249        default,
250        skip_serializing_if = "Option::is_none"
251    )]
252    pub is_allowed_custom_option: Option<bool>,
253    #[serde(
254        rename = "isMultiFileAllowed",
255        default,
256        skip_serializing_if = "Option::is_none"
257    )]
258    pub is_multi_file_allowed: Option<bool>,
259    #[serde(
260        rename = "maxFileLimit",
261        default,
262        skip_serializing_if = "Option::is_none"
263    )]
264    pub max_file_limit: Option<f64>,
265    #[serde(
266        rename = "locationId",
267        default,
268        skip_serializing_if = "Option::is_none"
269    )]
270    pub location_id: Option<String>,
271    /// Model of the custom field
272    /// Allowed values: `contact`, `opportunity`.
273    #[serde(default, skip_serializing_if = "Option::is_none")]
274    pub model: Option<String>,
275}
276
277/// `CustomFieldSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
278#[derive(Debug, Clone, Default, Serialize, Deserialize)]
279pub struct CustomFieldSuccessfulResponseDto {
280    #[serde(
281        rename = "customField",
282        default,
283        skip_serializing_if = "Option::is_none"
284    )]
285    pub custom_field: Option<CustomFieldSchema>,
286}
287
288/// `CustomFieldsListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
289#[derive(Debug, Clone, Default, Serialize, Deserialize)]
290pub struct CustomFieldsListSuccessfulResponseDto {
291    #[serde(
292        rename = "customFields",
293        default,
294        skip_serializing_if = "Vec::is_empty"
295    )]
296    pub custom_fields: Vec<CustomFieldSchema>,
297}
298
299/// `CustomRRulesOptions` from the GoHighLevel OpenAPI spec.
300#[derive(Debug, Clone, Default, Serialize, Deserialize)]
301pub struct CustomRRulesOptions {
302    /// Allowed values: `yearly`, `monthly`, `weekly`, `daily`, `hourly`.
303    /// Required by the API.
304    #[serde(rename = "intervalType")]
305    pub interval_type: String,
306    /// Required by the API.
307    pub interval: f64,
308    /// Start Date
309    /// Required by the API.
310    #[serde(rename = "startDate")]
311    pub start_date: String,
312    /// End Date
313    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
314    pub end_date: Option<String>,
315    /// 1, 2, 3, ..., 27, 31
316    #[serde(
317        rename = "dayOfMonth",
318        default,
319        skip_serializing_if = "Option::is_none"
320    )]
321    pub day_of_month: Option<f64>,
322    /// Allowed values: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`.
323    #[serde(rename = "dayOfWeek", default, skip_serializing_if = "Option::is_none")]
324    pub day_of_week: Option<String>,
325    /// 1, 2, ....., 11, 12
326    #[serde(
327        rename = "monthOfYear",
328        default,
329        skip_serializing_if = "Option::is_none"
330    )]
331    pub month_of_year: Option<f64>,
332    /// Max number of task executions
333    #[serde(default, skip_serializing_if = "Option::is_none")]
334    pub count: Option<f64>,
335    /// Create Task If Over Due
336    #[serde(
337        rename = "createTaskIfOverDue",
338        default,
339        skip_serializing_if = "Option::is_none"
340    )]
341    pub create_task_if_over_due: Option<bool>,
342    /// Due after seconds
343    /// Required by the API.
344    #[serde(rename = "dueAfterSeconds")]
345    pub due_after_seconds: f64,
346}
347
348/// `CustomValueDeleteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
349#[derive(Debug, Clone, Default, Serialize, Deserialize)]
350pub struct CustomValueDeleteSuccessfulResponseDto {
351    #[serde(default, skip_serializing_if = "Option::is_none")]
352    pub succeded: Option<bool>,
353}
354
355/// `CustomValueIdSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
356#[derive(Debug, Clone, Default, Serialize, Deserialize)]
357pub struct CustomValueIdSuccessfulResponseDto {
358    #[serde(
359        rename = "customValue",
360        default,
361        skip_serializing_if = "Option::is_none"
362    )]
363    pub custom_value: Option<CustomValueSchema>,
364}
365
366/// `CustomValueSchema` from the GoHighLevel OpenAPI spec.
367#[derive(Debug, Clone, Default, Serialize, Deserialize)]
368pub struct CustomValueSchema {
369    #[serde(default, skip_serializing_if = "Option::is_none")]
370    pub id: Option<String>,
371    #[serde(default, skip_serializing_if = "Option::is_none")]
372    pub name: Option<String>,
373    #[serde(rename = "fieldKey", default, skip_serializing_if = "Option::is_none")]
374    pub field_key: Option<String>,
375    #[serde(default, skip_serializing_if = "Option::is_none")]
376    pub value: Option<String>,
377    #[serde(
378        rename = "locationId",
379        default,
380        skip_serializing_if = "Option::is_none"
381    )]
382    pub location_id: Option<String>,
383}
384
385/// `CustomValuesListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
386#[derive(Debug, Clone, Default, Serialize, Deserialize)]
387pub struct CustomValuesListSuccessfulResponseDto {
388    #[serde(
389        rename = "customValues",
390        default,
391        skip_serializing_if = "Vec::is_empty"
392    )]
393    pub custom_values: Vec<CustomValueSchema>,
394}
395
396/// `DeleteRecurringTaskResponseDTO` from the GoHighLevel OpenAPI spec.
397#[derive(Debug, Clone, Default, Serialize, Deserialize)]
398pub struct DeleteRecurringTaskResponseDTO {
399    /// Recurring Task Id
400    /// Required by the API.
401    pub id: String,
402    /// Success
403    /// Required by the API.
404    pub success: bool,
405}
406
407/// `EmailTemplateSchema` from the GoHighLevel OpenAPI spec.
408#[derive(Debug, Clone, Default, Serialize, Deserialize)]
409pub struct EmailTemplateSchema {
410    #[serde(default, skip_serializing_if = "Option::is_none")]
411    pub subject: Option<String>,
412    #[serde(default, skip_serializing_if = "Vec::is_empty")]
413    pub attachments: Vec<Vec<serde_json::Value>>,
414    #[serde(default, skip_serializing_if = "Option::is_none")]
415    pub html: Option<String>,
416}
417
418/// `FileUploadBody` from the GoHighLevel OpenAPI spec.
419#[derive(Debug, Clone, Default, Serialize, Deserialize)]
420pub struct FileUploadBody {
421    /// Id(Contact Id/Opportunity Id/Custom Field Id)
422    #[serde(default, skip_serializing_if = "Option::is_none")]
423    pub id: Option<String>,
424    /// Max number of files
425    #[serde(rename = "maxFiles", default, skip_serializing_if = "Option::is_none")]
426    pub max_files: Option<String>,
427}
428
429/// `FileUploadResponseDto` from the GoHighLevel OpenAPI spec.
430#[derive(Debug, Clone, Default, Serialize, Deserialize)]
431pub struct FileUploadResponseDto {
432    /// Uploaded files
433    #[serde(
434        rename = "uploadedFiles",
435        default,
436        skip_serializing_if = "Option::is_none"
437    )]
438    pub uploaded_files: Option<serde_json::Value>,
439    /// Meta data of uploaded files
440    #[serde(default, skip_serializing_if = "Vec::is_empty")]
441    pub meta: Vec<String>,
442}
443
444/// `GetEmailTemplateResponseSchema` from the GoHighLevel OpenAPI spec.
445#[derive(Debug, Clone, Default, Serialize, Deserialize)]
446pub struct GetEmailTemplateResponseSchema {
447    #[serde(default, skip_serializing_if = "Option::is_none")]
448    pub id: Option<String>,
449    #[serde(default, skip_serializing_if = "Option::is_none")]
450    pub name: Option<String>,
451    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
452    pub type_: Option<String>,
453    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
454    pub date_added: Option<String>,
455    #[serde(default, skip_serializing_if = "Option::is_none")]
456    pub template: Option<EmailTemplateSchema>,
457    #[serde(
458        rename = "locationId",
459        default,
460        skip_serializing_if = "Option::is_none"
461    )]
462    pub location_id: Option<String>,
463}
464
465/// `GetLocationByIdSchema` from the GoHighLevel OpenAPI spec.
466#[derive(Debug, Clone, Default, Serialize, Deserialize)]
467pub struct GetLocationByIdSchema {
468    #[serde(default, skip_serializing_if = "Option::is_none")]
469    pub id: Option<String>,
470    #[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
471    pub company_id: Option<String>,
472    #[serde(default, skip_serializing_if = "Option::is_none")]
473    pub name: Option<String>,
474    #[serde(default, skip_serializing_if = "Option::is_none")]
475    pub domain: Option<String>,
476    #[serde(default, skip_serializing_if = "Option::is_none")]
477    pub address: Option<String>,
478    #[serde(default, skip_serializing_if = "Option::is_none")]
479    pub city: Option<String>,
480    #[serde(default, skip_serializing_if = "Option::is_none")]
481    pub state: Option<String>,
482    #[serde(rename = "logoUrl", default, skip_serializing_if = "Option::is_none")]
483    pub logo_url: Option<String>,
484    #[serde(default, skip_serializing_if = "Option::is_none")]
485    pub country: Option<String>,
486    #[serde(
487        rename = "postalCode",
488        default,
489        skip_serializing_if = "Option::is_none"
490    )]
491    pub postal_code: Option<String>,
492    #[serde(default, skip_serializing_if = "Option::is_none")]
493    pub website: Option<String>,
494    #[serde(default, skip_serializing_if = "Option::is_none")]
495    pub timezone: Option<String>,
496    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
497    pub first_name: Option<String>,
498    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
499    pub last_name: Option<String>,
500    #[serde(default, skip_serializing_if = "Option::is_none")]
501    pub email: Option<String>,
502    #[serde(default, skip_serializing_if = "Option::is_none")]
503    pub phone: Option<String>,
504    #[serde(default, skip_serializing_if = "Option::is_none")]
505    pub business: Option<BusinessSchema>,
506    #[serde(default, skip_serializing_if = "Option::is_none")]
507    pub social: Option<SocialSchema>,
508    #[serde(default, skip_serializing_if = "Option::is_none")]
509    pub settings: Option<SettingsSchema>,
510    #[serde(default, skip_serializing_if = "Option::is_none")]
511    pub reseller: Option<serde_json::Value>,
512}
513
514/// `GetLocationByIdSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
515#[derive(Debug, Clone, Default, Serialize, Deserialize)]
516pub struct GetLocationByIdSuccessfulResponseDto {
517    #[serde(default, skip_serializing_if = "Option::is_none")]
518    pub location: Option<GetLocationByIdSchema>,
519}
520
521/// `GetLocationSchema` from the GoHighLevel OpenAPI spec.
522#[derive(Debug, Clone, Default, Serialize, Deserialize)]
523pub struct GetLocationSchema {
524    /// Location Id
525    #[serde(default, skip_serializing_if = "Option::is_none")]
526    pub id: Option<String>,
527    /// The name for the sub-account/location
528    #[serde(default, skip_serializing_if = "Option::is_none")]
529    pub name: Option<String>,
530    /// The phone number of the business for which sub-account is created
531    #[serde(default, skip_serializing_if = "Option::is_none")]
532    pub phone: Option<String>,
533    /// The email for the sub-account/location
534    #[serde(default, skip_serializing_if = "Option::is_none")]
535    pub email: Option<String>,
536    /// The address of the business for which sub-account is created
537    #[serde(default, skip_serializing_if = "Option::is_none")]
538    pub address: Option<String>,
539    /// The city where the business is located for which sub-account is created
540    #[serde(default, skip_serializing_if = "Option::is_none")]
541    pub city: Option<String>,
542    /// The state in which the business operates for which sub-account is created
543    #[serde(default, skip_serializing_if = "Option::is_none")]
544    pub state: Option<String>,
545    /// The country in which the business is present for which sub-account is created
546    #[serde(default, skip_serializing_if = "Option::is_none")]
547    pub country: Option<String>,
548    /// The postal code of the business for which sub-account is created
549    #[serde(
550        rename = "postalCode",
551        default,
552        skip_serializing_if = "Option::is_none"
553    )]
554    pub postal_code: Option<String>,
555    /// The website of the business for which sub-account is created
556    #[serde(default, skip_serializing_if = "Option::is_none")]
557    pub website: Option<String>,
558    /// The timezone of the business for which sub-account is created
559    #[serde(default, skip_serializing_if = "Option::is_none")]
560    pub timezone: Option<String>,
561    /// The default settings for location
562    #[serde(default, skip_serializing_if = "Option::is_none")]
563    pub settings: Option<SettingsSchema>,
564    /// The social media links for location
565    #[serde(default, skip_serializing_if = "Option::is_none")]
566    pub social: Option<SocialSchema>,
567}
568
569/// `GetSmsTemplateResponseSchema` from the GoHighLevel OpenAPI spec.
570#[derive(Debug, Clone, Default, Serialize, Deserialize)]
571pub struct GetSmsTemplateResponseSchema {
572    #[serde(default, skip_serializing_if = "Option::is_none")]
573    pub id: Option<String>,
574    #[serde(default, skip_serializing_if = "Option::is_none")]
575    pub name: Option<String>,
576    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
577    pub type_: Option<String>,
578    #[serde(default, skip_serializing_if = "Option::is_none")]
579    pub template: Option<SmsTemplateSchema>,
580    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
581    pub date_added: Option<String>,
582    #[serde(
583        rename = "locationId",
584        default,
585        skip_serializing_if = "Option::is_none"
586    )]
587    pub location_id: Option<String>,
588    #[serde(
589        rename = "urlAttachments",
590        default,
591        skip_serializing_if = "Vec::is_empty"
592    )]
593    pub url_attachments: Vec<String>,
594}
595
596/// `GetTemplatesSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
597#[derive(Debug, Clone, Default, Serialize, Deserialize)]
598pub struct GetTemplatesSuccessfulResponseDto {
599    /// Multiple possible shapes in the spec; raw JSON.
600    #[serde(default, skip_serializing_if = "Vec::is_empty")]
601    pub templates: Vec<serde_json::Value>,
602    #[serde(
603        rename = "totalCount",
604        default,
605        skip_serializing_if = "Option::is_none"
606    )]
607    pub total_count: Option<f64>,
608}
609
610/// `LocationDeletedSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
611#[derive(Debug, Clone, Default, Serialize, Deserialize)]
612pub struct LocationDeletedSuccessfulResponseDto {
613    /// Success status of the API
614    /// Required by the API.
615    pub success: bool,
616    /// Success message of the API
617    /// Required by the API.
618    pub message: String,
619}
620
621/// `LocationTagDeleteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
622#[derive(Debug, Clone, Default, Serialize, Deserialize)]
623pub struct LocationTagDeleteSuccessfulResponseDto {
624    #[serde(default, skip_serializing_if = "Option::is_none")]
625    pub succeded: Option<bool>,
626}
627
628/// `LocationTagSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
629#[derive(Debug, Clone, Default, Serialize, Deserialize)]
630pub struct LocationTagSuccessfulResponseDto {
631    #[serde(default, skip_serializing_if = "Option::is_none")]
632    pub tag: Option<LocationTagsSchema>,
633}
634
635/// `LocationTagsSchema` from the GoHighLevel OpenAPI spec.
636#[derive(Debug, Clone, Default, Serialize, Deserialize)]
637pub struct LocationTagsSchema {
638    #[serde(default, skip_serializing_if = "Option::is_none")]
639    pub name: Option<String>,
640    #[serde(
641        rename = "locationId",
642        default,
643        skip_serializing_if = "Option::is_none"
644    )]
645    pub location_id: Option<String>,
646    #[serde(default, skip_serializing_if = "Option::is_none")]
647    pub id: Option<String>,
648}
649
650/// `LocationTagsSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
651#[derive(Debug, Clone, Default, Serialize, Deserialize)]
652pub struct LocationTagsSuccessfulResponseDto {
653    #[serde(default, skip_serializing_if = "Vec::is_empty")]
654    pub tags: Vec<LocationTagsSchema>,
655}
656
657/// `LocationTaskListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
658#[derive(Debug, Clone, Default, Serialize, Deserialize)]
659pub struct LocationTaskListSuccessfulResponseDto {
660    #[serde(default, skip_serializing_if = "Vec::is_empty")]
661    pub tasks: Vec<Vec<serde_json::Value>>,
662}
663
664/// `MailgunSchema` from the GoHighLevel OpenAPI spec.
665#[derive(Debug, Clone, Default, Serialize, Deserialize)]
666pub struct MailgunSchema {
667    /// API key provided by Mailgun
668    /// Required by the API.
669    #[serde(rename = "apiKey")]
670    pub api_key: String,
671    /// Domain connected with Mailgun
672    /// Required by the API.
673    pub domain: String,
674}
675
676/// `ProspectInfoDto` from the GoHighLevel OpenAPI spec.
677#[derive(Debug, Clone, Default, Serialize, Deserialize)]
678pub struct ProspectInfoDto {
679    /// First name of the prospect
680    /// Required by the API.
681    #[serde(rename = "firstName")]
682    pub first_name: String,
683    /// Last name of the prospect
684    /// Required by the API.
685    #[serde(rename = "lastName")]
686    pub last_name: String,
687    /// Email of the prospect
688    /// Required by the API.
689    pub email: String,
690}
691
692/// `RecurringTaskCreateDTO` from the GoHighLevel OpenAPI spec.
693#[derive(Debug, Clone, Default, Serialize, Deserialize)]
694pub struct RecurringTaskCreateDTO {
695    /// Name of the task
696    /// Required by the API.
697    pub title: String,
698    /// Description of the task
699    #[serde(default, skip_serializing_if = "Option::is_none")]
700    pub description: Option<String>,
701    /// Contact Id
702    #[serde(rename = "contactIds", default, skip_serializing_if = "Vec::is_empty")]
703    pub contact_ids: Vec<String>,
704    /// Assigned To
705    #[serde(default, skip_serializing_if = "Vec::is_empty")]
706    pub owners: Vec<String>,
707    /// Recurring rules
708    /// Required by the API.
709    #[serde(rename = "rruleOptions")]
710    pub rrule_options: CustomRRulesOptions,
711    /// Create initial task or not
712    #[serde(
713        rename = "ignoreTaskCreation",
714        default,
715        skip_serializing_if = "Option::is_none"
716    )]
717    pub ignore_task_creation: Option<bool>,
718}
719
720/// `RecurringTaskResponseDTO` from the GoHighLevel OpenAPI spec.
721#[derive(Debug, Clone, Default, Serialize, Deserialize)]
722pub struct RecurringTaskResponseDTO {
723    /// Recurring Task Id
724    /// Required by the API.
725    pub id: String,
726    /// Name of the task
727    /// Required by the API.
728    pub title: String,
729    /// Description of the task
730    /// Required by the API.
731    pub description: String,
732    /// Location Id
733    /// Required by the API.
734    #[serde(rename = "locationId")]
735    pub location_id: String,
736    /// Updated At
737    /// Required by the API.
738    #[serde(rename = "updatedAt")]
739    pub updated_at: String,
740    /// Created At
741    /// Required by the API.
742    #[serde(rename = "createdAt")]
743    pub created_at: String,
744    /// Recurring rules
745    /// Required by the API.
746    #[serde(rename = "rruleOptions")]
747    pub rrule_options: CustomRRulesOptions,
748    /// Total Occurrence
749    /// Required by the API.
750    #[serde(rename = "totalOccurrence")]
751    pub total_occurrence: f64,
752    /// Deleted
753    /// Required by the API.
754    pub deleted: bool,
755    /// Assigned To
756    #[serde(
757        rename = "assignedTo",
758        default,
759        skip_serializing_if = "Option::is_none"
760    )]
761    pub assigned_to: Option<String>,
762    /// Contact Id
763    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
764    pub contact_id: Option<String>,
765}
766
767/// `RecurringTaskSingleResponseDTO` from the GoHighLevel OpenAPI spec.
768#[derive(Debug, Clone, Default, Serialize, Deserialize)]
769pub struct RecurringTaskSingleResponseDTO {
770    /// Recurring Tasks
771    /// Required by the API.
772    #[serde(rename = "recurringTask")]
773    pub recurring_task: RecurringTaskResponseDTO,
774}
775
776/// `RecurringTaskUpdateDTO` from the GoHighLevel OpenAPI spec.
777#[derive(Debug, Clone, Default, Serialize, Deserialize)]
778pub struct RecurringTaskUpdateDTO {
779    /// Name of the task
780    #[serde(default, skip_serializing_if = "Option::is_none")]
781    pub title: Option<String>,
782    /// Description of the task
783    #[serde(default, skip_serializing_if = "Option::is_none")]
784    pub description: Option<String>,
785    /// Contact Id
786    #[serde(rename = "contactIds", default, skip_serializing_if = "Vec::is_empty")]
787    pub contact_ids: Vec<String>,
788    /// Assigned To
789    #[serde(default, skip_serializing_if = "Vec::is_empty")]
790    pub owners: Vec<String>,
791    /// Recurring rules
792    #[serde(
793        rename = "rruleOptions",
794        default,
795        skip_serializing_if = "Option::is_none"
796    )]
797    pub rrule_options: Option<CustomRRulesOptions>,
798    /// Create initial task or not
799    #[serde(
800        rename = "ignoreTaskCreation",
801        default,
802        skip_serializing_if = "Option::is_none"
803    )]
804    pub ignore_task_creation: Option<bool>,
805}
806
807/// `SearchSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
808#[derive(Debug, Clone, Default, Serialize, Deserialize)]
809pub struct SearchSuccessfulResponseDto {
810    #[serde(default, skip_serializing_if = "Vec::is_empty")]
811    pub locations: Vec<GetLocationSchema>,
812}
813
814/// `SettingsSchema` from the GoHighLevel OpenAPI spec.
815#[derive(Debug, Clone, Default, Serialize, Deserialize)]
816pub struct SettingsSchema {
817    #[serde(
818        rename = "allowDuplicateContact",
819        default,
820        skip_serializing_if = "Option::is_none"
821    )]
822    pub allow_duplicate_contact: Option<bool>,
823    #[serde(
824        rename = "allowDuplicateOpportunity",
825        default,
826        skip_serializing_if = "Option::is_none"
827    )]
828    pub allow_duplicate_opportunity: Option<bool>,
829    #[serde(
830        rename = "allowFacebookNameMerge",
831        default,
832        skip_serializing_if = "Option::is_none"
833    )]
834    pub allow_facebook_name_merge: Option<bool>,
835    #[serde(
836        rename = "disableContactTimezone",
837        default,
838        skip_serializing_if = "Option::is_none"
839    )]
840    pub disable_contact_timezone: Option<bool>,
841}
842
843/// `SmsTemplateSchema` from the GoHighLevel OpenAPI spec.
844#[derive(Debug, Clone, Default, Serialize, Deserialize)]
845pub struct SmsTemplateSchema {
846    #[serde(default, skip_serializing_if = "Option::is_none")]
847    pub body: Option<String>,
848    #[serde(default, skip_serializing_if = "Vec::is_empty")]
849    pub attachments: Vec<Vec<serde_json::Value>>,
850}
851
852/// `SnapshotPutSchema` from the GoHighLevel OpenAPI spec.
853#[derive(Debug, Clone, Default, Serialize, Deserialize)]
854pub struct SnapshotPutSchema {
855    /// Snaptshot ID
856    /// Required by the API.
857    pub id: String,
858    /// If you want override all conflicted assets then pass true. Default value is false.
859    #[serde(rename = "override", default, skip_serializing_if = "Option::is_none")]
860    pub override_: Option<bool>,
861}
862
863/// `SocialSchema` from the GoHighLevel OpenAPI spec.
864#[derive(Debug, Clone, Default, Serialize, Deserialize)]
865pub struct SocialSchema {
866    /// Facebook URL
867    #[serde(
868        rename = "facebookUrl",
869        default,
870        skip_serializing_if = "Option::is_none"
871    )]
872    pub facebook_url: Option<String>,
873    /// Googleplus URL
874    #[serde(
875        rename = "googlePlus",
876        default,
877        skip_serializing_if = "Option::is_none"
878    )]
879    pub google_plus: Option<String>,
880    /// LinkedIn URL
881    #[serde(rename = "linkedIn", default, skip_serializing_if = "Option::is_none")]
882    pub linked_in: Option<String>,
883    /// Foursquare URL
884    #[serde(default, skip_serializing_if = "Option::is_none")]
885    pub foursquare: Option<String>,
886    /// Twitter URL
887    #[serde(default, skip_serializing_if = "Option::is_none")]
888    pub twitter: Option<String>,
889    /// Yelp URL
890    #[serde(default, skip_serializing_if = "Option::is_none")]
891    pub yelp: Option<String>,
892    /// Instagram URL
893    #[serde(default, skip_serializing_if = "Option::is_none")]
894    pub instagram: Option<String>,
895    /// Instagram URL
896    #[serde(default, skip_serializing_if = "Option::is_none")]
897    pub youtube: Option<String>,
898    /// Instagram URL
899    #[serde(default, skip_serializing_if = "Option::is_none")]
900    pub pinterest: Option<String>,
901    /// Instagram URL
902    #[serde(rename = "blogRss", default, skip_serializing_if = "Option::is_none")]
903    pub blog_rss: Option<String>,
904    /// Google Business Places ID
905    #[serde(
906        rename = "googlePlacesId",
907        default,
908        skip_serializing_if = "Option::is_none"
909    )]
910    pub google_places_id: Option<String>,
911}
912
913/// `TaskSearchParamsDto` from the GoHighLevel OpenAPI spec.
914#[derive(Debug, Clone, Default, Serialize, Deserialize)]
915pub struct TaskSearchParamsDto {
916    /// Contact Ids
917    #[serde(rename = "contactId", default, skip_serializing_if = "Vec::is_empty")]
918    pub contact_id: Vec<String>,
919    /// Task Completed Or Pending
920    #[serde(default, skip_serializing_if = "Option::is_none")]
921    pub completed: Option<bool>,
922    /// Assigned User Ids
923    #[serde(rename = "assignedTo", default, skip_serializing_if = "Vec::is_empty")]
924    pub assigned_to: Vec<String>,
925    /// Search Value
926    #[serde(default, skip_serializing_if = "Option::is_none")]
927    pub query: Option<String>,
928    /// Limit To Api
929    #[serde(default, skip_serializing_if = "Option::is_none")]
930    pub limit: Option<f64>,
931    /// Number Of Tasks To Skip
932    #[serde(default, skip_serializing_if = "Option::is_none")]
933    pub skip: Option<f64>,
934    /// Bussiness Id
935    #[serde(
936        rename = "businessId",
937        default,
938        skip_serializing_if = "Option::is_none"
939    )]
940    pub business_id: Option<String>,
941}
942
943/// `TwilioSchema` from the GoHighLevel OpenAPI spec.
944#[derive(Debug, Clone, Default, Serialize, Deserialize)]
945pub struct TwilioSchema {
946    /// SID provided by Twilio
947    /// Required by the API.
948    pub sid: String,
949    /// Auth token provided by Twilio
950    /// Required by the API.
951    #[serde(rename = "authToken")]
952    pub auth_token: String,
953}
954
955/// `UpdateCustomFieldsDTO` from the GoHighLevel OpenAPI spec.
956#[derive(Debug, Clone, Default, Serialize, Deserialize)]
957pub struct UpdateCustomFieldsDTO {
958    /// Required by the API.
959    pub name: String,
960    #[serde(default, skip_serializing_if = "Option::is_none")]
961    pub placeholder: Option<String>,
962    #[serde(
963        rename = "acceptedFormat",
964        default,
965        skip_serializing_if = "Vec::is_empty"
966    )]
967    pub accepted_format: Vec<String>,
968    #[serde(
969        rename = "isMultipleFile",
970        default,
971        skip_serializing_if = "Option::is_none"
972    )]
973    pub is_multiple_file: Option<bool>,
974    #[serde(
975        rename = "maxNumberOfFiles",
976        default,
977        skip_serializing_if = "Option::is_none"
978    )]
979    pub max_number_of_files: Option<f64>,
980    /// Multiple possible shapes in the spec; raw JSON.
981    #[serde(
982        rename = "textBoxListOptions",
983        default,
984        skip_serializing_if = "Vec::is_empty"
985    )]
986    pub text_box_list_options: Vec<serde_json::Value>,
987    #[serde(default, skip_serializing_if = "Option::is_none")]
988    pub position: Option<f64>,
989    /// Model of the custom field you want to update
990    /// Allowed values: `contact`, `opportunity`.
991    #[serde(default, skip_serializing_if = "Option::is_none")]
992    pub model: Option<String>,
993}
994
995/// `UpdateLocationDto` from the GoHighLevel OpenAPI spec.
996#[derive(Debug, Clone, Default, Serialize, Deserialize)]
997pub struct UpdateLocationDto {
998    /// The name for the sub-account/location
999    #[serde(default, skip_serializing_if = "Option::is_none")]
1000    pub name: Option<String>,
1001    /// The phone number of the business for which sub-account is created
1002    #[serde(default, skip_serializing_if = "Option::is_none")]
1003    pub phone: Option<String>,
1004    /// Company/Agency Id
1005    /// Required by the API.
1006    #[serde(rename = "companyId")]
1007    pub company_id: String,
1008    /// The address of the business for which sub-account is created
1009    #[serde(default, skip_serializing_if = "Option::is_none")]
1010    pub address: Option<String>,
1011    /// The city where the business is located for which sub-account is created
1012    #[serde(default, skip_serializing_if = "Option::is_none")]
1013    pub city: Option<String>,
1014    /// The state in which the business operates for which sub-account is created
1015    #[serde(default, skip_serializing_if = "Option::is_none")]
1016    pub state: Option<String>,
1017    /// The country in which the business is present for which sub-account is created
1018    /// Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`.
1019    #[serde(default, skip_serializing_if = "Option::is_none")]
1020    pub country: Option<String>,
1021    /// The postal code of the business for which sub-account is created
1022    #[serde(
1023        rename = "postalCode",
1024        default,
1025        skip_serializing_if = "Option::is_none"
1026    )]
1027    pub postal_code: Option<String>,
1028    /// The website of the business for which sub-account is created
1029    #[serde(default, skip_serializing_if = "Option::is_none")]
1030    pub website: Option<String>,
1031    /// The timezone of the business for which sub-account is created
1032    #[serde(default, skip_serializing_if = "Option::is_none")]
1033    pub timezone: Option<String>,
1034    #[serde(
1035        rename = "prospectInfo",
1036        default,
1037        skip_serializing_if = "Option::is_none"
1038    )]
1039    pub prospect_info: Option<ProspectInfoDto>,
1040    /// The default settings for location
1041    #[serde(default, skip_serializing_if = "Option::is_none")]
1042    pub settings: Option<SettingsSchema>,
1043    /// The social media links for location
1044    #[serde(default, skip_serializing_if = "Option::is_none")]
1045    pub social: Option<SocialSchema>,
1046    /// The twilio credentials for location
1047    #[serde(default, skip_serializing_if = "Option::is_none")]
1048    pub twilio: Option<TwilioSchema>,
1049    /// The mailgun credentials for location
1050    #[serde(default, skip_serializing_if = "Option::is_none")]
1051    pub mailgun: Option<MailgunSchema>,
1052    /// The snapshot to be updated in the location.
1053    #[serde(default, skip_serializing_if = "Option::is_none")]
1054    pub snapshot: Option<SnapshotPutSchema>,
1055}
1056
1057/// `customValuesDTO` from the GoHighLevel OpenAPI spec.
1058#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1059pub struct CustomValuesDTO {
1060    /// Required by the API.
1061    pub name: String,
1062    /// Required by the API.
1063    pub value: String,
1064}
1065
1066/// `tagBody` from the GoHighLevel OpenAPI spec.
1067#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1068pub struct TagBody {
1069    /// Tag name
1070    /// Required by the API.
1071    pub name: String,
1072}
1073
1074/// `textBoxListOptionsSchema` from the GoHighLevel OpenAPI spec.
1075#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1076pub struct TextBoxListOptionsSchema {
1077    #[serde(default, skip_serializing_if = "Option::is_none")]
1078    pub label: Option<String>,
1079    #[serde(
1080        rename = "prefillValue",
1081        default,
1082        skip_serializing_if = "Option::is_none"
1083    )]
1084    pub prefill_value: Option<String>,
1085}