late 0.0.1344

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api  Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal.  Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).  Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
 *
 * The version of the OpenAPI document: 1.526.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateStandaloneAdRequest {
    #[serde(rename = "accountId")]
    pub account_id: String,
    #[serde(rename = "adAccountId")]
    pub ad_account_id: String,
    /// Omitted, the ad is named `Ad <YYYY-MM-DD HH:MM:SS>` (UTC) and the response reports it in `appliedDefaults.name`.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Meta, Reddit and Google. Exact campaign name; overrides the default `<name> - Campaign`. Ignored when the request joins an existing campaign or ad set.  Google: no line breaks and at most 255 characters, checked before calling Google. Names are unique in the Google Ads account, and on Search and Display a taken name is a 400 naming this field.
    #[serde(rename = "campaignName", skip_serializing_if = "Option::is_none")]
    pub campaign_name: Option<String>,
    /// Exact ad set name. Meta, Reddit and Google (the ad group).  - Overrides the default `<name> - Ad Set` (Google Search and Display: `<name> - Ad Group`). - Ignored when the request joins an existing ad set (`adSetId`). - Google Search and Display only: also works on `existingCampaignId`, where the new ad group's name is returned as `adSetName`. No line breaks, at most 255 characters, unique in the campaign (a taken name is a 400 naming this field). - Demand Gen names its ad group with `demandGen.adGroupName`, and Performance Max with `assetGroup.name`. - For per-ad names on the multi-creative shape, set `name` on each `creatives[]` entry.
    #[serde(rename = "adSetName", skip_serializing_if = "Option::is_none")]
    pub ad_set_name: Option<String>,
    /// Meta only. Exact ad name, overriding the default `name`. On the multi-creative shape it names every ad, numbered `#1`, `#2`... when there are several, unless a `creatives[]` entry sets its own `name`.
    #[serde(rename = "adName", skip_serializing_if = "Option::is_none")]
    pub ad_name: Option<String>,
    #[serde(rename = "tracking", skip_serializing_if = "Option::is_none")]
    pub tracking: Option<Box<models::AdTracking>>,
    /// The ad's goal. Available goals vary by platform. When omitted, it is inferred from the ad (see `appliedDefaults.goal` in the response); the attach shape inherits it from the ad set.  **Meta**  - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event (e.g. PURCHASE, START_TRIAL). Alternatives: `promotedObject.customConversionId` for a Custom Conversion, or `customEventType: OTHER` + `customEventStr` for a pixel custom event. - `lead_conversion`: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, with a leads-class event (LEAD, SUBMIT_APPLICATION, SCHEDULE, CONTACT) or `promotedObject.customConversionId`. Meta gates conversion events by objective, so leads-class events are rejected under `conversions`. - `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page. - `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`. - `catalog_sales`: Advantage+ catalog ads (e.g. vehicle inventory). Requires `promotedObject.productSetId`, `promotedObject.pixelId` and `promotedObject.customEventType`. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like {{product.name}} or {{vehicle.make}}. - `catalog_sales` visuals: no imageUrl or video is sent; Meta renders them per catalog item (an imageUrl or video sent is ignored, not uploaded). Find catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/{catalogId}/product-sets. - `catalog_sales` shape: single shape only, no creatives[], dynamicCreative, placementAssets, existingCreativeId or carouselCards. Works with `existingCampaignId`, and with `adSetId` to add to an existing ad set (then only `promotedObject.productSetId` is required). Pick the format with `catalogFormat`, and open the carousel with `catalogIntroCards`. - `traffic` with `promotedObject.productSetId`: a catalog ad without a pixel (OUTCOME_TRAFFIC, `optimizationGoal` LINK_CLICKS by default or LANDING_PAGE_VIEWS). The product set goes on the template creative only, never the ad set's promoted_object. No `pixelId` or `customEventType` needed. Same creative rules as `catalog_sales`. - `page_likes`: Page Likes under OUTCOME_ENGAGEMENT (destination_type ON_PAGE, optimization PAGE_LIKES). `promotedObject.pageId` is optional and auto-filled. The CTA is fixed to LIKE_PAGE for that Page; headline / body / linkUrl / callToAction / imageUrl / video are all optional (Meta derives them from the Page). - `page_visits`: \"Page visits and followers\" under OUTCOME_TRAFFIC (destination_type FACEBOOK_PAGE, optimization PROFILE_VISIT). `promotedObject.pageId` is optional and auto-filled; `linkUrl` defaults to the Page. Accounts Meta has not enabled are refused with \"This account isn't eligible to use Profile Visit ads yet\".  **TikTok**  - `conversions`: website-conversion ad group. Requires `promotedObject.pixelId` (your TikTok Pixel ID). Optional `promotedObject.customEventType`: a TikTok optimization_event code your pixel tracks (newer pixels: e.g. SHOPPING for purchases; legacy: ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER, FORM). To inherit pixel and event from an existing ad group, pass `adSetId`.  **LinkedIn**  - `engagement`, `traffic`, `awareness`, `video_views`: standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`. - `lead_generation`: requires `leadGenFormId` (an adForm ID from POST /v1/ads/lead-forms). Sets the campaign objective to MAX_LEAD and the creative's `leadgenCallToAction` destination to `urn:li:adForm:{id}`. - `job_applicants`: requires a `platformSpecificData.jobs` creative. - `conversions` or promoting an existing post: use POST /v1/ads/boost.  **OpenAI Ads**  - Only `traffic`, `awareness`, `conversions` (other goals return 400). They map to OpenAI's `bidding_type` (clicks, impressions, conversions). - `conversions` needs an active conversion event setting on the account, or returns 400. Create a tracking tag with `defaultEventType` (`POST /v1/accounts/{accountId}/tracking-tags`) or configure one in OpenAI Ads Manager. - Pick the event with `promotedObject.customEventType` (see AdPromotedObject); without it, the most recently created optimizable event is used.  **Reddit Ads**  - Supported: `traffic` (CLICKS), `awareness` (BRAND_AWARENESS), `conversions`, `video_views` (VIDEO_VIEWABLE_IMPRESSIONS), `lead_generation` (LEAD_GENERATION). Any other goal returns 400. - `conversions`: requires `promotedObject.customEventType`; the pixel must already have received that event (see AdPromotedObject). - `lead_generation`: sends people to `linkUrl` and optimizes toward the pixel's Lead event, which the pixel must already have received. Reddit retired native lead forms on September 30, 2026, so `leadGenFormId` returns 400. - `video_views`: needs a `video` (422 otherwise); `optimizationGoal` picks VIDEO_VIEW_6S (default) or VIDEO_VIEW_15S.
    #[serde(rename = "goal", skip_serializing_if = "Option::is_none")]
    pub goal: Option<Goal>,
    #[serde(rename = "smartTargeting", skip_serializing_if = "Option::is_none")]
    pub smart_targeting: Option<Box<models::CreateStandaloneAdRequestSmartTargeting>>,
    /// Explicit optimization goal. Supported on:  - **TikTok** with goal video_views: ENGAGED_VIEW (the 6-second default) or ENGAGED_VIEW_FIFTEEN; both bill per view. - **Reddit** with goal video_views: VIDEO_VIEW_6S (default) or VIDEO_VIEW_15S; other values return 400. - **Meta:** the ad-set `optimization_goal` (e.g. `LANDING_PAGE_VIEWS`, `LINK_CLICKS`, `REACH`, `IMPRESSIONS`, `OFFSITE_CONVERSIONS`, `THRUPLAY`, `LEAD_GENERATION`).  On Meta it overrides the default derived from `goal` (e.g. `traffic` defaults to `LINK_CLICKS`). It is forwarded verbatim; Meta validates compatibility with the campaign objective and rejects incompatible combinations.
    #[serde(rename = "optimizationGoal", skip_serializing_if = "Option::is_none")]
    pub optimization_goal: Option<String>,
    /// Meta only. Explicit ad-set `billing_event`. Defaults to `IMPRESSIONS`. Forwarded verbatim to Meta, which validates compatibility with the optimization goal.
    #[serde(rename = "billingEvent", skip_serializing_if = "Option::is_none")]
    pub billing_event: Option<String>,
    /// Meta only. Buying type. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. Reusing existingCampaignId does not change the campaign.  RESERVED = Reach & Frequency:  - Requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). - Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. - Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative).
    #[serde(rename = "buyingType", skip_serializing_if = "Option::is_none")]
    pub buying_type: Option<BuyingType>,
    /// Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id, so pass that one). Requires buyingType RESERVED.
    #[serde(rename = "rfPredictionId", skip_serializing_if = "Option::is_none")]
    pub rf_prediction_id: Option<String>,
    /// Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative.  Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.
    #[serde(
        rename = "promotion",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub promotion: Option<Option<serde_json::Value>>,
    /// Meta only. Applied to each new creative, including standalone, attach and catalog template shapes.  - With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. - auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting. - On catalog ads, the catalog enhancements are keys of this same map, for example `{ \"product_extensions\": \"OPT_OUT\", \"media_type_automation\": \"OPT_OUT\", \"standard_enhancements_catalog\": \"OPT_OUT\", \"multi_creative_post_carousel\": \"OPT_OUT\" }`.
    #[serde(rename = "creativeFeatures", skip_serializing_if = "Option::is_none")]
    pub creative_features: Option<CreativeFeatures>,
    /// Meta catalog template creatives only (goal `catalog_sales`, goal `traffic` with `promotedObject.productSetId`, or `adSetId` with `promotedObject.productSetId`); a 400 otherwise. Omit it to let Meta pick the format.  Sent as `object_story_spec.template_data.format_option`. `force_single_link` is never sent with it (Meta rejects the pair, subcode 1443051).  - `single_image`: also sends `format_transformation_spec` with `carousel` and `da_collection` set to `data_source: [\"none\"]`, so Meta keeps the single image instead of turning it into a carousel or collection. - `carousel_images_single_item`: also sends `template_data.multi_share_end_card: false`, which Meta requires for that format (subcode 1443167).
    #[serde(rename = "catalogFormat", skip_serializing_if = "Option::is_none")]
    pub catalog_format: Option<CatalogFormat>,
    /// Meta only. Static cards shown before the catalog products in a catalog carousel, for example a brand or offer slide. Valid only with goal `catalog_sales` and `catalogFormat` omitted or `carousel_images_multi_items`; a 400 otherwise.  Sent in order as `object_story_spec.template_data.child_attachments` with `static_card: true`, followed by one catalog card built from the top-level `headline`, `description` and `callToAction`.
    #[serde(rename = "catalogIntroCards", skip_serializing_if = "Option::is_none")]
    pub catalog_intro_cards: Option<Vec<models::CreateStandaloneAdRequestCatalogIntroCardsInner>>,
    /// Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave. It is a top-level creative field, NOT a `creativeFeatures` key, and Meta rejects it there.
    #[serde(rename = "multiAdvertiser", skip_serializing_if = "Option::is_none")]
    pub multi_advertiser: Option<MultiAdvertiser>,
    /// Meta only. Meta's \"Ad includes media created or edited with AI\" disclosure (the Ads Manager checkbox), stored on the creative as `generative_asset_spec.transparency_metadata.self_disclosure`.  - OPT_IN: checks it. - OPT_OUT: explicitly declares no AI media. - Omitted: leaves Meta's default.  Applied to each new creative (standalone, creatives[] and attach shapes) and preserved when a creative is rebuilt. This sets the disclosure on the ad; whether and when the viewer-facing label renders is Meta's decision.
    #[serde(rename = "aiDisclosure", skip_serializing_if = "Option::is_none")]
    pub ai_disclosure: Option<AiDisclosure>,
    /// Meta only (a 400 elsewhere). When Meta answers a create with a 5xx and reading the parent back by name finds no such object, Zernio sends the create again (at most 3 POSTs per object, never for an object created ACTIVE) and reports it in `recoveredWrites`.  `false` never sends it again: the request fails with 502 and `details.unconfirmedWrite`, so you can check the parent yourself. One object found by name is still reused.
    #[serde(rename = "retryOnServerError", skip_serializing_if = "Option::is_none")]
    pub retry_on_server_error: Option<bool>,
    /// Validate the request without creating anything. Supported on Meta, TikTok, ChatGPT (OpenAI) and Google Performance Max / Demand Gen. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 `feature_not_available`.  **Google Performance Max**: validates the complete atomic campaign and asset group, with no resource creation or local persistence. Validation still downloads image URLs and consumes quota.  **Meta**: validates the inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created; validation bypasses Idempotency-Key storage. Success returns 200 with per-node results; a Meta rejection returns an error.  Before the dry run, Meta validateOnly runs the account status and payment checks of GET /v1/ads/accounts/health: an ad account that is not ready answers its blocker `code` (`ad_account_unusable`, `ad_account_payment_required`) with `details.hint` and `details.fix`, and Meta is not called.  - Supported: a single image or existing video.id (each also with bodies[] / headlines[] Multiple Text Options), all-image placementAssets with per-rule copy and text pools, placementAssets with an existing video id in every slot and no thumbnails, or existingCreativeId. - Return 400: dynamicCreative, translations, carouselCards, placement videos by URL or with thumbnails, new video uploads, creatives[], adSetId, RESERVED buying. - Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. - When Meta cannot dry-run the nested tree, the campaign and creative are validated alone and the adSet and ad nodes return unverified with the reason. This covers code 2, and two errors Meta returns but then creates normally (below). - Code 1 (unknown error) on an OFFSITE_CONVERSIONS ad set nested in a new campaign (some website-conversion ad sets). - Code 100 subcode 2446880 \"WhatsApp number required\" on an ad that does not message on WhatsApp (intermittent). If the creative's own dry run also asks for a WhatsApp number, the creative is unverified too. Messaging ads still fail on 2446880.  **ChatGPT (OpenAI)**: no platform dry-run. Zernio runs every check it knows (creative lengths, budget, bid strategy, targeting) plus live lookups of the conversion event and target countries, and uploads or creates nothing. OpenAI's own checks (image fetch, currency-specific minimums, ad review) run only on a real create.  **TikTok**: TikTok has no dry-run. Zernio runs the input checks and the read-only TikTok calls a real create makes. It uploads or creates nothing: no video, Brand Identity, campaign, ad group or ad. A failure returns the same 4xx a real create would.  - Advertiser: `message` names its currency when TikTok returns it. - Identity: `identityId` is authorized on the advertiser (the `identity` node). `message` names the identity and type the ad would run as. - `existingCampaignId`: exists and is not an Upgraded Smart+ campaign. - Pixel and optimization event resolve on the advertiser, and the schedule and targeting build. - Not checked (marked `unverified` with the reason): the video (format, size, length, cover), the ad group as TikTok would create it (the budget minimum for the advertiser currency, location and audience ids, bid), a new campaign, and TikTok's review of the ad text, call to action and landing page. - A Brand Identity a real create would make from `brandIdentity` is not made: the `identity` node is `unverified`. - Supported: the single standalone video ad. `smartPlus` and `adSetId` return 400.
    #[serde(rename = "validateOnly", skip_serializing_if = "Option::is_none")]
    pub validate_only: Option<bool>,
    /// Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this number in minor units, an easy and expensive mix-up.  Required on legacy, multi-creative and Performance Max shapes. Inherited on attach.  **OpenAI Ads:** in the ad account currency, minimum 1. OpenAI can require a higher daily minimum for some currencies and names it in the error.
    #[serde(rename = "budgetAmount", skip_serializing_if = "Option::is_none")]
    pub budget_amount: Option<f64>,
    /// Defaults to daily when `budgetAmount` is sent without it (reported in `appliedDefaults.budgetType`). Inherited on attach.  - **OpenAI Ads:** accepts both as the campaign's single spend cap. A lifetime cap can later switch to daily with PUT /v1/ads/campaigns/{campaignId}, but never daily back to lifetime (422). Automatic bidding (Maximize Results) needs a daily budget. - **Reddit Ads:** the ad group's daily or lifetime spend goal.
    #[serde(rename = "budgetType", skip_serializing_if = "Option::is_none")]
    pub budget_type: Option<BudgetType>,
    /// Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default, back-compat).  PAUSED pauses only the TOP-MOST object this call creates and switches everything below it on, so one resume of that object brings the new tree live and nothing pre-existing is touched:  - New campaign: held paused with its ad set and ad on. - With `existingCampaignId`: the new ad set is held paused with its ad on. - With `adSetId`: the new ad itself is paused.  **Level overrides.** `campaignStatus`, `adSetStatus` and `adStatus` set one level each and always win for that level. `status: PAUSED` adds its own hold only when none of them is PAUSED. `campaignStatus: ACTIVE` with `status: PAUSED` moves the pause down to the new ad set. To create every object paused, send all three as PAUSED.  **Platform notes:**  - LinkedIn: every object the call creates is held. A new campaign group is PAUSED. A new campaign or creative stays DRAFT, as LinkedIn refuses PAUSED on a creative until its review is APPROVED. Resume each held object top-down to go live. - X: no per-ad switch, so its lowest level is the line item. - Google Performance Max and Demand Gen: accept PAUSED only (the campaign is created paused).
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// Every platform. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. Omitted, it follows `status`. Ignored when the request creates no campaign (`existingCampaignId` or `adSetId`).  - `PAUSED`: holds the campaign off with its ad set and ad on, unless `adSetStatus` or `adStatus` say otherwise. - `ACTIVE` with `status: PAUSED`: switches the campaign on and holds the new ad set paused (its ad on).
    #[serde(rename = "campaignStatus", skip_serializing_if = "Option::is_none")]
    pub campaign_status: Option<CampaignStatus>,
    /// Every platform. Sets the switch of the new ad set alone and overrides `status` for it. When omitted, it follows `status`. Equivalent object: Google, TikTok, Pinterest and ChatGPT, the ad group; LinkedIn, the campaign (stays DRAFT when held); X, the line item.  Precedence: a level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level. `status: PAUSED` then holds the top-most new object with no level status, only when no level status is PAUSED. Every other new object is switched on.  So `campaignStatus: ACTIVE` + `adSetStatus: PAUSED` + `adStatus: PAUSED` keeps the campaign on with the new ad set and ad off; all three PAUSED creates the whole tree paused.  Rejected with a 400 alongside `adSetId` (that ad set exists; change it with PUT /v1/ads/ad-sets/{adSetId}/status). Performance Max and Demand Gen accept PAUSED only.
    #[serde(rename = "adSetStatus", skip_serializing_if = "Option::is_none")]
    pub ad_set_status: Option<AdSetStatus>,
    /// Sets the switch of the new ad alone, also when attaching to an existing ad set with `adSetId`, and overrides `status` for it. Same precedence as `adSetStatus`. Omitted, it follows `status`.  - LinkedIn: a creative held off is created DRAFT, because LinkedIn refuses PAUSED on a creative until its review is APPROVED. A DRAFT creative is not submitted for review and cannot serve; it reads `paused`. Resuming the ad (PUT /v1/ads/{adId}/status `active`) switches it ACTIVE, which starts the review. - X: returns a 400. A promoted post has no switch of its own, so hold the line item with `adSetStatus`. - `PAUSED` with `buyingType: RESERVED`: returns a 400 (Meta creates the first Reach and Frequency ad ACTIVE). - Performance Max and Demand Gen: accept PAUSED only.
    #[serde(rename = "adStatus", skip_serializing_if = "Option::is_none")]
    pub ad_status: Option<models::AdActivationStatus>,
    /// Meta only. Where the budget lives, which selects the Meta budget model:  - `adset` (used when omitted): ABO (Ad-set Budget Optimization). The budget is set on the ad set. - `campaign`: CBO (Campaign Budget Optimization / Advantage Campaign Budget). The budget AND `bidStrategy` are set on the CAMPAIGN, and Meta distributes spend across ad sets automatically.  The returned ad stores the applied `budgetLevel`, and the budget in `campaignBudget` (CBO) or `adSetBudget` (ABO). Edit CBO budgets with `PUT /v1/ads/campaigns/{campaignId}` and ABO budgets with `PUT /v1/ads/ad-sets/{adSetId}`.  Meta requires the budget at exactly one level, never both. Ignored on the Meta attach shape (`adSetId`), which inherits the existing budget.  Google Demand Gen also reads it. A new Demand Gen campaign accepts only `campaign` or no value. With `existingCampaignId` or `adSetId`, omit it: the budget stays on the existing campaign. Other platforms ignore it.
    #[serde(rename = "budgetLevel", skip_serializing_if = "Option::is_none")]
    pub budget_level: Option<BudgetLevel>,
    /// ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Meta only. Optional: Zernio resolves it from the ad account when omitted. The value selects the minor-unit exponent Zernio converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is).
    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// Ad headline. Required for Meta, Google, Pinterest, LinkedIn, OpenAI Ads and Reddit Ads on legacy + attach shapes (for multi-creative, skip it and use `creatives[].headline`). Ignored for TikTok.  Max length: Meta=255, Google=30, Pinterest=100, LinkedIn=400, OpenAI=50 (min 3), Reddit=300.  - LinkedIn: the ad's headline (the bold text on the creative); for traffic ads, the link card title. - OpenAI Ads: the chat card's title. - Reddit: the promoted post's title. - X: the website card title (needs imageUrl and linkUrl, max 70).
    #[serde(rename = "headline", skip_serializing_if = "Option::is_none")]
    pub headline: Option<String>,
    /// Google Display only. Defaults to `headline` if omitted. On LinkedIn, reused as the optional secondary description text on traffic (link) ads; omitted if not provided.
    #[serde(rename = "longHeadline", skip_serializing_if = "Option::is_none")]
    pub long_headline: Option<String>,
    /// Required on legacy + attach shapes.  - X: the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). - LinkedIn: the post commentary (the intro text shown above the ad). - OpenAI Ads: the chat card's body text. - Reddit: the promoted post's body. Optional on image, video and carousel ads, required on text ads.  Max: Google=90, Pinterest=500, OpenAI=100.
    #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
    pub body: Option<String>,
    /// Meta only (facebook/instagram). Link description: the secondary text shown below the headline (Meta's link_data.description; on video creatives mapped to video_data.link_description). When omitted, Meta auto-pulls the destination URL's OpenGraph description.  - Applies on legacy, attach, and placementAssets shapes. - For multi-creative use creatives[].description (this field is the shared fallback). - For multi-text variations use `descriptions` (array) instead.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Meta only. Multiple Text Options (Advantage+ Flexible Format): 1-5 primary-text variations that Meta optimises delivery across, WITHOUT enabling full Dynamic Creative (`dynamicCreative`).  Uses `optimization_type: DEGREES_OF_FREEDOM` on the asset feed, so multiple ads per ad set are allowed (unlike `dynamicCreative`, which is limited to one).  **Requirements:** `imageUrl` or `video`, `linkUrl`, `callToAction`, and `headlines`. The top-level `body` becomes `object_story_spec.link_data.message` (the preview text). On a video creative the copy lands in `video_data.message` / `video_data.title` instead of `link_data`.  Mutually exclusive with `dynamicCreative`, `carouselCards`, and `creatives[]`.  **With `placementAssets`:** the pool applies to the placement-customized creative instead (`optimization_type: PLACEMENT`). Every body carries the label of each rule that does not pin its own `body` (same for `headlines`), so Meta rotates options per placement while media stays pinned.  A rule's own `body` / `headline` stays pinned for that placement. `descriptions[]` cannot join a placement-customized creative (Meta refuses a second description per rule, subcode 1885878).
    #[serde(rename = "bodies", skip_serializing_if = "Option::is_none")]
    pub bodies: Option<Vec<String>>,
    /// Meta only. Headline variations for Multiple Text Options. Must be sent alongside `bodies`. The top-level `headline` field is used as the `object_story_spec.link_data.name` (`video_data.title` on a video creative).
    #[serde(rename = "headlines", skip_serializing_if = "Option::is_none")]
    pub headlines: Option<Vec<String>>,
    /// Meta only. Optional description variations for Multiple Text Options. Sent alongside `bodies` and `headlines`.
    #[serde(rename = "descriptions", skip_serializing_if = "Option::is_none")]
    pub descriptions: Option<Vec<String>>,
    /// The ad's call-to-action button.  - **Meta:** required on legacy + attach shapes. Accepts every call to action type Meta itself accepts (the enum lists them), including values such as SEE_DETAILS that ads synced from Meta carry. - **TikTok:** honoured, passed through to the Spark Ad creative's `call_to_action`. - **LinkedIn:** the CTA button on the ad; defaults to LEARN_MORE when `linkUrl` is set. Accepts LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. - **Reddit** (image, video and carousel ads): accepts LEARN_MORE, SHOP_NOW, SIGN_UP, CONTACT_US, DOWNLOAD, GET_QUOTE, SUBSCRIBE, APPLY_NOW, BOOK_NOW, BUY_TICKETS, DONATE_NOW, GET_DIRECTIONS, GET_SHOWTIMES, LISTEN_NOW, ORDER_NOW, SEE_MENU, INSTALL_MOBILE_APP. Other values return 400. - **Google, Pinterest, and X:** ignored.
    #[serde(rename = "callToAction", skip_serializing_if = "Option::is_none")]
    pub call_to_action: Option<CallToAction>,
    /// The ad's destination URL. Required on legacy + attach shapes (skip for multi-creative). NOT required when `goal` is `lead_generation` (the ad opens a Lead Gen form instead).  - **LinkedIn:** required for `traffic` ads, optional for `engagement` / `awareness`. `imageUrl` + `linkUrl` publishes an ARTICLE-content creative (LinkedIn's article ad format), with the image as thumbnail and `longHeadline` as description. - **OpenAI Ads:** required (the chat card's target_url). - **Reddit:** required on image and video ads (the post's destination and the ad's click URL), the fallback for carousel cards without their own, and refused with 400 on text ads.
    #[serde(rename = "linkUrl", skip_serializing_if = "Option::is_none")]
    pub link_url: Option<String>,
    /// Lead Gen form ID to attach to the ad's creative. REQUIRED when `goal` is `lead_generation`. Create one via POST /v1/ads/lead-forms.  - Meta (facebook/instagram): the leadgen_forms ID. The ad set's promoted_object.page_id, LEAD_GENERATION optimization and destination_type ON_AD are derived automatically from the goal. - Meta: also required on every ATTACH (`adSetId`) call targeting a lead ad set (the form attaches per-ad; Meta rejects a formless ad in a lead ad set). - Meta: `placementAssets`, `dynamicCreative` and `carouselCards` (multi-card Instant-Form lead ad) ARE supported on instant-form lead ads. `linkUrl` and per-card `linkUrl` are optional, forwarded as real destinations when sent, else falling back to Meta's lead-form link. - LinkedIn: the adForm ID. The creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}` and the campaign objective to MAX_LEAD. Forms must be owned by the sponsoredAccount (not the organization) for the URN to resolve. - Reddit: rejected with 400 on every goal (Reddit retired its native lead forms).
    #[serde(rename = "leadGenFormId", skip_serializing_if = "Option::is_none")]
    pub lead_gen_form_id: Option<String>,
    /// Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes. Mutually exclusive with `video`.  - LinkedIn: required unless `video` is set. Uploaded to LinkedIn under the authoring Company Page (see `organizationId`); recommended ratio 1.91:1 (e.g. 1200×627). - Google: not required for Search campaigns. For Display, treated as the landscape image (alias of `images.landscape`); supply `images.square` alongside or the request is rejected. - TikTok: this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the `imageUrl` name is kept for cross-platform consistency). - X: imageUrl + headline + linkUrl together build a website card (image, title and destination under the post; the URL is not added to the post text). Sending only some of them is a 400. - X: description, video and callToAction are rejected with 400 (promote a post that carries a video with POST /v1/ads/boost). - OpenAI Ads: required, uploaded as the chat card's image (OpenAI has no video ad format). - Reddit: builds an image ad (requires `linkUrl`). On a Reddit video ad it is the fallback for `video.thumbnailUrl`.
    #[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")]
    pub image_url: Option<String>,
    #[serde(rename = "images", skip_serializing_if = "Option::is_none")]
    pub images: Option<Box<models::CreateStandaloneAdRequestImages>>,
    #[serde(rename = "video", skip_serializing_if = "Option::is_none")]
    pub video: Option<Box<models::CreateStandaloneAdRequestVideo>>,
    /// Meta-only. When present, switches to the multi-creative shape: creates 1 campaign + 1 ad set + N ads (one per entry here). Mutually exclusive with `adSetId`.  With `existingCampaignId` it creates 1 ad set + N ads under that campaign, so one call per audience launches a creative matrix.  Top-level `headline` / `body` / `imageUrl` / `linkUrl` / `callToAction` are ignored in this mode. Entries that repeat an `imageUrl` or `video.url` share one upload.
    #[serde(rename = "creatives", skip_serializing_if = "Option::is_none")]
    pub creatives: Option<Vec<models::CreateStandaloneAdRequestCreativesInner>>,
    /// When present, switches to the attach shape: adds one new ad to this existing ad set without creating a new campaign. Mutually exclusive with `creatives[]`.  **Inherited from the ad set on Meta:** budget, targeting, goal, schedule and bid strategy. Passing `bidStrategy` in attach mode returns 400 (change an ad set's bid with `PUT /v1/ads/ad-sets/{adSetId}`). `dynamicCreative` returns 400 in attach mode: omit `adSetId` to create a new dynamic ad set instead.  **Creative.** The attached ad takes the full single-creative surface: `headline`/`body`/`description`/`callToAction` plus one of:  - `imageUrl`/`video` - `placementAssets` (its own per-placement Feed/Story assets) - `translations`/`defaultLocale` (its own per-locale asset feed, Meta only)  Pass `leadGenFormId` on EVERY ad attached to a lead ad set: the parent must be ON_AD (true for ad sets created via goal `lead_generation`), and Meta rejects a formless ad there.  To build N full ads sharing one ad set, create the first ad via the normal shape, then attach the rest one call each.  **Platforms.** Supported on Meta (facebook, instagram), Google Ads, TikTok, LinkedIn and Reddit Ads.  - TikTok: `adSetId` is the ad group ID; the new ad inherits the ad group's bid, budget and targeting. - LinkedIn: `adSetId` is the LinkedIn Campaign ID (numeric). We attach a new Creative to that Campaign, so its `platformSpecificData` bidding, targeting, budget and schedule are inherited (passing those fields returns 400). - Reddit Ads: `adSetId` is the AD GROUP id. Only the post and the ad are created; the ad group keeps its budget, schedule, targeting, bid and optimization. `goal` is not required. An ad group of another ad account returns 404. - Reddit Ads, rejected with 400: `budgetAmount`, `budgetType`, `startDate`, `endDate`, targeting fields, `promotedObject`, `tracking.pixelId` and `optimizationGoal`.  **Google Ads.** `adSetId` is the AD GROUP id (numeric). `goal` is not required: the ad group keeps its campaign's bidding, budget and targeting. `validateOnly` is supported.  - `campaignType` is read from the ad group's campaign (Search, Display or Demand Gen) and can be omitted. A contradicting `campaignType` returns 400, an ad group Google does not know in that customer returns 404, and any other campaign type returns 422. - A Search ad needs `headline` + `body` + `linkUrl`; a Display ad also needs `images.landscape` + `images.square` + `businessName`. - Google allows 3 responsive search ads per ad group: a fourth returns 422 naming the limit (`RESPONSIVE_SEARCH_ADS_PER_AD_GROUP`) and the ad group. - `budgetAmount`/`budgetType` and bidding fields (`bidStrategy`, `bidAmount`, `portfolioBidStrategyId`) return 400; the ad group already owns them. - With `campaignType: \"demand_gen\"` the ad group must belong to a Demand Gen campaign (otherwise 400). `demandGen` carries only the ad's creative, and the new ad is created PAUSED. - Demand Gen ad group settings return 400: geo, languages, `demandGen.channels`/`audience`/`audienceId`/ `adGroupName`.
    #[serde(rename = "adSetId", skip_serializing_if = "Option::is_none")]
    pub ad_set_id: Option<String>,
    /// Create the new objects under this EXISTING campaign instead of creating a new one. Supported on Meta, Google Ads, LinkedIn, TikTok and Reddit Ads. Mutually exclusive with `adSetId`.  - TikTok: creates the ad group and the ad under this campaign. The campaign is neither created nor activated, and its objective must fit `goal`. Not with `smartPlus`. - Meta: adds the new ad set under this campaign (multi-ad-set audience testing). Its budget matches the campaign's mode: for a CBO campaign (campaign-level budget) omit `budgetAmount`/`budgetType`, since the campaign owns the budget; for an ABO campaign pass them (they go on the new ad set). - Meta with `creatives[]`: the new ad set gets one ad per entry. - LinkedIn: creates a new Campaign (and its Creative) under this EXISTING CampaignGroup. - Google Ads: creates a new ad group under this campaign. It inherits the campaign's budget, so omit `budgetAmount`/`budgetType` (and any bidding field), or the request returns 400. - Google Ads with `campaignType: \"demand_gen\"`: the campaign must be Demand Gen (otherwise 400). The new ad group (with its geo, languages, channels and audience from the request) and its ad are created in one atomic request, the ad group PAUSED. Schedule and `locationTargetingType` belong to the campaign and return 400. - Google Ads, campaign migrated from Discovery that still targets locations and languages on the campaign: geo and language fields return 400 on a new ad group, which follows the campaign's targeting. - Google Ads failure: only the entities we authored are cleaned up. The pre-existing parent is left untouched and is never (re)activated. - Reddit Ads: creates a new ad group and the ad under this campaign. `goal` may be omitted (the campaign's objective decides it); any other goal returns 400 naming the one to send. If the ad fails, the new ad group is archived. - Reddit Ads dates: the ad group must start no earlier than a future campaign start and end no later than the campaign end (400 otherwise). Without `endDate` it ends with the campaign. - Reddit Ads, campaign without a campaign budget: send `budgetAmount`/`budgetType` for the new ad group (400 without them). Bid, conversion event and pixel work as on a new campaign. - Reddit Ads under campaign budget optimization: the ad group takes the campaign's bid, goal type, optimization event and pixel and has no budget of its own. `budgetAmount`/`budgetType`, bid fields, or another conversion event or pixel return 400, as does an `endDate` when the campaign has no end date. - Reddit Ads errors: a campaign of another ad account returns 404, a Reddit Max campaign 422.
    #[serde(rename = "existingCampaignId", skip_serializing_if = "Option::is_none")]
    pub existing_campaign_id: Option<String>,
    /// Meta attach shape only (`adSetId`). The phone number (E.164, e.g. `+4712345678`) for an ad added to a \"website and phone call\" ad set (destination_type `WEBSITE_AND_PHONE_CALL`), sent as the creative's call configuration.  Optional: when omitted, the number on the ad set's existing ads is reused; if none carries one, the request is a 400.  Rejected with 400 on any other ad set, with `existingCreativeId`, without `adSetId`, or on other platforms (a new call campaign is `POST /v1/ads/call`).
    #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
    pub phone_number: Option<String>,
    /// Meta only. Reuse an EXISTING ad creative by id instead of building a new one from the copy/media fields (which are then ignored).  - Combine with `existingCampaignId` to build a multi-ad-set campaign that shares one creative. - Mutually exclusive with `creatives[]`, `dynamicCreative`, and `placementAssets`. - The creative id used is returned as `creativeId` on the create response.
    #[serde(rename = "existingCreativeId", skip_serializing_if = "Option::is_none")]
    pub existing_creative_id: Option<String>,
    /// Google Display only
    #[serde(rename = "businessName", skip_serializing_if = "Option::is_none")]
    pub business_name: Option<String>,
    /// Pinterest only. Board ID (auto-creates if not provided).
    #[serde(rename = "boardId", skip_serializing_if = "Option::is_none")]
    pub board_id: Option<String>,
    /// LinkedIn only (ignored by every other platform). The Company Page that authors the Direct Sponsored Content (\"dark\") post backing the ad. Accepts a numeric organization ID or a full `urn:li:organization:N` URN.  Required unless it defaults:  - to the page, when the resolved `accountId` is a connected LinkedIn Company-Page account; - to the owning organization, when the LinkedIn ad account is org-owned.  The authenticated member must be an ADMINISTRATOR or DIRECT_SPONSORED_CONTENT_POSTER of this page, and the page must be associated with the ad account, or LinkedIn returns 403.
    #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")]
    pub organization_id: Option<String>,
    /// Nested targeting object: the same TargetingSpec shape as `POST /v1/ads/boost`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences.  Merged UNDER the flat inline targeting fields below: `savedTargetingId` < `targeting` < flat fields (a flat field present on the body replaces the nested value entirely). Both forms are equivalent; use whichever your integration already builds.  Reddit-only targeting (`communities`, `excludedCommunities`, `conversationKeywords`, `excludedConversationKeywords`) is sent here.
    #[serde(
        rename = "targeting",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub targeting: Option<Option<Box<models::TargetingSpec>>>,
    /// ISO 3166-1 alpha-2 country codes (e.g. ['NL']). Defaults to ['US'] when no other geo targeting (flat or nested `targeting`) is provided. (LinkedIn and OpenAI Ads currently honour country-level targeting only; any other targeting field returns 400 for OpenAI Ads.)
    #[serde(rename = "countries", skip_serializing_if = "Option::is_none")]
    pub countries: Option<Vec<String>>,
    /// Meta only. Continents and trade blocs (`geo_locations.country_groups`), for targeting a whole region without listing its countries. Combines with `countries` rather than replacing it. Discoverable via `GET /v1/ads/targeting/search?dimension=geo&geoType=country_group`.
    #[serde(rename = "countryGroups", skip_serializing_if = "Option::is_none")]
    pub country_groups: Option<Vec<CountryGroups>>,
    /// City-level geo targeting (Meta, Google and TikTok). An entry is `{ key }` or the key alone as a plain string (`[\"1006410\"]`).  Each city is targeted by the platform's opaque `key` (the city ID), found via `GET /v1/ads/targeting/search?dimension=geo&q=<name>&countryCode=<ISO>`.  **Radius (Meta only):** optional `radius` + `distance_unit` extend targeting beyond city limits (e.g. radius 25 km around the center). Set both or omit both (Meta defaults to ~16 km).  - **Meta:** cannot overlap with the same country in `countries` (Meta returns a \"locations overlap\" error). Drop the country or scope it to a different one. - **TikTok:** keys are numeric location ids and can be sent without `countries`.
    #[serde(rename = "cities", skip_serializing_if = "Option::is_none")]
    pub cities: Option<Vec<models::CreateStandaloneAdRequestCitiesInner>>,
    /// Region-level (state/province) geo targeting (Meta, Google and TikTok). Each region is targeted by the platform's opaque `key` (the region ID) which can be looked up via `GET /v1/ads/targeting/search?dimension=geo&q=<name>&countryCode=<ISO>`. An entry may also be the key alone as a plain string.
    #[serde(rename = "regions", skip_serializing_if = "Option::is_none")]
    pub regions: Option<Vec<models::CreateStandaloneAdRequestRegionsInner>>,
    #[serde(rename = "ageMin", skip_serializing_if = "Option::is_none")]
    pub age_min: Option<i32>,
    #[serde(rename = "ageMax", skip_serializing_if = "Option::is_none")]
    pub age_max: Option<i32>,
    /// Interest objects from /v1/ads/targeting/search?dimension=interest (or dimension=interestKeyword on TikTok). Each must include id and name.  **TikTok:**  - Bare numeric ids are interest categories (`interest_category_ids`). - Ids like `keyword:123456` from `dimension=interestKeyword` are additional interests (`interest_keyword_ids`). - Any other id returns 422 naming `targeting.interests`. - TikTok matches people who fit ANY selected interest, additional interest or behavior (one OR'd group). That group is ANDed with location, age, gender and the other dimensions.
    #[serde(rename = "interests", skip_serializing_if = "Option::is_none")]
    pub interests: Option<Vec<models::UpdateAdRequestTargetingInterestsInner>>,
    /// Postal/ZIP geo targeting. `key` is the platform's postal location ID from /v1/ads/targeting/search?dimension=geo&geoType=zip. Supported on Meta, Google, TikTok, Pinterest, X.
    #[serde(rename = "zips", skip_serializing_if = "Option::is_none")]
    pub zips: Option<Vec<models::CreateStandaloneAdRequestZipsInner>>,
    /// DMA / metro-area geo targeting (Meta and TikTok). `key` is the platform's metro ID from /v1/ads/targeting/search?dimension=geo&geoType=metro (TikTok metros appear as type `metro`, e.g. the New York DMA).
    #[serde(rename = "metros", skip_serializing_if = "Option::is_none")]
    pub metros: Option<Vec<models::CreateStandaloneAdRequestZipsInner>>,
    /// Point-radius (lat/lng) geo targeting. Meta only (custom_locations). Rejected on platforms without radius support.
    #[serde(rename = "customLocations", skip_serializing_if = "Option::is_none")]
    pub custom_locations: Option<Vec<models::CreateStandaloneAdRequestCustomLocationsInner>>,
    /// Behaviour entities from /v1/ads/targeting/search?dimension=behavior (Meta, TikTok and LinkedIn). Each must include id.  **On TikTok:**  - Targets people who interacted with videos (watched to the end, liked, commented or shared, last 15 days) or creators (followed or viewed the profile) in the picked categories. - Or people who viewed videos with a picked hashtag: `hashtag:<id>` ids from `dimension=hashtag`, sent as a `HASHTAG_RELATED` action with `VIEW_HASHTAG`. - The ad group uses the TikTok placement only. - Behaviors are OR'd with interests and additional interests.
    #[serde(rename = "behaviors", skip_serializing_if = "Option::is_none")]
    pub behaviors: Option<Vec<models::CreateStandaloneAdRequestBehaviorsInner>>,
    /// Meta only. Job title entities from /v1/ads/targeting/search?dimension=workPosition. Each must include id. Rejected on other platforms (use LinkedIn's `jobTitles` there).
    #[serde(rename = "workPositions", skip_serializing_if = "Option::is_none")]
    pub work_positions: Option<Vec<models::CreateStandaloneAdRequestBehaviorsInner>>,
    /// Meta only. Employer entities from /v1/ads/targeting/search?dimension=workEmployer. Each must include id.
    #[serde(rename = "workEmployers", skip_serializing_if = "Option::is_none")]
    pub work_employers: Option<Vec<models::CreateStandaloneAdRequestBehaviorsInner>>,
    /// Meta only. Work-industry entities from /v1/ads/targeting/search?dimension=workIndustry. Each must include id. Rejected on other platforms (use LinkedIn's `industries` there).
    #[serde(rename = "workIndustries", skip_serializing_if = "Option::is_none")]
    pub work_industries: Option<Vec<models::CreateStandaloneAdRequestBehaviorsInner>>,
    /// Normalized household-income tier. Meta and TikTok express all four; Google maps only `top_10`; rejected on LinkedIn, X, and Pinterest. On Meta, income targeting is incompatible with housing/employment/credit `specialAdCategories`.
    #[serde(rename = "incomeTier", skip_serializing_if = "Option::is_none")]
    pub income_tier: Option<IncomeTier>,
    /// Language codes, e.g. [\"en\",\"es\"].  - Google: campaign language targeting (language_constant) using Google's language codes (ISO 639-1, plus variants such as `zh_CN`). Unknown codes return 400. - Meta: a bare code targets all regional variants (\"en\" = all English); use a region-qualified code for a specific one (\"en_GB\", \"pt_BR\", \"zh_TW\"). Meta numeric locale ids (e.g. \"24\" for English UK) are also accepted. Unknown values are rejected. POST /v1/ads/boost takes the same format in `targeting.languages`. - Other ad platforms use their own language-code systems.
    #[serde(rename = "languages", skip_serializing_if = "Option::is_none")]
    pub languages: Option<Vec<String>>,
    #[serde(rename = "placements", skip_serializing_if = "Option::is_none")]
    pub placements: Option<Box<models::CreateStandaloneAdRequestPlacements>>,
    /// ID of a `saved_targeting` audience (created via POST /v1/ads/audiences). When set, its stored TargetingSpec is expanded as the base targeting; inline fields on this body merge on top. Lets you reuse a named targeting preset without re-sending every field.
    #[serde(rename = "savedTargetingId", skip_serializing_if = "Option::is_none")]
    pub saved_targeting_id: Option<String>,
    /// Meta only. A raw Meta-native targeting spec (snake_case: `geo_locations`, `age_min`, `excluded_custom_audiences`, `flexible_spec`, `targeting_automation`, `user_os`, `wireless_carrier`, business places, etc.), the exact shape `GET /v1/ads/{adId}` returns for external ads.  Sent alone, it reaches the ad set VERBATIM (the path for cloning a campaign's targeting exactly). Meta validates it and surfaces any errors.  **Combining with camelCase fields** (countries/regions/cities/interests/ageMin/..., `targeting`, `savedTargetingId`, `audienceId`): rawTargeting is the BASE layer and the built camelCase spec is merged on top, key by key, with camelCase winning on collision.  The camelCase precedence chain stays `savedTargetingId` < `targeting` < flat fields. Merge rules:  - Inside `geo_locations` and `excluded_geo_locations` the merge goes one level deep: built sub-keys win, and raw-only sub-keys such as `location_types` survive alongside built `countries`. - Array values (`flexible_spec`, ...) are replaced as a WHOLE key when the camelCase spec builds them, never element-merged. - With rawTargeting present, the defaults the camelCase builder normally injects (US geo, `targeting_automation.advantage_audience: 0`) are suppressed, so raw values are not clobbered.  Include `targeting_automation` in the raw spec (or send `advantageAudience`), as Meta requires it on create. When cloning an EU campaign, also pass `dsaBeneficiary` / `dsaPayor` (separate fields, not part of targeting).
    #[serde(rename = "rawTargeting", skip_serializing_if = "Option::is_none")]
    pub raw_targeting: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// Declares the ad's special category, required for housing, employment, credit, or political/social-issue ads.  - Meta: every value. Setting a housing, employment or credit category disables income/zip   targeting on Meta. - TikTok: HOUSING, EMPLOYMENT and CREDIT, sent as the new campaign's `special_industries`   (TikTok requires one for these ads aimed at the US or Canada). Other values return 400. - TikTok targeting: the create (and `validateOnly`) returns 400 naming the field for ZIP codes   (`targeting.zips`), gender, ages under 18 (`targeting.ageMin`), interest keywords (`keyword:`   ids in `targeting.interests`) and hashtag behaviors. - TikTok also refuses Smart Targeting (`smartTargeting`) and lookalike audiences   (`targeting.audienceInclude` / `targeting.audienceExclude`). Without an age, the ad group   targets 18+. - TikTok sets the category when the campaign is created, so it is a 400 with `smartPlus`,   `existingCampaignId` or `adSetId`.
    #[serde(
        rename = "specialAdCategories",
        skip_serializing_if = "Option::is_none"
    )]
    pub special_ad_categories: Option<Vec<SpecialAdCategories>>,
    /// Meta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires specialAdCategories to be set (400 otherwise). Ignored when joining an existing campaign via existingCampaignId (the existing campaign's category/country already governs it).
    #[serde(
        rename = "specialAdCategoryCountry",
        skip_serializing_if = "Option::is_none"
    )]
    pub special_ad_category_country: Option<Vec<String>>,
    /// Meta only. Regional regulation categories required when the ad set targets certain countries. Known values: AUSTRALIA_FINSERV, AUSTRALIA_UNIVERSAL, BRAZIL_REGULATION, INDIA_FINSERV, MALAYSIA_UNIVERSAL, SINGAPORE_UNIVERSAL, TAIWAN_FINSERV, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL. Meta rejects the ad set without this when the targeting geo includes the corresponding country.
    #[serde(
        rename = "regionalRegulatedCategories",
        skip_serializing_if = "Option::is_none"
    )]
    pub regional_regulated_categories: Option<Vec<String>>,
    /// Meta only. Verified identity IDs of the beneficiary and payer for each declared regionalRegulatedCategories value. Ignored when adSetId adds the ad to an existing ad set.  Meta may require them on ad sets created through the API even when a default beneficiary and payer are set in Ads Manager advertising settings (seen on AUSTRALIA_FINSERV), so sending them explicitly is the reliable path.  **Value**: the Verified identity ID (Meta Business Settings > Verified identities), not a Page or Business ID. Beneficiary and payer may be the same ID. The IDs reach Meta unchanged.  Send each ID as a string of digits: Verified identity IDs can have 17 digits, more than a JSON number holds exactly, and a number that arrives rounded is rejected. Numbers up to 9007199254740991 are still accepted.  **Keys by category**:  - AUSTRALIA_FINSERV: australia_finserv_beneficiary / australia_finserv_payer - TAIWAN_FINSERV: taiwan_finserv_beneficiary / taiwan_finserv_payer - INDIA_FINSERV: india_finserv_beneficiary / india_finserv_payer - TAIWAN_UNIVERSAL: taiwan_universal_beneficiary / taiwan_universal_payer - SINGAPORE_UNIVERSAL: singapore_universal_beneficiary / singapore_universal_payer - AUSTRALIA_UNIVERSAL, BRAZIL_REGULATION, MALAYSIA_UNIVERSAL and THAILAND_UNIVERSAL: universal_beneficiary / universal_payer  **Errors**: when Meta rejects the ad set for a missing verified advertiser, the error carries param regionalRegulationIdentities, details.expectedIdentityKeys (the keys the declared categories expect), details.suggestedCategories (the markets Meta ties to that subcode) and Meta's metaCode, metaSubcode and fbtraceId.
    #[serde(
        rename = "regionalRegulationIdentities",
        skip_serializing_if = "Option::is_none"
    )]
    pub regional_regulation_identities: Option<
        std::collections::HashMap<
            String,
            models::UpdateAdSetRequestRegionalRegulationIdentitiesValue,
        >,
    >,
    /// When the ad ends. If omitted: on a lifetime budget, the ad ends 7 days after it starts (reported in `appliedDefaults.endDate`); a daily budget runs until paused.  Read like `startDate`: account timezone on Meta, TikTok, X, Pinterest, OpenAI and Reddit; whole account-local days on Google; UTC on LinkedIn. A date-only end runs to 23:59:59 local.  On a Pinterest ad account that needs Campaign Budget Optimization, the end also goes on the campaign, daily budget included.  400 when it is not an ISO 8601 date or date-time, or when the ad joins a parent that keeps its own dates: `adSetId` on Meta, TikTok, Google, LinkedIn and Reddit, and `existingCampaignId` on Google.
    #[serde(rename = "endDate", skip_serializing_if = "Option::is_none")]
    pub end_date: Option<String>,
    /// Ad-set start time (ISO 8601, e.g. \"2026-06-10T09:00:00Z\"). When omitted the ad starts delivering immediately. Same field as on `POST /v1/ads/boost`.  Maps to the ad set's start: Meta `start_time`, TikTok ad group `schedule_start_time`, LinkedIn / Pinterest / X / Google campaign start. For lifetime budgets Meta also requires `endDate`.  **Values without an offset** (`YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DDTHH:MM:SS`):  - Meta, TikTok, X, Pinterest, OpenAI and Reddit: read in the ad account timezone (Meta itself would read it as UTC). - Google: runs whole days in the customer account timezone and takes the value's calendar date as written. - LinkedIn: ad accounts carry no timezone, so it is read as UTC.  The created ad's `schedule` echoes the start and end the platform stored, as UTC instants. When attaching to an existing ad set (`adSetId`) it is that ad set's start and end.
    #[serde(rename = "startDate", skip_serializing_if = "Option::is_none")]
    pub start_date: Option<String>,
    /// Meta only. The Facebook Page the ad runs as (`object_story_spec.page_id`). Defaults to the Page bound to the connection.  Pass another Page ID to run the ad as that Page. Any Page granted to the connection is accepted (for a business-login connection, every Page granted in Meta's dialog; list them with GET /v1/ads/instagram-accounts).  - The Instagram identity is re-resolved for that Page unless `instagramAccountId` is set. - A Page the connection cannot see is a 400 on `pageId` naming the granted Pages.
    #[serde(rename = "pageId", skip_serializing_if = "Option::is_none")]
    pub page_id: Option<String>,
    /// Meta only. Overrides the Instagram account the ad is delivered as. Pass an Instagram Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`; it is sent as-is and never replaced. Useful when a Page has more than one eligible IG account.  When omitted, we use the Instagram account linked to the Page. Formats that need an Instagram actor without one use the actor the Page's other ads already run as, then the Page's page-backed Instagram account.  If Meta refuses that default because the ad account has no access to it (200/1815199), the creative is retried once with an Instagram account the ad account is authorized for. With none, the request fails with a 422 on `instagramAccountId` (list the usable accounts with GET /v1/ads/instagram-accounts).  A creative replaced later through /v1/ads/{adId} follows the same rule.
    #[serde(rename = "instagramAccountId", skip_serializing_if = "Option::is_none")]
    pub instagram_account_id: Option<String>,
    #[serde(rename = "dynamicCreative", skip_serializing_if = "Option::is_none")]
    pub dynamic_creative: Option<Box<models::CreateStandaloneAdRequestDynamicCreative>>,
    /// Carousel cards. Behavior per platform:  **Reddit:** builds a carousel ad. Each card has its image, destination (card `linkUrl`, falling back to top-level `linkUrl`; 400 when neither is set), call to action (card `callToAction`, falling back to the top-level one) and caption (card `headline`, else `description`). `headline` is still required.  **Meta only:** a hand-built carousel of 2-10 authored cards, sent in order as the creative's `link_data.child_attachments`. Unlike `dynamicCreative`, you author every card's copy and link.  - Meta may still reorder cards for performance (`multi_share_optimized` defaults to true); send `optimizeCardOrder: false` to keep your order. - Requires top-level `body` and `callToAction`; `linkUrl` too UNLESS `leadGenFormId` is set. These become the ad's Destination and button (`link_data.link` / `link_data.call_to_action`) and the per-card fallback. - Mutually exclusive with `imageUrl`/`video`, `creatives[]`, `dynamicCreative`, `placementAssets`, `existingCreativeId`, `adSetId` and goal `catalog_sales`. - With `leadGenFormId` it builds a carousel Instant-Form lead ad: `linkUrl` and per-card `linkUrl` become OPTIONAL, forwarded as real destinations when sent; when omitted, the destination falls back to Meta's lead-form link.
    #[serde(rename = "carouselCards", skip_serializing_if = "Option::is_none")]
    pub carousel_cards: Option<Vec<models::CreateStandaloneAdRequestCarouselCardsInner>>,
    /// Meta only (a 400 on any other platform), and only with `carouselCards` (a 400 without them). Sets the creative's `link_data.multi_share_optimized`.  - `false`: keeps the cards in the order given. Meta then takes at most 5 cards, so `false` with more than 5 `carouselCards` is a 400. - `true`: Meta picks and reorders the cards for performance (up to 10). - Omitted: nothing is sent and Meta's default (`true`) applies.
    #[serde(rename = "optimizeCardOrder", skip_serializing_if = "Option::is_none")]
    pub optimize_card_order: Option<bool>,
    /// Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`.
    #[serde(rename = "defaultLocale", skip_serializing_if = "Option::is_none")]
    pub default_locale: Option<String>,
    /// Meta only. Multi-language ads (Dynamic Language Optimization, the \"Languages\" toggle in Ads Manager): ONE ad with per-locale copy and, optionally, per-locale media. Social proof (likes/comments/shares) stays on a SINGLE post instead of splitting across one ad per language.  The ad's top-level copy is the DEFAULT for every locale you do NOT list, and counts as one of the language variants.  **Text does NOT inherit** (the opposite of what you might expect). Every entry needs its own `headline`, `body` AND `description`, all DISTINCT from each other and from the top-level copy. `description` is therefore effectively required on the ad whenever `translations` is present, though optional otherwise.  Why: Meta deduplicates identical strings in the asset feed, so two locales sharing a string collapse into one asset.  The create then fails with a misleading \"Too few ... texts provided in asset creation\" (subcode 1885817) naming a field that is present. We validate first and return a 400 naming the locale and field.  Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate with \"The language asset feed includes an unsupported targeting field\" (subcode 1885985).  **Media DOES inherit** and is uploaded once when shared. `linkUrl` inherits too: each locale may name its own landing page, and unlisted locales fall back to the top-level `linkUrl`.  Meta enforces Dynamic Creative image dimensions on language feeds, so an `imageUrl` that works on a normal ad may fail with \"The following images have invalid dimensions for Dynamic Creative\" (subcode 1885558). Video is not affected.  Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards`, `existingCreativeId` and `creatives[]`: Meta allows one `asset_feed_spec` shape per creative.
    #[serde(rename = "translations", skip_serializing_if = "Option::is_none")]
    pub translations: Option<Vec<models::CreateStandaloneAdRequestTranslationsInner>>,
    /// Meta only. Pins a SPECIFIC asset (image OR video) to each placement group on a SINGLE ad (e.g. a 9:16 on Stories/Reels and a 4:5 on Feed). The same thing Ads Manager produces with \"different creative per placement\", mapped to the creative's `asset_feed_spec` + `asset_customization_rules`.  Deterministic pinning, NOT the auto-optimizing pool of `dynamicCreative` (mutually exclusive). Cannot be combined with `creatives[]` or top-level `bodies`/`headlines`/`descriptions` arrays.  Works on the legacy single shape AND the attach shape: `adSetId` + placementAssets adds one placement-customized ad to an existing ad set. To build N per-placement ads sharing one ad set, create the first normally and attach the rest.  **Text.** Each rule can override `headline`, `body` and `description` with one string per field. Omitted fields and unmatched placements use the top-level copy; `linkUrl` and `callToAction` remain shared. Zernio emits labelled text with `optimization_type: PLACEMENT`. Multiple text options rotating within a placement are not supported by this input.  **Placements.** Each rule's `placements` accepts the same fields as the top-level `placements` object; Meta enforces co-selection rules and returns an actionable error.  Meta controls text rendering by placement and format. Validation accepts these fields but does not prove that every field appears in delivery. Preview the ad, and put copy that must always be visible into the image or video itself.  `validateOnly: true` supports all-image placementAssets, and video placementAssets with a video id in every slot and no thumbnails, without uploading or creating anything. Video URLs and thumbnails need an upload, so they return 400.  **Media.** A block is all-image OR all-video, never mixed (Meta's asset_feed_spec carries one ad format). Exactly one catch-all default is required.  - Image mode: `defaultImageUrl` + `rules[].imageUrl`. - Video mode: `defaultVideoUrl` or `defaultVideoId` + `rules[].videoUrl` or `rules[].videoId`, with optional `thumbnailUrl`/`defaultThumbnailUrl` posters (Meta auto-generates them when omitted). An id reuses a video already on the ad account and wins over a URL in the same slot; the two can mix across slots.
    #[serde(rename = "placementAssets", skip_serializing_if = "Option::is_none")]
    pub placement_assets: Option<Box<models::MetaPlacementAssets>>,
    /// Custom audience ID for targeting
    #[serde(rename = "audienceId", skip_serializing_if = "Option::is_none")]
    pub audience_id: Option<String>,
    /// Google only. Omitted, it is display on a new campaign, and the existing campaign's own type with `existingCampaignId` or `adSetId` (Search, Display or Demand Gen; other types return 422). Performance Max requires assetGroup and Demand Gen requires demandGen; both are always created PAUSED.
    #[serde(rename = "campaignType", skip_serializing_if = "Option::is_none")]
    pub campaign_type: Option<CampaignType>,
    /// Google only (400 elsewhere). Set on the new campaign; a request that joins an existing campaign (`existingCampaignId` or `adSetId`) returns 400, change that campaign with PUT /v1/ads/campaigns/{campaignId}/targeting instead. `presence` reaches only people in or regularly in the targeted locations.
    #[serde(
        rename = "locationTargetingType",
        skip_serializing_if = "Option::is_none"
    )]
    pub location_targeting_type: Option<models::GoogleLocationTargetingType>,
    #[serde(rename = "assetGroup", skip_serializing_if = "Option::is_none")]
    pub asset_group: Option<Box<models::GooglePmaxAssetGroupInput>>,
    #[serde(rename = "demandGen", skip_serializing_if = "Option::is_none")]
    pub demand_gen: Option<Box<models::GoogleDemandGenInput>>,
    /// Google Search only. Keywords on the new ad group; entries are strings (BROAD) or { text, matchType }. Editable later via PUT /v1/ads/{adId} targeting.keywords.
    #[serde(rename = "keywords", skip_serializing_if = "Option::is_none")]
    pub keywords: Option<Vec<models::KeywordEntry>>,
    /// Google Search only; other platforms return 400. Ad-group-level negative keywords on the new ad group. Editable later via PUT /v1/ads/{adId} targeting.negativeKeywords.
    #[serde(rename = "negativeKeywords", skip_serializing_if = "Option::is_none")]
    pub negative_keywords: Option<Vec<models::KeywordEntry>>,
    /// Google Search only; other platforms return 400. Campaign-level negative keywords (campaign_criterion.negative), created alongside the ad group. Editable later via PUT /v1/ads/campaigns/{campaignId}/negative-keywords.
    #[serde(
        rename = "campaignNegativeKeywords",
        skip_serializing_if = "Option::is_none"
    )]
    pub campaign_negative_keywords: Option<Vec<models::KeywordEntry>>,
    /// Google Search RSA only. Extra text assets, as strings or objects with text and optional pinnedField. String input remains supported.  - The effective create lists, including primary text and after deduplication, must contain 3-15 headlines and 2-4 descriptions. Excess entries return 400. - Each headline is at most 30 characters (Google's limit). A longer one returns 400 naming the field and index (e.g. `additionalHeadlines[2]`); it is never truncated. - On Search the same limit applies to `headline` and `longHeadline` (30) and to `body` (90).
    #[serde(
        rename = "additionalHeadlines",
        skip_serializing_if = "Option::is_none"
    )]
    pub additional_headlines:
        Option<Vec<models::CreateStandaloneAdRequestAdditionalHeadlinesInner>>,
    /// Google Search RSA only. Extra text assets, as strings or objects with text and optional pinnedField. Existing string input remains supported.  - The effective create lists, including primary text and deduplication, must contain 3-15 headlines and 2-4 descriptions; excess entries return 400. - Each description is at most 90 characters (Google's limit). A longer one returns 400 naming the field and index (e.g. `additionalDescriptions[2]`); it is never truncated. - On Search the same limit applies to `headline` and `longHeadline` (30) and to `body` (90).
    #[serde(
        rename = "additionalDescriptions",
        skip_serializing_if = "Option::is_none"
    )]
    pub additional_descriptions:
        Option<Vec<models::CreateStandaloneAdRequestAdditionalDescriptionsInner>>,
    /// Google Search only. Sitelink assets to create and attach at the campaign level. Each entry becomes an Asset (with sitelink_asset + Asset.final_urls) plus a CampaignAsset link (field_type SITELINK).  Approval is async: Google reviews assets after creation; poll asset.policy_summary later to read the verdict.  Google requires at least two sitelinks to surface them on an ad; four or more is Google's own recommendation for maximum visibility. The response's creative.sitelinks[] echoes each input plus its Google resourceName.
    #[serde(rename = "sitelinks", skip_serializing_if = "Option::is_none")]
    pub sitelinks: Option<Vec<models::CreateStandaloneAdRequestSitelinksInner>>,
    /// Google Search only. Short callout texts (max 25 chars each) that appear as non-clickable annotations under the ad, e.g. \"Free shipping\", \"24/7 support\". Each becomes one Asset (`callout_asset`) plus a CampaignAsset link with field_type CALLOUT. Response's creative.callouts[] echoes each input plus its Google resourceName.
    #[serde(rename = "callouts", skip_serializing_if = "Option::is_none")]
    pub callouts: Option<Vec<String>>,
    /// Google Search only. Structured snippets: one header from Google's predefined list plus 3-10 values (max 25 chars each). Each becomes one Asset (`structured_snippet_asset`) plus a CampaignAsset link with field_type STRUCTURED_SNIPPET.
    #[serde(rename = "structuredSnippets", skip_serializing_if = "Option::is_none")]
    pub structured_snippets: Option<Vec<models::CreateStandaloneAdRequestStructuredSnippetsInner>>,
    /// Meta only. Controls the Advantage audience feature (targeting_automation). 0 = disabled (default), 1 = enabled. Meta Marketing API requires this field on all ad set creation requests.
    #[serde(rename = "advantageAudience", skip_serializing_if = "Option::is_none")]
    pub advantage_audience: Option<AdvantageAudience>,
    /// Meta only. Conversion attribution window for the ad set, mapping 1:1 to Meta's ad-set `attribution_spec`. Only honored for conversion goals (`conversions`, `lead_generation`, `app_promotion`); ignored for awareness/traffic/engagement. Omit to use Meta's default (`7-day click` + `1-day view`).  Meta enforces the valid combinations (invalid combos surface as a Meta 400):  - `VIEW_THROUGH`: only `windowDays: 1` (7d/28d view windows were removed Jan 2026). - `ENGAGED_VIDEO_VIEW`: only `1`, and only alongside `VIEW_THROUGH: 1`. - `CLICK_THROUGH: 28`: only on certain objectives.  Example: `[{ \"eventType\": \"CLICK_THROUGH\", \"windowDays\": 7 }, { \"eventType\": \"VIEW_THROUGH\", \"windowDays\": 1 }]`
    #[serde(rename = "attributionSpec", skip_serializing_if = "Option::is_none")]
    pub attribution_spec: Option<Vec<models::BoostPostRequestAttributionSpecInner>>,
    /// Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Applied on Meta, TikTok, Pinterest and Reddit. Ignored on Google, LinkedIn and X.
    #[serde(rename = "gender", skip_serializing_if = "Option::is_none")]
    pub gender: Option<Gender>,
    /// Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window. Sending both shapes returns a 400.  Bid strategy applied to the ad set (Meta). Per platform:  - **OpenAI Ads:** only this flat field works (`platformSpecificData` is Meta/LinkedIn-only and returns 400 for OpenAI). `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` with `bidAmount` sets a fixed bid (`fixed_bid`, the CPA bid on `conversions`). - **OpenAI Ads, automatic:** omitted or `LOWEST_COST_WITHOUT_CAP` uses OpenAI's Maximize Results (`maximize_clicks` for `traffic`, `maximize_conversions` for `conversions`). It needs `budgetType: daily`; a lifetime budget or the `awareness` goal returns 400. - **Reddit Ads:** flat field, applied to the new ad group. LOWEST_COST_WITHOUT_CAP or omitted = automatic bidding (BIDLESS). LOWEST_COST_WITH_BID_CAP + `bidAmount` = MANUAL_BIDDING with that bid. COST_CAP + `bidAmount` = MAXIMIZE_VOLUME with that cap. Any other strategy returns 422 before anything is created. - **Google:** not deprecated (this flat field is Google's only shape), applied to the campaign this call creates. LOWEST_COST_WITHOUT_CAP = Maximize Conversions. COST_CAP + bidAmount = Target CPA. LOWEST_COST_WITH_MIN_ROAS + roasAverageFloor = Target ROAS. - **Google, continued:** LOWEST_COST_WITH_BID_CAP + bidAmount = Maximize Clicks with a CPC ceiling. portfolioBidStrategyId attaches a portfolio strategy instead. Omitted, the campaign falls back to a goal-based default.
    #[serde(rename = "bidStrategy", skip_serializing_if = "Option::is_none")]
    pub bid_strategy: Option<models::BidStrategy>,
    /// Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400.  Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`.  Meta only: `bidAmount` WITHOUT `bidStrategy` requires `existingCampaignId` (400 otherwise). It sets the new ad set's cap under the joined campaign's COST_CAP / LOWEST_COST_WITH_BID_CAP parent; the strategy is inherited from the campaign. Restating bidStrategy here is accepted but has no effect on the ad set.  Rejected with 400 in `adSetId` attach mode, which inherits its cap from the platform. Use `PUT /v1/ads/ad-sets/{adSetId}` there instead.
    #[serde(rename = "bidAmount", skip_serializing_if = "Option::is_none")]
    pub bid_amount: Option<f64>,
    /// Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window. Sending both shapes returns a 400.  Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`; sending it without `bidStrategy` is a 400. Sent to Meta as `bid_constraints.roas_average_floor` × 10000.  Known gap: a CBO campaign's ROAS floor lives on the campaign only (set via `POST /v1/ads/campaigns`). There is no supported way to set it while joining a CBO campaign here.
    #[serde(rename = "roasAverageFloor", skip_serializing_if = "Option::is_none")]
    pub roas_average_floor: Option<f64>,
    /// Google Search and Display only. Performance Max rejects portfolio bidding. Attach an existing portfolio bid strategy (numeric id from GET /v1/ads/bid-strategies) to the new campaign instead of a standard one. Exclusive with bidStrategy.
    #[serde(
        rename = "portfolioBidStrategyId",
        skip_serializing_if = "Option::is_none"
    )]
    pub portfolio_bid_strategy_id: Option<String>,
    /// Google Search only. Target impression share bidding. Exclusive with bidStrategy, portfolioBidStrategyId and manualCpc; bidAmount is refused alongside it (the ceiling is maxCpc).
    #[serde(
        rename = "targetImpressionShare",
        skip_serializing_if = "Option::is_none"
    )]
    pub target_impression_share: Option<Box<models::GoogleTargetImpressionShare>>,
    #[serde(rename = "manualCpc", skip_serializing_if = "Option::is_none")]
    pub manual_cpc: Option<Box<models::GoogleManualCpc>>,
    /// Google Search only, when the call creates the campaign (400 with existingCampaignId or adSetId).
    #[serde(rename = "networkSettings", skip_serializing_if = "Option::is_none")]
    pub network_settings: Option<Box<models::GoogleNetworkSettings>>,
    /// Meta only (facebook, instagram; other platforms return 400). Value rule set to attach to the new ad set, from `/v1/ads/value-rule-sets`. Attachment is driven by this id, so `valueRulesApplied` is optional alongside it.  Rejected with 400 in `adSetId` attach mode: that shape inherits the existing ad set's attachment, so the field would be silently ignored. Use `PUT /v1/ads/ad-sets/{adSetId}` there instead.  Ignored (stripped before the ad-set create) when `buyingType` is `RESERVED`: value rules only apply to auction ad sets on `LOWEST_COST_WITHOUT_CAP` or `COST_CAP`, and a Reach & Frequency reservation has no auction bid strategy.  Read back with `GET /v1/ads/ad-sets/{adSetId}?fields=value_rule_set_id`; the attachment is not mirrored onto Zernio's ad documents.
    #[serde(rename = "valueRuleSetId", skip_serializing_if = "Option::is_none")]
    pub value_rule_set_id: Option<String>,
    /// Meta only (facebook, instagram; other platforms return 400). Optional when attaching, and requires `valueRuleSetId`. `false` is REJECTED here with 400: a newly created ad set has nothing to detach, so detaching lives on `PUT /v1/ads/ad-sets/{adSetId}`.
    #[serde(rename = "valueRulesApplied", skip_serializing_if = "Option::is_none")]
    pub value_rules_applied: Option<bool>,
    #[serde(
        rename = "platformSpecificData",
        skip_serializing_if = "Option::is_none"
    )]
    pub platform_specific_data: Option<Box<models::CreateStandaloneAdRequestPlatformSpecificData>>,
    /// Legal entity that benefits from the ad. Required when targeting EU users (EU DSA, Article 26). Optional if the ad account has a default beneficiary: set it once via `PATCH /v1/ads/accounts` or in Meta Ads Manager, and Meta fills it in whenever the field is omitted.
    #[serde(rename = "dsaBeneficiary", skip_serializing_if = "Option::is_none")]
    pub dsa_beneficiary: Option<String>,
    /// Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor.
    #[serde(rename = "dsaPayor", skip_serializing_if = "Option::is_none")]
    pub dsa_payor: Option<String>,
    #[serde(rename = "brandIdentity", skip_serializing_if = "Option::is_none")]
    pub brand_identity: Option<Box<models::CreateStandaloneAdRequestBrandIdentity>>,
    /// TikTok: the identity the ad runs as, from GET /v1/ads/tiktok-identities. Overrides the connected account's own identity; must be authorized on the advertiser.
    #[serde(rename = "identityId", skip_serializing_if = "Option::is_none")]
    pub identity_id: Option<String>,
    /// TikTok only. Forces the identity attribution on the ad:    - `TT_USER`: the posting account's open_id (real @username     branding). Requires a connected TikTok posting account     on the same profile.   - `CUSTOMIZED_USER`: synthetic Brand Identity (display     name + avatar). Requires a configured Brand Identity     (cached on the `tiktokads` SocialAccount via     `PATCH /v1/connect/tiktok-ads`) or an inline     `brandIdentity` to create one on the fly.  When omitted, defaults to `TT_USER` if a posting account is connected on this profile, else `CUSTOMIZED_USER`. Spark Ads (`POST /v1/ads/boost`) always use `TT_USER` regardless of this field, because TikTok requires the original organic post's author identity for Spark.
    #[serde(rename = "identityType", skip_serializing_if = "Option::is_none")]
    pub identity_type: Option<IdentityType>,
    /// TikTok only. Creates the ad as a TikTok Upgraded Smart+ campaign: TikTok automates targeting, bidding and delivery. Supported goals:  - `conversions`: Smart+ Web Conversions. - `lead_generation`: Smart+ Lead Generation with a website form on `linkUrl` (TikTok Instant Forms not supported). - `app_promotion`: Smart+ App installs. The destination is the app store, so `linkUrl` is not used.  The web goals require `promotedObject.pixelId` AND `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` instead.  Targeting works like on any TikTok ad (defaults to `countries: [\"US\"]` when omitted), and TikTok automates delivery within it.  The budget lives on the Smart+ campaign (Campaign Budget Optimization). A `lifetime` budget without `endDate` ends 7 days after it starts. Smart+ needs `goal` sent; it is never inferred. Cannot be combined with `adSetId`.
    #[serde(rename = "smartPlus", skip_serializing_if = "Option::is_none")]
    pub smart_plus: Option<bool>,
    /// Meta only. Operating systems and version ranges, such as iOS_ver_14.0_and_above or Android. Emitted as user_os. May also be supplied inside targeting.
    #[serde(rename = "userOs", skip_serializing_if = "Option::is_none")]
    pub user_os: Option<Vec<String>>,
    /// Meta only. Device models such as iPhone. Emitted as user_device. May also be supplied inside targeting.
    #[serde(rename = "userDevice", skip_serializing_if = "Option::is_none")]
    pub user_device: Option<Vec<String>>,
    /// Meta app promotion only. Immutable campaign flag. Set true for iOS 14+ SKAdNetwork campaigns and supply promotedObject.applicationId plus promotedObject.objectStoreUrl. The campaign receives promotedObject only when this flag is true. Cannot be changed on an existing campaign.
    #[serde(
        rename = "isSkadnetworkAttribution",
        skip_serializing_if = "Option::is_none"
    )]
    pub is_skadnetwork_attribution: Option<bool>,
    /// Meta ad-set attribution. Required as SKADNETWORK for iOS 14+ app promotion or a SKAdNetwork campaign. Requires AUCTION buying. Standalone Meta ad-set creation is not supported; use this field on /v1/ads/create.
    #[serde(
        rename = "campaignAttribution",
        skip_serializing_if = "Option::is_none"
    )]
    pub campaign_attribution: Option<CampaignAttribution>,
    #[serde(rename = "promotedObject", skip_serializing_if = "Option::is_none")]
    pub promoted_object: Option<Box<models::AdPromotedObject>>,
}

impl CreateStandaloneAdRequest {
    pub fn new(account_id: String, ad_account_id: String) -> CreateStandaloneAdRequest {
        CreateStandaloneAdRequest {
            account_id,
            ad_account_id,
            name: None,
            campaign_name: None,
            ad_set_name: None,
            ad_name: None,
            tracking: None,
            goal: None,
            smart_targeting: None,
            optimization_goal: None,
            billing_event: None,
            buying_type: None,
            rf_prediction_id: None,
            promotion: None,
            creative_features: None,
            catalog_format: None,
            catalog_intro_cards: None,
            multi_advertiser: None,
            ai_disclosure: None,
            retry_on_server_error: None,
            validate_only: None,
            budget_amount: None,
            budget_type: None,
            status: None,
            campaign_status: None,
            ad_set_status: None,
            ad_status: None,
            budget_level: None,
            currency: None,
            headline: None,
            long_headline: None,
            body: None,
            description: None,
            bodies: None,
            headlines: None,
            descriptions: None,
            call_to_action: None,
            link_url: None,
            lead_gen_form_id: None,
            image_url: None,
            images: None,
            video: None,
            creatives: None,
            ad_set_id: None,
            existing_campaign_id: None,
            phone_number: None,
            existing_creative_id: None,
            business_name: None,
            board_id: None,
            organization_id: None,
            targeting: None,
            countries: None,
            country_groups: None,
            cities: None,
            regions: None,
            age_min: None,
            age_max: None,
            interests: None,
            zips: None,
            metros: None,
            custom_locations: None,
            behaviors: None,
            work_positions: None,
            work_employers: None,
            work_industries: None,
            income_tier: None,
            languages: None,
            placements: None,
            saved_targeting_id: None,
            raw_targeting: None,
            special_ad_categories: None,
            special_ad_category_country: None,
            regional_regulated_categories: None,
            regional_regulation_identities: None,
            end_date: None,
            start_date: None,
            page_id: None,
            instagram_account_id: None,
            dynamic_creative: None,
            carousel_cards: None,
            optimize_card_order: None,
            default_locale: None,
            translations: None,
            placement_assets: None,
            audience_id: None,
            campaign_type: None,
            location_targeting_type: None,
            asset_group: None,
            demand_gen: None,
            keywords: None,
            negative_keywords: None,
            campaign_negative_keywords: None,
            additional_headlines: None,
            additional_descriptions: None,
            sitelinks: None,
            callouts: None,
            structured_snippets: None,
            advantage_audience: None,
            attribution_spec: None,
            gender: None,
            bid_strategy: None,
            bid_amount: None,
            roas_average_floor: None,
            portfolio_bid_strategy_id: None,
            target_impression_share: None,
            manual_cpc: None,
            network_settings: None,
            value_rule_set_id: None,
            value_rules_applied: None,
            platform_specific_data: None,
            dsa_beneficiary: None,
            dsa_payor: None,
            brand_identity: None,
            identity_id: None,
            identity_type: None,
            smart_plus: None,
            user_os: None,
            user_device: None,
            is_skadnetwork_attribution: None,
            campaign_attribution: None,
            promoted_object: None,
        }
    }
}
/// The ad's goal. Available goals vary by platform. When omitted, it is inferred from the ad (see `appliedDefaults.goal` in the response); the attach shape inherits it from the ad set.  **Meta**  - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event (e.g. PURCHASE, START_TRIAL). Alternatives: `promotedObject.customConversionId` for a Custom Conversion, or `customEventType: OTHER` + `customEventStr` for a pixel custom event. - `lead_conversion`: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, with a leads-class event (LEAD, SUBMIT_APPLICATION, SCHEDULE, CONTACT) or `promotedObject.customConversionId`. Meta gates conversion events by objective, so leads-class events are rejected under `conversions`. - `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page. - `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`. - `catalog_sales`: Advantage+ catalog ads (e.g. vehicle inventory). Requires `promotedObject.productSetId`, `promotedObject.pixelId` and `promotedObject.customEventType`. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like {{product.name}} or {{vehicle.make}}. - `catalog_sales` visuals: no imageUrl or video is sent; Meta renders them per catalog item (an imageUrl or video sent is ignored, not uploaded). Find catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/{catalogId}/product-sets. - `catalog_sales` shape: single shape only, no creatives[], dynamicCreative, placementAssets, existingCreativeId or carouselCards. Works with `existingCampaignId`, and with `adSetId` to add to an existing ad set (then only `promotedObject.productSetId` is required). Pick the format with `catalogFormat`, and open the carousel with `catalogIntroCards`. - `traffic` with `promotedObject.productSetId`: a catalog ad without a pixel (OUTCOME_TRAFFIC, `optimizationGoal` LINK_CLICKS by default or LANDING_PAGE_VIEWS). The product set goes on the template creative only, never the ad set's promoted_object. No `pixelId` or `customEventType` needed. Same creative rules as `catalog_sales`. - `page_likes`: Page Likes under OUTCOME_ENGAGEMENT (destination_type ON_PAGE, optimization PAGE_LIKES). `promotedObject.pageId` is optional and auto-filled. The CTA is fixed to LIKE_PAGE for that Page; headline / body / linkUrl / callToAction / imageUrl / video are all optional (Meta derives them from the Page). - `page_visits`: \"Page visits and followers\" under OUTCOME_TRAFFIC (destination_type FACEBOOK_PAGE, optimization PROFILE_VISIT). `promotedObject.pageId` is optional and auto-filled; `linkUrl` defaults to the Page. Accounts Meta has not enabled are refused with \"This account isn't eligible to use Profile Visit ads yet\".  **TikTok**  - `conversions`: website-conversion ad group. Requires `promotedObject.pixelId` (your TikTok Pixel ID). Optional `promotedObject.customEventType`: a TikTok optimization_event code your pixel tracks (newer pixels: e.g. SHOPPING for purchases; legacy: ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER, FORM). To inherit pixel and event from an existing ad group, pass `adSetId`.  **LinkedIn**  - `engagement`, `traffic`, `awareness`, `video_views`: standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`. - `lead_generation`: requires `leadGenFormId` (an adForm ID from POST /v1/ads/lead-forms). Sets the campaign objective to MAX_LEAD and the creative's `leadgenCallToAction` destination to `urn:li:adForm:{id}`. - `job_applicants`: requires a `platformSpecificData.jobs` creative. - `conversions` or promoting an existing post: use POST /v1/ads/boost.  **OpenAI Ads**  - Only `traffic`, `awareness`, `conversions` (other goals return 400). They map to OpenAI's `bidding_type` (clicks, impressions, conversions). - `conversions` needs an active conversion event setting on the account, or returns 400. Create a tracking tag with `defaultEventType` (`POST /v1/accounts/{accountId}/tracking-tags`) or configure one in OpenAI Ads Manager. - Pick the event with `promotedObject.customEventType` (see AdPromotedObject); without it, the most recently created optimizable event is used.  **Reddit Ads**  - Supported: `traffic` (CLICKS), `awareness` (BRAND_AWARENESS), `conversions`, `video_views` (VIDEO_VIEWABLE_IMPRESSIONS), `lead_generation` (LEAD_GENERATION). Any other goal returns 400. - `conversions`: requires `promotedObject.customEventType`; the pixel must already have received that event (see AdPromotedObject). - `lead_generation`: sends people to `linkUrl` and optimizes toward the pixel's Lead event, which the pixel must already have received. Reddit retired native lead forms on September 30, 2026, so `leadGenFormId` returns 400. - `video_views`: needs a `video` (422 otherwise); `optimizationGoal` picks VIDEO_VIEW_6S (default) or VIDEO_VIEW_15S.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Goal {
    #[serde(rename = "engagement")]
    Engagement,
    #[serde(rename = "traffic")]
    Traffic,
    #[serde(rename = "awareness")]
    Awareness,
    #[serde(rename = "video_views")]
    VideoViews,
    #[serde(rename = "lead_generation")]
    LeadGeneration,
    #[serde(rename = "lead_conversion")]
    LeadConversion,
    #[serde(rename = "conversions")]
    Conversions,
    #[serde(rename = "app_promotion")]
    AppPromotion,
    #[serde(rename = "catalog_sales")]
    CatalogSales,
    #[serde(rename = "page_likes")]
    PageLikes,
    #[serde(rename = "page_visits")]
    PageVisits,
    #[serde(rename = "job_applicants")]
    JobApplicants,
}

impl Default for Goal {
    fn default() -> Goal {
        Self::Engagement
    }
}
/// Meta only. Buying type. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. Reusing existingCampaignId does not change the campaign.  RESERVED = Reach & Frequency:  - Requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). - Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. - Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum BuyingType {
    #[serde(rename = "AUCTION")]
    Auction,
    #[serde(rename = "RESERVED")]
    Reserved,
}

impl Default for BuyingType {
    fn default() -> BuyingType {
        Self::Auction
    }
}
/// Meta only. Applied to each new creative, including standalone, attach and catalog template shapes.  - With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. - auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting. - On catalog ads, the catalog enhancements are keys of this same map, for example `{ \"product_extensions\": \"OPT_OUT\", \"media_type_automation\": \"OPT_OUT\", \"standard_enhancements_catalog\": \"OPT_OUT\", \"multi_creative_post_carousel\": \"OPT_OUT\" }`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CreativeFeatures {
    #[serde(rename = "OPT_IN")]
    OptIn,
    #[serde(rename = "OPT_OUT")]
    OptOut,
}

impl Default for CreativeFeatures {
    fn default() -> CreativeFeatures {
        Self::OptIn
    }
}
/// Meta catalog template creatives only (goal `catalog_sales`, goal `traffic` with `promotedObject.productSetId`, or `adSetId` with `promotedObject.productSetId`); a 400 otherwise. Omit it to let Meta pick the format.  Sent as `object_story_spec.template_data.format_option`. `force_single_link` is never sent with it (Meta rejects the pair, subcode 1443051).  - `single_image`: also sends `format_transformation_spec` with `carousel` and `da_collection` set to `data_source: [\"none\"]`, so Meta keeps the single image instead of turning it into a carousel or collection. - `carousel_images_single_item`: also sends `template_data.multi_share_end_card: false`, which Meta requires for that format (subcode 1443167).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CatalogFormat {
    #[serde(rename = "single_image")]
    SingleImage,
    #[serde(rename = "carousel_images_multi_items")]
    CarouselImagesMultiItems,
    #[serde(rename = "carousel_images_single_item")]
    CarouselImagesSingleItem,
    #[serde(rename = "carousel_slideshows")]
    CarouselSlideshows,
}

impl Default for CatalogFormat {
    fn default() -> CatalogFormat {
        Self::SingleImage
    }
}
/// Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave. It is a top-level creative field, NOT a `creativeFeatures` key, and Meta rejects it there.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum MultiAdvertiser {
    #[serde(rename = "OPT_IN")]
    OptIn,
    #[serde(rename = "OPT_OUT")]
    OptOut,
}

impl Default for MultiAdvertiser {
    fn default() -> MultiAdvertiser {
        Self::OptIn
    }
}
/// Meta only. Meta's \"Ad includes media created or edited with AI\" disclosure (the Ads Manager checkbox), stored on the creative as `generative_asset_spec.transparency_metadata.self_disclosure`.  - OPT_IN: checks it. - OPT_OUT: explicitly declares no AI media. - Omitted: leaves Meta's default.  Applied to each new creative (standalone, creatives[] and attach shapes) and preserved when a creative is rebuilt. This sets the disclosure on the ad; whether and when the viewer-facing label renders is Meta's decision.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AiDisclosure {
    #[serde(rename = "OPT_IN")]
    OptIn,
    #[serde(rename = "OPT_OUT")]
    OptOut,
}

impl Default for AiDisclosure {
    fn default() -> AiDisclosure {
        Self::OptIn
    }
}
/// Defaults to daily when `budgetAmount` is sent without it (reported in `appliedDefaults.budgetType`). Inherited on attach.  - **OpenAI Ads:** accepts both as the campaign's single spend cap. A lifetime cap can later switch to daily with PUT /v1/ads/campaigns/{campaignId}, but never daily back to lifetime (422). Automatic bidding (Maximize Results) needs a daily budget. - **Reddit Ads:** the ad group's daily or lifetime spend goal.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum BudgetType {
    #[serde(rename = "daily")]
    Daily,
    #[serde(rename = "lifetime")]
    Lifetime,
}

impl Default for BudgetType {
    fn default() -> BudgetType {
        Self::Daily
    }
}
/// Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default, back-compat).  PAUSED pauses only the TOP-MOST object this call creates and switches everything below it on, so one resume of that object brings the new tree live and nothing pre-existing is touched:  - New campaign: held paused with its ad set and ad on. - With `existingCampaignId`: the new ad set is held paused with its ad on. - With `adSetId`: the new ad itself is paused.  **Level overrides.** `campaignStatus`, `adSetStatus` and `adStatus` set one level each and always win for that level. `status: PAUSED` adds its own hold only when none of them is PAUSED. `campaignStatus: ACTIVE` with `status: PAUSED` moves the pause down to the new ad set. To create every object paused, send all three as PAUSED.  **Platform notes:**  - LinkedIn: every object the call creates is held. A new campaign group is PAUSED. A new campaign or creative stays DRAFT, as LinkedIn refuses PAUSED on a creative until its review is APPROVED. Resume each held object top-down to go live. - X: no per-ad switch, so its lowest level is the line item. - Google Performance Max and Demand Gen: accept PAUSED only (the campaign is created paused).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "ACTIVE")]
    Active,
    #[serde(rename = "PAUSED")]
    Paused,
}

impl Default for Status {
    fn default() -> Status {
        Self::Active
    }
}
/// Every platform. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. Omitted, it follows `status`. Ignored when the request creates no campaign (`existingCampaignId` or `adSetId`).  - `PAUSED`: holds the campaign off with its ad set and ad on, unless `adSetStatus` or `adStatus` say otherwise. - `ACTIVE` with `status: PAUSED`: switches the campaign on and holds the new ad set paused (its ad on).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CampaignStatus {
    #[serde(rename = "ACTIVE")]
    Active,
    #[serde(rename = "PAUSED")]
    Paused,
}

impl Default for CampaignStatus {
    fn default() -> CampaignStatus {
        Self::Active
    }
}
/// Every platform. Sets the switch of the new ad set alone and overrides `status` for it. When omitted, it follows `status`. Equivalent object: Google, TikTok, Pinterest and ChatGPT, the ad group; LinkedIn, the campaign (stays DRAFT when held); X, the line item.  Precedence: a level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level. `status: PAUSED` then holds the top-most new object with no level status, only when no level status is PAUSED. Every other new object is switched on.  So `campaignStatus: ACTIVE` + `adSetStatus: PAUSED` + `adStatus: PAUSED` keeps the campaign on with the new ad set and ad off; all three PAUSED creates the whole tree paused.  Rejected with a 400 alongside `adSetId` (that ad set exists; change it with PUT /v1/ads/ad-sets/{adSetId}/status). Performance Max and Demand Gen accept PAUSED only.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AdSetStatus {
    #[serde(rename = "ACTIVE")]
    Active,
    #[serde(rename = "PAUSED")]
    Paused,
}

impl Default for AdSetStatus {
    fn default() -> AdSetStatus {
        Self::Active
    }
}
/// Meta only. Where the budget lives, which selects the Meta budget model:  - `adset` (used when omitted): ABO (Ad-set Budget Optimization). The budget is set on the ad set. - `campaign`: CBO (Campaign Budget Optimization / Advantage Campaign Budget). The budget AND `bidStrategy` are set on the CAMPAIGN, and Meta distributes spend across ad sets automatically.  The returned ad stores the applied `budgetLevel`, and the budget in `campaignBudget` (CBO) or `adSetBudget` (ABO). Edit CBO budgets with `PUT /v1/ads/campaigns/{campaignId}` and ABO budgets with `PUT /v1/ads/ad-sets/{adSetId}`.  Meta requires the budget at exactly one level, never both. Ignored on the Meta attach shape (`adSetId`), which inherits the existing budget.  Google Demand Gen also reads it. A new Demand Gen campaign accepts only `campaign` or no value. With `existingCampaignId` or `adSetId`, omit it: the budget stays on the existing campaign. Other platforms ignore it.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum BudgetLevel {
    #[serde(rename = "adset")]
    Adset,
    #[serde(rename = "campaign")]
    Campaign,
}

impl Default for BudgetLevel {
    fn default() -> BudgetLevel {
        Self::Adset
    }
}
/// The ad's call-to-action button.  - **Meta:** required on legacy + attach shapes. Accepts every call to action type Meta itself accepts (the enum lists them), including values such as SEE_DETAILS that ads synced from Meta carry. - **TikTok:** honoured, passed through to the Spark Ad creative's `call_to_action`. - **LinkedIn:** the CTA button on the ad; defaults to LEARN_MORE when `linkUrl` is set. Accepts LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. - **Reddit** (image, video and carousel ads): accepts LEARN_MORE, SHOP_NOW, SIGN_UP, CONTACT_US, DOWNLOAD, GET_QUOTE, SUBSCRIBE, APPLY_NOW, BOOK_NOW, BUY_TICKETS, DONATE_NOW, GET_DIRECTIONS, GET_SHOWTIMES, LISTEN_NOW, ORDER_NOW, SEE_MENU, INSTALL_MOBILE_APP. Other values return 400. - **Google, Pinterest, and X:** ignored.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CallToAction {
    #[serde(rename = "BOOK_TRAVEL")]
    BookTravel,
    #[serde(rename = "CONTACT_US")]
    ContactUs,
    #[serde(rename = "DONATE")]
    Donate,
    #[serde(rename = "DONATE_NOW")]
    DonateNow,
    #[serde(rename = "DOWNLOAD")]
    Download,
    #[serde(rename = "GET_DIRECTIONS")]
    GetDirections,
    #[serde(rename = "GO_LIVE")]
    GoLive,
    #[serde(rename = "INTERESTED")]
    Interested,
    #[serde(rename = "LEARN_MORE")]
    LearnMore,
    #[serde(rename = "SEE_DETAILS")]
    SeeDetails,
    #[serde(rename = "LIKE_PAGE")]
    LikePage,
    #[serde(rename = "MESSAGE_PAGE")]
    MessagePage,
    #[serde(rename = "RAISE_MONEY")]
    RaiseMoney,
    #[serde(rename = "SAVE")]
    Save,
    #[serde(rename = "SEND_TIP")]
    SendTip,
    #[serde(rename = "SHOP_NOW")]
    ShopNow,
    #[serde(rename = "SIGN_UP")]
    SignUp,
    #[serde(rename = "VIEW_INSTAGRAM_PROFILE")]
    ViewInstagramProfile,
    #[serde(rename = "INSTAGRAM_MESSAGE")]
    InstagramMessage,
    #[serde(rename = "LOYALTY_LEARN_MORE")]
    LoyaltyLearnMore,
    #[serde(rename = "PURCHASE_GIFT_CARDS")]
    PurchaseGiftCards,
    #[serde(rename = "PAY_TO_ACCESS")]
    PayToAccess,
    #[serde(rename = "SEE_MORE")]
    SeeMore,
    #[serde(rename = "TRY_IN_CAMERA")]
    TryInCamera,
    #[serde(rename = "WHATSAPP_LINK")]
    WhatsappLink,
    #[serde(rename = "GET_IN_TOUCH")]
    GetInTouch,
    #[serde(rename = "TRY_NOW")]
    TryNow,
    #[serde(rename = "ASK_A_QUESTION")]
    AskAQuestion,
    #[serde(rename = "START_A_CHAT")]
    StartAChat,
    #[serde(rename = "CHAT_NOW")]
    ChatNow,
    #[serde(rename = "ASK_US")]
    AskUs,
    #[serde(rename = "CHAT_WITH_US")]
    ChatWithUs,
    #[serde(rename = "SHOP_ON_RETAILER")]
    ShopOnRetailer,
    #[serde(rename = "BOOK_NOW")]
    BookNow,
    #[serde(rename = "CHECK_AVAILABILITY")]
    CheckAvailability,
    #[serde(rename = "ORDER_NOW")]
    OrderNow,
    #[serde(rename = "WHATSAPP_MESSAGE")]
    WhatsappMessage,
    #[serde(rename = "GET_MOBILE_APP")]
    GetMobileApp,
    #[serde(rename = "INSTALL_MOBILE_APP")]
    InstallMobileApp,
    #[serde(rename = "USE_MOBILE_APP")]
    UseMobileApp,
    #[serde(rename = "INSTALL_APP")]
    InstallApp,
    #[serde(rename = "USE_APP")]
    UseApp,
    #[serde(rename = "PLAY_GAME")]
    PlayGame,
    #[serde(rename = "TRY_DEMO")]
    TryDemo,
    #[serde(rename = "WATCH_VIDEO")]
    WatchVideo,
    #[serde(rename = "WATCH_MORE")]
    WatchMore,
    #[serde(rename = "OPEN_LINK")]
    OpenLink,
    #[serde(rename = "NO_BUTTON")]
    NoButton,
    #[serde(rename = "LISTEN_MUSIC")]
    ListenMusic,
    #[serde(rename = "MOBILE_DOWNLOAD")]
    MobileDownload,
    #[serde(rename = "GET_OFFER")]
    GetOffer,
    #[serde(rename = "GET_OFFER_VIEW")]
    GetOfferView,
    #[serde(rename = "BUY_NOW")]
    BuyNow,
    #[serde(rename = "BUY_TICKETS")]
    BuyTickets,
    #[serde(rename = "UPDATE_APP")]
    UpdateApp,
    #[serde(rename = "BET_NOW")]
    BetNow,
    #[serde(rename = "ADD_TO_CART")]
    AddToCart,
    #[serde(rename = "SELL_NOW")]
    SellNow,
    #[serde(rename = "GET_SHOWTIMES")]
    GetShowtimes,
    #[serde(rename = "LISTEN_NOW")]
    ListenNow,
    #[serde(rename = "GET_EVENT_TICKETS")]
    GetEventTickets,
    #[serde(rename = "REMIND_ME")]
    RemindMe,
    #[serde(rename = "SEARCH_MORE")]
    SearchMore,
    #[serde(rename = "PRE_REGISTER")]
    PreRegister,
    #[serde(rename = "SWIPE_UP_PRODUCT")]
    SwipeUpProduct,
    #[serde(rename = "SWIPE_UP_SHOP")]
    SwipeUpShop,
    #[serde(rename = "PLAY_GAME_ON_FACEBOOK")]
    PlayGameOnFacebook,
    #[serde(rename = "VISIT_WORLD")]
    VisitWorld,
    #[serde(rename = "OPEN_INSTANT_APP")]
    OpenInstantApp,
    #[serde(rename = "JOIN_GROUP")]
    JoinGroup,
    #[serde(rename = "GET_PROMOTIONS")]
    GetPromotions,
    #[serde(rename = "SEND_UPDATES")]
    SendUpdates,
    #[serde(rename = "INQUIRE_NOW")]
    InquireNow,
    #[serde(rename = "VISIT_PROFILE")]
    VisitProfile,
    #[serde(rename = "CHAT_ON_WHATSAPP")]
    ChatOnWhatsapp,
    #[serde(rename = "EXPLORE_MORE")]
    ExploreMore,
    #[serde(rename = "CONFIRM")]
    Confirm,
    #[serde(rename = "JOIN_CHANNEL")]
    JoinChannel,
    #[serde(rename = "MAKE_AN_APPOINTMENT")]
    MakeAnAppointment,
    #[serde(rename = "ASK_ABOUT_SERVICES")]
    AskAboutServices,
    #[serde(rename = "BOOK_A_CONSULTATION")]
    BookAConsultation,
    #[serde(rename = "GET_A_QUOTE")]
    GetAQuote,
    #[serde(rename = "BUY_VIA_MESSAGE")]
    BuyViaMessage,
    #[serde(rename = "ASK_FOR_MORE_INFO")]
    AskForMoreInfo,
    #[serde(rename = "VIEW_PRODUCT")]
    ViewProduct,
    #[serde(rename = "VIEW_CHANNEL")]
    ViewChannel,
    #[serde(rename = "WATCH_LIVE_VIDEO")]
    WatchLiveVideo,
    #[serde(rename = "JOIN_LIVE_VIDEO")]
    JoinLiveVideo,
    #[serde(rename = "IMAGINE")]
    Imagine,
    #[serde(rename = "WATCH_NOW")]
    WatchNow,
    #[serde(rename = "STREAM_NOW")]
    StreamNow,
    #[serde(rename = "BUY_ACTIVITY_TICKETS")]
    BuyActivityTickets,
    #[serde(rename = "CALL")]
    Call,
    #[serde(rename = "MISSED_CALL")]
    MissedCall,
    #[serde(rename = "CALL_NOW")]
    CallNow,
    #[serde(rename = "CALL_ME")]
    CallMe,
    #[serde(rename = "APPLY_NOW")]
    ApplyNow,
    #[serde(rename = "BUY")]
    Buy,
    #[serde(rename = "GET_QUOTE")]
    GetQuote,
    #[serde(rename = "SUBSCRIBE")]
    Subscribe,
    #[serde(rename = "RECORD_NOW")]
    RecordNow,
    #[serde(rename = "VOTE_NOW")]
    VoteNow,
    #[serde(rename = "GIVE_FREE_RIDES")]
    GiveFreeRides,
    #[serde(rename = "REGISTER_NOW")]
    RegisterNow,
    #[serde(rename = "OPEN_MESSENGER_EXT")]
    OpenMessengerExt,
    #[serde(rename = "EVENT_RSVP")]
    EventRsvp,
    #[serde(rename = "CIVIC_ACTION")]
    CivicAction,
    #[serde(rename = "SEND_INVITES")]
    SendInvites,
    #[serde(rename = "REFER_FRIENDS")]
    ReferFriends,
    #[serde(rename = "REQUEST_TIME")]
    RequestTime,
    #[serde(rename = "SEE_MENU")]
    SeeMenu,
    #[serde(rename = "SEARCH")]
    Search,
    #[serde(rename = "TRY_IT")]
    TryIt,
    #[serde(rename = "TRY_ON")]
    TryOn,
    #[serde(rename = "LINK_CARD")]
    LinkCard,
    #[serde(rename = "DIAL_CODE")]
    DialCode,
    #[serde(rename = "FIND_YOUR_GROUPS")]
    FindYourGroups,
    #[serde(rename = "START_ORDER")]
    StartOrder,
    #[serde(rename = "REGISTER")]
    Register,
    #[serde(rename = "JOIN")]
    Join,
    #[serde(rename = "ATTEND")]
    Attend,
    #[serde(rename = "REQUEST_DEMO")]
    RequestDemo,
    #[serde(rename = "VIEW_QUOTE")]
    ViewQuote,
    #[serde(rename = "APPLY")]
    Apply,
}

impl Default for CallToAction {
    fn default() -> CallToAction {
        Self::BookTravel
    }
}
/// Meta only. Continents and trade blocs (`geo_locations.country_groups`), for targeting a whole region without listing its countries. Combines with `countries` rather than replacing it. Discoverable via `GET /v1/ads/targeting/search?dimension=geo&geoType=country_group`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CountryGroups {
    #[serde(rename = "africa")]
    Africa,
    #[serde(rename = "asia")]
    Asia,
    #[serde(rename = "europe")]
    Europe,
    #[serde(rename = "north_america")]
    NorthAmerica,
    #[serde(rename = "south_america")]
    SouthAmerica,
    #[serde(rename = "oceania")]
    Oceania,
    #[serde(rename = "central_america")]
    CentralAmerica,
    #[serde(rename = "caribbean")]
    Caribbean,
    #[serde(rename = "eea")]
    Eea,
    #[serde(rename = "euro_area")]
    EuroArea,
    #[serde(rename = "nafta")]
    Nafta,
    #[serde(rename = "mercosur")]
    Mercosur,
    #[serde(rename = "afta")]
    Afta,
    #[serde(rename = "apec")]
    Apec,
    #[serde(rename = "gcc")]
    Gcc,
    #[serde(rename = "cisfta")]
    Cisfta,
    #[serde(rename = "emerging_markets")]
    EmergingMarkets,
    #[serde(rename = "itunes_app_store")]
    ItunesAppStore,
    #[serde(rename = "android_free_store")]
    AndroidFreeStore,
    #[serde(rename = "android_paid_store")]
    AndroidPaidStore,
}

impl Default for CountryGroups {
    fn default() -> CountryGroups {
        Self::Africa
    }
}
/// Normalized household-income tier. Meta and TikTok express all four; Google maps only `top_10`; rejected on LinkedIn, X, and Pinterest. On Meta, income targeting is incompatible with housing/employment/credit `specialAdCategories`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum IncomeTier {
    #[serde(rename = "top_5")]
    Top5,
    #[serde(rename = "top_10")]
    Top10,
    #[serde(rename = "top_10_25")]
    Top1025,
    #[serde(rename = "top_25_50")]
    Top2550,
}

impl Default for IncomeTier {
    fn default() -> IncomeTier {
        Self::Top5
    }
}
/// Declares the ad's special category, required for housing, employment, credit, or political/social-issue ads.  - Meta: every value. Setting a housing, employment or credit category disables income/zip   targeting on Meta. - TikTok: HOUSING, EMPLOYMENT and CREDIT, sent as the new campaign's `special_industries`   (TikTok requires one for these ads aimed at the US or Canada). Other values return 400. - TikTok targeting: the create (and `validateOnly`) returns 400 naming the field for ZIP codes   (`targeting.zips`), gender, ages under 18 (`targeting.ageMin`), interest keywords (`keyword:`   ids in `targeting.interests`) and hashtag behaviors. - TikTok also refuses Smart Targeting (`smartTargeting`) and lookalike audiences   (`targeting.audienceInclude` / `targeting.audienceExclude`). Without an age, the ad group   targets 18+. - TikTok sets the category when the campaign is created, so it is a 400 with `smartPlus`,   `existingCampaignId` or `adSetId`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SpecialAdCategories {
    #[serde(rename = "HOUSING")]
    Housing,
    #[serde(rename = "EMPLOYMENT")]
    Employment,
    #[serde(rename = "CREDIT")]
    Credit,
    #[serde(rename = "FINANCIAL_PRODUCTS_SERVICES")]
    FinancialProductsServices,
    #[serde(rename = "ISSUES_ELECTIONS_POLITICS")]
    IssuesElectionsPolitics,
    #[serde(rename = "ONLINE_GAMBLING_AND_GAMING")]
    OnlineGamblingAndGaming,
}

impl Default for SpecialAdCategories {
    fn default() -> SpecialAdCategories {
        Self::Housing
    }
}
/// Google only. Omitted, it is display on a new campaign, and the existing campaign's own type with `existingCampaignId` or `adSetId` (Search, Display or Demand Gen; other types return 422). Performance Max requires assetGroup and Demand Gen requires demandGen; both are always created PAUSED.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CampaignType {
    #[serde(rename = "display")]
    Display,
    #[serde(rename = "search")]
    Search,
    #[serde(rename = "pmax")]
    Pmax,
    #[serde(rename = "demand_gen")]
    DemandGen,
}

impl Default for CampaignType {
    fn default() -> CampaignType {
        Self::Display
    }
}
/// Meta only. Controls the Advantage audience feature (targeting_automation). 0 = disabled (default), 1 = enabled. Meta Marketing API requires this field on all ad set creation requests.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AdvantageAudience {
    #[serde(rename = "0")]
    Variant0,
    #[serde(rename = "1")]
    Variant1,
}

impl Default for AdvantageAudience {
    fn default() -> AdvantageAudience {
        Self::Variant0
    }
}
/// Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Applied on Meta, TikTok, Pinterest and Reddit. Ignored on Google, LinkedIn and X.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Gender {
    #[serde(rename = "all")]
    All,
    #[serde(rename = "male")]
    Male,
    #[serde(rename = "female")]
    Female,
}

impl Default for Gender {
    fn default() -> Gender {
        Self::All
    }
}
/// TikTok only. Forces the identity attribution on the ad:    - `TT_USER`: the posting account's open_id (real @username     branding). Requires a connected TikTok posting account     on the same profile.   - `CUSTOMIZED_USER`: synthetic Brand Identity (display     name + avatar). Requires a configured Brand Identity     (cached on the `tiktokads` SocialAccount via     `PATCH /v1/connect/tiktok-ads`) or an inline     `brandIdentity` to create one on the fly.  When omitted, defaults to `TT_USER` if a posting account is connected on this profile, else `CUSTOMIZED_USER`. Spark Ads (`POST /v1/ads/boost`) always use `TT_USER` regardless of this field, because TikTok requires the original organic post's author identity for Spark.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum IdentityType {
    #[serde(rename = "TT_USER")]
    TtUser,
    #[serde(rename = "CUSTOMIZED_USER")]
    CustomizedUser,
    #[serde(rename = "BC_AUTH_TT")]
    BcAuthTt,
}

impl Default for IdentityType {
    fn default() -> IdentityType {
        Self::TtUser
    }
}
/// Meta ad-set attribution. Required as SKADNETWORK for iOS 14+ app promotion or a SKAdNetwork campaign. Requires AUCTION buying. Standalone Meta ad-set creation is not supported; use this field on /v1/ads/create.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CampaignAttribution {
    #[serde(rename = "AEM")]
    Aem,
    #[serde(rename = "SKADNETWORK")]
    Skadnetwork,
}

impl Default for CampaignAttribution {
    fn default() -> CampaignAttribution {
        Self::Aem
    }
}