001// Generated by delombok at Fri Oct 04 16:05:59 CEST 2024 002/* 003 * Copyright (c) 2010-2024 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 public String getAccountId() { 201 return this.accountId; 202 } 203 204 /** 205 * ID of the ad account that owns this campaign 206 */ 207 @java.lang.SuppressWarnings("all") 208 public void setAccountId(final String accountId) { 209 this.accountId = accountId; 210 } 211 212 /** 213 * @return Ad Labels associated with this campaign 214 */ 215 @java.lang.SuppressWarnings("all") 216 public List<AdLabel> getAdlabels() { 217 return this.adlabels; 218 } 219 220 /** 221 * Ad Labels associated with this campaign 222 */ 223 @java.lang.SuppressWarnings("all") 224 public void setAdlabels(final List<AdLabel> adlabels) { 225 this.adlabels = adlabels; 226 } 227 228 /** 229 * Bid strategy for this campaign 230 */ 231 @java.lang.SuppressWarnings("all") 232 public String getBidStrategy() { 233 return this.bidStrategy; 234 } 235 236 /** 237 * Bid strategy for this campaign 238 */ 239 @java.lang.SuppressWarnings("all") 240 public void setBidStrategy(final String bidStrategy) { 241 this.bidStrategy = bidStrategy; 242 } 243 244 /** 245 * The Boosted Object this campaign has associated, if any 246 */ 247 @java.lang.SuppressWarnings("all") 248 public String getBoostedObjectId() { 249 return this.boostedObjectId; 250 } 251 252 /** 253 * The Boosted Object this campaign has associated, if any 254 */ 255 @java.lang.SuppressWarnings("all") 256 public void setBoostedObjectId(final String boostedObjectId) { 257 this.boostedObjectId = boostedObjectId; 258 } 259 260 /** 261 * Automated Brand Lift V2 studies for this ad set. 262 */ 263 @java.lang.SuppressWarnings("all") 264 public List<AdStudy> getBrandLiftStudies() { 265 return this.brandLiftStudies; 266 } 267 268 /** 269 * Automated Brand Lift V2 studies for this ad set. 270 */ 271 @java.lang.SuppressWarnings("all") 272 public void setBrandLiftStudies(final List<AdStudy> brandLiftStudies) { 273 this.brandLiftStudies = brandLiftStudies; 274 } 275 276 /** 277 * Whether to automatically rebalance budgets daily for all the adsets under this campaign. 278 */ 279 @java.lang.SuppressWarnings("all") 280 public Boolean getBudgetRebalanceFlag() { 281 return this.budgetRebalanceFlag; 282 } 283 284 /** 285 * Whether to automatically rebalance budgets daily for all the adsets under this campaign. 286 */ 287 @java.lang.SuppressWarnings("all") 288 public void setBudgetRebalanceFlag(final Boolean budgetRebalanceFlag) { 289 this.budgetRebalanceFlag = budgetRebalanceFlag; 290 } 291 292 /** 293 * Remaining budget 294 */ 295 @java.lang.SuppressWarnings("all") 296 public String getBudgetRemaining() { 297 return this.budgetRemaining; 298 } 299 300 /** 301 * Remaining budget 302 */ 303 @java.lang.SuppressWarnings("all") 304 public void setBudgetRemaining(final String budgetRemaining) { 305 this.budgetRemaining = budgetRemaining; 306 } 307 308 /** 309 * @return Buying type 310 */ 311 @java.lang.SuppressWarnings("all") 312 public String getBuyingType() { 313 return this.buyingType; 314 } 315 316 /** 317 * Buying type, possible values are: 318 * <ul> 319 * <li>AUCTION: default</li> 320 * <li>RESERVED: for reach and frequency ads</li> 321 * </ul> 322 */ 323 @java.lang.SuppressWarnings("all") 324 public void setBuyingType(final String buyingType) { 325 this.buyingType = buyingType; 326 } 327 328 /** 329 * If we can create a new automated brand lift study for the ad set. 330 */ 331 @java.lang.SuppressWarnings("all") 332 public Boolean getCanCreateBrandLiftStudy() { 333 return this.canCreateBrandLiftStudy; 334 } 335 336 /** 337 * If we can create a new automated brand lift study for the ad set. 338 */ 339 @java.lang.SuppressWarnings("all") 340 public void setCanCreateBrandLiftStudy(final Boolean canCreateBrandLiftStudy) { 341 this.canCreateBrandLiftStudy = canCreateBrandLiftStudy; 342 } 343 344 /** 345 * @return Whether the campaign can set the spend cap 346 */ 347 @java.lang.SuppressWarnings("all") 348 public Boolean getCanUseSpendCap() { 349 return this.canUseSpendCap; 350 } 351 352 /** 353 * Whether the campaign can set the spend cap 354 */ 355 @java.lang.SuppressWarnings("all") 356 public void setCanUseSpendCap(final Boolean canUseSpendCap) { 357 this.canUseSpendCap = canUseSpendCap; 358 } 359 360 /** 361 * @return the configured status 362 */ 363 @java.lang.SuppressWarnings("all") 364 public String getConfiguredStatus() { 365 return this.configuredStatus; 366 } 367 368 /** 369 * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status 370 * CAMPAIGN_PAUSED. Prefer using 'status' instead of this. 371 * 372 * possible values: ACTIVE, PAUSED, DELETED, ARCHIVED 373 */ 374 @java.lang.SuppressWarnings("all") 375 public void setConfiguredStatus(final String configuredStatus) { 376 this.configuredStatus = configuredStatus; 377 } 378 379 /** 380 * @return Created Time 381 */ 382 @Override 383 @java.lang.SuppressWarnings("all") 384 public Date getCreatedTime() { 385 return this.createdTime; 386 } 387 388 /** 389 * Created Time 390 */ 391 @java.lang.SuppressWarnings("all") 392 public void setCreatedTime(final Date createdTime) { 393 this.createdTime = createdTime; 394 } 395 396 /** 397 * The daily budget of the campaign 398 */ 399 @java.lang.SuppressWarnings("all") 400 public String getDailyBudget() { 401 return this.dailyBudget; 402 } 403 404 /** 405 * The daily budget of the campaign 406 */ 407 @java.lang.SuppressWarnings("all") 408 public void setDailyBudget(final String dailyBudget) { 409 this.dailyBudget = dailyBudget; 410 } 411 412 /** 413 * @return The effective status of this campaign 414 */ 415 @java.lang.SuppressWarnings("all") 416 public String getEffectiveStatus() { 417 return this.effectiveStatus; 418 } 419 420 /** 421 * The effective status of this campaign. 422 * 423 * possible values: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, 424 * CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED 425 */ 426 @java.lang.SuppressWarnings("all") 427 public void setEffectiveStatus(final String effectiveStatus) { 428 this.effectiveStatus = effectiveStatus; 429 } 430 431 /** 432 * @return List of issues for this campaign that prevented it from deliverying. 433 */ 434 @GraphAPI(since = "3.2") 435 @java.lang.SuppressWarnings("all") 436 public List<AdCampaignIssuesInfo> getIssuesInfo() { 437 return this.issuesInfo; 438 } 439 440 /** 441 * Issues for this campaign that prevented it from deliverying. 442 */ 443 @java.lang.SuppressWarnings("all") 444 public void setIssuesInfo(final List<AdCampaignIssuesInfo> issuesInfo) { 445 this.issuesInfo = issuesInfo; 446 } 447 448 /** 449 * Last budget toggling time 450 */ 451 @java.lang.SuppressWarnings("all") 452 public Date getLastBudgetTogglingTime() { 453 return this.lastBudgetTogglingTime; 454 } 455 456 /** 457 * Last budget toggling time 458 */ 459 @java.lang.SuppressWarnings("all") 460 public void setLastBudgetTogglingTime(final Date lastBudgetTogglingTime) { 461 this.lastBudgetTogglingTime = lastBudgetTogglingTime; 462 } 463 464 /** 465 * The lifetime budget of the campaign 466 */ 467 @java.lang.SuppressWarnings("all") 468 public String getLifetimeBudget() { 469 return this.lifetimeBudget; 470 } 471 472 /** 473 * The lifetime budget of the campaign 474 */ 475 @java.lang.SuppressWarnings("all") 476 public void setLifetimeBudget(final String lifetimeBudget) { 477 this.lifetimeBudget = lifetimeBudget; 478 } 479 480 /** 481 * @return Campaign's objective 482 */ 483 @java.lang.SuppressWarnings("all") 484 public String getObjective() { 485 return this.objective; 486 } 487 488 /** 489 * Campaign's objective 490 */ 491 @java.lang.SuppressWarnings("all") 492 public void setObjective(final String objective) { 493 this.objective = objective; 494 } 495 496 /** 497 * @return If there are recommendations for this campaign, this field includes them. 498 */ 499 @java.lang.SuppressWarnings("all") 500 public List<AdRecommendation> getRecommendations() { 501 return this.recommendations; 502 } 503 504 /** 505 * If there are recommendations for this campaign, this field includes them. 506 */ 507 @java.lang.SuppressWarnings("all") 508 public void setRecommendations(final List<AdRecommendation> recommendations) { 509 this.recommendations = recommendations; 510 } 511 512 /** 513 * The source campaign that this campaign is copied from 514 */ 515 @java.lang.SuppressWarnings("all") 516 public Campaign getSourceCampaign() { 517 return this.sourceCampaign; 518 } 519 520 /** 521 * The source campaign that this campaign is copied from 522 */ 523 @java.lang.SuppressWarnings("all") 524 public void setSourceCampaign(final Campaign sourceCampaign) { 525 this.sourceCampaign = sourceCampaign; 526 } 527 528 /** 529 * The source campaign id that this campaign is copied from 530 */ 531 @java.lang.SuppressWarnings("all") 532 public String getSourceCampaignId() { 533 return this.sourceCampaignId; 534 } 535 536 /** 537 * The source campaign id that this campaign is copied from 538 */ 539 @java.lang.SuppressWarnings("all") 540 public void setSourceCampaignId(final String sourceCampaignId) { 541 this.sourceCampaignId = sourceCampaignId; 542 } 543 544 /** 545 * The campaign's Special Ad Category. One of {@code HOUSING}, {@code EMPLOYMENT}, {@code CREDIT}, or {@code NONE}. 546 */ 547 @java.lang.Deprecated 548 @java.lang.SuppressWarnings("all") 549 public String getSpecialAdCategory() { 550 return this.specialAdCategory; 551 } 552 553 /** 554 * The campaign's Special Ad Category. One of {@code HOUSING}, {@code EMPLOYMENT}, {@code CREDIT}, or {@code NONE}. 555 */ 556 @java.lang.Deprecated 557 @java.lang.SuppressWarnings("all") 558 public void setSpecialAdCategory(final String specialAdCategory) { 559 this.specialAdCategory = specialAdCategory; 560 } 561 562 @java.lang.SuppressWarnings("all") 563 public List<String> getSpecialAdCategories() { 564 return this.specialAdCategories; 565 } 566 567 @java.lang.SuppressWarnings("all") 568 public void setSpecialAdCategories(final List<String> specialAdCategories) { 569 this.specialAdCategories = specialAdCategories; 570 } 571 572 /** 573 * @return A spend cap for the campaign, such that it will not spend more than this cap. 574 */ 575 @java.lang.SuppressWarnings("all") 576 public String getSpendCap() { 577 return this.spendCap; 578 } 579 580 /** 581 * A spend cap for the campaign, such that it will not spend more than this cap. Expressed as integer value of the 582 * subunit in your currency. 583 */ 584 @java.lang.SuppressWarnings("all") 585 public void setSpendCap(final String spendCap) { 586 this.spendCap = spendCap; 587 } 588 589 /** 590 * @return Start Time 591 */ 592 @java.lang.SuppressWarnings("all") 593 public Date getStartTime() { 594 return this.startTime; 595 } 596 597 /** 598 * Start Time 599 */ 600 @java.lang.SuppressWarnings("all") 601 public void setStartTime(final Date startTime) { 602 this.startTime = startTime; 603 } 604 605 /** 606 * @return the status 607 */ 608 @java.lang.SuppressWarnings("all") 609 public String getStatus() { 610 return this.status; 611 } 612 613 /** 614 * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status 615 * CAMPAIGN_PAUSED. The field returns the same value as 'configured_status', and is the suggested one to use. 616 */ 617 @java.lang.SuppressWarnings("all") 618 public void setStatus(final String status) { 619 this.status = status; 620 } 621 622 /** 623 * @return Stop Time 624 */ 625 @java.lang.SuppressWarnings("all") 626 public Date getStopTime() { 627 return this.stopTime; 628 } 629 630 /** 631 * Stop Time 632 */ 633 @java.lang.SuppressWarnings("all") 634 public void setStopTime(final Date stopTime) { 635 this.stopTime = stopTime; 636 } 637 638 /** 639 * Topline ID 640 */ 641 @java.lang.SuppressWarnings("all") 642 public String getToplineId() { 643 return this.toplineId; 644 } 645 646 /** 647 * Topline ID 648 */ 649 @java.lang.SuppressWarnings("all") 650 public void setToplineId(final String toplineId) { 651 this.toplineId = toplineId; 652 } 653 654 /** 655 * @return Updated Time 656 */ 657 @java.lang.SuppressWarnings("all") 658 public Date getUpdatedTime() { 659 return this.updatedTime; 660 } 661 662 /** 663 * Updated Time 664 */ 665 @java.lang.SuppressWarnings("all") 666 public void setUpdatedTime(final Date updatedTime) { 667 this.updatedTime = updatedTime; 668 } 669}