Skip to main content

ghl_models/v3/
locations.rs

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