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    /// (Optional here so responses that omit it still parse.)
2194    #[serde(
2195        rename = "campaignId",
2196        default,
2197        skip_serializing_if = "Option::is_none"
2198    )]
2199    pub campaign_id: Option<String>,
2200    /// Current campaign publishing status in ad-publishing
2201    /// Allowed values: `DRAFT`, `SCHEDULED`, `PUBLISHED`, `PUBLISHING`, `FAILED`, `IN_REVIEW`,
2202    /// `PAUSED`, `ARCHIVED`, `WITH_ISSUES`, `REJECTED`.
2203    /// Required by the API.
2204    /// (Optional here so responses that omit it still parse.)
2205    #[serde(
2206        rename = "publishingStatus",
2207        default,
2208        skip_serializing_if = "Option::is_none"
2209    )]
2210    pub publishing_status: Option<String>,
2211    /// Total publish steps tracked in Redis (campaign + ad sets + ads)
2212    /// Required by the API.
2213    /// (Optional here so responses that omit it still parse.)
2214    #[serde(default, skip_serializing_if = "Option::is_none")]
2215    pub total: Option<f64>,
2216    /// Number of publish steps completed so far
2217    /// Required by the API.
2218    /// (Optional here so responses that omit it still parse.)
2219    #[serde(default, skip_serializing_if = "Option::is_none")]
2220    pub processed: Option<f64>,
2221    /// Whether publishing is finished (Redis complete/failed, processed >= total, or status is
2222    /// no longer PUBLISHING)
2223    /// Required by the API.
2224    /// (Optional here so responses that omit it still parse.)
2225    #[serde(
2226        rename = "isComplete",
2227        default,
2228        skip_serializing_if = "Option::is_none"
2229    )]
2230    pub is_complete: Option<bool>,
2231    /// Whether publishing failed (Redis failed status or campaign FAILED)
2232    /// Required by the API.
2233    /// (Optional here so responses that omit it still parse.)
2234    #[serde(rename = "hasFailed", default, skip_serializing_if = "Option::is_none")]
2235    pub has_failed: Option<bool>,
2236}
2237
2238/// `QuestionDetailsDTO` from the GoHighLevel OpenAPI spec.
2239#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2240pub struct QuestionDetailsDTO {
2241    /// Text question details (empty object for text questions)
2242    #[serde(
2243        rename = "textQuestionDetails",
2244        default,
2245        skip_serializing_if = "Option::is_none"
2246    )]
2247    pub text_question_details: Option<serde_json::Value>,
2248    /// Multiple choice question details
2249    #[serde(
2250        rename = "multipleChoiceQuestionDetails",
2251        default,
2252        skip_serializing_if = "Option::is_none"
2253    )]
2254    pub multiple_choice_question_details: Option<MultipleChoiceQuestionDetailsDTO>,
2255}
2256
2257/// `RuleBasedUserListDTO` from the GoHighLevel OpenAPI spec.
2258#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2259pub struct RuleBasedUserListDTO {
2260    /// Prepopulation status
2261    /// Allowed values: `REQUESTED`.
2262    #[serde(
2263        rename = "prepopulationStatus",
2264        default,
2265        skip_serializing_if = "Option::is_none"
2266    )]
2267    pub prepopulation_status: Option<String>,
2268    /// Flexible rule user list configuration
2269    /// Required by the API.
2270    #[serde(rename = "flexibleRuleUserList")]
2271    pub flexible_rule_user_list: FlexibleRuleUserListDTO,
2272}
2273
2274/// `RuleDTO` from the GoHighLevel OpenAPI spec.
2275#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2276pub struct RuleDTO {
2277    /// List of rule item groups
2278    /// Required by the API.
2279    #[serde(
2280        rename = "ruleItemGroups",
2281        default,
2282        skip_serializing_if = "Vec::is_empty"
2283    )]
2284    pub rule_item_groups: Vec<RuleItemGroupDTO>,
2285}
2286
2287/// `RuleItemDTO` from the GoHighLevel OpenAPI spec.
2288#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2289pub struct RuleItemDTO {
2290    /// Rule item name
2291    /// Allowed values: `url__`, `referrer__`.
2292    /// Required by the API.
2293    pub name: String,
2294    /// String rule item condition
2295    /// Required by the API.
2296    #[serde(rename = "stringRuleItem")]
2297    pub string_rule_item: StringRuleItemDTO,
2298}
2299
2300/// `RuleItemGroupDTO` from the GoHighLevel OpenAPI spec.
2301#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2302pub struct RuleItemGroupDTO {
2303    /// List of rule items
2304    /// Required by the API.
2305    #[serde(rename = "ruleItems", default, skip_serializing_if = "Vec::is_empty")]
2306    pub rule_items: Vec<RuleItemDTO>,
2307}
2308
2309/// `RuleOperandDTO` from the GoHighLevel OpenAPI spec.
2310#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2311pub struct RuleOperandDTO {
2312    /// Lookback window in days
2313    /// Required by the API.
2314    #[serde(rename = "lookbackWindowDays")]
2315    pub lookback_window_days: f64,
2316    /// Rule definition
2317    /// Required by the API.
2318    pub rule: RuleDTO,
2319}
2320
2321/// `SelectedAttributeDTO` from the GoHighLevel OpenAPI spec.
2322#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2323pub struct SelectedAttributeDTO {
2324    /// Targeting attribute URN
2325    /// Required by the API.
2326    pub urn: String,
2327    /// Display name
2328    /// Required by the API.
2329    pub name: String,
2330    /// Category name
2331    /// Required by the API.
2332    #[serde(rename = "categoryName")]
2333    pub category_name: String,
2334    /// Facet identifier
2335    /// Required by the API.
2336    pub facet: String,
2337}
2338
2339/// `SitelinkAssetPayloadDTO` from the GoHighLevel OpenAPI spec.
2340#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2341pub struct SitelinkAssetPayloadDTO {
2342    /// Google Ads resource name for an existing sitelink asset
2343    #[serde(
2344        rename = "resourceName",
2345        default,
2346        skip_serializing_if = "Option::is_none"
2347    )]
2348    pub resource_name: Option<String>,
2349    /// Sitelink display text
2350    /// Required by the API.
2351    #[serde(rename = "linkText")]
2352    pub link_text: String,
2353    /// Final landing page URL
2354    /// Required by the API.
2355    #[serde(rename = "finalUrls")]
2356    pub final_urls: String,
2357    /// First description line
2358    #[serde(default, skip_serializing_if = "Option::is_none")]
2359    pub description1: Option<String>,
2360    /// Second description line
2361    #[serde(default, skip_serializing_if = "Option::is_none")]
2362    pub description2: Option<String>,
2363    /// Start date for the sitelink (YYYY-MM-DD)
2364    #[serde(rename = "startDate", default, skip_serializing_if = "Option::is_none")]
2365    pub start_date: Option<String>,
2366    /// End date for the sitelink (YYYY-MM-DD)
2367    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
2368    pub end_date: Option<String>,
2369    /// Ad schedule targets restricting when the sitelink is shown
2370    #[serde(
2371        rename = "adScheduleTargets",
2372        default,
2373        skip_serializing_if = "Vec::is_empty"
2374    )]
2375    pub ad_schedule_targets: Vec<AdScheduleTargetDTO>,
2376}
2377
2378/// `SponsoredAccountOwnerDTO` from the GoHighLevel OpenAPI spec.
2379#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2380pub struct SponsoredAccountOwnerDTO {
2381    /// Sponsored account URN
2382    /// Required by the API.
2383    #[serde(rename = "sponsoredAccount")]
2384    pub sponsored_account: String,
2385}
2386
2387/// `StringRuleItemDTO` from the GoHighLevel OpenAPI spec.
2388#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2389pub struct StringRuleItemDTO {
2390    /// Rule operator
2391    /// Required by the API.
2392    pub operator: String,
2393    /// Rule value
2394    /// Required by the API.
2395    pub value: String,
2396}
2397
2398/// `TargetAudienceDTO` from the GoHighLevel OpenAPI spec.
2399#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2400pub struct TargetAudienceDTO {
2401    /// Included targeting attributes (groups of ANDed attributes, ORed together)
2402    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2403    pub include: Vec<Vec<SelectedAttributeDTO>>,
2404    /// Excluded targeting attributes
2405    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2406    pub exclude: Vec<Vec<SelectedAttributeDTO>>,
2407}
2408
2409/// `ThankYouPage` from the GoHighLevel OpenAPI spec.
2410#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2411pub struct ThankYouPage {
2412    /// Thank you page title
2413    /// Required by the API.
2414    pub title: String,
2415    /// Thank you page body
2416    /// Required by the API.
2417    pub body: String,
2418    /// Button text label
2419    /// Required by the API.
2420    #[serde(rename = "buttonText")]
2421    pub button_text: String,
2422    /// Button action type
2423    /// Required by the API.
2424    #[serde(rename = "buttonType")]
2425    pub button_type: String,
2426    /// Button destination link
2427    #[serde(
2428        rename = "buttonLink",
2429        default,
2430        skip_serializing_if = "Option::is_none"
2431    )]
2432    pub button_link: Option<String>,
2433    /// Business phone number
2434    #[serde(
2435        rename = "businessPhone",
2436        default,
2437        skip_serializing_if = "Option::is_none"
2438    )]
2439    pub business_phone: Option<String>,
2440    /// Phone country code
2441    #[serde(
2442        rename = "countryCode",
2443        default,
2444        skip_serializing_if = "Option::is_none"
2445    )]
2446    pub country_code: Option<String>,
2447}
2448
2449/// `UnitCostDTO` from the GoHighLevel OpenAPI spec.
2450#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2451pub struct UnitCostDTO {
2452    /// Bid amount in currency minor units
2453    /// Required by the API.
2454    pub amount: f64,
2455}
2456
2457/// `UpdateCustomAudienceBatchDTO` from the GoHighLevel OpenAPI spec.
2458#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2459pub struct UpdateCustomAudienceBatchDTO {
2460    /// Location identifier
2461    /// Required by the API.
2462    #[serde(rename = "locationId")]
2463    pub location_id: String,
2464    /// CSV file path
2465    #[serde(rename = "csvPath", default, skip_serializing_if = "Option::is_none")]
2466    pub csv_path: Option<String>,
2467    /// Batch operation type
2468    /// Required by the API.
2469    #[serde(rename = "operationType")]
2470    pub operation_type: String,
2471    /// Smartlist IDs array
2472    #[serde(
2473        rename = "smartlistIds",
2474        default,
2475        skip_serializing_if = "Vec::is_empty"
2476    )]
2477    pub smartlist_ids: Vec<String>,
2478    /// Dynamic audience flag
2479    #[serde(
2480        rename = "dynamicAudience",
2481        default,
2482        skip_serializing_if = "Option::is_none"
2483    )]
2484    pub dynamic_audience: Option<String>,
2485}
2486
2487/// `UpdateCustomAudienceDTO` from the GoHighLevel OpenAPI spec.
2488#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2489pub struct UpdateCustomAudienceDTO {
2490    /// Location identifier
2491    /// Required by the API.
2492    #[serde(rename = "locationId")]
2493    pub location_id: String,
2494    /// Contact identifier
2495    /// Required by the API.
2496    #[serde(rename = "contactId")]
2497    pub contact_id: String,
2498    /// Facebook ad account ID
2499    #[serde(
2500        rename = "fbAdAccountId",
2501        default,
2502        skip_serializing_if = "Option::is_none"
2503    )]
2504    pub fb_ad_account_id: Option<String>,
2505}
2506
2507/// `UpsertAdDTO` from the GoHighLevel OpenAPI spec.
2508#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2509pub struct UpsertAdDTO {
2510    /// Ad identifier
2511    #[serde(default, skip_serializing_if = "Option::is_none")]
2512    pub id: Option<String>,
2513    /// Location identifier
2514    /// Required by the API.
2515    #[serde(rename = "locationId")]
2516    pub location_id: String,
2517    /// Ad name
2518    #[serde(default, skip_serializing_if = "Option::is_none")]
2519    pub name: Option<String>,
2520    /// Ad primary text
2521    #[serde(
2522        rename = "primaryText",
2523        default,
2524        skip_serializing_if = "Option::is_none"
2525    )]
2526    pub primary_text: Option<String>,
2527    /// Ad headline text
2528    #[serde(default, skip_serializing_if = "Option::is_none")]
2529    pub headline: Option<String>,
2530    /// Ad description text
2531    #[serde(default, skip_serializing_if = "Option::is_none")]
2532    pub description: Option<String>,
2533    /// Ad image URL
2534    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
2535    pub image_url: Option<String>,
2536    /// Ad media type
2537    /// Allowed values: `SINGLE`, `CAROUSEL`.
2538    #[serde(rename = "mediaType", default, skip_serializing_if = "Option::is_none")]
2539    pub media_type: Option<String>,
2540    /// Media items (images or videos) attached to the ad creative
2541    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2542    pub media: Vec<MediaDTO>,
2543    /// Enable multi-advertiser ads
2544    #[serde(
2545        rename = "multiAdvertiserAds",
2546        default,
2547        skip_serializing_if = "Option::is_none"
2548    )]
2549    pub multi_advertiser_ads: Option<bool>,
2550    /// Parent campaign ID
2551    /// Required by the API.
2552    #[serde(rename = "campaignId")]
2553    pub campaign_id: String,
2554    /// Parent ad set ID
2555    /// Required by the API.
2556    #[serde(rename = "adsetId")]
2557    pub adset_id: String,
2558    /// Call to action type
2559    #[serde(default, skip_serializing_if = "Option::is_none")]
2560    pub cta: Option<String>,
2561    /// Conversation form ID
2562    #[serde(
2563        rename = "conversationFormId",
2564        default,
2565        skip_serializing_if = "Option::is_none"
2566    )]
2567    pub conversation_form_id: Option<String>,
2568    /// Destination link URL
2569    #[serde(
2570        rename = "destinationLink",
2571        default,
2572        skip_serializing_if = "Option::is_none"
2573    )]
2574    pub destination_link: Option<String>,
2575    /// Destination form ID
2576    #[serde(
2577        rename = "destinationFormId",
2578        default,
2579        skip_serializing_if = "Option::is_none"
2580    )]
2581    pub destination_form_id: Option<String>,
2582}
2583
2584/// `UpsertAdsetDTO` from the GoHighLevel OpenAPI spec.
2585#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2586pub struct UpsertAdsetDTO {
2587    /// Ad set identifier
2588    #[serde(default, skip_serializing_if = "Option::is_none")]
2589    pub id: Option<String>,
2590    /// Location identifier
2591    /// Required by the API.
2592    #[serde(rename = "locationId")]
2593    pub location_id: String,
2594    /// Ad set name
2595    #[serde(default, skip_serializing_if = "Option::is_none")]
2596    pub name: Option<String>,
2597    /// Facebook page ID
2598    #[serde(rename = "pageId", default, skip_serializing_if = "Option::is_none")]
2599    pub page_id: Option<String>,
2600    /// Instagram actor ID
2601    #[serde(
2602        rename = "instagramActorId",
2603        default,
2604        skip_serializing_if = "Option::is_none"
2605    )]
2606    pub instagram_actor_id: Option<String>,
2607    /// Messaging platforms
2608    /// Allowed values: `WHATSAPP`, `MESSENGER`, `INSTAGRAM_DIRECT`.
2609    #[serde(
2610        rename = "messagingPlatforms",
2611        default,
2612        skip_serializing_if = "Vec::is_empty"
2613    )]
2614    pub messaging_platforms: Vec<String>,
2615    /// WhatsApp phone number
2616    #[serde(
2617        rename = "whatsappNumber",
2618        default,
2619        skip_serializing_if = "Option::is_none"
2620    )]
2621    pub whatsapp_number: Option<String>,
2622    /// Targeting audience configuration including geo-locations, locales, placements, and
2623    /// custom audiences
2624    #[serde(default, skip_serializing_if = "Option::is_none")]
2625    pub audience: Option<FacebookAudienceDTO>,
2626    /// Ad set budget config
2627    #[serde(default, skip_serializing_if = "Option::is_none")]
2628    pub budget: Option<Budget>,
2629    /// Conversion location
2630    #[serde(
2631        rename = "conversionLocation",
2632        default,
2633        skip_serializing_if = "Option::is_none"
2634    )]
2635    pub conversion_location: Option<String>,
2636    /// Custom event type
2637    #[serde(
2638        rename = "customEventType",
2639        default,
2640        skip_serializing_if = "Option::is_none"
2641    )]
2642    pub custom_event_type: Option<String>,
2643    /// Conversion pixel ID
2644    #[serde(rename = "pixelId", default, skip_serializing_if = "Option::is_none")]
2645    pub pixel_id: Option<String>,
2646    /// Parent campaign ID
2647    /// Required by the API.
2648    #[serde(rename = "campaignId")]
2649    pub campaign_id: String,
2650}
2651
2652/// `UpsertAssetsDTO` from the GoHighLevel OpenAPI spec.
2653#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2654pub struct UpsertAssetsDTO {
2655    /// Location identifier
2656    /// Required by the API.
2657    #[serde(rename = "locationId")]
2658    pub location_id: String,
2659    /// Asset type to create or update
2660    /// Allowed values: `CALL`, `SITELINK`, `LEAD_FORM`.
2661    /// Required by the API.
2662    #[serde(rename = "type")]
2663    pub type_: String,
2664    /// Asset payload — shape depends on the type field: CallAssetPayload (CALL),
2665    /// SitelinkAssetPayload (SITELINK), or LeadFormAssetPayload (LEAD_FORM)
2666    /// Multiple possible shapes in the spec; raw JSON.
2667    /// Required by the API.
2668    pub payload: serde_json::Value,
2669}
2670
2671/// `UpsertAudienceDTO` from the GoHighLevel OpenAPI spec.
2672#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2673pub struct UpsertAudienceDTO {
2674    /// Location identifier
2675    /// Required by the API.
2676    #[serde(rename = "locationId")]
2677    pub location_id: String,
2678    /// Audience resource name
2679    #[serde(
2680        rename = "resourceName",
2681        default,
2682        skip_serializing_if = "Option::is_none"
2683    )]
2684    pub resource_name: Option<String>,
2685    /// Audience name
2686    /// Required by the API.
2687    pub name: String,
2688    /// Audience dimensions
2689    #[serde(default, skip_serializing_if = "Option::is_none")]
2690    pub dimensions: Option<AudienceDimensionDTO>,
2691    /// Exclusion dimensions
2692    #[serde(
2693        rename = "exclusionDimension",
2694        default,
2695        skip_serializing_if = "Option::is_none"
2696    )]
2697    pub exclusion_dimension: Option<AudienceDimensionDTO>,
2698}
2699
2700/// `UpsertCampaignDTO` from the GoHighLevel OpenAPI spec.
2701#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2702pub struct UpsertCampaignDTO {
2703    /// Campaign identifier
2704    #[serde(default, skip_serializing_if = "Option::is_none")]
2705    pub id: Option<String>,
2706    /// Location identifier
2707    /// Required by the API.
2708    #[serde(rename = "locationId")]
2709    pub location_id: String,
2710    /// Campaign name
2711    #[serde(default, skip_serializing_if = "Option::is_none")]
2712    pub name: Option<String>,
2713    /// Campaign objective
2714    /// Allowed values: `OUTCOME_LEADS`, `OUTCOME_TRAFFIC`, `OUTCOME_ENGAGEMENT`,
2715    /// `OUTCOME_SALES`.
2716    #[serde(default, skip_serializing_if = "Option::is_none")]
2717    pub objective: Option<String>,
2718    /// Special ad categories
2719    /// Allowed values: `EMPLOYMENT`, `CREDIT`, `FINANCIAL_PRODUCTS_SERVICES`, `HOUSING`,
2720    /// `ISSUES_ELECTIONS_POLITICS`, `ONLINE_GAMBLING_AND_GAMING`, `NONE`.
2721    #[serde(
2722        rename = "specialAdCategories",
2723        default,
2724        skip_serializing_if = "Vec::is_empty"
2725    )]
2726    pub special_ad_categories: Vec<String>,
2727    /// Campaign data source
2728    #[serde(default, skip_serializing_if = "Option::is_none")]
2729    pub source: Option<String>,
2730}
2731
2732/// `UpsertConversionDTO` from the GoHighLevel OpenAPI spec.
2733#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2734pub struct UpsertConversionDTO {
2735    /// Location identifier
2736    /// Required by the API.
2737    #[serde(rename = "locationId")]
2738    pub location_id: String,
2739    /// Conversion identifier
2740    #[serde(
2741        rename = "conversionId",
2742        default,
2743        skip_serializing_if = "Option::is_none"
2744    )]
2745    pub conversion_id: Option<String>,
2746    /// Conversion name
2747    /// Required by the API.
2748    pub name: String,
2749    /// Conversion type
2750    /// Allowed values: `UPLOAD_CLICKS`, `UPLOAD_CALLS`, `WEBPAGE`, `LEAD_FORM_SUBMIT`.
2751    /// Required by the API.
2752    #[serde(rename = "type")]
2753    pub type_: String,
2754    /// Conversion category
2755    /// Required by the API.
2756    pub category: String,
2757    /// Value settings that control how monetary value is attributed to conversions
2758    /// Required by the API.
2759    #[serde(rename = "valueSettings")]
2760    pub value_settings: ConversionValueSettings,
2761    /// How conversions are counted per interaction
2762    /// Allowed values: `ONE_PER_CLICK`, `MANY_PER_CLICK`.
2763    /// Required by the API.
2764    #[serde(rename = "countingType")]
2765    pub counting_type: String,
2766    /// Attribution model used to credit conversions
2767    /// Allowed values: `GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN`, `GOOGLE_ADS_LAST_CLICK`.
2768    /// Required by the API.
2769    #[serde(rename = "attributionModel")]
2770    pub attribution_model: String,
2771    /// Click-through conversion window in days
2772    /// Required by the API.
2773    #[serde(rename = "clickThroughWindow")]
2774    pub click_through_window: f64,
2775}
2776
2777/// `UpsertConversionPixelDTO` from the GoHighLevel OpenAPI spec.
2778#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2779pub struct UpsertConversionPixelDTO {
2780    /// Location identifier
2781    /// Required by the API.
2782    #[serde(rename = "locationId")]
2783    pub location_id: String,
2784    /// Conversion pixel ID
2785    #[serde(
2786        rename = "conversionPixelId",
2787        default,
2788        skip_serializing_if = "Option::is_none"
2789    )]
2790    pub conversion_pixel_id: Option<String>,
2791    /// Pixel name
2792    #[serde(default, skip_serializing_if = "Option::is_none")]
2793    pub name: Option<String>,
2794    /// Instagram user ID
2795    #[serde(rename = "igUserId", default, skip_serializing_if = "Option::is_none")]
2796    pub ig_user_id: Option<String>,
2797    /// Pixel event type
2798    /// Required by the API.
2799    #[serde(rename = "type")]
2800    pub type_: String,
2801}
2802
2803/// `UpsertSegmentDTO` from the GoHighLevel OpenAPI spec.
2804#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2805pub struct UpsertSegmentDTO {
2806    /// Segment name
2807    /// Required by the API.
2808    pub name: String,
2809    /// Segment description
2810    #[serde(default, skip_serializing_if = "Option::is_none")]
2811    pub description: Option<String>,
2812    /// Segment members — keywords, URLs, or apps that define the custom segment
2813    #[serde(default, skip_serializing_if = "Vec::is_empty")]
2814    pub members: Vec<MemberDTO>,
2815    /// Segment status
2816    #[serde(default, skip_serializing_if = "Option::is_none")]
2817    pub status: Option<String>,
2818    /// Segment type
2819    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
2820    pub type_: Option<String>,
2821    /// Segment identifier
2822    #[serde(default, skip_serializing_if = "Option::is_none")]
2823    pub id: Option<String>,
2824    /// Membership status
2825    #[serde(
2826        rename = "membershipStatus",
2827        default,
2828        skip_serializing_if = "Option::is_none"
2829    )]
2830    pub membership_status: Option<String>,
2831    /// Rule-based user list config
2832    #[serde(
2833        rename = "ruleBasedUserList",
2834        default,
2835        skip_serializing_if = "Option::is_none"
2836    )]
2837    pub rule_based_user_list: Option<RuleBasedUserListDTO>,
2838    /// Membership life span
2839    #[serde(
2840        rename = "membershipLifeSpan",
2841        default,
2842        skip_serializing_if = "Option::is_none"
2843    )]
2844    pub membership_life_span: Option<f64>,
2845    /// Seed user list IDs
2846    #[serde(
2847        rename = "seedUserListIds",
2848        default,
2849        skip_serializing_if = "Vec::is_empty"
2850    )]
2851    pub seed_user_list_ids: Vec<String>,
2852    /// Country codes
2853    #[serde(
2854        rename = "countryCodes",
2855        default,
2856        skip_serializing_if = "Vec::is_empty"
2857    )]
2858    pub country_codes: Vec<String>,
2859    /// Expansion level
2860    /// Allowed values: `BALANCED`, `BROAD`, `NARROW`.
2861    #[serde(
2862        rename = "expansionLevel",
2863        default,
2864        skip_serializing_if = "Option::is_none"
2865    )]
2866    pub expansion_level: Option<String>,
2867}
2868
2869/// `WelcomeMessageQuestion` from the GoHighLevel OpenAPI spec.
2870#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2871pub struct WelcomeMessageQuestion {
2872    /// Question title text
2873    /// Required by the API.
2874    pub question: String,
2875    /// Auto-response message
2876    #[serde(default, skip_serializing_if = "Option::is_none")]
2877    pub response: Option<String>,
2878}