001// Generated by delombok at Thu Aug 13 13:56:43 UTC 2026 002/* 003 * Copyright (c) 2010-2026 Mark Allen, Norbert Bartels. 004 * 005 * Permission is hereby granted, free of charge, to any person obtaining a copy 006 * of this software and associated documentation files (the "Software"), to deal 007 * in the Software without restriction, including without limitation the rights 008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 009 * copies of the Software, and to permit persons to whom the Software is 010 * furnished to do so, subject to the following conditions: 011 * 012 * The above copyright notice and this permission notice shall be included in 013 * all copies or substantial portions of the Software. 014 * 015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 021 * THE SOFTWARE. 022 */ 023package com.restfb.types.ads; 024 025import java.util.ArrayList; 026import java.util.Date; 027import java.util.List; 028import com.restfb.Facebook; 029import com.restfb.annotation.GraphAPI; 030import com.restfb.types.features.HasCreatedTime; 031 032/** 033 * Represents the <a href="https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group">Campaign</a> 034 * Marketing API type 035 */ 036public class Campaign extends NamedAdsObject implements HasCreatedTime { 037 /** 038 * ID of the ad account that owns this campaign 039 */ 040 @Facebook("account_id") 041 private String accountId; 042 /** 043 * Ad Labels associated with this campaign 044 */ 045 @Facebook("adlabels") 046 private List<AdLabel> adlabels; 047 /** 048 * Bid strategy for this campaign 049 */ 050 @Facebook("bid_strategy") 051 private String bidStrategy; 052 /** 053 * The Boosted Object this campaign has associated, if any 054 */ 055 @Facebook("boosted_object_id") 056 private String boostedObjectId; 057 /** 058 * Automated Brand Lift V2 studies for this ad set. 059 */ 060 @Facebook("brand_lift_studies") 061 private List<AdStudy> brandLiftStudies = new ArrayList<>(); 062 /** 063 * Whether to automatically rebalance budgets daily for all the adsets under this campaign. 064 */ 065 @Facebook("budget_rebalance_flag") 066 private Boolean budgetRebalanceFlag; 067 /** 068 * Remaining budget 069 */ 070 @Facebook("budget_remaining") 071 private String budgetRemaining; 072 /** 073 * Buying type, possible values are: 074 * <ul> 075 * <li>AUCTION: default</li> 076 * <li>RESERVED: for reach and frequency ads</li> 077 * </ul> 078 */ 079 @Facebook("buying_type") 080 private String buyingType; 081 /** 082 * If we can create a new automated brand lift study for the ad set. 083 */ 084 @Facebook("can_create_brand_lift_study") 085 private Boolean canCreateBrandLiftStudy; 086 /** 087 * Whether the campaign can set the spend cap 088 */ 089 @Facebook("can_use_spend_cap") 090 private Boolean canUseSpendCap; 091 /** 092 * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status 093 * CAMPAIGN_PAUSED. Prefer using 'status' instead of this. 094 * 095 * possible values: ACTIVE, PAUSED, DELETED, ARCHIVED 096 */ 097 @Facebook("configured_status") 098 private String configuredStatus; 099 /** 100 * Created Time 101 */ 102 @Facebook("created_time") 103 private Date createdTime; 104 /** 105 * The daily budget of the campaign 106 */ 107 @Facebook("daily_budget") 108 private String dailyBudget; 109 /** 110 * The effective status of this campaign. 111 * 112 * possible values: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, 113 * CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED 114 */ 115 @Facebook("effective_status") 116 private String effectiveStatus; 117 /** 118 * Issues for this campaign that prevented it from deliverying. 119 */ 120 @Facebook("issues_info") 121 @GraphAPI(since = "3.2") 122 private List<AdCampaignIssuesInfo> issuesInfo = new ArrayList<>(); 123 /** 124 * Last budget toggling time 125 */ 126 @Facebook("last_budget_toggling_time") 127 private Date lastBudgetTogglingTime; 128 /** 129 * The lifetime budget of the campaign 130 */ 131 @Facebook("lifetime_budget") 132 private String lifetimeBudget; 133 /** 134 * Campaign's objective 135 */ 136 @Facebook 137 private String objective; 138 /** 139 * If there are recommendations for this campaign, this field includes them. 140 */ 141 @Facebook 142 private List<AdRecommendation> recommendations = new ArrayList<>(); 143 /** 144 * The source campaign that this campaign is copied from 145 */ 146 @Facebook("source_campaign") 147 private Campaign sourceCampaign; 148 /** 149 * The source campaign id that this campaign is copied from 150 */ 151 @Facebook("source_campaign_id") 152 private String sourceCampaignId; 153 /** 154 * The campaign's Special Ad Category. One of {@code HOUSING}, {@code EMPLOYMENT}, {@code CREDIT}, or {@code NONE}. 155 */ 156 @Deprecated 157 @GraphAPI(until = "7.0") 158 @Facebook("special_ad_category") 159 private String specialAdCategory; 160 @GraphAPI(since = "7.0") 161 @Facebook("special_ad_categories") 162 private List<String> specialAdCategories = new ArrayList<>(); 163 /** 164 * A spend cap for the campaign, such that it will not spend more than this cap. Expressed as integer value of the 165 * subunit in your currency. 166 */ 167 @Facebook("spend_cap") 168 private String spendCap; 169 /** 170 * Start Time 171 */ 172 @Facebook("start_time") 173 private Date startTime; 174 /** 175 * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status 176 * CAMPAIGN_PAUSED. The field returns the same value as 'configured_status', and is the suggested one to use. 177 */ 178 @Facebook 179 private String status; 180 /** 181 * Stop Time 182 */ 183 @Facebook("stop_time") 184 private Date stopTime; 185 /** 186 * Topline ID 187 */ 188 @Facebook("topline_id") 189 private String toplineId; 190 /** 191 * Updated Time 192 */ 193 @Facebook("updated_time") 194 private Date updatedTime; 195 196 /** 197 * @return ID of the ad account that owns this campaign 198 */ 199 @java.lang.SuppressWarnings("all") 200 @lombok.Generated 201 public String getAccountId() { 202 return this.accountId; 203 } 204 205 /** 206 * ID of the ad account that owns this campaign 207 */ 208 @java.lang.SuppressWarnings("all") 209 @lombok.Generated 210 public void setAccountId(final String accountId) { 211 this.accountId = accountId; 212 } 213 214 /** 215 * @return Ad Labels associated with this campaign 216 */ 217 @java.lang.SuppressWarnings("all") 218 @lombok.Generated 219 public List<AdLabel> getAdlabels() { 220 return this.adlabels; 221 } 222 223 /** 224 * Ad Labels associated with this campaign 225 */ 226 @java.lang.SuppressWarnings("all") 227 @lombok.Generated 228 public void setAdlabels(final List<AdLabel> adlabels) { 229 this.adlabels = adlabels; 230 } 231 232 /** 233 * Bid strategy for this campaign 234 */ 235 @java.lang.SuppressWarnings("all") 236 @lombok.Generated 237 public String getBidStrategy() { 238 return this.bidStrategy; 239 } 240 241 /** 242 * Bid strategy for this campaign 243 */ 244 @java.lang.SuppressWarnings("all") 245 @lombok.Generated 246 public void setBidStrategy(final String bidStrategy) { 247 this.bidStrategy = bidStrategy; 248 } 249 250 /** 251 * The Boosted Object this campaign has associated, if any 252 */ 253 @java.lang.SuppressWarnings("all") 254 @lombok.Generated 255 public String getBoostedObjectId() { 256 return this.boostedObjectId; 257 } 258 259 /** 260 * The Boosted Object this campaign has associated, if any 261 */ 262 @java.lang.SuppressWarnings("all") 263 @lombok.Generated 264 public void setBoostedObjectId(final String boostedObjectId) { 265 this.boostedObjectId = boostedObjectId; 266 } 267 268 /** 269 * Automated Brand Lift V2 studies for this ad set. 270 */ 271 @java.lang.SuppressWarnings("all") 272 @lombok.Generated 273 public List<AdStudy> getBrandLiftStudies() { 274 return this.brandLiftStudies; 275 } 276 277 /** 278 * Automated Brand Lift V2 studies for this ad set. 279 */ 280 @java.lang.SuppressWarnings("all") 281 @lombok.Generated 282 public void setBrandLiftStudies(final List<AdStudy> brandLiftStudies) { 283 this.brandLiftStudies = brandLiftStudies; 284 } 285 286 /** 287 * Whether to automatically rebalance budgets daily for all the adsets under this campaign. 288 */ 289 @java.lang.SuppressWarnings("all") 290 @lombok.Generated 291 public Boolean getBudgetRebalanceFlag() { 292 return this.budgetRebalanceFlag; 293 } 294 295 /** 296 * Whether to automatically rebalance budgets daily for all the adsets under this campaign. 297 */ 298 @java.lang.SuppressWarnings("all") 299 @lombok.Generated 300 public void setBudgetRebalanceFlag(final Boolean budgetRebalanceFlag) { 301 this.budgetRebalanceFlag = budgetRebalanceFlag; 302 } 303 304 /** 305 * Remaining budget 306 */ 307 @java.lang.SuppressWarnings("all") 308 @lombok.Generated 309 public String getBudgetRemaining() { 310 return this.budgetRemaining; 311 } 312 313 /** 314 * Remaining budget 315 */ 316 @java.lang.SuppressWarnings("all") 317 @lombok.Generated 318 public void setBudgetRemaining(final String budgetRemaining) { 319 this.budgetRemaining = budgetRemaining; 320 } 321 322 /** 323 * @return Buying type 324 */ 325 @java.lang.SuppressWarnings("all") 326 @lombok.Generated 327 public String getBuyingType() { 328 return this.buyingType; 329 } 330 331 /** 332 * Buying type, possible values are: 333 * <ul> 334 * <li>AUCTION: default</li> 335 * <li>RESERVED: for reach and frequency ads</li> 336 * </ul> 337 */ 338 @java.lang.SuppressWarnings("all") 339 @lombok.Generated 340 public void setBuyingType(final String buyingType) { 341 this.buyingType = buyingType; 342 } 343 344 /** 345 * If we can create a new automated brand lift study for the ad set. 346 */ 347 @java.lang.SuppressWarnings("all") 348 @lombok.Generated 349 public Boolean getCanCreateBrandLiftStudy() { 350 return this.canCreateBrandLiftStudy; 351 } 352 353 /** 354 * If we can create a new automated brand lift study for the ad set. 355 */ 356 @java.lang.SuppressWarnings("all") 357 @lombok.Generated 358 public void setCanCreateBrandLiftStudy(final Boolean canCreateBrandLiftStudy) { 359 this.canCreateBrandLiftStudy = canCreateBrandLiftStudy; 360 } 361 362 /** 363 * @return Whether the campaign can set the spend cap 364 */ 365 @java.lang.SuppressWarnings("all") 366 @lombok.Generated 367 public Boolean getCanUseSpendCap() { 368 return this.canUseSpendCap; 369 } 370 371 /** 372 * Whether the campaign can set the spend cap 373 */ 374 @java.lang.SuppressWarnings("all") 375 @lombok.Generated 376 public void setCanUseSpendCap(final Boolean canUseSpendCap) { 377 this.canUseSpendCap = canUseSpendCap; 378 } 379 380 /** 381 * @return the configured status 382 */ 383 @java.lang.SuppressWarnings("all") 384 @lombok.Generated 385 public String getConfiguredStatus() { 386 return this.configuredStatus; 387 } 388 389 /** 390 * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status 391 * CAMPAIGN_PAUSED. Prefer using 'status' instead of this. 392 * 393 * possible values: ACTIVE, PAUSED, DELETED, ARCHIVED 394 */ 395 @java.lang.SuppressWarnings("all") 396 @lombok.Generated 397 public void setConfiguredStatus(final String configuredStatus) { 398 this.configuredStatus = configuredStatus; 399 } 400 401 /** 402 * @return Created Time 403 */ 404 @Override 405 @java.lang.SuppressWarnings("all") 406 @lombok.Generated 407 public Date getCreatedTime() { 408 return this.createdTime; 409 } 410 411 /** 412 * Created Time 413 */ 414 @java.lang.SuppressWarnings("all") 415 @lombok.Generated 416 public void setCreatedTime(final Date createdTime) { 417 this.createdTime = createdTime; 418 } 419 420 /** 421 * The daily budget of the campaign 422 */ 423 @java.lang.SuppressWarnings("all") 424 @lombok.Generated 425 public String getDailyBudget() { 426 return this.dailyBudget; 427 } 428 429 /** 430 * The daily budget of the campaign 431 */ 432 @java.lang.SuppressWarnings("all") 433 @lombok.Generated 434 public void setDailyBudget(final String dailyBudget) { 435 this.dailyBudget = dailyBudget; 436 } 437 438 /** 439 * @return The effective status of this campaign 440 */ 441 @java.lang.SuppressWarnings("all") 442 @lombok.Generated 443 public String getEffectiveStatus() { 444 return this.effectiveStatus; 445 } 446 447 /** 448 * The effective status of this campaign. 449 * 450 * possible values: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, 451 * CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED 452 */ 453 @java.lang.SuppressWarnings("all") 454 @lombok.Generated 455 public void setEffectiveStatus(final String effectiveStatus) { 456 this.effectiveStatus = effectiveStatus; 457 } 458 459 /** 460 * @return List of issues for this campaign that prevented it from deliverying. 461 */ 462 @GraphAPI(since = "3.2") 463 @java.lang.SuppressWarnings("all") 464 @lombok.Generated 465 public List<AdCampaignIssuesInfo> getIssuesInfo() { 466 return this.issuesInfo; 467 } 468 469 /** 470 * Issues for this campaign that prevented it from deliverying. 471 */ 472 @java.lang.SuppressWarnings("all") 473 @lombok.Generated 474 public void setIssuesInfo(final List<AdCampaignIssuesInfo> issuesInfo) { 475 this.issuesInfo = issuesInfo; 476 } 477 478 /** 479 * Last budget toggling time 480 */ 481 @java.lang.SuppressWarnings("all") 482 @lombok.Generated 483 public Date getLastBudgetTogglingTime() { 484 return this.lastBudgetTogglingTime; 485 } 486 487 /** 488 * Last budget toggling time 489 */ 490 @java.lang.SuppressWarnings("all") 491 @lombok.Generated 492 public void setLastBudgetTogglingTime(final Date lastBudgetTogglingTime) { 493 this.lastBudgetTogglingTime = lastBudgetTogglingTime; 494 } 495 496 /** 497 * The lifetime budget of the campaign 498 */ 499 @java.lang.SuppressWarnings("all") 500 @lombok.Generated 501 public String getLifetimeBudget() { 502 return this.lifetimeBudget; 503 } 504 505 /** 506 * The lifetime budget of the campaign 507 */ 508 @java.lang.SuppressWarnings("all") 509 @lombok.Generated 510 public void setLifetimeBudget(final String lifetimeBudget) { 511 this.lifetimeBudget = lifetimeBudget; 512 } 513 514 /** 515 * @return Campaign's objective 516 */ 517 @java.lang.SuppressWarnings("all") 518 @lombok.Generated 519 public String getObjective() { 520 return this.objective; 521 } 522 523 /** 524 * Campaign's objective 525 */ 526 @java.lang.SuppressWarnings("all") 527 @lombok.Generated 528 public void setObjective(final String objective) { 529 this.objective = objective; 530 } 531 532 /** 533 * @return If there are recommendations for this campaign, this field includes them. 534 */ 535 @java.lang.SuppressWarnings("all") 536 @lombok.Generated 537 public List<AdRecommendation> getRecommendations() { 538 return this.recommendations; 539 } 540 541 /** 542 * If there are recommendations for this campaign, this field includes them. 543 */ 544 @java.lang.SuppressWarnings("all") 545 @lombok.Generated 546 public void setRecommendations(final List<AdRecommendation> recommendations) { 547 this.recommendations = recommendations; 548 } 549 550 /** 551 * The source campaign that this campaign is copied from 552 */ 553 @java.lang.SuppressWarnings("all") 554 @lombok.Generated 555 public Campaign getSourceCampaign() { 556 return this.sourceCampaign; 557 } 558 559 /** 560 * The source campaign that this campaign is copied from 561 */ 562 @java.lang.SuppressWarnings("all") 563 @lombok.Generated 564 public void setSourceCampaign(final Campaign sourceCampaign) { 565 this.sourceCampaign = sourceCampaign; 566 } 567 568 /** 569 * The source campaign id that this campaign is copied from 570 */ 571 @java.lang.SuppressWarnings("all") 572 @lombok.Generated 573 public String getSourceCampaignId() { 574 return this.sourceCampaignId; 575 } 576 577 /** 578 * The source campaign id that this campaign is copied from 579 */ 580 @java.lang.SuppressWarnings("all") 581 @lombok.Generated 582 public void setSourceCampaignId(final String sourceCampaignId) { 583 this.sourceCampaignId = sourceCampaignId; 584 } 585 586 /** 587 * The campaign's Special Ad Category. One of {@code HOUSING}, {@code EMPLOYMENT}, {@code CREDIT}, or {@code NONE}. 588 */ 589 @java.lang.Deprecated 590 @java.lang.SuppressWarnings("all") 591 @lombok.Generated 592 public String getSpecialAdCategory() { 593 return this.specialAdCategory; 594 } 595 596 /** 597 * The campaign's Special Ad Category. One of {@code HOUSING}, {@code EMPLOYMENT}, {@code CREDIT}, or {@code NONE}. 598 */ 599 @java.lang.Deprecated 600 @java.lang.SuppressWarnings("all") 601 @lombok.Generated 602 public void setSpecialAdCategory(final String specialAdCategory) { 603 this.specialAdCategory = specialAdCategory; 604 } 605 606 @java.lang.SuppressWarnings("all") 607 @lombok.Generated 608 public List<String> getSpecialAdCategories() { 609 return this.specialAdCategories; 610 } 611 612 @java.lang.SuppressWarnings("all") 613 @lombok.Generated 614 public void setSpecialAdCategories(final List<String> specialAdCategories) { 615 this.specialAdCategories = specialAdCategories; 616 } 617 618 /** 619 * @return A spend cap for the campaign, such that it will not spend more than this cap. 620 */ 621 @java.lang.SuppressWarnings("all") 622 @lombok.Generated 623 public String getSpendCap() { 624 return this.spendCap; 625 } 626 627 /** 628 * A spend cap for the campaign, such that it will not spend more than this cap. Expressed as integer value of the 629 * subunit in your currency. 630 */ 631 @java.lang.SuppressWarnings("all") 632 @lombok.Generated 633 public void setSpendCap(final String spendCap) { 634 this.spendCap = spendCap; 635 } 636 637 /** 638 * @return Start Time 639 */ 640 @java.lang.SuppressWarnings("all") 641 @lombok.Generated 642 public Date getStartTime() { 643 return this.startTime; 644 } 645 646 /** 647 * Start Time 648 */ 649 @java.lang.SuppressWarnings("all") 650 @lombok.Generated 651 public void setStartTime(final Date startTime) { 652 this.startTime = startTime; 653 } 654 655 /** 656 * @return the status 657 */ 658 @java.lang.SuppressWarnings("all") 659 @lombok.Generated 660 public String getStatus() { 661 return this.status; 662 } 663 664 /** 665 * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status 666 * CAMPAIGN_PAUSED. The field returns the same value as 'configured_status', and is the suggested one to use. 667 */ 668 @java.lang.SuppressWarnings("all") 669 @lombok.Generated 670 public void setStatus(final String status) { 671 this.status = status; 672 } 673 674 /** 675 * @return Stop Time 676 */ 677 @java.lang.SuppressWarnings("all") 678 @lombok.Generated 679 public Date getStopTime() { 680 return this.stopTime; 681 } 682 683 /** 684 * Stop Time 685 */ 686 @java.lang.SuppressWarnings("all") 687 @lombok.Generated 688 public void setStopTime(final Date stopTime) { 689 this.stopTime = stopTime; 690 } 691 692 /** 693 * Topline ID 694 */ 695 @java.lang.SuppressWarnings("all") 696 @lombok.Generated 697 public String getToplineId() { 698 return this.toplineId; 699 } 700 701 /** 702 * Topline ID 703 */ 704 @java.lang.SuppressWarnings("all") 705 @lombok.Generated 706 public void setToplineId(final String toplineId) { 707 this.toplineId = toplineId; 708 } 709 710 /** 711 * @return Updated Time 712 */ 713 @java.lang.SuppressWarnings("all") 714 @lombok.Generated 715 public Date getUpdatedTime() { 716 return this.updatedTime; 717 } 718 719 /** 720 * Updated Time 721 */ 722 @java.lang.SuppressWarnings("all") 723 @lombok.Generated 724 public void setUpdatedTime(final Date updatedTime) { 725 this.updatedTime = updatedTime; 726 } 727}