Skip to main content

ghl_models/v3/
ad_publishing.rs

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