Skip to main content

ghl_models/v3/
ad_publishing.rs

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