Skip to main content

ghl_models/v2/
ad_manager.rs

1//! `ad-manager` data models for GoHighLevel API V2 (107 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Ad Manager** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`ad-manager` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/ad-manager.md).
7//!
8//! Enable with `features = ["ad-manager"]`.
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/// `AdCampaignDTO` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct AdCampaignDTO {
24    #[serde(default, skip_serializing_if = "Option::is_none")]
25    pub id: Option<String>,
26    /// Campaign locale
27    #[serde(default, skip_serializing_if = "Option::is_none")]
28    pub locale: Option<LocaleDTO>,
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub name: Option<String>,
31    /// Allowed values: `DRAFT`, `SCHEDULED`, `PUBLISHED`, `PUBLISHING`, `FAILED`, `IN_REVIEW`,
32    /// `PAUSED`, `ARCHIVED`, `WITH_ISSUES`, `REJECTED`.
33    #[serde(
34        rename = "publishingStatus",
35        default,
36        skip_serializing_if = "Option::is_none"
37    )]
38    pub publishing_status: Option<String>,
39    /// Campaign audience targeting
40    /// Allowed values: `STANDARD_UPDATE`, `SINGLE_VIDEO`, `CAROUSEL`.
41    #[serde(rename = "mediaType", default, skip_serializing_if = "Option::is_none")]
42    pub media_type: Option<String>,
43    /// Campaign audience targeting
44    #[serde(default, skip_serializing_if = "Option::is_none")]
45    pub audience: Option<AudienceDTO>,
46    /// Bid unit cost
47    #[serde(rename = "unitCost", default, skip_serializing_if = "Option::is_none")]
48    pub unit_cost: Option<UnitCostDTO>,
49    #[serde(
50        rename = "campaignType",
51        default,
52        skip_serializing_if = "Option::is_none"
53    )]
54    pub campaign_type: Option<String>,
55    #[serde(
56        rename = "adCampaignGroupId",
57        default,
58        skip_serializing_if = "Option::is_none"
59    )]
60    pub ad_campaign_group_id: Option<String>,
61    #[serde(
62        rename = "adCampaignId",
63        default,
64        skip_serializing_if = "Option::is_none"
65    )]
66    pub ad_campaign_id: Option<String>,
67    #[serde(default, skip_serializing_if = "Vec::is_empty")]
68    pub ads: Vec<LinkedInAdDTO>,
69    /// LinkedIn API error message
70    #[serde(
71        rename = "linkedInError",
72        default,
73        skip_serializing_if = "Option::is_none"
74    )]
75    pub linked_in_error: Option<String>,
76    #[serde(default, skip_serializing_if = "Option::is_none")]
77    pub meta: Option<serde_json::Value>,
78}
79
80/// `AdCampaignGroupDataDTO` from the GoHighLevel OpenAPI spec.
81#[derive(Debug, Clone, Default, Serialize, Deserialize)]
82pub struct AdCampaignGroupDataDTO {
83    #[serde(default, skip_serializing_if = "Option::is_none")]
84    pub id: Option<String>,
85    /// Location ID
86    /// Required by the API.
87    #[serde(rename = "locationId")]
88    pub location_id: String,
89    #[serde(default, skip_serializing_if = "Option::is_none")]
90    pub budget: Option<LinkedInBudgetDTO>,
91    #[serde(rename = "adCampaigns", default, skip_serializing_if = "Vec::is_empty")]
92    pub ad_campaigns: Vec<AdCampaignDTO>,
93    /// Allowed values: `MAXIMUM_DELIVERY`, `COST_CAP`.
94    #[serde(
95        rename = "adBudgetOptimization",
96        default,
97        skip_serializing_if = "Option::is_none"
98    )]
99    pub ad_budget_optimization: Option<String>,
100    /// Allowed values: `LEAD_GENERATION`, `WEBSITE_VISIT`.
101    #[serde(
102        rename = "objectiveType",
103        default,
104        skip_serializing_if = "Option::is_none"
105    )]
106    pub objective_type: Option<String>,
107    #[serde(default, skip_serializing_if = "Option::is_none")]
108    pub name: Option<String>,
109    #[serde(
110        rename = "adCampaignGroupId",
111        default,
112        skip_serializing_if = "Option::is_none"
113    )]
114    pub ad_campaign_group_id: Option<String>,
115    /// Allowed values: `DRAFT`, `SCHEDULED`, `PUBLISHED`, `PUBLISHING`, `FAILED`, `IN_REVIEW`,
116    /// `PAUSED`, `ARCHIVED`, `WITH_ISSUES`, `REJECTED`.
117    #[serde(
118        rename = "publishingStatus",
119        default,
120        skip_serializing_if = "Option::is_none"
121    )]
122    pub publishing_status: Option<String>,
123    #[serde(
124        rename = "linkedInAdAccountId",
125        default,
126        skip_serializing_if = "Option::is_none"
127    )]
128    pub linked_in_ad_account_id: Option<String>,
129    #[serde(
130        rename = "unpublishedChanges",
131        default,
132        skip_serializing_if = "Option::is_none"
133    )]
134    pub unpublished_changes: Option<bool>,
135    #[serde(default, skip_serializing_if = "Option::is_none")]
136    pub meta: Option<serde_json::Value>,
137    #[serde(
138        rename = "linkedInError",
139        default,
140        skip_serializing_if = "Option::is_none"
141    )]
142    pub linked_in_error: Option<String>,
143}
144
145/// `AdScheduleTargetDTO` from the GoHighLevel OpenAPI spec.
146#[derive(Debug, Clone, Default, Serialize, Deserialize)]
147pub struct AdScheduleTargetDTO {
148    /// Minute mark the schedule starts at
149    /// Allowed values: `ZERO`, `FIFTEEN`, `THIRTY`, `FORTY_FIVE`.
150    /// Required by the API.
151    #[serde(rename = "startMinute")]
152    pub start_minute: String,
153    /// Minute mark the schedule ends at
154    /// Allowed values: `ZERO`, `FIFTEEN`, `THIRTY`, `FORTY_FIVE`.
155    /// Required by the API.
156    #[serde(rename = "endMinute")]
157    pub end_minute: String,
158    /// Day of the week for this schedule
159    /// Allowed values: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`,
160    /// `SUNDAY`.
161    /// Required by the API.
162    #[serde(rename = "dayOfWeek")]
163    pub day_of_week: String,
164    /// Start hour in 24h format (0-23)
165    /// Required by the API.
166    #[serde(rename = "startHour")]
167    pub start_hour: f64,
168    /// End hour in 24h format (0-23)
169    /// Required by the API.
170    #[serde(rename = "endHour")]
171    pub end_hour: f64,
172}
173
174/// `AudienceCustomAudienceItemDTO` from the GoHighLevel OpenAPI spec.
175#[derive(Debug, Clone, Default, Serialize, Deserialize)]
176pub struct AudienceCustomAudienceItemDTO {
177    /// Custom audience ID
178    /// Required by the API.
179    pub id: String,
180    /// Custom audience name
181    /// Required by the API.
182    pub name: String,
183}
184
185/// `AudienceDTO` from the GoHighLevel OpenAPI spec.
186#[derive(Debug, Clone, Default, Serialize, Deserialize)]
187pub struct AudienceDTO {
188    /// Geographic location targets
189    #[serde(default, skip_serializing_if = "Vec::is_empty")]
190    pub geo_locations: Vec<GeoLocationDTO>,
191    /// Target audience attribute selections
192    #[serde(
193        rename = "targetAudience",
194        default,
195        skip_serializing_if = "Option::is_none"
196    )]
197    pub target_audience: Option<TargetAudienceDTO>,
198}
199
200/// `AudienceDimensionDTO` from the GoHighLevel OpenAPI spec.
201#[derive(Debug, Clone, Default, Serialize, Deserialize)]
202pub struct AudienceDimensionDTO {
203    /// Include unknown age
204    #[serde(
205        rename = "isAgeUnknown",
206        default,
207        skip_serializing_if = "Option::is_none"
208    )]
209    pub is_age_unknown: Option<bool>,
210    /// Age range filters
211    #[serde(rename = "ageRanges", default, skip_serializing_if = "Vec::is_empty")]
212    pub age_ranges: Vec<String>,
213    /// Gender targets
214    #[serde(default, skip_serializing_if = "Vec::is_empty")]
215    pub genders: Vec<String>,
216    /// Parental status targets
217    #[serde(
218        rename = "parentalStatuses",
219        default,
220        skip_serializing_if = "Vec::is_empty"
221    )]
222    pub parental_statuses: Vec<String>,
223    /// Audience segment references used for targeting
224    #[serde(
225        rename = "audienceSegments",
226        default,
227        skip_serializing_if = "Option::is_none"
228    )]
229    pub audience_segments: Option<AudienceSegmentsDTO>,
230}
231
232/// `AudienceInterestDTO` from the GoHighLevel OpenAPI spec.
233#[derive(Debug, Clone, Default, Serialize, Deserialize)]
234pub struct AudienceInterestDTO {
235    /// Interest ID
236    /// Required by the API.
237    pub id: String,
238    /// Interest name
239    /// Required by the API.
240    pub name: String,
241    /// Interest category type (defaults to "interests" if omitted)
242    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
243    pub type_: Option<String>,
244}
245
246/// `AudienceLocaleDTO` from the GoHighLevel OpenAPI spec.
247#[derive(Debug, Clone, Default, Serialize, Deserialize)]
248pub struct AudienceLocaleDTO {
249    /// Locale display name
250    /// Required by the API.
251    pub name: String,
252    /// Facebook locale key
253    /// Required by the API.
254    pub key: f64,
255}
256
257/// `AudienceLocationDTO` from the GoHighLevel OpenAPI spec.
258#[derive(Debug, Clone, Default, Serialize, Deserialize)]
259pub struct AudienceLocationDTO {
260    /// Facebook location key
261    /// Required by the API.
262    pub key: String,
263    /// Location display name
264    /// Required by the API.
265    pub name: String,
266    /// Geographic location type
267    /// Allowed values: `country`, `city`, `region`, `country_group`, `geo_market`,
268    /// `large_geo_area`, `medium_geo_area`, `small_geo_area`, `subcity`, `neighborhood`, `zip`,
269    /// `address`.
270    /// Required by the API.
271    #[serde(rename = "type")]
272    pub type_: String,
273    /// Whether the location is included or excluded from targeting
274    /// Allowed values: `include`, `exclude`.
275    /// Required by the API.
276    #[serde(rename = "selectionType")]
277    pub selection_type: String,
278    /// Targeting radius around the location (for city/address types)
279    #[serde(default, skip_serializing_if = "Option::is_none")]
280    pub radius: Option<f64>,
281    /// Unit for the targeting radius
282    /// Allowed values: `km`, `mi`.
283    #[serde(
284        rename = "radiusUnit",
285        default,
286        skip_serializing_if = "Option::is_none"
287    )]
288    pub radius_unit: Option<String>,
289    /// Geometry data for address-based targeting
290    #[serde(default, skip_serializing_if = "Option::is_none")]
291    pub geometry: Option<AudienceLocationGeometry>,
292}
293
294/// `AudienceLocationGeometry` from the GoHighLevel OpenAPI spec.
295#[derive(Debug, Clone, Default, Serialize, Deserialize)]
296pub struct AudienceLocationGeometry {
297    /// Geographic coordinates
298    /// Required by the API.
299    pub location: serde_json::Value,
300    /// Geocoding result type
301    /// Required by the API.
302    pub location_type: String,
303}
304
305/// `AudiencePlacementsDTO` from the GoHighLevel OpenAPI spec.
306#[derive(Debug, Clone, Default, Serialize, Deserialize)]
307pub struct AudiencePlacementsDTO {
308    /// Facebook placement positions
309    #[serde(default, skip_serializing_if = "Vec::is_empty")]
310    pub facebook: Vec<String>,
311    /// Instagram placement positions
312    #[serde(default, skip_serializing_if = "Vec::is_empty")]
313    pub instagram: Vec<String>,
314    /// Messenger placement positions
315    #[serde(default, skip_serializing_if = "Vec::is_empty")]
316    pub messenger: Vec<String>,
317}
318
319/// `AudienceSegmentsDTO` from the GoHighLevel OpenAPI spec.
320#[derive(Debug, Clone, Default, Serialize, Deserialize)]
321pub struct AudienceSegmentsDTO {
322    /// Resource names of custom audience segments
323    #[serde(
324        rename = "customAudiences",
325        default,
326        skip_serializing_if = "Vec::is_empty"
327    )]
328    pub custom_audiences: Vec<String>,
329    /// Resource names of user lists (remarketing lists, customer match lists, etc.)
330    #[serde(rename = "userLists", default, skip_serializing_if = "Vec::is_empty")]
331    pub user_lists: Vec<String>,
332    /// Resource names of user interest segments (in-market or affinity audiences)
333    #[serde(
334        rename = "userInterests",
335        default,
336        skip_serializing_if = "Vec::is_empty"
337    )]
338    pub user_interests: Vec<String>,
339}
340
341/// `Budget` from the GoHighLevel OpenAPI spec.
342#[derive(Debug, Clone, Default, Serialize, Deserialize)]
343pub struct Budget {
344    /// Budget type
345    /// Allowed values: `DAILY`, `LIFETIME`.
346    /// Required by the API.
347    #[serde(rename = "budgetType")]
348    pub budget_type: String,
349    /// Budget amount
350    /// Required by the API.
351    pub amount: f64,
352    /// Schedule start date
353    #[serde(
354        rename = "scheduleStartDate",
355        default,
356        skip_serializing_if = "Option::is_none"
357    )]
358    pub schedule_start_date: Option<String>,
359    /// Schedule end date
360    #[serde(
361        rename = "scheduleEndDate",
362        default,
363        skip_serializing_if = "Option::is_none"
364    )]
365    pub schedule_end_date: Option<String>,
366}
367
368/// `CallAssetPayloadDTO` from the GoHighLevel OpenAPI spec.
369#[derive(Debug, Clone, Default, Serialize, Deserialize)]
370pub struct CallAssetPayloadDTO {
371    /// Phone number for call ads
372    /// Required by the API.
373    #[serde(rename = "phoneNumber")]
374    pub phone_number: String,
375    /// Two-letter ISO country code
376    /// Required by the API.
377    #[serde(rename = "countryCode")]
378    pub country_code: String,
379    /// Call conversion action resource name
380    #[serde(
381        rename = "callConversionAction",
382        default,
383        skip_serializing_if = "Option::is_none"
384    )]
385    pub call_conversion_action: Option<String>,
386    /// Ad schedule targets restricting when the call asset is shown
387    #[serde(
388        rename = "adScheduleTargets",
389        default,
390        skip_serializing_if = "Vec::is_empty"
391    )]
392    pub ad_schedule_targets: Vec<AdScheduleTargetDTO>,
393    /// Google Ads resource name for an existing call asset
394    #[serde(
395        rename = "resourceName",
396        default,
397        skip_serializing_if = "Option::is_none"
398    )]
399    pub resource_name: Option<String>,
400}
401
402/// `CampaignDTO` from the GoHighLevel OpenAPI spec.
403#[derive(Debug, Clone, Default, Serialize, Deserialize)]
404pub struct CampaignDTO {
405    /// Campaign identifier
406    #[serde(default, skip_serializing_if = "Option::is_none")]
407    pub id: Option<String>,
408    /// Campaign name
409    /// Required by the API.
410    pub name: String,
411    /// Location identifier
412    /// Required by the API.
413    #[serde(rename = "locationId")]
414    pub location_id: String,
415    /// Advertising channel
416    /// Allowed values: `SEARCH`, `DISCOVERY`, `DISPLAY`, `HOTEL`, `LOCAL`, `MULTI_CHANNEL`,
417    /// `PERFORMANCE_MAX`, `DEMAND_GEN`.
418    /// Required by the API.
419    #[serde(rename = "advertisingChannelType")]
420    pub advertising_channel_type: String,
421    /// Channel sub type
422    /// Allowed values: `DEMAND_GEN`.
423    #[serde(
424        rename = "advertisingChannelSubType",
425        default,
426        skip_serializing_if = "Option::is_none"
427    )]
428    pub advertising_channel_sub_type: Option<String>,
429    /// Goal type
430    /// Allowed values: `WEBSITE_TRAFFIC`, `LEAD`.
431    #[serde(rename = "goalType", default, skip_serializing_if = "Option::is_none")]
432    pub goal_type: Option<String>,
433    /// Campaign budget
434    #[serde(default, skip_serializing_if = "Option::is_none")]
435    pub budget: Option<GoogleBudgetDTO>,
436    /// Campaign audience targeting
437    #[serde(default, skip_serializing_if = "Option::is_none")]
438    pub audience: Option<GoogleCampaignAudienceDTO>,
439    /// Network settings
440    #[serde(
441        rename = "networkSettings",
442        default,
443        skip_serializing_if = "Option::is_none"
444    )]
445    pub network_settings: Option<GoogleNetworkSettingsDTO>,
446    /// Bidding strategy config
447    #[serde(
448        rename = "biddingStrategy",
449        default,
450        skip_serializing_if = "Option::is_none"
451    )]
452    pub bidding_strategy: Option<GoogleBiddingStrategyDTO>,
453    /// Campaign assets
454    #[serde(default, skip_serializing_if = "Option::is_none")]
455    pub assets: Option<GoogleAssetsDTO>,
456    /// EU political ads flag
457    #[serde(
458        rename = "isEuPoliticalAds",
459        default,
460        skip_serializing_if = "Option::is_none"
461    )]
462    pub is_eu_political_ads: Option<bool>,
463    /// Campaign ad groups
464    #[serde(rename = "adGroups", default, skip_serializing_if = "Vec::is_empty")]
465    pub ad_groups: Vec<GoogleAdGroupDTO>,
466    /// Campaign goal config
467    #[serde(
468        rename = "campaignGoal",
469        default,
470        skip_serializing_if = "Option::is_none"
471    )]
472    pub campaign_goal: Option<GoogleCampaignGoalDTO>,
473    /// Ad schedule rules
474    #[serde(rename = "adSchedule", default, skip_serializing_if = "Vec::is_empty")]
475    pub ad_schedule: Vec<GoogleAdScheduleDTO>,
476    /// Publishing status
477    /// Allowed values: `DRAFT`, `SCHEDULED`, `PUBLISHED`, `PUBLISHING`, `FAILED`, `IN_REVIEW`,
478    /// `PAUSED`, `ARCHIVED`, `WITH_ISSUES`, `REJECTED`.
479    #[serde(
480        rename = "publishingStatus",
481        default,
482        skip_serializing_if = "Option::is_none"
483    )]
484    pub publishing_status: Option<String>,
485    /// Google Ad account identifier
486    #[serde(
487        rename = "googleAdAccountId",
488        default,
489        skip_serializing_if = "Option::is_none"
490    )]
491    pub google_ad_account_id: Option<String>,
492    /// Whether the campaign has unpublished changes
493    #[serde(
494        rename = "unpublishedChanges",
495        default,
496        skip_serializing_if = "Option::is_none"
497    )]
498    pub unpublished_changes: Option<bool>,
499    /// Maximum CPC bid in micros
500    #[serde(
501        rename = "maximumCpc",
502        default,
503        skip_serializing_if = "Option::is_none"
504    )]
505    pub maximum_cpc: Option<f64>,
506    /// Google Ads campaign resource ID
507    #[serde(
508        rename = "googleCampaignId",
509        default,
510        skip_serializing_if = "Option::is_none"
511    )]
512    pub google_campaign_id: Option<String>,
513    /// Traffic source
514    #[serde(default, skip_serializing_if = "Option::is_none")]
515    pub source: Option<String>,
516    /// Advanced options
517    #[serde(
518        rename = "advancedOptions",
519        default,
520        skip_serializing_if = "Option::is_none"
521    )]
522    pub advanced_options: Option<serde_json::Value>,
523}
524
525/// `ConsentDTO` from the GoHighLevel OpenAPI spec.
526#[derive(Debug, Clone, Default, Serialize, Deserialize)]
527pub struct ConsentDTO {
528    /// Whether consent checkbox is required
529    /// Required by the API.
530    #[serde(rename = "checkRequired")]
531    pub check_required: bool,
532    /// Consent identifier
533    /// Required by the API.
534    pub id: f64,
535    /// Consent text
536    /// Required by the API.
537    pub consent: LocalizedStringDTO,
538}
539
540/// `ConversionValueSettings` from the GoHighLevel OpenAPI spec.
541#[derive(Debug, Clone, Default, Serialize, Deserialize)]
542pub struct ConversionValueSettings {
543    /// Default monetary value assigned to each conversion
544    /// Required by the API.
545    #[serde(rename = "defaultValue")]
546    pub default_value: f64,
547    /// ISO 4217 currency code for the default value
548    /// Required by the API.
549    #[serde(rename = "defaultCurrencyCode")]
550    pub default_currency_code: String,
551    /// When true, always uses the default value even if a transaction-specific value is
552    /// provided
553    /// Required by the API.
554    #[serde(rename = "alwaysUseDefaultValue")]
555    pub always_use_default_value: bool,
556}
557
558/// `CreateConversationFormDTO` from the GoHighLevel OpenAPI spec.
559#[derive(Debug, Clone, Default, Serialize, Deserialize)]
560pub struct CreateConversationFormDTO {
561    /// Location identifier
562    /// Required by the API.
563    #[serde(rename = "locationId")]
564    pub location_id: String,
565    /// Conversation form name
566    /// Required by the API.
567    pub name: String,
568    /// Welcome message text
569    /// Required by the API.
570    pub text: String,
571    /// Quick-reply questions shown in the welcome message of the conversation form
572    /// Required by the API.
573    #[serde(default, skip_serializing_if = "Vec::is_empty")]
574    pub questions: Vec<WelcomeMessageQuestion>,
575}
576
577/// `CreateGoogleIntegrationDTO` from the GoHighLevel OpenAPI spec.
578#[derive(Debug, Clone, Default, Serialize, Deserialize)]
579pub struct CreateGoogleIntegrationDTO {
580    /// Location identifier
581    /// Required by the API.
582    #[serde(rename = "locationId")]
583    pub location_id: String,
584    /// Ad account identifier
585    /// Required by the API.
586    #[serde(rename = "adAccountId")]
587    pub ad_account_id: String,
588    /// MCC identifier
589    /// Required by the API.
590    #[serde(rename = "mccId")]
591    pub mcc_id: String,
592}
593
594/// `CreateIntegrationDTO` from the GoHighLevel OpenAPI spec.
595#[derive(Debug, Clone, Default, Serialize, Deserialize)]
596pub struct CreateIntegrationDTO {
597    /// Location identifier
598    /// Required by the API.
599    #[serde(rename = "locationId")]
600    pub location_id: String,
601    /// Facebook page ID
602    /// Required by the API.
603    #[serde(rename = "pageId")]
604    pub page_id: String,
605    /// Ad account identifier
606    #[serde(
607        rename = "adAccountId",
608        default,
609        skip_serializing_if = "Option::is_none"
610    )]
611    pub ad_account_id: Option<String>,
612}
613
614/// `CreateLeadFormDTO` from the GoHighLevel OpenAPI spec.
615#[derive(Debug, Clone, Default, Serialize, Deserialize)]
616pub struct CreateLeadFormDTO {
617    /// Lead form type
618    /// Allowed values: `MORE_VOLUME`, `HIGHER_INTENT`.
619    /// Required by the API.
620    #[serde(rename = "type")]
621    pub type_: String,
622    /// Lead form name
623    /// Required by the API.
624    pub name: String,
625    /// Location identifier
626    /// Required by the API.
627    #[serde(rename = "locationId")]
628    pub location_id: String,
629    /// Greeting card config
630    #[serde(
631        rename = "greetingCard",
632        default,
633        skip_serializing_if = "Option::is_none"
634    )]
635    pub greeting_card: Option<GreetingCard>,
636    /// List of questions displayed on the lead form
637    /// Required by the API.
638    #[serde(default, skip_serializing_if = "Vec::is_empty")]
639    pub questions: Vec<FormQuestion>,
640    /// Question page headline
641    #[serde(
642        rename = "questionPageHeadline",
643        default,
644        skip_serializing_if = "Option::is_none"
645    )]
646    pub question_page_headline: Option<String>,
647    /// Privacy policy URL
648    /// Required by the API.
649    #[serde(rename = "privacyPolicyLink")]
650    pub privacy_policy_link: String,
651    /// Privacy policy text
652    #[serde(
653        rename = "privacyPolicyText",
654        default,
655        skip_serializing_if = "Option::is_none"
656    )]
657    pub privacy_policy_text: Option<String>,
658    /// Custom disclaimer config
659    #[serde(
660        rename = "customDisclaimer",
661        default,
662        skip_serializing_if = "Option::is_none"
663    )]
664    pub custom_disclaimer: Option<CustomDisclaimer>,
665    /// Thank you page config
666    /// Required by the API.
667    #[serde(rename = "thankYouPage")]
668    pub thank_you_page: ThankYouPage,
669}
670
671/// `CreateLinkedinIntegrationDTO` from the GoHighLevel OpenAPI spec.
672#[derive(Debug, Clone, Default, Serialize, Deserialize)]
673pub struct CreateLinkedinIntegrationDTO {
674    /// Location identifier
675    /// Required by the API.
676    #[serde(rename = "locationId")]
677    pub location_id: String,
678    /// Ad account identifier
679    /// Required by the API.
680    #[serde(rename = "adAccountId")]
681    pub ad_account_id: String,
682    /// Ad account name
683    /// Required by the API.
684    #[serde(rename = "adAccountName")]
685    pub ad_account_name: String,
686    /// Currency code
687    /// Required by the API.
688    #[serde(rename = "currencyCode")]
689    pub currency_code: String,
690    /// Organization identifier
691    /// Required by the API.
692    #[serde(rename = "organizationId")]
693    pub organization_id: String,
694}
695
696/// `CreateOfflineUserListJobDTO` from the GoHighLevel OpenAPI spec.
697#[derive(Debug, Clone, Default, Serialize, Deserialize)]
698pub struct CreateOfflineUserListJobDTO {
699    /// Location identifier
700    /// Required by the API.
701    #[serde(rename = "locationId")]
702    pub location_id: String,
703    /// Smart list IDs
704    #[serde(
705        rename = "smartListIds",
706        default,
707        skip_serializing_if = "Vec::is_empty"
708    )]
709    pub smart_list_ids: Vec<String>,
710    /// CSV file path
711    #[serde(rename = "csvPath", default, skip_serializing_if = "Option::is_none")]
712    pub csv_path: Option<String>,
713    /// User list identifier
714    #[serde(
715        rename = "userListId",
716        default,
717        skip_serializing_if = "Option::is_none"
718    )]
719    pub user_list_id: Option<String>,
720    /// Dynamic list flag
721    #[serde(rename = "isDynamic", default, skip_serializing_if = "Option::is_none")]
722    pub is_dynamic: Option<bool>,
723}
724
725/// `CreationLocaleDTO` from the GoHighLevel OpenAPI spec.
726#[derive(Debug, Clone, Default, Serialize, Deserialize)]
727pub struct CreationLocaleDTO {
728    /// Country code
729    /// Required by the API.
730    pub country: String,
731    /// Language code
732    /// Required by the API.
733    pub language: String,
734}
735
736/// `CustomDisclaimer` from the GoHighLevel OpenAPI spec.
737#[derive(Debug, Clone, Default, Serialize, Deserialize)]
738pub struct CustomDisclaimer {
739    /// Disclaimer title
740    /// Required by the API.
741    pub title: String,
742    /// Disclaimer body text
743    /// Required by the API.
744    pub body: String,
745    /// Consent checkboxes the user must agree to before submitting the form
746    #[serde(default, skip_serializing_if = "Vec::is_empty")]
747    pub checkboxes: Vec<CustomDisclaimerCheckbox>,
748}
749
750/// `CustomDisclaimerCheckbox` from the GoHighLevel OpenAPI spec.
751#[derive(Debug, Clone, Default, Serialize, Deserialize)]
752pub struct CustomDisclaimerCheckbox {
753    /// Checkbox required flag
754    /// Required by the API.
755    pub is_required: bool,
756    /// Checkbox text label
757    /// Required by the API.
758    pub text: String,
759    /// Checkbox unique key
760    /// Required by the API.
761    pub key: String,
762}
763
764/// `CustomQuestionFieldDTO` from the GoHighLevel OpenAPI spec.
765#[derive(Debug, Clone, Default, Serialize, Deserialize)]
766pub struct CustomQuestionFieldDTO {
767    /// Custom question text shown to the user
768    /// Required by the API.
769    #[serde(rename = "customQuestionText")]
770    pub custom_question_text: String,
771    /// Answer choices for the custom question
772    /// Required by the API.
773    #[serde(
774        rename = "singleChoiceAnswers",
775        default,
776        skip_serializing_if = "Vec::is_empty"
777    )]
778    pub single_choice_answers: Vec<String>,
779}
780
781/// `FacebookAudienceDTO` from the GoHighLevel OpenAPI spec.
782#[derive(Debug, Clone, Default, Serialize, Deserialize)]
783pub struct FacebookAudienceDTO {
784    /// Geographic locations to target or exclude
785    /// Required by the API.
786    #[serde(default, skip_serializing_if = "Vec::is_empty")]
787    pub geo_locations: Vec<AudienceLocationDTO>,
788    /// Language locales to target
789    #[serde(default, skip_serializing_if = "Vec::is_empty")]
790    pub locales: Vec<AudienceLocaleDTO>,
791    /// Ad placement positions per platform (only used when placementType is "manual")
792    #[serde(default, skip_serializing_if = "Option::is_none")]
793    pub placements: Option<AudiencePlacementsDTO>,
794    /// Placement strategy — "auto" lets Facebook choose, "manual" uses the placements config
795    /// Allowed values: `auto`, `manual`.
796    #[serde(
797        rename = "placementType",
798        default,
799        skip_serializing_if = "Option::is_none"
800    )]
801    pub placement_type: Option<String>,
802    /// Lookalike audiences to target
803    #[serde(default, skip_serializing_if = "Vec::is_empty")]
804    pub lookalike: Vec<AudienceCustomAudienceItemDTO>,
805    /// Retargeting custom audiences to target
806    #[serde(default, skip_serializing_if = "Vec::is_empty")]
807    pub retargeting: Vec<AudienceCustomAudienceItemDTO>,
808    /// Interest-based targeting criteria
809    #[serde(default, skip_serializing_if = "Vec::is_empty")]
810    pub interests: Vec<AudienceInterestDTO>,
811    /// Minimum age for targeting
812    #[serde(default, skip_serializing_if = "Option::is_none")]
813    pub age_min: Option<f64>,
814    /// Maximum age for targeting
815    #[serde(default, skip_serializing_if = "Option::is_none")]
816    pub age_max: Option<f64>,
817    /// Gender targeting (1 = male, 2 = female)
818    #[serde(default, skip_serializing_if = "Vec::is_empty")]
819    pub genders: Vec<f64>,
820}
821
822/// `FbSetDefaultPageBodyDTO` from the GoHighLevel OpenAPI spec.
823#[derive(Debug, Clone, Default, Serialize, Deserialize)]
824pub struct FbSetDefaultPageBodyDTO {
825    /// Facebook page identifier
826    /// Required by the API.
827    #[serde(rename = "pageId")]
828    pub page_id: String,
829}
830
831/// `FbUpdateAudienceBodyDTO` from the GoHighLevel OpenAPI spec.
832#[derive(Debug, Clone, Default, Serialize, Deserialize)]
833pub struct FbUpdateAudienceBodyDTO {
834    /// Location identifier
835    /// Required by the API.
836    #[serde(rename = "locationId")]
837    pub location_id: String,
838    /// Audience name
839    /// Required by the API.
840    pub name: String,
841    /// Audience description
842    /// Required by the API.
843    pub description: String,
844}
845
846/// `FlexibleRuleUserListDTO` from the GoHighLevel OpenAPI spec.
847#[derive(Debug, Clone, Default, Serialize, Deserialize)]
848pub struct FlexibleRuleUserListDTO {
849    /// Operator for combining inclusive operands
850    #[serde(
851        rename = "inclusiveRuleOperator",
852        default,
853        skip_serializing_if = "Option::is_none"
854    )]
855    pub inclusive_rule_operator: Option<String>,
856    /// Inclusive rule operands
857    /// Required by the API.
858    #[serde(
859        rename = "inclusiveOperands",
860        default,
861        skip_serializing_if = "Vec::is_empty"
862    )]
863    pub inclusive_operands: Vec<RuleOperandDTO>,
864    /// Exclusive rule operands
865    /// Required by the API.
866    #[serde(
867        rename = "exclusiveOperands",
868        default,
869        skip_serializing_if = "Vec::is_empty"
870    )]
871    pub exclusive_operands: Vec<RuleOperandDTO>,
872}
873
874/// `FormQuestion` from the GoHighLevel OpenAPI spec.
875#[derive(Debug, Clone, Default, Serialize, Deserialize)]
876pub struct FormQuestion {
877    /// Question label text shown to the user
878    #[serde(default, skip_serializing_if = "Option::is_none")]
879    pub label: Option<String>,
880    /// Question key
881    /// Required by the API.
882    pub key: String,
883    /// Question input type — use a prefilled type for standard fields or CUSTOM / SHORT_ANSWER
884    /// for freeform questions
885    /// Allowed values: `CUSTOM`, `CITY`, `COMPANY_NAME`, `COUNTRY`, `DATE_OF_BIRTH`, `EMAIL`,
886    /// `FIRST_NAME`, `FULL_NAME`, `GENDER`, `JOB_TITLE`, `LAST_NAME`, `MARITAL_STATUS`.
887    /// Required by the API.
888    #[serde(rename = "type")]
889    pub type_: String,
890    /// Answer options for multiple-choice questions (only applies to CUSTOM type)
891    #[serde(default, skip_serializing_if = "Vec::is_empty")]
892    pub options: Vec<FormQuestionOption>,
893}
894
895/// `FormQuestionOption` from the GoHighLevel OpenAPI spec.
896#[derive(Debug, Clone, Default, Serialize, Deserialize)]
897pub struct FormQuestionOption {
898    /// Option key
899    /// Required by the API.
900    pub key: String,
901    /// Option value
902    /// Required by the API.
903    pub value: String,
904}
905
906/// `GeoAddressComponentDTO` from the GoHighLevel OpenAPI spec.
907#[derive(Debug, Clone, Default, Serialize, Deserialize)]
908pub struct GeoAddressComponentDTO {
909    /// Full name of the address component
910    #[serde(default, skip_serializing_if = "Option::is_none")]
911    pub long_name: Option<String>,
912    /// Abbreviated name of the address component
913    #[serde(default, skip_serializing_if = "Option::is_none")]
914    pub short_name: Option<String>,
915    /// Address component types
916    #[serde(default, skip_serializing_if = "Vec::is_empty")]
917    pub types: Vec<String>,
918}
919
920/// `GeoGeometryDTO` from the GoHighLevel OpenAPI spec.
921#[derive(Debug, Clone, Default, Serialize, Deserialize)]
922pub struct GeoGeometryDTO {
923    /// Location coordinates
924    #[serde(default, skip_serializing_if = "Option::is_none")]
925    pub location: Option<GeoLatLngDTO>,
926    /// Location type (e.g. APPROXIMATE)
927    #[serde(default, skip_serializing_if = "Option::is_none")]
928    pub location_type: Option<String>,
929    /// Viewport bounding box
930    #[serde(default, skip_serializing_if = "Option::is_none")]
931    pub viewport: Option<GeoViewportDTO>,
932}
933
934/// `GeoLatLngDTO` from the GoHighLevel OpenAPI spec.
935#[derive(Debug, Clone, Default, Serialize, Deserialize)]
936pub struct GeoLatLngDTO {
937    /// Latitude
938    #[serde(default, skip_serializing_if = "Option::is_none")]
939    pub lat: Option<f64>,
940    /// Longitude
941    #[serde(default, skip_serializing_if = "Option::is_none")]
942    pub lng: Option<f64>,
943}
944
945/// `GeoLocationDTO` from the GoHighLevel OpenAPI spec.
946#[derive(Debug, Clone, Default, Serialize, Deserialize)]
947pub struct GeoLocationDTO {
948    /// Location display name
949    /// Required by the API.
950    pub name: String,
951    /// Location URN
952    /// Required by the API.
953    pub urn: String,
954    /// Facet URN
955    /// Required by the API.
956    #[serde(rename = "facetUrn")]
957    pub facet_urn: String,
958    /// Selection type
959    /// Allowed values: `include`, `exclude`.
960    /// Required by the API.
961    #[serde(rename = "selectionType")]
962    pub selection_type: String,
963}
964
965/// `GeoViewportDTO` from the GoHighLevel OpenAPI spec.
966#[derive(Debug, Clone, Default, Serialize, Deserialize)]
967pub struct GeoViewportDTO {
968    /// Northeast corner of the viewport
969    #[serde(default, skip_serializing_if = "Option::is_none")]
970    pub northeast: Option<GeoLatLngDTO>,
971    /// Southwest corner of the viewport
972    #[serde(default, skip_serializing_if = "Option::is_none")]
973    pub southwest: Option<GeoLatLngDTO>,
974}
975
976/// `GoogleAdContentDTO` from the GoHighLevel OpenAPI spec.
977#[derive(Debug, Clone, Default, Serialize, Deserialize)]
978pub struct GoogleAdContentDTO {
979    /// Ad identifier
980    #[serde(default, skip_serializing_if = "Option::is_none")]
981    pub id: Option<String>,
982    /// Ad name
983    #[serde(default, skip_serializing_if = "Option::is_none")]
984    pub name: Option<String>,
985    /// Media type
986    /// Allowed values: `IMAGE`, `VIDEO`, `CAROUSEL`.
987    #[serde(rename = "mediaType", default, skip_serializing_if = "Option::is_none")]
988    pub media_type: Option<String>,
989    /// Ad headlines
990    #[serde(default, skip_serializing_if = "Vec::is_empty")]
991    pub headlines: Vec<String>,
992    /// Long headlines
993    #[serde(
994        rename = "longHeadlines",
995        default,
996        skip_serializing_if = "Vec::is_empty"
997    )]
998    pub long_headlines: Vec<String>,
999    /// Ad descriptions
1000    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1001    pub descriptions: Vec<String>,
1002    /// Final URL
1003    #[serde(rename = "finalUrl", default, skip_serializing_if = "Option::is_none")]
1004    pub final_url: Option<String>,
1005    /// Display path 1
1006    #[serde(default, skip_serializing_if = "Option::is_none")]
1007    pub path1: Option<String>,
1008    /// Display path 2
1009    #[serde(default, skip_serializing_if = "Option::is_none")]
1010    pub path2: Option<String>,
1011    /// Whether the ad is soft-deleted
1012    #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
1013    pub is_deleted: Option<bool>,
1014    /// Ad-level error message from Google
1015    #[serde(rename = "adError", default, skip_serializing_if = "Option::is_none")]
1016    pub ad_error: Option<String>,
1017    /// Ad publishing status
1018    /// Allowed values: `DRAFT`, `SCHEDULED`, `PUBLISHED`, `PUBLISHING`, `FAILED`, `IN_REVIEW`,
1019    /// `PAUSED`, `ARCHIVED`, `WITH_ISSUES`, `REJECTED`.
1020    #[serde(
1021        rename = "publishingStatus",
1022        default,
1023        skip_serializing_if = "Option::is_none"
1024    )]
1025    pub publishing_status: Option<String>,
1026    /// Internal ad identifier
1027    #[serde(rename = "adId", default, skip_serializing_if = "Option::is_none")]
1028    pub ad_id: Option<String>,
1029    /// Ad campaign identifier
1030    #[serde(
1031        rename = "adCampaignId",
1032        default,
1033        skip_serializing_if = "Option::is_none"
1034    )]
1035    pub ad_campaign_id: Option<String>,
1036    /// Ad group identifier
1037    #[serde(rename = "adGroupId", default, skip_serializing_if = "Option::is_none")]
1038    pub ad_group_id: Option<String>,
1039    /// Google Ads ad resource ID
1040    #[serde(
1041        rename = "googleAdId",
1042        default,
1043        skip_serializing_if = "Option::is_none"
1044    )]
1045    pub google_ad_id: Option<String>,
1046    /// Ad media items
1047    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1048    pub media: Vec<GoogleMediaDTO>,
1049    /// Call to action label
1050    /// Allowed values: `AUTOMATED`, `LEARN_MORE`, `GET_QUOTE`, `APPLY_NOW`, `SIGN_UP`,
1051    /// `CONTACT_US`, `SUBSCRIBE`, `DOWNLOAD`, `BOOK_NOW`, `SHOP_NOW`, `BUY_NOW`, `DONATE_NOW`.
1052    #[serde(
1053        rename = "callToActionLabel",
1054        default,
1055        skip_serializing_if = "Option::is_none"
1056    )]
1057    pub call_to_action_label: Option<String>,
1058    /// Business name
1059    #[serde(
1060        rename = "businessName",
1061        default,
1062        skip_serializing_if = "Option::is_none"
1063    )]
1064    pub business_name: Option<String>,
1065    /// YouTube video links
1066    #[serde(
1067        rename = "youtubeVideoLinks",
1068        default,
1069        skip_serializing_if = "Vec::is_empty"
1070    )]
1071    pub youtube_video_links: Vec<GoogleYouTubeVideoLinkDTO>,
1072    /// Carousel cards
1073    #[serde(
1074        rename = "carouselCards",
1075        default,
1076        skip_serializing_if = "Vec::is_empty"
1077    )]
1078    pub carousel_cards: Vec<GoogleCarouselCardDTO>,
1079    /// Channel placements
1080    /// Allowed values: `GMAIL`, `YOUTUBE_IN_STREAM`, `YOUTUBE_SHORTS`, `YOUTUBE_IN_FEED`,
1081    /// `DISCOVER`, `DISPLAY`.
1082    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1083    pub placements: Vec<String>,
1084    /// Custom channels flag
1085    #[serde(
1086        rename = "customChannels",
1087        default,
1088        skip_serializing_if = "Option::is_none"
1089    )]
1090    pub custom_channels: Option<bool>,
1091}
1092
1093/// `GoogleAdGroupAudienceDTO` from the GoHighLevel OpenAPI spec.
1094#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1095pub struct GoogleAdGroupAudienceDTO {
1096    /// Geo-location targeting
1097    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1098    pub geo_locations: Vec<GoogleGeoLocationDTO>,
1099    /// Language/locale targeting
1100    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1101    pub locales: Vec<GoogleLocaleDTO>,
1102}
1103
1104/// `GoogleAdGroupDTO` from the GoHighLevel OpenAPI spec.
1105#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1106pub struct GoogleAdGroupDTO {
1107    /// Ad group identifier
1108    #[serde(default, skip_serializing_if = "Option::is_none")]
1109    pub id: Option<String>,
1110    /// Google ad group identifier
1111    #[serde(rename = "adGroupId", default, skip_serializing_if = "Option::is_none")]
1112    pub ad_group_id: Option<String>,
1113    /// Ad group name
1114    #[serde(default, skip_serializing_if = "Option::is_none")]
1115    pub name: Option<String>,
1116    /// Ad campaign identifier
1117    #[serde(
1118        rename = "adCampaignId",
1119        default,
1120        skip_serializing_if = "Option::is_none"
1121    )]
1122    pub ad_campaign_id: Option<String>,
1123    /// Ad content items
1124    #[serde(rename = "adContent", default, skip_serializing_if = "Vec::is_empty")]
1125    pub ad_content: Vec<GoogleAdContentDTO>,
1126    /// Keyword targeting
1127    #[serde(default, skip_serializing_if = "Option::is_none")]
1128    pub keywords: Option<GoogleKeywordsDTO>,
1129    /// Ad group publishing status
1130    /// Allowed values: `DRAFT`, `SCHEDULED`, `PUBLISHED`, `PUBLISHING`, `FAILED`, `IN_REVIEW`,
1131    /// `PAUSED`, `ARCHIVED`, `WITH_ISSUES`, `REJECTED`.
1132    #[serde(
1133        rename = "publishingStatus",
1134        default,
1135        skip_serializing_if = "Option::is_none"
1136    )]
1137    pub publishing_status: Option<String>,
1138    /// Ad group-level error from Google
1139    #[serde(
1140        rename = "adGroupError",
1141        default,
1142        skip_serializing_if = "Option::is_none"
1143    )]
1144    pub ad_group_error: Option<String>,
1145    /// Google Ads ad group resource ID
1146    #[serde(
1147        rename = "googleAdGroupId",
1148        default,
1149        skip_serializing_if = "Option::is_none"
1150    )]
1151    pub google_ad_group_id: Option<String>,
1152    /// Custom channels flag
1153    #[serde(
1154        rename = "customChannels",
1155        default,
1156        skip_serializing_if = "Option::is_none"
1157    )]
1158    pub custom_channels: Option<bool>,
1159    /// Selected channel placements
1160    /// Allowed values: `GMAIL`, `YOUTUBE_IN_STREAM`, `YOUTUBE_SHORTS`, `YOUTUBE_IN_FEED`,
1161    /// `DISCOVER`, `DISPLAY`.
1162    #[serde(
1163        rename = "selectedChannels",
1164        default,
1165        skip_serializing_if = "Vec::is_empty"
1166    )]
1167    pub selected_channels: Vec<String>,
1168    /// Google audience resource ID
1169    #[serde(
1170        rename = "googleAudienceId",
1171        default,
1172        skip_serializing_if = "Option::is_none"
1173    )]
1174    pub google_audience_id: Option<String>,
1175    /// Ad group audience targeting
1176    #[serde(default, skip_serializing_if = "Option::is_none")]
1177    pub audience: Option<GoogleAdGroupAudienceDTO>,
1178}
1179
1180/// `GoogleAdScheduleDTO` from the GoHighLevel OpenAPI spec.
1181#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1182pub struct GoogleAdScheduleDTO {
1183    /// Day of week
1184    /// Allowed values: `FRIDAY`, `MONDAY`, `SATURDAY`, `SUNDAY`, `THURSDAY`, `TUESDAY`,
1185    /// `UNKNOWN`, `UNSPECIFIED`, `WEDNESDAY`, `ALL_DAYS`, `MONDAY_TO_FRIDAY`,
1186    /// `SATURDAY_AND_SUNDAY`.
1187    /// Required by the API.
1188    #[serde(rename = "dayOfWeek")]
1189    pub day_of_week: String,
1190    /// Start time (HH:MM)
1191    /// Required by the API.
1192    #[serde(rename = "from")]
1193    pub from_: String,
1194    /// End time (HH:MM)
1195    /// Required by the API.
1196    pub to: String,
1197}
1198
1199/// `GoogleAssetImageDTO` from the GoHighLevel OpenAPI spec.
1200#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1201pub struct GoogleAssetImageDTO {
1202    /// Image URL
1203    /// Required by the API.
1204    pub url: String,
1205    /// Google Ads resource name
1206    #[serde(
1207        rename = "resourceName",
1208        default,
1209        skip_serializing_if = "Option::is_none"
1210    )]
1211    pub resource_name: Option<String>,
1212    /// Asset name
1213    #[serde(default, skip_serializing_if = "Option::is_none")]
1214    pub name: Option<String>,
1215    /// Error message if asset upload failed
1216    #[serde(default, skip_serializing_if = "Option::is_none")]
1217    pub error: Option<String>,
1218}
1219
1220/// `GoogleAssetsDTO` from the GoHighLevel OpenAPI spec.
1221#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1222pub struct GoogleAssetsDTO {
1223    /// Call extension asset resource names
1224    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1225    pub calls: Vec<String>,
1226    /// Sitelink asset resource names
1227    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1228    pub sitelinks: Vec<String>,
1229    /// Lead form asset resource name
1230    #[serde(rename = "leadForm", default, skip_serializing_if = "Option::is_none")]
1231    pub lead_form: Option<String>,
1232    /// Image assets
1233    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1234    pub images: Vec<GoogleAssetImageDTO>,
1235    /// Business logo asset
1236    #[serde(
1237        rename = "businessLogo",
1238        default,
1239        skip_serializing_if = "Option::is_none"
1240    )]
1241    pub business_logo: Option<GoogleAssetImageDTO>,
1242}
1243
1244/// `GoogleBiddingStrategyDTO` from the GoHighLevel OpenAPI spec.
1245#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1246pub struct GoogleBiddingStrategyDTO {
1247    /// Bidding strategy type
1248    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1249    pub type_: Option<String>,
1250    /// Bid value in micros
1251    #[serde(default, skip_serializing_if = "Option::is_none")]
1252    pub value: Option<f64>,
1253}
1254
1255/// `GoogleBudgetDTO` from the GoHighLevel OpenAPI spec.
1256#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1257pub struct GoogleBudgetDTO {
1258    /// Budget type
1259    /// Allowed values: `DAILY`, `LIFETIME`.
1260    #[serde(
1261        rename = "budgetType",
1262        default,
1263        skip_serializing_if = "Option::is_none"
1264    )]
1265    pub budget_type: Option<String>,
1266    /// Budget amount in micros
1267    #[serde(default, skip_serializing_if = "Option::is_none")]
1268    pub amount: Option<f64>,
1269    /// Schedule start date
1270    #[serde(
1271        rename = "scheduleStartDate",
1272        default,
1273        skip_serializing_if = "Option::is_none"
1274    )]
1275    pub schedule_start_date: Option<String>,
1276    /// Schedule end date
1277    #[serde(
1278        rename = "scheduleEndDate",
1279        default,
1280        skip_serializing_if = "Option::is_none"
1281    )]
1282    pub schedule_end_date: Option<String>,
1283}
1284
1285/// `GoogleCampaignAudienceDTO` from the GoHighLevel OpenAPI spec.
1286#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1287pub struct GoogleCampaignAudienceDTO {
1288    /// Geo-location targeting
1289    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1290    pub geo_locations: Vec<GoogleGeoLocationDTO>,
1291    /// Language/locale targeting
1292    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1293    pub locales: Vec<GoogleLocaleDTO>,
1294    /// Gender targeting
1295    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1296    pub gender: Vec<GoogleDemographicTargetDTO>,
1297    /// Age range targeting
1298    #[serde(rename = "ageRange", default, skip_serializing_if = "Vec::is_empty")]
1299    pub age_range: Vec<GoogleDemographicTargetDTO>,
1300    /// Audience segment targeting
1301    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1302    pub segments: Vec<GoogleSegmentTargetDTO>,
1303    /// Interest-based targeting
1304    #[serde(
1305        rename = "targetInterests",
1306        default,
1307        skip_serializing_if = "Option::is_none"
1308    )]
1309    pub target_interests: Option<GoogleTargetInterestsDTO>,
1310}
1311
1312/// `GoogleCampaignGoalDTO` from the GoHighLevel OpenAPI spec.
1313#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1314pub struct GoogleCampaignGoalDTO {
1315    /// Campaign goal type
1316    /// Allowed values: `CONVERSIONS`, `CLICK`, `YOUTUBE_ENGAGEMENT`.
1317    /// Required by the API.
1318    #[serde(rename = "type")]
1319    pub type_: String,
1320    /// Goal value (e.g. conversion action resource name)
1321    #[serde(default, skip_serializing_if = "Option::is_none")]
1322    pub value: Option<String>,
1323    /// Whether this is a custom conversion goal
1324    #[serde(
1325        rename = "isCustomConversionGoal",
1326        default,
1327        skip_serializing_if = "Option::is_none"
1328    )]
1329    pub is_custom_conversion_goal: Option<bool>,
1330}
1331
1332/// `GoogleCarouselCardDTO` from the GoHighLevel OpenAPI spec.
1333#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1334pub struct GoogleCarouselCardDTO {
1335    /// Card headline
1336    #[serde(default, skip_serializing_if = "Option::is_none")]
1337    pub headline: Option<String>,
1338    /// Card final URL
1339    #[serde(rename = "finalUrl", default, skip_serializing_if = "Option::is_none")]
1340    pub final_url: Option<String>,
1341    /// Call to action label
1342    #[serde(
1343        rename = "callToActionLabel",
1344        default,
1345        skip_serializing_if = "Option::is_none"
1346    )]
1347    pub call_to_action_label: Option<String>,
1348    /// Card media items
1349    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1350    pub media: Vec<GoogleMediaDTO>,
1351}
1352
1353/// `GoogleDemographicTargetDTO` from the GoHighLevel OpenAPI spec.
1354#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1355pub struct GoogleDemographicTargetDTO {
1356    /// Demographic enum value
1357    /// Required by the API.
1358    #[serde(rename = "enum")]
1359    pub enum_: String,
1360    /// Whether this is a negative target
1361    /// Required by the API.
1362    pub negative: bool,
1363}
1364
1365/// `GoogleGeoLocationDTO` from the GoHighLevel OpenAPI spec.
1366#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1367pub struct GoogleGeoLocationDTO {
1368    /// Geo target constant resource name
1369    #[serde(default, skip_serializing_if = "Option::is_none")]
1370    pub key: Option<String>,
1371    /// Location identifier (place_id)
1372    #[serde(default, skip_serializing_if = "Option::is_none")]
1373    pub id: Option<String>,
1374    /// Location display name
1375    #[serde(default, skip_serializing_if = "Option::is_none")]
1376    pub name: Option<String>,
1377    /// Country name
1378    #[serde(default, skip_serializing_if = "Option::is_none")]
1379    pub country_name: Option<String>,
1380    /// Location type (city, region, country, address, etc.)
1381    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1382    pub type_: Option<String>,
1383    /// Radius for proximity targeting
1384    #[serde(default, skip_serializing_if = "Option::is_none")]
1385    pub radius: Option<f64>,
1386    /// Radius unit
1387    /// Allowed values: `km`, `mi`.
1388    #[serde(
1389        rename = "radiusUnit",
1390        default,
1391        skip_serializing_if = "Option::is_none"
1392    )]
1393    pub radius_unit: Option<String>,
1394    /// Include or exclude this location
1395    /// Allowed values: `include`, `exclude`.
1396    #[serde(
1397        rename = "selectionType",
1398        default,
1399        skip_serializing_if = "Option::is_none"
1400    )]
1401    pub selection_type: Option<String>,
1402    /// Google Ads resource name
1403    #[serde(
1404        rename = "resourceName",
1405        default,
1406        skip_serializing_if = "Option::is_none"
1407    )]
1408    pub resource_name: Option<String>,
1409    /// Google place ID
1410    #[serde(default, skip_serializing_if = "Option::is_none")]
1411    pub place_id: Option<String>,
1412    /// Full formatted address string
1413    #[serde(default, skip_serializing_if = "Option::is_none")]
1414    pub formatted_address: Option<String>,
1415    /// Geometry data from Google Geocoding API
1416    #[serde(default, skip_serializing_if = "Option::is_none")]
1417    pub geometry: Option<GeoGeometryDTO>,
1418    /// Address components from Google Geocoding API
1419    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1420    pub address_components: Vec<GeoAddressComponentDTO>,
1421}
1422
1423/// `GoogleKeywordItemDTO` from the GoHighLevel OpenAPI spec.
1424#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1425pub struct GoogleKeywordItemDTO {
1426    /// Keyword text
1427    /// Required by the API.
1428    pub keyword: String,
1429    /// Match type (BROAD, PHRASE, EXACT)
1430    /// Required by the API.
1431    #[serde(rename = "matchType")]
1432    pub match_type: String,
1433}
1434
1435/// `GoogleKeywordsDTO` from the GoHighLevel OpenAPI spec.
1436#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1437pub struct GoogleKeywordsDTO {
1438    /// Positive keywords
1439    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1440    pub positives: Vec<GoogleKeywordItemDTO>,
1441    /// Negative keywords
1442    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1443    pub negatives: Vec<GoogleKeywordItemDTO>,
1444}
1445
1446/// `GoogleLocaleDTO` from the GoHighLevel OpenAPI spec.
1447#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1448pub struct GoogleLocaleDTO {
1449    /// Language display name
1450    #[serde(default, skip_serializing_if = "Option::is_none")]
1451    pub name: Option<String>,
1452    /// Language key
1453    #[serde(default, skip_serializing_if = "Option::is_none")]
1454    pub key: Option<String>,
1455    /// Language identifier
1456    #[serde(default, skip_serializing_if = "Option::is_none")]
1457    pub id: Option<String>,
1458    /// Language resource name
1459    #[serde(
1460        rename = "resourceName",
1461        default,
1462        skip_serializing_if = "Option::is_none"
1463    )]
1464    pub resource_name: Option<String>,
1465}
1466
1467/// `GoogleMediaDTO` from the GoHighLevel OpenAPI spec.
1468#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1469pub struct GoogleMediaDTO {
1470    /// Media type
1471    /// Allowed values: `IMAGE`.
1472    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1473    pub type_: Option<String>,
1474    /// Media source URL
1475    #[serde(default, skip_serializing_if = "Option::is_none")]
1476    pub src: Option<String>,
1477    /// Is logo flag
1478    #[serde(rename = "isLogo", default, skip_serializing_if = "Option::is_none")]
1479    pub is_logo: Option<bool>,
1480    /// Error message if media failed
1481    #[serde(default, skip_serializing_if = "Option::is_none")]
1482    pub error: Option<String>,
1483    /// Public URL of the media
1484    #[serde(default, skip_serializing_if = "Option::is_none")]
1485    pub url: Option<String>,
1486    /// Image type classification
1487    #[serde(rename = "imageType", default, skip_serializing_if = "Option::is_none")]
1488    pub image_type: Option<String>,
1489}
1490
1491/// `GoogleNetworkSettingsDTO` from the GoHighLevel OpenAPI spec.
1492#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1493pub struct GoogleNetworkSettingsDTO {
1494    /// Target Google Search Network
1495    /// Required by the API.
1496    #[serde(rename = "targetSearchNetwork")]
1497    pub target_search_network: bool,
1498    /// Target Google Display Network
1499    /// Required by the API.
1500    #[serde(rename = "targetContentNetwork")]
1501    pub target_content_network: bool,
1502}
1503
1504/// `GoogleSegmentTargetDTO` from the GoHighLevel OpenAPI spec.
1505#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1506pub struct GoogleSegmentTargetDTO {
1507    /// Segment type
1508    /// Required by the API.
1509    #[serde(rename = "type")]
1510    pub type_: String,
1511    /// Segment identifier
1512    /// Required by the API.
1513    pub id: String,
1514}
1515
1516/// `GoogleTargetInterestsDTO` from the GoHighLevel OpenAPI spec.
1517#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1518pub struct GoogleTargetInterestsDTO {
1519    /// Affinity audience IDs
1520    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1521    pub affinity: Vec<String>,
1522    /// In-market audience IDs
1523    #[serde(rename = "inMarket", default, skip_serializing_if = "Vec::is_empty")]
1524    pub in_market: Vec<String>,
1525}
1526
1527/// `GoogleYouTubeVideoLinkDTO` from the GoHighLevel OpenAPI spec.
1528#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1529pub struct GoogleYouTubeVideoLinkDTO {
1530    /// YouTube video ID
1531    /// Required by the API.
1532    #[serde(rename = "youtubeVideoId")]
1533    pub youtube_video_id: String,
1534}
1535
1536/// `GreetingCard` from the GoHighLevel OpenAPI spec.
1537#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1538pub struct GreetingCard {
1539    /// Greeting card title
1540    /// Required by the API.
1541    pub title: String,
1542    /// Greeting card style
1543    /// Required by the API.
1544    pub style: String,
1545    /// Greeting card content
1546    /// Required by the API.
1547    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1548    pub content: Vec<String>,
1549}
1550
1551/// `HiddenFieldDTO` from the GoHighLevel OpenAPI spec.
1552#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1553pub struct HiddenFieldDTO {
1554    /// Field name
1555    /// Required by the API.
1556    pub name: String,
1557    /// Field value
1558    /// Required by the API.
1559    pub value: String,
1560}
1561
1562/// `KeywordSuggestionDTO` from the GoHighLevel OpenAPI spec.
1563#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1564pub struct KeywordSuggestionDTO {
1565    /// Target URL
1566    /// Required by the API.
1567    pub url: String,
1568    /// Language code
1569    #[serde(
1570        rename = "languageCode",
1571        default,
1572        skip_serializing_if = "Option::is_none"
1573    )]
1574    pub language_code: Option<String>,
1575    /// Target locations
1576    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1577    pub locations: Vec<String>,
1578    /// Seed keywords
1579    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1580    pub keywords: Vec<String>,
1581}
1582
1583/// `LeadFormAssetPayloadDTO` from the GoHighLevel OpenAPI spec.
1584#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1585pub struct LeadFormAssetPayloadDTO {
1586    /// Google Ads resource name for an existing lead form asset
1587    #[serde(
1588        rename = "resourceName",
1589        default,
1590        skip_serializing_if = "Option::is_none"
1591    )]
1592    pub resource_name: Option<String>,
1593    /// Lead form headline
1594    /// Required by the API.
1595    pub headline: String,
1596    /// Lead form description
1597    /// Required by the API.
1598    pub description: String,
1599    /// Business name shown on the form
1600    /// Required by the API.
1601    #[serde(rename = "businessName")]
1602    pub business_name: String,
1603    /// Privacy policy URL
1604    /// Required by the API.
1605    #[serde(rename = "privacyPolicyUrl")]
1606    pub privacy_policy_url: String,
1607    /// Form fields to collect user input
1608    /// Required by the API.
1609    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1610    pub fields: Vec<LeadFormFieldDTO>,
1611    /// Call to action button type
1612    /// Allowed values: `LEARN_MORE`, `GET_QUOTE`, `APPLY_NOW`, `SIGN_UP`, `CONTACT_US`,
1613    /// `SUBSCRIBE`, `DOWNLOAD`, `BOOK_NOW`, `GET_OFFER`, `REGISTER`, `GET_INFO`,
1614    /// `REQUEST_DEMO`.
1615    /// Required by the API.
1616    #[serde(rename = "callToActionType")]
1617    pub call_to_action_type: String,
1618    /// Description text for the CTA button
1619    #[serde(
1620        rename = "callToActionDescription",
1621        default,
1622        skip_serializing_if = "Option::is_none"
1623    )]
1624    pub call_to_action_description: Option<String>,
1625    /// Background image asset resource name
1626    #[serde(
1627        rename = "backgroundImageAsset",
1628        default,
1629        skip_serializing_if = "Option::is_none"
1630    )]
1631    pub background_image_asset: Option<String>,
1632    /// Desired lead intent level
1633    /// Allowed values: `LOW_INTENT`, `HIGH_INTENT`.
1634    #[serde(
1635        rename = "desiredIntent",
1636        default,
1637        skip_serializing_if = "Option::is_none"
1638    )]
1639    pub desired_intent: Option<String>,
1640    /// Custom question fields appended after standard fields
1641    #[serde(
1642        rename = "customQuestionFields",
1643        default,
1644        skip_serializing_if = "Vec::is_empty"
1645    )]
1646    pub custom_question_fields: Vec<CustomQuestionFieldDTO>,
1647    /// Headline shown after form submission
1648    #[serde(
1649        rename = "postSubmitHeadline",
1650        default,
1651        skip_serializing_if = "Option::is_none"
1652    )]
1653    pub post_submit_headline: Option<String>,
1654    /// Description shown after form submission
1655    #[serde(
1656        rename = "postSubmitDescription",
1657        default,
1658        skip_serializing_if = "Option::is_none"
1659    )]
1660    pub post_submit_description: Option<String>,
1661    /// Post-submit CTA button type
1662    /// Allowed values: `VISIT_SITE`, `DOWNLOAD`, `LEARN_MORE`, `SHOP_NOW`.
1663    #[serde(
1664        rename = "postSubmitCallToActionType",
1665        default,
1666        skip_serializing_if = "Option::is_none"
1667    )]
1668    pub post_submit_call_to_action_type: Option<String>,
1669    /// Final URL shown after form submission
1670    #[serde(rename = "finalUrls", default, skip_serializing_if = "Option::is_none")]
1671    pub final_urls: Option<String>,
1672}
1673
1674/// `LeadFormContentDTO` from the GoHighLevel OpenAPI spec.
1675#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1676pub struct LeadFormContentDTO {
1677    /// Form questions
1678    /// Required by the API.
1679    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1680    pub questions: Vec<LeadFormQuestionDTO>,
1681    /// Form description
1682    #[serde(default, skip_serializing_if = "Option::is_none")]
1683    pub description: Option<LocalizedStringDTO>,
1684    /// Form headline
1685    /// Required by the API.
1686    pub headline: LocalizedStringDTO,
1687    /// Post-submission info
1688    /// Required by the API.
1689    #[serde(rename = "postSubmissionInfo")]
1690    pub post_submission_info: PostSubmissionInfoDTO,
1691    /// Legal information
1692    /// Required by the API.
1693    #[serde(rename = "legalInfo")]
1694    pub legal_info: LegalInfoDTO,
1695}
1696
1697/// `LeadFormFieldDTO` from the GoHighLevel OpenAPI spec.
1698#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1699pub struct LeadFormFieldDTO {
1700    /// Field input type from Google Ads LeadFormFieldUserInputType
1701    /// Required by the API.
1702    #[serde(rename = "inputType")]
1703    pub input_type: String,
1704    /// Single-choice answer options for the field
1705    #[serde(
1706        rename = "singleChoiceAnswers",
1707        default,
1708        skip_serializing_if = "Vec::is_empty"
1709    )]
1710    pub single_choice_answers: Vec<String>,
1711}
1712
1713/// `LeadFormQuestionDTO` from the GoHighLevel OpenAPI spec.
1714#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1715pub struct LeadFormQuestionDTO {
1716    /// Question text
1717    /// Required by the API.
1718    pub question: LocalizedStringDTO,
1719    /// Question field name
1720    /// Required by the API.
1721    pub name: String,
1722    /// Question type details
1723    /// Required by the API.
1724    #[serde(rename = "questionDetails")]
1725    pub question_details: QuestionDetailsDTO,
1726    /// Predefined field identifier
1727    #[serde(
1728        rename = "predefinedField",
1729        default,
1730        skip_serializing_if = "Option::is_none"
1731    )]
1732    pub predefined_field: Option<String>,
1733}
1734
1735/// `LegalInfoDTO` from the GoHighLevel OpenAPI spec.
1736#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1737pub struct LegalInfoDTO {
1738    /// Consent entries
1739    /// Required by the API.
1740    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1741    pub consents: Vec<ConsentDTO>,
1742    /// Privacy policy URL
1743    /// Required by the API.
1744    #[serde(rename = "privacyPolicyUrl")]
1745    pub privacy_policy_url: String,
1746    /// Legal disclaimer text
1747    #[serde(
1748        rename = "legalDisclaimer",
1749        default,
1750        skip_serializing_if = "Option::is_none"
1751    )]
1752    pub legal_disclaimer: Option<LocalizedStringDTO>,
1753}
1754
1755/// `LinkedInAdDTO` from the GoHighLevel OpenAPI spec.
1756#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1757pub struct LinkedInAdDTO {
1758    #[serde(default, skip_serializing_if = "Option::is_none")]
1759    pub id: Option<String>,
1760    #[serde(default, skip_serializing_if = "Option::is_none")]
1761    pub name: Option<String>,
1762    #[serde(
1763        rename = "introductoryText",
1764        default,
1765        skip_serializing_if = "Option::is_none"
1766    )]
1767    pub introductory_text: Option<String>,
1768    #[serde(
1769        rename = "destinationUrl",
1770        default,
1771        skip_serializing_if = "Option::is_none"
1772    )]
1773    pub destination_url: Option<String>,
1774    #[serde(
1775        rename = "callToActionLabel",
1776        default,
1777        skip_serializing_if = "Option::is_none"
1778    )]
1779    pub call_to_action_label: Option<String>,
1780    #[serde(
1781        rename = "destinationFormId",
1782        default,
1783        skip_serializing_if = "Option::is_none"
1784    )]
1785    pub destination_form_id: Option<String>,
1786    #[serde(
1787        rename = "contentReferenceString",
1788        default,
1789        skip_serializing_if = "Option::is_none"
1790    )]
1791    pub content_reference_string: Option<String>,
1792    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1793    pub media: Vec<LinkedInMediaDTO>,
1794    #[serde(
1795        rename = "adCampaignId",
1796        default,
1797        skip_serializing_if = "Option::is_none"
1798    )]
1799    pub ad_campaign_id: Option<String>,
1800    #[serde(rename = "adId", default, skip_serializing_if = "Option::is_none")]
1801    pub ad_id: Option<String>,
1802    #[serde(default, skip_serializing_if = "Option::is_none")]
1803    pub headline: Option<String>,
1804    /// Allowed values: `DRAFT`, `SCHEDULED`, `PUBLISHED`, `PUBLISHING`, `FAILED`, `IN_REVIEW`,
1805    /// `PAUSED`, `ARCHIVED`, `WITH_ISSUES`, `REJECTED`.
1806    #[serde(
1807        rename = "publishingStatus",
1808        default,
1809        skip_serializing_if = "Option::is_none"
1810    )]
1811    pub publishing_status: Option<String>,
1812    #[serde(
1813        rename = "adCampaignGroupId",
1814        default,
1815        skip_serializing_if = "Option::is_none"
1816    )]
1817    pub ad_campaign_group_id: Option<String>,
1818    #[serde(default, skip_serializing_if = "Option::is_none")]
1819    pub description: Option<String>,
1820    #[serde(default, skip_serializing_if = "Option::is_none")]
1821    pub meta: Option<serde_json::Value>,
1822    /// LinkedIn API error message
1823    #[serde(
1824        rename = "linkedInError",
1825        default,
1826        skip_serializing_if = "Option::is_none"
1827    )]
1828    pub linked_in_error: Option<String>,
1829}
1830
1831/// `LinkedInBudgetDTO` from the GoHighLevel OpenAPI spec.
1832#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1833pub struct LinkedInBudgetDTO {
1834    /// Allowed values: `DAILY`, `LIFETIME`.
1835    #[serde(
1836        rename = "budgetType",
1837        default,
1838        skip_serializing_if = "Option::is_none"
1839    )]
1840    pub budget_type: Option<String>,
1841    #[serde(default, skip_serializing_if = "Option::is_none")]
1842    pub amount: Option<f64>,
1843    /// Schedule start date (ISO 8601)
1844    #[serde(
1845        rename = "scheduleStartDate",
1846        default,
1847        skip_serializing_if = "Option::is_none"
1848    )]
1849    pub schedule_start_date: Option<String>,
1850    /// Schedule end date (ISO 8601)
1851    #[serde(
1852        rename = "scheduleEndDate",
1853        default,
1854        skip_serializing_if = "Option::is_none"
1855    )]
1856    pub schedule_end_date: Option<String>,
1857}
1858
1859/// `LinkedInCreateLeadFormBodyDTO` from the GoHighLevel OpenAPI spec.
1860#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1861pub struct LinkedInCreateLeadFormBodyDTO {
1862    /// Form owner
1863    /// Required by the API.
1864    pub owner: SponsoredAccountOwnerDTO,
1865    /// Creation locale
1866    /// Required by the API.
1867    #[serde(rename = "creationLocale")]
1868    pub creation_locale: CreationLocaleDTO,
1869    /// Form name
1870    /// Required by the API.
1871    pub name: String,
1872    /// Form state
1873    /// Allowed values: `PUBLISHED`.
1874    /// Required by the API.
1875    pub state: String,
1876    /// Form content
1877    /// Required by the API.
1878    pub content: LeadFormContentDTO,
1879    /// Hidden fields
1880    #[serde(
1881        rename = "hiddenFields",
1882        default,
1883        skip_serializing_if = "Vec::is_empty"
1884    )]
1885    pub hidden_fields: Vec<HiddenFieldDTO>,
1886}
1887
1888/// `LinkedInMediaDTO` from the GoHighLevel OpenAPI spec.
1889#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1890pub struct LinkedInMediaDTO {
1891    /// Media type
1892    /// Allowed values: `video`, `image`.
1893    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1894    pub type_: Option<String>,
1895    /// Media source URL
1896    #[serde(default, skip_serializing_if = "Option::is_none")]
1897    pub src: Option<String>,
1898    /// Video frame URLs
1899    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1900    pub frames: Vec<String>,
1901    /// Selected poster frame index
1902    #[serde(
1903        rename = "selectedPoster",
1904        default,
1905        skip_serializing_if = "Option::is_none"
1906    )]
1907    pub selected_poster: Option<f64>,
1908    /// Thumbnail URL
1909    #[serde(
1910        rename = "thumbnailUrl",
1911        default,
1912        skip_serializing_if = "Option::is_none"
1913    )]
1914    pub thumbnail_url: Option<String>,
1915    /// Media name
1916    #[serde(default, skip_serializing_if = "Option::is_none")]
1917    pub name: Option<String>,
1918    /// Media headline
1919    #[serde(default, skip_serializing_if = "Option::is_none")]
1920    pub headline: Option<String>,
1921    /// Click-through destination URL
1922    #[serde(
1923        rename = "destinationUrl",
1924        default,
1925        skip_serializing_if = "Option::is_none"
1926    )]
1927    pub destination_url: Option<String>,
1928    /// File size in bytes
1929    #[serde(
1930        rename = "fileSizeBytes",
1931        default,
1932        skip_serializing_if = "Option::is_none"
1933    )]
1934    pub file_size_bytes: Option<f64>,
1935}
1936
1937/// `LinkedInUpdateAdStatusBodyDTO` from the GoHighLevel OpenAPI spec.
1938#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1939pub struct LinkedInUpdateAdStatusBodyDTO {
1940    /// Update operation
1941    /// Allowed values: `PAUSED`, `ARCHIVED`, `RESUME`.
1942    /// Required by the API.
1943    #[serde(rename = "operationType")]
1944    pub operation_type: String,
1945    /// Ad object type
1946    /// Allowed values: `adGroup`, `adCampaign`, `ad`.
1947    /// Required by the API.
1948    #[serde(rename = "type")]
1949    pub type_: String,
1950}
1951
1952/// `LocaleDTO` from the GoHighLevel OpenAPI spec.
1953#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1954pub struct LocaleDTO {
1955    /// Country code
1956    /// Required by the API.
1957    pub country: String,
1958    /// Language code
1959    /// Required by the API.
1960    pub language: String,
1961}
1962
1963/// `LocalizedStringDTO` from the GoHighLevel OpenAPI spec.
1964#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1965pub struct LocalizedStringDTO {
1966    /// Locale-keyed string map
1967    /// Required by the API.
1968    pub localized: serde_json::Value,
1969}
1970
1971/// `LocationIdBodyDTO` from the GoHighLevel OpenAPI spec.
1972#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1973pub struct LocationIdBodyDTO {
1974    /// Location identifier
1975    /// Required by the API.
1976    #[serde(rename = "locationId")]
1977    pub location_id: String,
1978}
1979
1980/// `MediaDTO` from the GoHighLevel OpenAPI spec.
1981#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1982pub struct MediaDTO {
1983    /// Media source URL
1984    /// Required by the API.
1985    pub src: String,
1986    /// Thumbnail URL (required when type is video)
1987    #[serde(
1988        rename = "thumbnailUrl",
1989        default,
1990        skip_serializing_if = "Option::is_none"
1991    )]
1992    pub thumbnail_url: Option<String>,
1993    /// Selected poster index (required when type is video)
1994    #[serde(
1995        rename = "selectedPoster",
1996        default,
1997        skip_serializing_if = "Option::is_none"
1998    )]
1999    pub selected_poster: Option<f64>,
2000    /// Media content type
2001    /// Allowed values: `image`, `video`.
2002    /// Required by the API.
2003    #[serde(rename = "type")]
2004    pub type_: String,
2005    /// Media file name
2006    #[serde(default, skip_serializing_if = "Option::is_none")]
2007    pub name: Option<String>,
2008    /// Media headline
2009    #[serde(default, skip_serializing_if = "Option::is_none")]
2010    pub headline: Option<String>,
2011    /// Media description
2012    #[serde(default, skip_serializing_if = "Option::is_none")]
2013    pub description: Option<String>,
2014    /// Media destination link
2015    #[serde(default, skip_serializing_if = "Option::is_none")]
2016    pub link: Option<String>,
2017}
2018
2019/// `MemberDTO` from the GoHighLevel OpenAPI spec.
2020#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2021pub struct MemberDTO {
2022    /// Member type
2023    /// Allowed values: `KEYWORD`, `URL`, `APP`.
2024    /// Required by the API.
2025    #[serde(rename = "memberType")]
2026    pub member_type: String,
2027    /// Keyword value
2028    #[serde(default, skip_serializing_if = "Option::is_none")]
2029    pub keyword: Option<String>,
2030    /// URL value
2031    #[serde(default, skip_serializing_if = "Option::is_none")]
2032    pub url: Option<String>,
2033    /// App identifier
2034    #[serde(default, skip_serializing_if = "Option::is_none")]
2035    pub app: Option<String>,
2036}
2037
2038/// `MultipleChoiceOptionDTO` from the GoHighLevel OpenAPI spec.
2039#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2040pub struct MultipleChoiceOptionDTO {
2041    /// Option ID
2042    /// Required by the API.
2043    pub id: f64,
2044    /// Option text
2045    /// Required by the API.
2046    pub text: LocalizedStringDTO,
2047}
2048
2049/// `MultipleChoiceQuestionDetailsDTO` from the GoHighLevel OpenAPI spec.
2050#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2051pub struct MultipleChoiceQuestionDetailsDTO {
2052    /// Choice options
2053    /// Required by the API.
2054    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2055    pub options: Vec<MultipleChoiceOptionDTO>,
2056}
2057
2058/// `PostSubmissionCallToActionDTO` from the GoHighLevel OpenAPI spec.
2059#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2060pub struct PostSubmissionCallToActionDTO {
2061    /// Call to action target
2062    /// Required by the API.
2063    #[serde(rename = "callToActionTarget")]
2064    pub call_to_action_target: PostSubmissionCallToActionTargetDTO,
2065    /// Call to action label
2066    /// Allowed values: `VISIT_COMPANY_WEBSITE`, `DOWNLOAD_NOW`, `TRY_NOW`, `VIEW_NOW`,
2067    /// `LEARN_MORE`.
2068    /// Required by the API.
2069    #[serde(rename = "callToActionLabel")]
2070    pub call_to_action_label: String,
2071}
2072
2073/// `PostSubmissionCallToActionTargetDTO` from the GoHighLevel OpenAPI spec.
2074#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2075pub struct PostSubmissionCallToActionTargetDTO {
2076    /// Landing page URL
2077    /// Required by the API.
2078    #[serde(rename = "landingPageUrl")]
2079    pub landing_page_url: String,
2080}
2081
2082/// `PostSubmissionInfoDTO` from the GoHighLevel OpenAPI spec.
2083#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2084pub struct PostSubmissionInfoDTO {
2085    /// Thank-you message
2086    /// Required by the API.
2087    pub message: LocalizedStringDTO,
2088    /// Post-submission call to action
2089    /// Required by the API.
2090    #[serde(rename = "callToAction")]
2091    pub call_to_action: PostSubmissionCallToActionDTO,
2092}
2093
2094/// `PublishAdDTO` from the GoHighLevel OpenAPI spec.
2095#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2096pub struct PublishAdDTO {
2097    /// Location identifier
2098    /// Required by the API.
2099    #[serde(rename = "locationId")]
2100    pub location_id: String,
2101}
2102
2103/// `QuestionDetailsDTO` from the GoHighLevel OpenAPI spec.
2104#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2105pub struct QuestionDetailsDTO {
2106    /// Text question details (empty object for text questions)
2107    #[serde(
2108        rename = "textQuestionDetails",
2109        default,
2110        skip_serializing_if = "Option::is_none"
2111    )]
2112    pub text_question_details: Option<serde_json::Value>,
2113    /// Multiple choice question details
2114    #[serde(
2115        rename = "multipleChoiceQuestionDetails",
2116        default,
2117        skip_serializing_if = "Option::is_none"
2118    )]
2119    pub multiple_choice_question_details: Option<MultipleChoiceQuestionDetailsDTO>,
2120}
2121
2122/// `RuleBasedUserListDTO` from the GoHighLevel OpenAPI spec.
2123#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2124pub struct RuleBasedUserListDTO {
2125    /// Prepopulation status
2126    /// Allowed values: `REQUESTED`.
2127    #[serde(
2128        rename = "prepopulationStatus",
2129        default,
2130        skip_serializing_if = "Option::is_none"
2131    )]
2132    pub prepopulation_status: Option<String>,
2133    /// Flexible rule user list configuration
2134    /// Required by the API.
2135    #[serde(rename = "flexibleRuleUserList")]
2136    pub flexible_rule_user_list: FlexibleRuleUserListDTO,
2137}
2138
2139/// `RuleDTO` from the GoHighLevel OpenAPI spec.
2140#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2141pub struct RuleDTO {
2142    /// List of rule item groups
2143    /// Required by the API.
2144    #[serde(
2145        rename = "ruleItemGroups",
2146        default,
2147        skip_serializing_if = "Vec::is_empty"
2148    )]
2149    pub rule_item_groups: Vec<RuleItemGroupDTO>,
2150}
2151
2152/// `RuleItemDTO` from the GoHighLevel OpenAPI spec.
2153#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2154pub struct RuleItemDTO {
2155    /// Rule item name
2156    /// Allowed values: `url__`, `referrer__`.
2157    /// Required by the API.
2158    pub name: String,
2159    /// String rule item condition
2160    /// Required by the API.
2161    #[serde(rename = "stringRuleItem")]
2162    pub string_rule_item: StringRuleItemDTO,
2163}
2164
2165/// `RuleItemGroupDTO` from the GoHighLevel OpenAPI spec.
2166#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2167pub struct RuleItemGroupDTO {
2168    /// List of rule items
2169    /// Required by the API.
2170    #[serde(rename = "ruleItems", default, skip_serializing_if = "Vec::is_empty")]
2171    pub rule_items: Vec<RuleItemDTO>,
2172}
2173
2174/// `RuleOperandDTO` from the GoHighLevel OpenAPI spec.
2175#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2176pub struct RuleOperandDTO {
2177    /// Lookback window in days
2178    /// Required by the API.
2179    #[serde(rename = "lookbackWindowDays")]
2180    pub lookback_window_days: f64,
2181    /// Rule definition
2182    /// Required by the API.
2183    pub rule: RuleDTO,
2184}
2185
2186/// `SelectedAttributeDTO` from the GoHighLevel OpenAPI spec.
2187#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2188pub struct SelectedAttributeDTO {
2189    /// Targeting attribute URN
2190    /// Required by the API.
2191    pub urn: String,
2192    /// Display name
2193    /// Required by the API.
2194    pub name: String,
2195    /// Category name
2196    /// Required by the API.
2197    #[serde(rename = "categoryName")]
2198    pub category_name: String,
2199    /// Facet identifier
2200    /// Required by the API.
2201    pub facet: String,
2202}
2203
2204/// `SitelinkAssetPayloadDTO` from the GoHighLevel OpenAPI spec.
2205#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2206pub struct SitelinkAssetPayloadDTO {
2207    /// Google Ads resource name for an existing sitelink asset
2208    #[serde(
2209        rename = "resourceName",
2210        default,
2211        skip_serializing_if = "Option::is_none"
2212    )]
2213    pub resource_name: Option<String>,
2214    /// Sitelink display text
2215    /// Required by the API.
2216    #[serde(rename = "linkText")]
2217    pub link_text: String,
2218    /// Final landing page URL
2219    /// Required by the API.
2220    #[serde(rename = "finalUrls")]
2221    pub final_urls: String,
2222    /// First description line
2223    #[serde(default, skip_serializing_if = "Option::is_none")]
2224    pub description1: Option<String>,
2225    /// Second description line
2226    #[serde(default, skip_serializing_if = "Option::is_none")]
2227    pub description2: Option<String>,
2228    /// Start date for the sitelink (YYYY-MM-DD)
2229    #[serde(rename = "startDate", default, skip_serializing_if = "Option::is_none")]
2230    pub start_date: Option<String>,
2231    /// End date for the sitelink (YYYY-MM-DD)
2232    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
2233    pub end_date: Option<String>,
2234    /// Ad schedule targets restricting when the sitelink is shown
2235    #[serde(
2236        rename = "adScheduleTargets",
2237        default,
2238        skip_serializing_if = "Vec::is_empty"
2239    )]
2240    pub ad_schedule_targets: Vec<AdScheduleTargetDTO>,
2241}
2242
2243/// `SponsoredAccountOwnerDTO` from the GoHighLevel OpenAPI spec.
2244#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2245pub struct SponsoredAccountOwnerDTO {
2246    /// Sponsored account URN
2247    /// Required by the API.
2248    #[serde(rename = "sponsoredAccount")]
2249    pub sponsored_account: String,
2250}
2251
2252/// `StringRuleItemDTO` from the GoHighLevel OpenAPI spec.
2253#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2254pub struct StringRuleItemDTO {
2255    /// Rule operator
2256    /// Required by the API.
2257    pub operator: String,
2258    /// Rule value
2259    /// Required by the API.
2260    pub value: String,
2261}
2262
2263/// `TargetAudienceDTO` from the GoHighLevel OpenAPI spec.
2264#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2265pub struct TargetAudienceDTO {
2266    /// Included targeting attributes (groups of ANDed attributes, ORed together)
2267    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2268    pub include: Vec<Vec<SelectedAttributeDTO>>,
2269    /// Excluded targeting attributes
2270    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2271    pub exclude: Vec<Vec<SelectedAttributeDTO>>,
2272}
2273
2274/// `ThankYouPage` from the GoHighLevel OpenAPI spec.
2275#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2276pub struct ThankYouPage {
2277    /// Thank you page title
2278    /// Required by the API.
2279    pub title: String,
2280    /// Thank you page body
2281    /// Required by the API.
2282    pub body: String,
2283    /// Button text label
2284    /// Required by the API.
2285    #[serde(rename = "buttonText")]
2286    pub button_text: String,
2287    /// Button action type
2288    /// Required by the API.
2289    #[serde(rename = "buttonType")]
2290    pub button_type: String,
2291    /// Button destination link
2292    #[serde(
2293        rename = "buttonLink",
2294        default,
2295        skip_serializing_if = "Option::is_none"
2296    )]
2297    pub button_link: Option<String>,
2298    /// Business phone number
2299    #[serde(
2300        rename = "businessPhone",
2301        default,
2302        skip_serializing_if = "Option::is_none"
2303    )]
2304    pub business_phone: Option<String>,
2305    /// Phone country code
2306    #[serde(
2307        rename = "countryCode",
2308        default,
2309        skip_serializing_if = "Option::is_none"
2310    )]
2311    pub country_code: Option<String>,
2312}
2313
2314/// `UnitCostDTO` from the GoHighLevel OpenAPI spec.
2315#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2316pub struct UnitCostDTO {
2317    /// Bid amount in currency minor units
2318    /// Required by the API.
2319    pub amount: f64,
2320}
2321
2322/// `UpdateCustomAudienceBatchDTO` from the GoHighLevel OpenAPI spec.
2323#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2324pub struct UpdateCustomAudienceBatchDTO {
2325    /// Location identifier
2326    /// Required by the API.
2327    #[serde(rename = "locationId")]
2328    pub location_id: String,
2329    /// CSV file path
2330    #[serde(rename = "csvPath", default, skip_serializing_if = "Option::is_none")]
2331    pub csv_path: Option<String>,
2332    /// Batch operation type
2333    /// Required by the API.
2334    #[serde(rename = "operationType")]
2335    pub operation_type: String,
2336    /// Smartlist IDs array
2337    #[serde(
2338        rename = "smartlistIds",
2339        default,
2340        skip_serializing_if = "Vec::is_empty"
2341    )]
2342    pub smartlist_ids: Vec<String>,
2343    /// Dynamic audience flag
2344    #[serde(
2345        rename = "dynamicAudience",
2346        default,
2347        skip_serializing_if = "Option::is_none"
2348    )]
2349    pub dynamic_audience: Option<String>,
2350}
2351
2352/// `UpdateCustomAudienceDTO` from the GoHighLevel OpenAPI spec.
2353#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2354pub struct UpdateCustomAudienceDTO {
2355    /// Location identifier
2356    /// Required by the API.
2357    #[serde(rename = "locationId")]
2358    pub location_id: String,
2359    /// Contact identifier
2360    /// Required by the API.
2361    #[serde(rename = "contactId")]
2362    pub contact_id: String,
2363    /// Facebook ad account ID
2364    #[serde(
2365        rename = "fbAdAccountId",
2366        default,
2367        skip_serializing_if = "Option::is_none"
2368    )]
2369    pub fb_ad_account_id: Option<String>,
2370}
2371
2372/// `UpsertAdDTO` from the GoHighLevel OpenAPI spec.
2373#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2374pub struct UpsertAdDTO {
2375    /// Ad identifier
2376    #[serde(default, skip_serializing_if = "Option::is_none")]
2377    pub id: Option<String>,
2378    /// Location identifier
2379    /// Required by the API.
2380    #[serde(rename = "locationId")]
2381    pub location_id: String,
2382    /// Ad name
2383    #[serde(default, skip_serializing_if = "Option::is_none")]
2384    pub name: Option<String>,
2385    /// Ad primary text
2386    #[serde(
2387        rename = "primaryText",
2388        default,
2389        skip_serializing_if = "Option::is_none"
2390    )]
2391    pub primary_text: Option<String>,
2392    /// Ad headline text
2393    #[serde(default, skip_serializing_if = "Option::is_none")]
2394    pub headline: Option<String>,
2395    /// Ad description text
2396    #[serde(default, skip_serializing_if = "Option::is_none")]
2397    pub description: Option<String>,
2398    /// Ad image URL
2399    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
2400    pub image_url: Option<String>,
2401    /// Ad media type
2402    /// Allowed values: `SINGLE`, `CAROUSEL`.
2403    #[serde(rename = "mediaType", default, skip_serializing_if = "Option::is_none")]
2404    pub media_type: Option<String>,
2405    /// Media items (images or videos) attached to the ad creative
2406    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2407    pub media: Vec<MediaDTO>,
2408    /// Enable multi-advertiser ads
2409    #[serde(
2410        rename = "multiAdvertiserAds",
2411        default,
2412        skip_serializing_if = "Option::is_none"
2413    )]
2414    pub multi_advertiser_ads: Option<bool>,
2415    /// Parent campaign ID
2416    /// Required by the API.
2417    #[serde(rename = "campaignId")]
2418    pub campaign_id: String,
2419    /// Parent ad set ID
2420    /// Required by the API.
2421    #[serde(rename = "adsetId")]
2422    pub adset_id: String,
2423    /// Call to action type
2424    #[serde(default, skip_serializing_if = "Option::is_none")]
2425    pub cta: Option<String>,
2426    /// Conversation form ID
2427    #[serde(
2428        rename = "conversationFormId",
2429        default,
2430        skip_serializing_if = "Option::is_none"
2431    )]
2432    pub conversation_form_id: Option<String>,
2433    /// Destination link URL
2434    #[serde(
2435        rename = "destinationLink",
2436        default,
2437        skip_serializing_if = "Option::is_none"
2438    )]
2439    pub destination_link: Option<String>,
2440    /// Destination form ID
2441    #[serde(
2442        rename = "destinationFormId",
2443        default,
2444        skip_serializing_if = "Option::is_none"
2445    )]
2446    pub destination_form_id: Option<String>,
2447}
2448
2449/// `UpsertAdsetDTO` from the GoHighLevel OpenAPI spec.
2450#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2451pub struct UpsertAdsetDTO {
2452    /// Ad set identifier
2453    #[serde(default, skip_serializing_if = "Option::is_none")]
2454    pub id: Option<String>,
2455    /// Location identifier
2456    /// Required by the API.
2457    #[serde(rename = "locationId")]
2458    pub location_id: String,
2459    /// Ad set name
2460    #[serde(default, skip_serializing_if = "Option::is_none")]
2461    pub name: Option<String>,
2462    /// Facebook page ID
2463    #[serde(rename = "pageId", default, skip_serializing_if = "Option::is_none")]
2464    pub page_id: Option<String>,
2465    /// Instagram actor ID
2466    #[serde(
2467        rename = "instagramActorId",
2468        default,
2469        skip_serializing_if = "Option::is_none"
2470    )]
2471    pub instagram_actor_id: Option<String>,
2472    /// Messaging platforms
2473    /// Allowed values: `WHATSAPP`, `MESSENGER`, `INSTAGRAM_DIRECT`.
2474    #[serde(
2475        rename = "messagingPlatforms",
2476        default,
2477        skip_serializing_if = "Option::is_none"
2478    )]
2479    pub messaging_platforms: Option<String>,
2480    /// WhatsApp phone number
2481    #[serde(
2482        rename = "whatsappNumber",
2483        default,
2484        skip_serializing_if = "Option::is_none"
2485    )]
2486    pub whatsapp_number: Option<String>,
2487    /// Targeting audience configuration including geo-locations, locales, placements, and
2488    /// custom audiences
2489    #[serde(default, skip_serializing_if = "Option::is_none")]
2490    pub audience: Option<FacebookAudienceDTO>,
2491    /// Ad set budget config
2492    #[serde(default, skip_serializing_if = "Option::is_none")]
2493    pub budget: Option<Budget>,
2494    /// Conversion location
2495    #[serde(
2496        rename = "conversionLocation",
2497        default,
2498        skip_serializing_if = "Option::is_none"
2499    )]
2500    pub conversion_location: Option<String>,
2501    /// Custom event type
2502    #[serde(
2503        rename = "customEventType",
2504        default,
2505        skip_serializing_if = "Option::is_none"
2506    )]
2507    pub custom_event_type: Option<String>,
2508    /// Conversion pixel ID
2509    #[serde(rename = "pixelId", default, skip_serializing_if = "Option::is_none")]
2510    pub pixel_id: Option<String>,
2511    /// Parent campaign ID
2512    /// Required by the API.
2513    #[serde(rename = "campaignId")]
2514    pub campaign_id: String,
2515}
2516
2517/// `UpsertAssetsDTO` from the GoHighLevel OpenAPI spec.
2518#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2519pub struct UpsertAssetsDTO {
2520    /// Location identifier
2521    /// Required by the API.
2522    #[serde(rename = "locationId")]
2523    pub location_id: String,
2524    /// Asset type to create or update
2525    /// Allowed values: `CALL`, `SITELINK`, `LEAD_FORM`.
2526    /// Required by the API.
2527    #[serde(rename = "type")]
2528    pub type_: String,
2529    /// Asset payload — shape depends on the type field: CallAssetPayload (CALL),
2530    /// SitelinkAssetPayload (SITELINK), or LeadFormAssetPayload (LEAD_FORM)
2531    /// Multiple possible shapes in the spec; raw JSON.
2532    /// Required by the API.
2533    pub payload: serde_json::Value,
2534}
2535
2536/// `UpsertAudienceDTO` from the GoHighLevel OpenAPI spec.
2537#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2538pub struct UpsertAudienceDTO {
2539    /// Location identifier
2540    /// Required by the API.
2541    #[serde(rename = "locationId")]
2542    pub location_id: String,
2543    /// Audience resource name
2544    #[serde(
2545        rename = "resourceName",
2546        default,
2547        skip_serializing_if = "Option::is_none"
2548    )]
2549    pub resource_name: Option<String>,
2550    /// Audience name
2551    /// Required by the API.
2552    pub name: String,
2553    /// Audience dimensions
2554    #[serde(default, skip_serializing_if = "Option::is_none")]
2555    pub dimensions: Option<AudienceDimensionDTO>,
2556    /// Exclusion dimensions
2557    #[serde(
2558        rename = "exclusionDimension",
2559        default,
2560        skip_serializing_if = "Option::is_none"
2561    )]
2562    pub exclusion_dimension: Option<AudienceDimensionDTO>,
2563}
2564
2565/// `UpsertCampaignDTO` from the GoHighLevel OpenAPI spec.
2566#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2567pub struct UpsertCampaignDTO {
2568    /// Campaign identifier
2569    #[serde(default, skip_serializing_if = "Option::is_none")]
2570    pub id: Option<String>,
2571    /// Location identifier
2572    /// Required by the API.
2573    #[serde(rename = "locationId")]
2574    pub location_id: String,
2575    /// Campaign name
2576    #[serde(default, skip_serializing_if = "Option::is_none")]
2577    pub name: Option<String>,
2578    /// Campaign objective
2579    /// Allowed values: `OUTCOME_LEADS`, `OUTCOME_TRAFFIC`, `OUTCOME_ENGAGEMENT`,
2580    /// `OUTCOME_SALES`.
2581    #[serde(default, skip_serializing_if = "Option::is_none")]
2582    pub objective: Option<String>,
2583    /// Special ad categories
2584    /// Allowed values: `EMPLOYMENT`, `CREDIT`, `FINANCIAL_PRODUCTS_SERVICES`, `HOUSING`,
2585    /// `ISSUES_ELECTIONS_POLITICS`, `ONLINE_GAMBLING_AND_GAMING`, `NONE`.
2586    #[serde(
2587        rename = "specialAdCategories",
2588        default,
2589        skip_serializing_if = "Option::is_none"
2590    )]
2591    pub special_ad_categories: Option<String>,
2592    /// Campaign data source
2593    #[serde(default, skip_serializing_if = "Option::is_none")]
2594    pub source: Option<String>,
2595}
2596
2597/// `UpsertConversionDTO` from the GoHighLevel OpenAPI spec.
2598#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2599pub struct UpsertConversionDTO {
2600    /// Location identifier
2601    /// Required by the API.
2602    #[serde(rename = "locationId")]
2603    pub location_id: String,
2604    /// Conversion identifier
2605    #[serde(
2606        rename = "conversionId",
2607        default,
2608        skip_serializing_if = "Option::is_none"
2609    )]
2610    pub conversion_id: Option<String>,
2611    /// Conversion name
2612    /// Required by the API.
2613    pub name: String,
2614    /// Conversion type
2615    /// Allowed values: `UPLOAD_CLICKS`, `UPLOAD_CALLS`, `WEBPAGE`, `LEAD_FORM_SUBMIT`.
2616    /// Required by the API.
2617    #[serde(rename = "type")]
2618    pub type_: String,
2619    /// Conversion category
2620    /// Required by the API.
2621    pub category: String,
2622    /// Value settings that control how monetary value is attributed to conversions
2623    /// Required by the API.
2624    #[serde(rename = "valueSettings")]
2625    pub value_settings: ConversionValueSettings,
2626    /// How conversions are counted per interaction
2627    /// Allowed values: `ONE_PER_CLICK`, `MANY_PER_CLICK`.
2628    /// Required by the API.
2629    #[serde(rename = "countingType")]
2630    pub counting_type: String,
2631    /// Attribution model used to credit conversions
2632    /// Allowed values: `GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN`, `GOOGLE_ADS_LAST_CLICK`.
2633    /// Required by the API.
2634    #[serde(rename = "attributionModel")]
2635    pub attribution_model: String,
2636    /// Click-through conversion window in days
2637    /// Required by the API.
2638    #[serde(rename = "clickThroughWindow")]
2639    pub click_through_window: f64,
2640}
2641
2642/// `UpsertConversionPixelDTO` from the GoHighLevel OpenAPI spec.
2643#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2644pub struct UpsertConversionPixelDTO {
2645    /// Location identifier
2646    /// Required by the API.
2647    #[serde(rename = "locationId")]
2648    pub location_id: String,
2649    /// Conversion pixel ID
2650    #[serde(
2651        rename = "conversionPixelId",
2652        default,
2653        skip_serializing_if = "Option::is_none"
2654    )]
2655    pub conversion_pixel_id: Option<String>,
2656    /// Pixel name
2657    #[serde(default, skip_serializing_if = "Option::is_none")]
2658    pub name: Option<String>,
2659    /// Instagram user ID
2660    #[serde(rename = "igUserId", default, skip_serializing_if = "Option::is_none")]
2661    pub ig_user_id: Option<String>,
2662    /// Pixel event type
2663    /// Required by the API.
2664    #[serde(rename = "type")]
2665    pub type_: String,
2666}
2667
2668/// `UpsertSegmentDTO` from the GoHighLevel OpenAPI spec.
2669#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2670pub struct UpsertSegmentDTO {
2671    /// Segment name
2672    /// Required by the API.
2673    pub name: String,
2674    /// Segment description
2675    #[serde(default, skip_serializing_if = "Option::is_none")]
2676    pub description: Option<String>,
2677    /// Segment members — keywords, URLs, or apps that define the custom segment
2678    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2679    pub members: Vec<MemberDTO>,
2680    /// Segment status
2681    #[serde(default, skip_serializing_if = "Option::is_none")]
2682    pub status: Option<String>,
2683    /// Segment type
2684    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
2685    pub type_: Option<String>,
2686    /// Segment identifier
2687    #[serde(default, skip_serializing_if = "Option::is_none")]
2688    pub id: Option<String>,
2689    /// Membership status
2690    #[serde(
2691        rename = "membershipStatus",
2692        default,
2693        skip_serializing_if = "Option::is_none"
2694    )]
2695    pub membership_status: Option<String>,
2696    /// Rule-based user list config
2697    #[serde(
2698        rename = "ruleBasedUserList",
2699        default,
2700        skip_serializing_if = "Option::is_none"
2701    )]
2702    pub rule_based_user_list: Option<RuleBasedUserListDTO>,
2703    /// Membership life span
2704    #[serde(
2705        rename = "membershipLifeSpan",
2706        default,
2707        skip_serializing_if = "Option::is_none"
2708    )]
2709    pub membership_life_span: Option<f64>,
2710    /// Seed user list IDs
2711    #[serde(
2712        rename = "seedUserListIds",
2713        default,
2714        skip_serializing_if = "Vec::is_empty"
2715    )]
2716    pub seed_user_list_ids: Vec<String>,
2717    /// Country codes
2718    #[serde(
2719        rename = "countryCodes",
2720        default,
2721        skip_serializing_if = "Vec::is_empty"
2722    )]
2723    pub country_codes: Vec<String>,
2724    /// Expansion level
2725    /// Allowed values: `BALANCED`, `BROAD`, `NARROW`.
2726    #[serde(
2727        rename = "expansionLevel",
2728        default,
2729        skip_serializing_if = "Option::is_none"
2730    )]
2731    pub expansion_level: Option<String>,
2732}
2733
2734/// `WelcomeMessageQuestion` from the GoHighLevel OpenAPI spec.
2735#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2736pub struct WelcomeMessageQuestion {
2737    /// Question title text
2738    /// Required by the API.
2739    pub question: String,
2740    /// Auto-response message
2741    #[serde(default, skip_serializing_if = "Option::is_none")]
2742    pub response: Option<String>,
2743}