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.List; 027import com.restfb.Facebook; 028 029/** 030 * Represents the <a href="https://developers.facebook.com/docs/marketing-api/reference/custom-audience">Custom 031 * Audience</a> Marketing API type 032 */ 033public class CustomAudience extends NamedAdsObject { 034 /** 035 * Ad Account ID 036 */ 037 @Facebook("account_id") 038 private String accountId; 039 /** 040 * Approximate number of people in this audience 041 */ 042 @Facebook("approximate_count") 043 private Long approximateCount; 044 /** 045 * JSON dictionary of type, sub_type to indicate by which method the custom audience was created. 046 */ 047 @Facebook("data_source") 048 private CustomAudienceDataSource dataSource; 049 /** 050 * JSON dictionary of code and description. 051 * 052 * Indicates whether or not an audience can be used in ads. There are two situations that an audience will make ads 053 * not deliverable. First, if the size is smaller than 20 people, the audience can't be delivered. Second, if for some 054 * reason the audience is disabled (such as violation of policy, expired), validation will fail when it is used in 055 * ads. 056 */ 057 @Facebook("delivery_status") 058 private CustomAudienceStatus deliveryStatus; 059 /** 060 * Custom audience description 061 */ 062 @Facebook 063 private String description; 064 @Facebook("excluded_custom_audiences") 065 private List<CustomAudience> excludedCustomAudiences = new ArrayList<>(); 066 /** 067 * Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audience 068 */ 069 @Facebook("external_event_source") 070 private AdsPixel externalEventSource; 071 @Facebook("included_custom_audiences") 072 private List<CustomAudience> includedCustomAudiences = new ArrayList<>(); 073 /** 074 * last used time of this object by the current viewer 075 */ 076 @Facebook("last_used_time") 077 private String lastUsedTime; 078 /** 079 * The IDs of the lookalike audiences generated from this audience 080 */ 081 @Facebook("lookalike_audience_ids") 082 private List<String> lookalikeAudienceIds = new ArrayList<>(); 083 /** 084 * Generated only when the subtype is LOOKALIKE. 085 */ 086 @Facebook("lookalike_spec") 087 private LookalikeSpec lookalikeSpec; 088 /** 089 * JSON dictionary of code to int value and description to a description string. 090 * 091 * The operation status represents the status of the last operation performed on an audience. In general, it will have 092 * following states: 093 * <ul> 094 * <li>0: Status not available</li> 095 * <li>200: Normal: there is no updating or issues found</li> 096 * <li>400: Warning: there is some message we would like advertisers to know</li> 097 * <li>410: No upload: no file has been uploaded</li> 098 * <li>411: Low match rate: low rate of matched people</li> 099 * <li>412: High invalid rate: high rate of invalid people</li> 100 * <li>421: No pixel: Your Facebook pixel hasn't been installed on your website yet</li> 101 * <li>422: Pixel not firing: Your Facebook pixel isn't firing</li> 102 * <li>423: Invalid pixel: Your Facebook pixel is invalid</li> 103 * <li>431: Lookalike Audience refresh failed</li> 104 * <li>432: Lookalike Audience build failed</li> 105 * <li>433: Lookalike Audience build failed</li> 106 * <li>434: Lookalike Audience build retrying</li> 107 * <li>500: Error: there is some error and advertisers need to take action items to fix the error</li> 108 * </ul> 109 */ 110 @Facebook("operation_status") 111 private CustomAudienceStatus operationStatus; 112 /** 113 * Your opt-out URL so people can choose not to be targeted 114 */ 115 @Facebook("opt_out_link") 116 private String optOutLink; 117 /** 118 * The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100. 119 */ 120 @Facebook("origin_audience_id") 121 private Long originAudienceId; 122 /** 123 * owner business of this object 124 */ 125 @Facebook("owner_business") 126 private Business ownerBusiness; 127 /** 128 * JSON dictionary of permissions (string) to boolean value if the custom audience has that permission 129 */ 130 @Facebook("permission_for_actions") 131 private CustomAudiencePermission permissionForActions; 132 /** 133 * ID of the pixel which is collecting events for this Website Custom audience 134 */ 135 @Facebook("pixel_id") 136 private String pixelId; 137 /** 138 * Number of days to keep the user in this cluster. You can use any value between 1 and 180 days. Defaults to 14 days 139 * if not specified 140 */ 141 @Facebook("retention_days") 142 private Long retentionDays; 143 /** 144 * Audience rules to be applied on the referrer URL 145 */ 146 @Facebook 147 private String rule; 148 /** 149 * Type of custom audience, derived from original data source 150 */ 151 @Facebook 152 private String subtype; 153 /** 154 * Last update of people in this custom audience 155 */ 156 @Facebook("time_content_updated") 157 private Long timeContentUpdated; 158 /** 159 * Creation time 160 */ 161 @Facebook("time_created") 162 private Long timeCreated; 163 /** 164 * Last time this audience metadata was updated 165 */ 166 @Facebook("time_updated") 167 private Long timeUpdated; 168 169 /** 170 * @return Ad Account ID 171 */ 172 @java.lang.SuppressWarnings("all") 173 @lombok.Generated 174 public String getAccountId() { 175 return this.accountId; 176 } 177 178 /** 179 * Ad Account ID 180 */ 181 @java.lang.SuppressWarnings("all") 182 @lombok.Generated 183 public void setAccountId(final String accountId) { 184 this.accountId = accountId; 185 } 186 187 /** 188 * @return Approximate number of people in this audience 189 */ 190 @java.lang.SuppressWarnings("all") 191 @lombok.Generated 192 public Long getApproximateCount() { 193 return this.approximateCount; 194 } 195 196 /** 197 * Approximate number of people in this audience 198 */ 199 @java.lang.SuppressWarnings("all") 200 @lombok.Generated 201 public void setApproximateCount(final Long approximateCount) { 202 this.approximateCount = approximateCount; 203 } 204 205 /** 206 * @return JSON dictionary of type, sub_type to indicate by which method the custom audience was created. 207 */ 208 @java.lang.SuppressWarnings("all") 209 @lombok.Generated 210 public CustomAudienceDataSource getDataSource() { 211 return this.dataSource; 212 } 213 214 /** 215 * JSON dictionary of type, sub_type to indicate by which method the custom audience was created. 216 */ 217 @java.lang.SuppressWarnings("all") 218 @lombok.Generated 219 public void setDataSource(final CustomAudienceDataSource dataSource) { 220 this.dataSource = dataSource; 221 } 222 223 /** 224 * @return dictionary of code and description 225 */ 226 @java.lang.SuppressWarnings("all") 227 @lombok.Generated 228 public CustomAudienceStatus getDeliveryStatus() { 229 return this.deliveryStatus; 230 } 231 232 /** 233 * JSON dictionary of code and description. 234 * 235 * Indicates whether or not an audience can be used in ads. There are two situations that an audience will make ads 236 * not deliverable. First, if the size is smaller than 20 people, the audience can't be delivered. Second, if for some 237 * reason the audience is disabled (such as violation of policy, expired), validation will fail when it is used in 238 * ads. 239 */ 240 @java.lang.SuppressWarnings("all") 241 @lombok.Generated 242 public void setDeliveryStatus(final CustomAudienceStatus deliveryStatus) { 243 this.deliveryStatus = deliveryStatus; 244 } 245 246 /** 247 * @return Custom audience description 248 */ 249 @java.lang.SuppressWarnings("all") 250 @lombok.Generated 251 public String getDescription() { 252 return this.description; 253 } 254 255 /** 256 * Custom audience description 257 */ 258 @java.lang.SuppressWarnings("all") 259 @lombok.Generated 260 public void setDescription(final String description) { 261 this.description = description; 262 } 263 264 @java.lang.SuppressWarnings("all") 265 @lombok.Generated 266 public List<CustomAudience> getExcludedCustomAudiences() { 267 return this.excludedCustomAudiences; 268 } 269 270 @java.lang.SuppressWarnings("all") 271 @lombok.Generated 272 public void setExcludedCustomAudiences(final List<CustomAudience> excludedCustomAudiences) { 273 this.excludedCustomAudiences = excludedCustomAudiences; 274 } 275 276 /** 277 * @return Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audience 278 */ 279 @java.lang.SuppressWarnings("all") 280 @lombok.Generated 281 public AdsPixel getExternalEventSource() { 282 return this.externalEventSource; 283 } 284 285 /** 286 * Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audience 287 */ 288 @java.lang.SuppressWarnings("all") 289 @lombok.Generated 290 public void setExternalEventSource(final AdsPixel externalEventSource) { 291 this.externalEventSource = externalEventSource; 292 } 293 294 @java.lang.SuppressWarnings("all") 295 @lombok.Generated 296 public List<CustomAudience> getIncludedCustomAudiences() { 297 return this.includedCustomAudiences; 298 } 299 300 @java.lang.SuppressWarnings("all") 301 @lombok.Generated 302 public void setIncludedCustomAudiences(final List<CustomAudience> includedCustomAudiences) { 303 this.includedCustomAudiences = includedCustomAudiences; 304 } 305 306 /** 307 * @return last used time of this object by the current viewer 308 */ 309 @java.lang.SuppressWarnings("all") 310 @lombok.Generated 311 public String getLastUsedTime() { 312 return this.lastUsedTime; 313 } 314 315 /** 316 * last used time of this object by the current viewer 317 */ 318 @java.lang.SuppressWarnings("all") 319 @lombok.Generated 320 public void setLastUsedTime(final String lastUsedTime) { 321 this.lastUsedTime = lastUsedTime; 322 } 323 324 /** 325 * @return The IDs of the lookalike audiences generated from this audience 326 */ 327 @java.lang.SuppressWarnings("all") 328 @lombok.Generated 329 public List<String> getLookalikeAudienceIds() { 330 return this.lookalikeAudienceIds; 331 } 332 333 /** 334 * The IDs of the lookalike audiences generated from this audience 335 */ 336 @java.lang.SuppressWarnings("all") 337 @lombok.Generated 338 public void setLookalikeAudienceIds(final List<String> lookalikeAudienceIds) { 339 this.lookalikeAudienceIds = lookalikeAudienceIds; 340 } 341 342 /** 343 * @return Generated only when the subtype is LOOKALIKE. 344 */ 345 @java.lang.SuppressWarnings("all") 346 @lombok.Generated 347 public LookalikeSpec getLookalikeSpec() { 348 return this.lookalikeSpec; 349 } 350 351 /** 352 * Generated only when the subtype is LOOKALIKE. 353 */ 354 @java.lang.SuppressWarnings("all") 355 @lombok.Generated 356 public void setLookalikeSpec(final LookalikeSpec lookalikeSpec) { 357 this.lookalikeSpec = lookalikeSpec; 358 } 359 360 /** 361 * @return dictionary of code to int value and description to a description string 362 */ 363 @java.lang.SuppressWarnings("all") 364 @lombok.Generated 365 public CustomAudienceStatus getOperationStatus() { 366 return this.operationStatus; 367 } 368 369 /** 370 * JSON dictionary of code to int value and description to a description string. 371 * 372 * The operation status represents the status of the last operation performed on an audience. In general, it will have 373 * following states: 374 * <ul> 375 * <li>0: Status not available</li> 376 * <li>200: Normal: there is no updating or issues found</li> 377 * <li>400: Warning: there is some message we would like advertisers to know</li> 378 * <li>410: No upload: no file has been uploaded</li> 379 * <li>411: Low match rate: low rate of matched people</li> 380 * <li>412: High invalid rate: high rate of invalid people</li> 381 * <li>421: No pixel: Your Facebook pixel hasn't been installed on your website yet</li> 382 * <li>422: Pixel not firing: Your Facebook pixel isn't firing</li> 383 * <li>423: Invalid pixel: Your Facebook pixel is invalid</li> 384 * <li>431: Lookalike Audience refresh failed</li> 385 * <li>432: Lookalike Audience build failed</li> 386 * <li>433: Lookalike Audience build failed</li> 387 * <li>434: Lookalike Audience build retrying</li> 388 * <li>500: Error: there is some error and advertisers need to take action items to fix the error</li> 389 * </ul> 390 */ 391 @java.lang.SuppressWarnings("all") 392 @lombok.Generated 393 public void setOperationStatus(final CustomAudienceStatus operationStatus) { 394 this.operationStatus = operationStatus; 395 } 396 397 /** 398 * @return Your opt-out URL so people can choose not to be targeted 399 */ 400 @java.lang.SuppressWarnings("all") 401 @lombok.Generated 402 public String getOptOutLink() { 403 return this.optOutLink; 404 } 405 406 /** 407 * Your opt-out URL so people can choose not to be targeted 408 */ 409 @java.lang.SuppressWarnings("all") 410 @lombok.Generated 411 public void setOptOutLink(final String optOutLink) { 412 this.optOutLink = optOutLink; 413 } 414 415 /** 416 * @return The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100. 417 */ 418 @java.lang.SuppressWarnings("all") 419 @lombok.Generated 420 public Long getOriginAudienceId() { 421 return this.originAudienceId; 422 } 423 424 /** 425 * The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100. 426 */ 427 @java.lang.SuppressWarnings("all") 428 @lombok.Generated 429 public void setOriginAudienceId(final Long originAudienceId) { 430 this.originAudienceId = originAudienceId; 431 } 432 433 /** 434 * @return owner business of this object 435 */ 436 @java.lang.SuppressWarnings("all") 437 @lombok.Generated 438 public Business getOwnerBusiness() { 439 return this.ownerBusiness; 440 } 441 442 /** 443 * owner business of this object 444 */ 445 @java.lang.SuppressWarnings("all") 446 @lombok.Generated 447 public void setOwnerBusiness(final Business ownerBusiness) { 448 this.ownerBusiness = ownerBusiness; 449 } 450 451 /** 452 * @return JSON dictionary of permissions (string) to boolean value if the custom audience has that permission 453 */ 454 @java.lang.SuppressWarnings("all") 455 @lombok.Generated 456 public CustomAudiencePermission getPermissionForActions() { 457 return this.permissionForActions; 458 } 459 460 /** 461 * JSON dictionary of permissions (string) to boolean value if the custom audience has that permission 462 */ 463 @java.lang.SuppressWarnings("all") 464 @lombok.Generated 465 public void setPermissionForActions(final CustomAudiencePermission permissionForActions) { 466 this.permissionForActions = permissionForActions; 467 } 468 469 /** 470 * @return ID of the pixel which is collecting events for this Website Custom audience 471 */ 472 @java.lang.SuppressWarnings("all") 473 @lombok.Generated 474 public String getPixelId() { 475 return this.pixelId; 476 } 477 478 /** 479 * ID of the pixel which is collecting events for this Website Custom audience 480 */ 481 @java.lang.SuppressWarnings("all") 482 @lombok.Generated 483 public void setPixelId(final String pixelId) { 484 this.pixelId = pixelId; 485 } 486 487 /** 488 * @return Number of days to keep the user in this cluster. 489 */ 490 @java.lang.SuppressWarnings("all") 491 @lombok.Generated 492 public Long getRetentionDays() { 493 return this.retentionDays; 494 } 495 496 /** 497 * Number of days to keep the user in this cluster. You can use any value between 1 and 180 days. Defaults to 14 days 498 * if not specified 499 */ 500 @java.lang.SuppressWarnings("all") 501 @lombok.Generated 502 public void setRetentionDays(final Long retentionDays) { 503 this.retentionDays = retentionDays; 504 } 505 506 /** 507 * @return Audience rules to be applied on the referrer URL 508 */ 509 @java.lang.SuppressWarnings("all") 510 @lombok.Generated 511 public String getRule() { 512 return this.rule; 513 } 514 515 /** 516 * Audience rules to be applied on the referrer URL 517 */ 518 @java.lang.SuppressWarnings("all") 519 @lombok.Generated 520 public void setRule(final String rule) { 521 this.rule = rule; 522 } 523 524 /** 525 * @return Type of custom audience, derived from original data source 526 */ 527 @java.lang.SuppressWarnings("all") 528 @lombok.Generated 529 public String getSubtype() { 530 return this.subtype; 531 } 532 533 /** 534 * Type of custom audience, derived from original data source 535 */ 536 @java.lang.SuppressWarnings("all") 537 @lombok.Generated 538 public void setSubtype(final String subtype) { 539 this.subtype = subtype; 540 } 541 542 /** 543 * @return Last update of people in this custom audience 544 */ 545 @java.lang.SuppressWarnings("all") 546 @lombok.Generated 547 public Long getTimeContentUpdated() { 548 return this.timeContentUpdated; 549 } 550 551 /** 552 * Last update of people in this custom audience 553 */ 554 @java.lang.SuppressWarnings("all") 555 @lombok.Generated 556 public void setTimeContentUpdated(final Long timeContentUpdated) { 557 this.timeContentUpdated = timeContentUpdated; 558 } 559 560 /** 561 * @return Creation time 562 */ 563 @java.lang.SuppressWarnings("all") 564 @lombok.Generated 565 public Long getTimeCreated() { 566 return this.timeCreated; 567 } 568 569 /** 570 * Creation time 571 */ 572 @java.lang.SuppressWarnings("all") 573 @lombok.Generated 574 public void setTimeCreated(final Long timeCreated) { 575 this.timeCreated = timeCreated; 576 } 577 578 /** 579 * @return Last time this audience metadata was updated 580 */ 581 @java.lang.SuppressWarnings("all") 582 @lombok.Generated 583 public Long getTimeUpdated() { 584 return this.timeUpdated; 585 } 586 587 /** 588 * Last time this audience metadata was updated 589 */ 590 @java.lang.SuppressWarnings("all") 591 @lombok.Generated 592 public void setTimeUpdated(final Long timeUpdated) { 593 this.timeUpdated = timeUpdated; 594 } 595}