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    /// (Optional here so responses that omit it still parse.)
305    #[serde(
306        rename = "intervalType",
307        default,
308        skip_serializing_if = "Option::is_none"
309    )]
310    pub interval_type: Option<String>,
311    /// Required by the API.
312    /// (Optional here so responses that omit it still parse.)
313    #[serde(default, skip_serializing_if = "Option::is_none")]
314    pub interval: Option<f64>,
315    /// Start Date
316    /// Required by the API.
317    /// (Optional here so responses that omit it still parse.)
318    #[serde(rename = "startDate", default, skip_serializing_if = "Option::is_none")]
319    pub start_date: Option<String>,
320    /// End Date
321    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
322    pub end_date: Option<String>,
323    /// 1, 2, 3, ..., 27, 31
324    #[serde(
325        rename = "dayOfMonth",
326        default,
327        skip_serializing_if = "Option::is_none"
328    )]
329    pub day_of_month: Option<f64>,
330    /// Allowed values: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`.
331    #[serde(rename = "dayOfWeek", default, skip_serializing_if = "Option::is_none")]
332    pub day_of_week: Option<String>,
333    /// 1, 2, ....., 11, 12
334    #[serde(
335        rename = "monthOfYear",
336        default,
337        skip_serializing_if = "Option::is_none"
338    )]
339    pub month_of_year: Option<f64>,
340    /// Max number of task executions
341    #[serde(default, skip_serializing_if = "Option::is_none")]
342    pub count: Option<f64>,
343    /// Create Task If Over Due
344    #[serde(
345        rename = "createTaskIfOverDue",
346        default,
347        skip_serializing_if = "Option::is_none"
348    )]
349    pub create_task_if_over_due: Option<bool>,
350    /// Due after seconds
351    /// Required by the API.
352    /// (Optional here so responses that omit it still parse.)
353    #[serde(
354        rename = "dueAfterSeconds",
355        default,
356        skip_serializing_if = "Option::is_none"
357    )]
358    pub due_after_seconds: Option<f64>,
359}
360
361/// `CustomValueDeleteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
362#[derive(Debug, Clone, Default, Serialize, Deserialize)]
363pub struct CustomValueDeleteSuccessfulResponseDto {
364    #[serde(default, skip_serializing_if = "Option::is_none")]
365    pub succeded: Option<bool>,
366}
367
368/// `CustomValueIdSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
369#[derive(Debug, Clone, Default, Serialize, Deserialize)]
370pub struct CustomValueIdSuccessfulResponseDto {
371    #[serde(
372        rename = "customValue",
373        default,
374        skip_serializing_if = "Option::is_none"
375    )]
376    pub custom_value: Option<CustomValueSchema>,
377}
378
379/// `CustomValueSchema` from the GoHighLevel OpenAPI spec.
380#[derive(Debug, Clone, Default, Serialize, Deserialize)]
381pub struct CustomValueSchema {
382    #[serde(default, skip_serializing_if = "Option::is_none")]
383    pub id: Option<String>,
384    #[serde(default, skip_serializing_if = "Option::is_none")]
385    pub name: Option<String>,
386    #[serde(rename = "fieldKey", default, skip_serializing_if = "Option::is_none")]
387    pub field_key: Option<String>,
388    #[serde(default, skip_serializing_if = "Option::is_none")]
389    pub value: Option<String>,
390    #[serde(
391        rename = "locationId",
392        default,
393        skip_serializing_if = "Option::is_none"
394    )]
395    pub location_id: Option<String>,
396}
397
398/// `CustomValuesListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
399#[derive(Debug, Clone, Default, Serialize, Deserialize)]
400pub struct CustomValuesListSuccessfulResponseDto {
401    #[serde(
402        rename = "customValues",
403        default,
404        skip_serializing_if = "Vec::is_empty"
405    )]
406    pub custom_values: Vec<CustomValueSchema>,
407}
408
409/// `DeleteRecurringTaskResponseDTO` from the GoHighLevel OpenAPI spec.
410#[derive(Debug, Clone, Default, Serialize, Deserialize)]
411pub struct DeleteRecurringTaskResponseDTO {
412    /// Recurring Task Id
413    /// Required by the API.
414    /// (Optional here so responses that omit it still parse.)
415    #[serde(default, skip_serializing_if = "Option::is_none")]
416    pub id: Option<String>,
417    /// Success
418    /// Required by the API.
419    /// (Optional here so responses that omit it still parse.)
420    #[serde(default, skip_serializing_if = "Option::is_none")]
421    pub success: Option<bool>,
422}
423
424/// `EmailTemplateSchema` from the GoHighLevel OpenAPI spec.
425#[derive(Debug, Clone, Default, Serialize, Deserialize)]
426pub struct EmailTemplateSchema {
427    #[serde(default, skip_serializing_if = "Option::is_none")]
428    pub subject: Option<String>,
429    #[serde(default, skip_serializing_if = "Vec::is_empty")]
430    pub attachments: Vec<Vec<serde_json::Value>>,
431    #[serde(default, skip_serializing_if = "Option::is_none")]
432    pub html: Option<String>,
433}
434
435/// `FileUploadBody` from the GoHighLevel OpenAPI spec.
436#[derive(Debug, Clone, Default, Serialize, Deserialize)]
437pub struct FileUploadBody {
438    /// Id(Contact Id/Opportunity Id/Custom Field Id)
439    #[serde(default, skip_serializing_if = "Option::is_none")]
440    pub id: Option<String>,
441    /// Max number of files
442    #[serde(rename = "maxFiles", default, skip_serializing_if = "Option::is_none")]
443    pub max_files: Option<String>,
444}
445
446/// `FileUploadResponseDto` from the GoHighLevel OpenAPI spec.
447#[derive(Debug, Clone, Default, Serialize, Deserialize)]
448pub struct FileUploadResponseDto {
449    /// Uploaded files
450    #[serde(
451        rename = "uploadedFiles",
452        default,
453        skip_serializing_if = "Option::is_none"
454    )]
455    pub uploaded_files: Option<serde_json::Value>,
456    /// Meta data of uploaded files
457    #[serde(default, skip_serializing_if = "Vec::is_empty")]
458    pub meta: Vec<String>,
459}
460
461/// `GetEmailTemplateResponseSchema` from the GoHighLevel OpenAPI spec.
462#[derive(Debug, Clone, Default, Serialize, Deserialize)]
463pub struct GetEmailTemplateResponseSchema {
464    #[serde(default, skip_serializing_if = "Option::is_none")]
465    pub id: Option<String>,
466    #[serde(default, skip_serializing_if = "Option::is_none")]
467    pub name: Option<String>,
468    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
469    pub type_: Option<String>,
470    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
471    pub date_added: Option<String>,
472    #[serde(default, skip_serializing_if = "Option::is_none")]
473    pub template: Option<EmailTemplateSchema>,
474    #[serde(
475        rename = "locationId",
476        default,
477        skip_serializing_if = "Option::is_none"
478    )]
479    pub location_id: Option<String>,
480}
481
482/// `GetLocationByIdSchema` from the GoHighLevel OpenAPI spec.
483#[derive(Debug, Clone, Default, Serialize, Deserialize)]
484pub struct GetLocationByIdSchema {
485    #[serde(default, skip_serializing_if = "Option::is_none")]
486    pub id: Option<String>,
487    #[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
488    pub company_id: Option<String>,
489    #[serde(default, skip_serializing_if = "Option::is_none")]
490    pub name: Option<String>,
491    #[serde(default, skip_serializing_if = "Option::is_none")]
492    pub domain: Option<String>,
493    #[serde(default, skip_serializing_if = "Option::is_none")]
494    pub address: Option<String>,
495    #[serde(default, skip_serializing_if = "Option::is_none")]
496    pub city: Option<String>,
497    #[serde(default, skip_serializing_if = "Option::is_none")]
498    pub state: Option<String>,
499    #[serde(rename = "logoUrl", default, skip_serializing_if = "Option::is_none")]
500    pub logo_url: Option<String>,
501    #[serde(default, skip_serializing_if = "Option::is_none")]
502    pub country: Option<String>,
503    #[serde(
504        rename = "postalCode",
505        default,
506        skip_serializing_if = "Option::is_none"
507    )]
508    pub postal_code: Option<String>,
509    #[serde(default, skip_serializing_if = "Option::is_none")]
510    pub website: Option<String>,
511    #[serde(default, skip_serializing_if = "Option::is_none")]
512    pub timezone: Option<String>,
513    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
514    pub first_name: Option<String>,
515    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
516    pub last_name: Option<String>,
517    #[serde(default, skip_serializing_if = "Option::is_none")]
518    pub email: Option<String>,
519    #[serde(default, skip_serializing_if = "Option::is_none")]
520    pub phone: Option<String>,
521    #[serde(default, skip_serializing_if = "Option::is_none")]
522    pub business: Option<BusinessSchema>,
523    #[serde(default, skip_serializing_if = "Option::is_none")]
524    pub social: Option<SocialSchema>,
525    #[serde(default, skip_serializing_if = "Option::is_none")]
526    pub settings: Option<SettingsSchema>,
527    #[serde(default, skip_serializing_if = "Option::is_none")]
528    pub reseller: Option<serde_json::Value>,
529}
530
531/// `GetLocationByIdSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
532#[derive(Debug, Clone, Default, Serialize, Deserialize)]
533pub struct GetLocationByIdSuccessfulResponseDto {
534    #[serde(default, skip_serializing_if = "Option::is_none")]
535    pub location: Option<GetLocationByIdSchema>,
536}
537
538/// `GetLocationSchema` from the GoHighLevel OpenAPI spec.
539#[derive(Debug, Clone, Default, Serialize, Deserialize)]
540pub struct GetLocationSchema {
541    /// Location Id
542    #[serde(default, skip_serializing_if = "Option::is_none")]
543    pub id: Option<String>,
544    /// The name for the sub-account/location
545    #[serde(default, skip_serializing_if = "Option::is_none")]
546    pub name: Option<String>,
547    /// The phone number of the business for which sub-account is created
548    #[serde(default, skip_serializing_if = "Option::is_none")]
549    pub phone: Option<String>,
550    /// The email for the sub-account/location
551    #[serde(default, skip_serializing_if = "Option::is_none")]
552    pub email: Option<String>,
553    /// The address of the business for which sub-account is created
554    #[serde(default, skip_serializing_if = "Option::is_none")]
555    pub address: Option<String>,
556    /// The city where the business is located for which sub-account is created
557    #[serde(default, skip_serializing_if = "Option::is_none")]
558    pub city: Option<String>,
559    /// The state in which the business operates for which sub-account is created
560    #[serde(default, skip_serializing_if = "Option::is_none")]
561    pub state: Option<String>,
562    /// The country in which the business is present for which sub-account is created
563    #[serde(default, skip_serializing_if = "Option::is_none")]
564    pub country: Option<String>,
565    /// The postal code of the business for which sub-account is created
566    #[serde(
567        rename = "postalCode",
568        default,
569        skip_serializing_if = "Option::is_none"
570    )]
571    pub postal_code: Option<String>,
572    /// The website of the business for which sub-account is created
573    #[serde(default, skip_serializing_if = "Option::is_none")]
574    pub website: Option<String>,
575    /// The timezone of the business for which sub-account is created
576    #[serde(default, skip_serializing_if = "Option::is_none")]
577    pub timezone: Option<String>,
578    /// The default settings for location
579    #[serde(default, skip_serializing_if = "Option::is_none")]
580    pub settings: Option<SettingsSchema>,
581    /// The social media links for location
582    #[serde(default, skip_serializing_if = "Option::is_none")]
583    pub social: Option<SocialSchema>,
584}
585
586/// `GetSmsTemplateResponseSchema` from the GoHighLevel OpenAPI spec.
587#[derive(Debug, Clone, Default, Serialize, Deserialize)]
588pub struct GetSmsTemplateResponseSchema {
589    #[serde(default, skip_serializing_if = "Option::is_none")]
590    pub id: Option<String>,
591    #[serde(default, skip_serializing_if = "Option::is_none")]
592    pub name: Option<String>,
593    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
594    pub type_: Option<String>,
595    #[serde(default, skip_serializing_if = "Option::is_none")]
596    pub template: Option<SmsTemplateSchema>,
597    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
598    pub date_added: Option<String>,
599    #[serde(
600        rename = "locationId",
601        default,
602        skip_serializing_if = "Option::is_none"
603    )]
604    pub location_id: Option<String>,
605    #[serde(
606        rename = "urlAttachments",
607        default,
608        skip_serializing_if = "Vec::is_empty"
609    )]
610    pub url_attachments: Vec<String>,
611}
612
613/// `GetTemplatesSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
614#[derive(Debug, Clone, Default, Serialize, Deserialize)]
615pub struct GetTemplatesSuccessfulResponseDto {
616    /// Multiple possible shapes in the spec; raw JSON.
617    #[serde(default, skip_serializing_if = "Vec::is_empty")]
618    pub templates: Vec<serde_json::Value>,
619    #[serde(
620        rename = "totalCount",
621        default,
622        skip_serializing_if = "Option::is_none"
623    )]
624    pub total_count: Option<f64>,
625}
626
627/// `LocationDeletedSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
628#[derive(Debug, Clone, Default, Serialize, Deserialize)]
629pub struct LocationDeletedSuccessfulResponseDto {
630    /// Success status of the API
631    /// Required by the API.
632    /// (Optional here so responses that omit it still parse.)
633    #[serde(default, skip_serializing_if = "Option::is_none")]
634    pub success: Option<bool>,
635    /// Success message of the API
636    /// Required by the API.
637    /// (Optional here so responses that omit it still parse.)
638    #[serde(default, skip_serializing_if = "Option::is_none")]
639    pub message: Option<String>,
640}
641
642/// `LocationTagDeleteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
643#[derive(Debug, Clone, Default, Serialize, Deserialize)]
644pub struct LocationTagDeleteSuccessfulResponseDto {
645    #[serde(default, skip_serializing_if = "Option::is_none")]
646    pub succeded: Option<bool>,
647}
648
649/// `LocationTagSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
650#[derive(Debug, Clone, Default, Serialize, Deserialize)]
651pub struct LocationTagSuccessfulResponseDto {
652    #[serde(default, skip_serializing_if = "Option::is_none")]
653    pub tag: Option<LocationTagsSchema>,
654}
655
656/// `LocationTagsSchema` from the GoHighLevel OpenAPI spec.
657#[derive(Debug, Clone, Default, Serialize, Deserialize)]
658pub struct LocationTagsSchema {
659    #[serde(default, skip_serializing_if = "Option::is_none")]
660    pub name: Option<String>,
661    #[serde(
662        rename = "locationId",
663        default,
664        skip_serializing_if = "Option::is_none"
665    )]
666    pub location_id: Option<String>,
667    #[serde(default, skip_serializing_if = "Option::is_none")]
668    pub id: Option<String>,
669}
670
671/// `LocationTagsSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
672#[derive(Debug, Clone, Default, Serialize, Deserialize)]
673pub struct LocationTagsSuccessfulResponseDto {
674    #[serde(default, skip_serializing_if = "Vec::is_empty")]
675    pub tags: Vec<LocationTagsSchema>,
676}
677
678/// `LocationTaskListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
679#[derive(Debug, Clone, Default, Serialize, Deserialize)]
680pub struct LocationTaskListSuccessfulResponseDto {
681    #[serde(default, skip_serializing_if = "Vec::is_empty")]
682    pub tasks: Vec<Vec<serde_json::Value>>,
683}
684
685/// `MailgunSchema` from the GoHighLevel OpenAPI spec.
686#[derive(Debug, Clone, Default, Serialize, Deserialize)]
687pub struct MailgunSchema {
688    /// API key provided by Mailgun
689    /// Required by the API.
690    #[serde(rename = "apiKey")]
691    pub api_key: String,
692    /// Domain connected with Mailgun
693    /// Required by the API.
694    pub domain: String,
695}
696
697/// `ProspectInfoDto` from the GoHighLevel OpenAPI spec.
698#[derive(Debug, Clone, Default, Serialize, Deserialize)]
699pub struct ProspectInfoDto {
700    /// First name of the prospect
701    /// Required by the API.
702    #[serde(rename = "firstName")]
703    pub first_name: String,
704    /// Last name of the prospect
705    /// Required by the API.
706    #[serde(rename = "lastName")]
707    pub last_name: String,
708    /// Email of the prospect
709    /// Required by the API.
710    pub email: String,
711}
712
713/// `RecurringTaskCreateDTO` from the GoHighLevel OpenAPI spec.
714#[derive(Debug, Clone, Default, Serialize, Deserialize)]
715pub struct RecurringTaskCreateDTO {
716    /// Name of the task
717    /// Required by the API.
718    pub title: String,
719    /// Description of the task
720    #[serde(default, skip_serializing_if = "Option::is_none")]
721    pub description: Option<String>,
722    /// Contact Id
723    #[serde(rename = "contactIds", default, skip_serializing_if = "Vec::is_empty")]
724    pub contact_ids: Vec<String>,
725    /// Assigned To
726    #[serde(default, skip_serializing_if = "Vec::is_empty")]
727    pub owners: Vec<String>,
728    /// Recurring rules
729    /// Required by the API.
730    #[serde(rename = "rruleOptions")]
731    pub rrule_options: CustomRRulesOptions,
732    /// Create initial task or not
733    #[serde(
734        rename = "ignoreTaskCreation",
735        default,
736        skip_serializing_if = "Option::is_none"
737    )]
738    pub ignore_task_creation: Option<bool>,
739}
740
741/// `RecurringTaskResponseDTO` from the GoHighLevel OpenAPI spec.
742#[derive(Debug, Clone, Default, Serialize, Deserialize)]
743pub struct RecurringTaskResponseDTO {
744    /// Recurring Task Id
745    /// Required by the API.
746    /// (Optional here so responses that omit it still parse.)
747    #[serde(default, skip_serializing_if = "Option::is_none")]
748    pub id: Option<String>,
749    /// Name of the task
750    /// Required by the API.
751    /// (Optional here so responses that omit it still parse.)
752    #[serde(default, skip_serializing_if = "Option::is_none")]
753    pub title: Option<String>,
754    /// Description of the task
755    /// Required by the API.
756    /// (Optional here so responses that omit it still parse.)
757    #[serde(default, skip_serializing_if = "Option::is_none")]
758    pub description: Option<String>,
759    /// Location Id
760    /// Required by the API.
761    /// (Optional here so responses that omit it still parse.)
762    #[serde(
763        rename = "locationId",
764        default,
765        skip_serializing_if = "Option::is_none"
766    )]
767    pub location_id: Option<String>,
768    /// Updated At
769    /// Required by the API.
770    /// (Optional here so responses that omit it still parse.)
771    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
772    pub updated_at: Option<String>,
773    /// Created At
774    /// Required by the API.
775    /// (Optional here so responses that omit it still parse.)
776    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
777    pub created_at: Option<String>,
778    /// Recurring rules
779    /// Required by the API.
780    /// (Optional here so responses that omit it still parse.)
781    #[serde(
782        rename = "rruleOptions",
783        default,
784        skip_serializing_if = "Option::is_none"
785    )]
786    pub rrule_options: Option<CustomRRulesOptions>,
787    /// Total Occurrence
788    /// Required by the API.
789    /// (Optional here so responses that omit it still parse.)
790    #[serde(
791        rename = "totalOccurrence",
792        default,
793        skip_serializing_if = "Option::is_none"
794    )]
795    pub total_occurrence: Option<f64>,
796    /// Deleted
797    /// Required by the API.
798    /// (Optional here so responses that omit it still parse.)
799    #[serde(default, skip_serializing_if = "Option::is_none")]
800    pub deleted: Option<bool>,
801    /// Assigned To
802    #[serde(
803        rename = "assignedTo",
804        default,
805        skip_serializing_if = "Option::is_none"
806    )]
807    pub assigned_to: Option<String>,
808    /// Contact Id
809    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
810    pub contact_id: Option<String>,
811}
812
813/// `RecurringTaskSingleResponseDTO` from the GoHighLevel OpenAPI spec.
814#[derive(Debug, Clone, Default, Serialize, Deserialize)]
815pub struct RecurringTaskSingleResponseDTO {
816    /// Recurring Tasks
817    /// Required by the API.
818    /// (Optional here so responses that omit it still parse.)
819    #[serde(
820        rename = "recurringTask",
821        default,
822        skip_serializing_if = "Option::is_none"
823    )]
824    pub recurring_task: Option<RecurringTaskResponseDTO>,
825}
826
827/// `RecurringTaskUpdateDTO` from the GoHighLevel OpenAPI spec.
828#[derive(Debug, Clone, Default, Serialize, Deserialize)]
829pub struct RecurringTaskUpdateDTO {
830    /// Name of the task
831    #[serde(default, skip_serializing_if = "Option::is_none")]
832    pub title: Option<String>,
833    /// Description of the task
834    #[serde(default, skip_serializing_if = "Option::is_none")]
835    pub description: Option<String>,
836    /// Contact Id
837    #[serde(rename = "contactIds", default, skip_serializing_if = "Vec::is_empty")]
838    pub contact_ids: Vec<String>,
839    /// Assigned To
840    #[serde(default, skip_serializing_if = "Vec::is_empty")]
841    pub owners: Vec<String>,
842    /// Recurring rules
843    #[serde(
844        rename = "rruleOptions",
845        default,
846        skip_serializing_if = "Option::is_none"
847    )]
848    pub rrule_options: Option<CustomRRulesOptions>,
849    /// Create initial task or not
850    #[serde(
851        rename = "ignoreTaskCreation",
852        default,
853        skip_serializing_if = "Option::is_none"
854    )]
855    pub ignore_task_creation: Option<bool>,
856}
857
858/// `SearchSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
859#[derive(Debug, Clone, Default, Serialize, Deserialize)]
860pub struct SearchSuccessfulResponseDto {
861    #[serde(default, skip_serializing_if = "Vec::is_empty")]
862    pub locations: Vec<GetLocationSchema>,
863}
864
865/// `SettingsSchema` from the GoHighLevel OpenAPI spec.
866#[derive(Debug, Clone, Default, Serialize, Deserialize)]
867pub struct SettingsSchema {
868    #[serde(
869        rename = "allowDuplicateContact",
870        default,
871        skip_serializing_if = "Option::is_none"
872    )]
873    pub allow_duplicate_contact: Option<bool>,
874    #[serde(
875        rename = "allowDuplicateOpportunity",
876        default,
877        skip_serializing_if = "Option::is_none"
878    )]
879    pub allow_duplicate_opportunity: Option<bool>,
880    #[serde(
881        rename = "allowFacebookNameMerge",
882        default,
883        skip_serializing_if = "Option::is_none"
884    )]
885    pub allow_facebook_name_merge: Option<bool>,
886    #[serde(
887        rename = "disableContactTimezone",
888        default,
889        skip_serializing_if = "Option::is_none"
890    )]
891    pub disable_contact_timezone: Option<bool>,
892}
893
894/// `SmsTemplateSchema` from the GoHighLevel OpenAPI spec.
895#[derive(Debug, Clone, Default, Serialize, Deserialize)]
896pub struct SmsTemplateSchema {
897    #[serde(default, skip_serializing_if = "Option::is_none")]
898    pub body: Option<String>,
899    #[serde(default, skip_serializing_if = "Vec::is_empty")]
900    pub attachments: Vec<Vec<serde_json::Value>>,
901}
902
903/// `SnapshotPutSchema` from the GoHighLevel OpenAPI spec.
904#[derive(Debug, Clone, Default, Serialize, Deserialize)]
905pub struct SnapshotPutSchema {
906    /// Snaptshot ID
907    /// Required by the API.
908    pub id: String,
909    /// If you want override all conflicted assets then pass true. Default value is false.
910    #[serde(rename = "override", default, skip_serializing_if = "Option::is_none")]
911    pub override_: Option<bool>,
912}
913
914/// `SocialSchema` from the GoHighLevel OpenAPI spec.
915#[derive(Debug, Clone, Default, Serialize, Deserialize)]
916pub struct SocialSchema {
917    /// Facebook URL
918    #[serde(
919        rename = "facebookUrl",
920        default,
921        skip_serializing_if = "Option::is_none"
922    )]
923    pub facebook_url: Option<String>,
924    /// Googleplus URL
925    #[serde(
926        rename = "googlePlus",
927        default,
928        skip_serializing_if = "Option::is_none"
929    )]
930    pub google_plus: Option<String>,
931    /// LinkedIn URL
932    #[serde(rename = "linkedIn", default, skip_serializing_if = "Option::is_none")]
933    pub linked_in: Option<String>,
934    /// Foursquare URL
935    #[serde(default, skip_serializing_if = "Option::is_none")]
936    pub foursquare: Option<String>,
937    /// Twitter URL
938    #[serde(default, skip_serializing_if = "Option::is_none")]
939    pub twitter: Option<String>,
940    /// Yelp URL
941    #[serde(default, skip_serializing_if = "Option::is_none")]
942    pub yelp: Option<String>,
943    /// Instagram URL
944    #[serde(default, skip_serializing_if = "Option::is_none")]
945    pub instagram: Option<String>,
946    /// Instagram URL
947    #[serde(default, skip_serializing_if = "Option::is_none")]
948    pub youtube: Option<String>,
949    /// Instagram URL
950    #[serde(default, skip_serializing_if = "Option::is_none")]
951    pub pinterest: Option<String>,
952    /// Instagram URL
953    #[serde(rename = "blogRss", default, skip_serializing_if = "Option::is_none")]
954    pub blog_rss: Option<String>,
955    /// Google Business Places ID
956    #[serde(
957        rename = "googlePlacesId",
958        default,
959        skip_serializing_if = "Option::is_none"
960    )]
961    pub google_places_id: Option<String>,
962}
963
964/// `TaskSearchParamsDto` from the GoHighLevel OpenAPI spec.
965#[derive(Debug, Clone, Default, Serialize, Deserialize)]
966pub struct TaskSearchParamsDto {
967    /// Contact Ids
968    #[serde(rename = "contactId", default, skip_serializing_if = "Vec::is_empty")]
969    pub contact_id: Vec<String>,
970    /// Task Completed Or Pending
971    #[serde(default, skip_serializing_if = "Option::is_none")]
972    pub completed: Option<bool>,
973    /// Assigned User Ids
974    #[serde(rename = "assignedTo", default, skip_serializing_if = "Vec::is_empty")]
975    pub assigned_to: Vec<String>,
976    /// Search Value
977    #[serde(default, skip_serializing_if = "Option::is_none")]
978    pub query: Option<String>,
979    /// Limit To Api
980    #[serde(default, skip_serializing_if = "Option::is_none")]
981    pub limit: Option<f64>,
982    /// Number Of Tasks To Skip
983    #[serde(default, skip_serializing_if = "Option::is_none")]
984    pub skip: Option<f64>,
985    /// Bussiness Id
986    #[serde(
987        rename = "businessId",
988        default,
989        skip_serializing_if = "Option::is_none"
990    )]
991    pub business_id: Option<String>,
992}
993
994/// `TwilioSchema` from the GoHighLevel OpenAPI spec.
995#[derive(Debug, Clone, Default, Serialize, Deserialize)]
996pub struct TwilioSchema {
997    /// SID provided by Twilio
998    /// Required by the API.
999    pub sid: String,
1000    /// Auth token provided by Twilio
1001    /// Required by the API.
1002    #[serde(rename = "authToken")]
1003    pub auth_token: String,
1004}
1005
1006/// `UpdateCustomFieldsDTO` from the GoHighLevel OpenAPI spec.
1007#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1008pub struct UpdateCustomFieldsDTO {
1009    /// Required by the API.
1010    pub name: String,
1011    #[serde(default, skip_serializing_if = "Option::is_none")]
1012    pub placeholder: Option<String>,
1013    #[serde(
1014        rename = "acceptedFormat",
1015        default,
1016        skip_serializing_if = "Vec::is_empty"
1017    )]
1018    pub accepted_format: Vec<String>,
1019    #[serde(
1020        rename = "isMultipleFile",
1021        default,
1022        skip_serializing_if = "Option::is_none"
1023    )]
1024    pub is_multiple_file: Option<bool>,
1025    #[serde(
1026        rename = "maxNumberOfFiles",
1027        default,
1028        skip_serializing_if = "Option::is_none"
1029    )]
1030    pub max_number_of_files: Option<f64>,
1031    /// Multiple possible shapes in the spec; raw JSON.
1032    #[serde(
1033        rename = "textBoxListOptions",
1034        default,
1035        skip_serializing_if = "Vec::is_empty"
1036    )]
1037    pub text_box_list_options: Vec<serde_json::Value>,
1038    #[serde(default, skip_serializing_if = "Option::is_none")]
1039    pub position: Option<f64>,
1040    /// Model of the custom field you want to update
1041    /// Allowed values: `contact`, `opportunity`.
1042    #[serde(default, skip_serializing_if = "Option::is_none")]
1043    pub model: Option<String>,
1044}
1045
1046/// `UpdateLocationDto` from the GoHighLevel OpenAPI spec.
1047#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1048pub struct UpdateLocationDto {
1049    /// The name for the sub-account/location
1050    #[serde(default, skip_serializing_if = "Option::is_none")]
1051    pub name: Option<String>,
1052    /// The phone number of the business for which sub-account is created
1053    #[serde(default, skip_serializing_if = "Option::is_none")]
1054    pub phone: Option<String>,
1055    /// Company/Agency Id
1056    /// Required by the API.
1057    #[serde(rename = "companyId")]
1058    pub company_id: String,
1059    /// The address of the business for which sub-account is created
1060    #[serde(default, skip_serializing_if = "Option::is_none")]
1061    pub address: Option<String>,
1062    /// The city where the business is located for which sub-account is created
1063    #[serde(default, skip_serializing_if = "Option::is_none")]
1064    pub city: Option<String>,
1065    /// The state in which the business operates for which sub-account is created
1066    #[serde(default, skip_serializing_if = "Option::is_none")]
1067    pub state: Option<String>,
1068    /// The country in which the business is present for which sub-account is created
1069    /// Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`.
1070    #[serde(default, skip_serializing_if = "Option::is_none")]
1071    pub country: Option<String>,
1072    /// The postal code of the business for which sub-account is created
1073    #[serde(
1074        rename = "postalCode",
1075        default,
1076        skip_serializing_if = "Option::is_none"
1077    )]
1078    pub postal_code: Option<String>,
1079    /// The website of the business for which sub-account is created
1080    #[serde(default, skip_serializing_if = "Option::is_none")]
1081    pub website: Option<String>,
1082    /// The timezone of the business for which sub-account is created
1083    #[serde(default, skip_serializing_if = "Option::is_none")]
1084    pub timezone: Option<String>,
1085    #[serde(
1086        rename = "prospectInfo",
1087        default,
1088        skip_serializing_if = "Option::is_none"
1089    )]
1090    pub prospect_info: Option<ProspectInfoDto>,
1091    /// The default settings for location
1092    #[serde(default, skip_serializing_if = "Option::is_none")]
1093    pub settings: Option<SettingsSchema>,
1094    /// The social media links for location
1095    #[serde(default, skip_serializing_if = "Option::is_none")]
1096    pub social: Option<SocialSchema>,
1097    /// The twilio credentials for location
1098    #[serde(default, skip_serializing_if = "Option::is_none")]
1099    pub twilio: Option<TwilioSchema>,
1100    /// The mailgun credentials for location
1101    #[serde(default, skip_serializing_if = "Option::is_none")]
1102    pub mailgun: Option<MailgunSchema>,
1103    /// The snapshot to be updated in the location.
1104    #[serde(default, skip_serializing_if = "Option::is_none")]
1105    pub snapshot: Option<SnapshotPutSchema>,
1106}
1107
1108/// `customValuesDTO` from the GoHighLevel OpenAPI spec.
1109#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1110pub struct CustomValuesDTO {
1111    /// Required by the API.
1112    pub name: String,
1113    /// Required by the API.
1114    pub value: String,
1115}
1116
1117/// `tagBody` from the GoHighLevel OpenAPI spec.
1118#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1119pub struct TagBody {
1120    /// Tag name
1121    /// Required by the API.
1122    pub name: String,
1123}
1124
1125/// `textBoxListOptionsSchema` from the GoHighLevel OpenAPI spec.
1126#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1127pub struct TextBoxListOptionsSchema {
1128    #[serde(default, skip_serializing_if = "Option::is_none")]
1129    pub label: Option<String>,
1130    #[serde(
1131        rename = "prefillValue",
1132        default,
1133        skip_serializing_if = "Option::is_none"
1134    )]
1135    pub prefill_value: Option<String>,
1136}