001// Generated by delombok at Wed Jan 31 21:27:42 UTC 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.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  public String getAccountId() {
174    return this.accountId;
175  }
176
177  /**
178   * Ad Account ID
179   */
180  @java.lang.SuppressWarnings("all")
181  public void setAccountId(final String accountId) {
182    this.accountId = accountId;
183  }
184
185  /**
186   * @return Approximate number of people in this audience
187   */
188  @java.lang.SuppressWarnings("all")
189  public Long getApproximateCount() {
190    return this.approximateCount;
191  }
192
193  /**
194   * Approximate number of people in this audience
195   */
196  @java.lang.SuppressWarnings("all")
197  public void setApproximateCount(final Long approximateCount) {
198    this.approximateCount = approximateCount;
199  }
200
201  /**
202   * @return JSON dictionary of type, sub_type to indicate by which method the custom audience was created.
203   */
204  @java.lang.SuppressWarnings("all")
205  public CustomAudienceDataSource getDataSource() {
206    return this.dataSource;
207  }
208
209  /**
210   * JSON dictionary of type, sub_type to indicate by which method the custom audience was created.
211   */
212  @java.lang.SuppressWarnings("all")
213  public void setDataSource(final CustomAudienceDataSource dataSource) {
214    this.dataSource = dataSource;
215  }
216
217  /**
218   * @return dictionary of code and description
219   */
220  @java.lang.SuppressWarnings("all")
221  public CustomAudienceStatus getDeliveryStatus() {
222    return this.deliveryStatus;
223  }
224
225  /**
226   * JSON dictionary of code and description.
227   *
228   * Indicates whether or not an audience can be used in ads. There are two situations that an audience will make ads
229   * not deliverable. First, if the size is smaller than 20 people, the audience can't be delivered. Second, if for some
230   * reason the audience is disabled (such as violation of policy, expired), validation will fail when it is used in
231   * ads.
232   */
233  @java.lang.SuppressWarnings("all")
234  public void setDeliveryStatus(final CustomAudienceStatus deliveryStatus) {
235    this.deliveryStatus = deliveryStatus;
236  }
237
238  /**
239   * @return Custom audience description
240   */
241  @java.lang.SuppressWarnings("all")
242  public String getDescription() {
243    return this.description;
244  }
245
246  /**
247   * Custom audience description
248   */
249  @java.lang.SuppressWarnings("all")
250  public void setDescription(final String description) {
251    this.description = description;
252  }
253
254  @java.lang.SuppressWarnings("all")
255  public List<CustomAudience> getExcludedCustomAudiences() {
256    return this.excludedCustomAudiences;
257  }
258
259  @java.lang.SuppressWarnings("all")
260  public void setExcludedCustomAudiences(final List<CustomAudience> excludedCustomAudiences) {
261    this.excludedCustomAudiences = excludedCustomAudiences;
262  }
263
264  /**
265   * @return Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audience
266   */
267  @java.lang.SuppressWarnings("all")
268  public AdsPixel getExternalEventSource() {
269    return this.externalEventSource;
270  }
271
272  /**
273   * Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audience
274   */
275  @java.lang.SuppressWarnings("all")
276  public void setExternalEventSource(final AdsPixel externalEventSource) {
277    this.externalEventSource = externalEventSource;
278  }
279
280  @java.lang.SuppressWarnings("all")
281  public List<CustomAudience> getIncludedCustomAudiences() {
282    return this.includedCustomAudiences;
283  }
284
285  @java.lang.SuppressWarnings("all")
286  public void setIncludedCustomAudiences(final List<CustomAudience> includedCustomAudiences) {
287    this.includedCustomAudiences = includedCustomAudiences;
288  }
289
290  /**
291   * @return last used time of this object by the current viewer
292   */
293  @java.lang.SuppressWarnings("all")
294  public String getLastUsedTime() {
295    return this.lastUsedTime;
296  }
297
298  /**
299   * last used time of this object by the current viewer
300   */
301  @java.lang.SuppressWarnings("all")
302  public void setLastUsedTime(final String lastUsedTime) {
303    this.lastUsedTime = lastUsedTime;
304  }
305
306  /**
307   * @return The IDs of the lookalike audiences generated from this audience
308   */
309  @java.lang.SuppressWarnings("all")
310  public List<String> getLookalikeAudienceIds() {
311    return this.lookalikeAudienceIds;
312  }
313
314  /**
315   * The IDs of the lookalike audiences generated from this audience
316   */
317  @java.lang.SuppressWarnings("all")
318  public void setLookalikeAudienceIds(final List<String> lookalikeAudienceIds) {
319    this.lookalikeAudienceIds = lookalikeAudienceIds;
320  }
321
322  /**
323   * @return Generated only when the subtype is LOOKALIKE.
324   */
325  @java.lang.SuppressWarnings("all")
326  public LookalikeSpec getLookalikeSpec() {
327    return this.lookalikeSpec;
328  }
329
330  /**
331   * Generated only when the subtype is LOOKALIKE.
332   */
333  @java.lang.SuppressWarnings("all")
334  public void setLookalikeSpec(final LookalikeSpec lookalikeSpec) {
335    this.lookalikeSpec = lookalikeSpec;
336  }
337
338  /**
339   * @return dictionary of code to int value and description to a description string
340   */
341  @java.lang.SuppressWarnings("all")
342  public CustomAudienceStatus getOperationStatus() {
343    return this.operationStatus;
344  }
345
346  /**
347   * JSON dictionary of code to int value and description to a description string.
348   *
349   * The operation status represents the status of the last operation performed on an audience. In general, it will have
350   * following states:
351   * <ul>
352   * <li>0: Status not available</li>
353   * <li>200: Normal: there is no updating or issues found</li>
354   * <li>400: Warning: there is some message we would like advertisers to know</li>
355   * <li>410: No upload: no file has been uploaded</li>
356   * <li>411: Low match rate: low rate of matched people</li>
357   * <li>412: High invalid rate: high rate of invalid people</li>
358   * <li>421: No pixel: Your Facebook pixel hasn't been installed on your website yet</li>
359   * <li>422: Pixel not firing: Your Facebook pixel isn't firing</li>
360   * <li>423: Invalid pixel: Your Facebook pixel is invalid</li>
361   * <li>431: Lookalike Audience refresh failed</li>
362   * <li>432: Lookalike Audience build failed</li>
363   * <li>433: Lookalike Audience build failed</li>
364   * <li>434: Lookalike Audience build retrying</li>
365   * <li>500: Error: there is some error and advertisers need to take action items to fix the error</li>
366   * </ul>
367   */
368  @java.lang.SuppressWarnings("all")
369  public void setOperationStatus(final CustomAudienceStatus operationStatus) {
370    this.operationStatus = operationStatus;
371  }
372
373  /**
374   * @return Your opt-out URL so people can choose not to be targeted
375   */
376  @java.lang.SuppressWarnings("all")
377  public String getOptOutLink() {
378    return this.optOutLink;
379  }
380
381  /**
382   * Your opt-out URL so people can choose not to be targeted
383   */
384  @java.lang.SuppressWarnings("all")
385  public void setOptOutLink(final String optOutLink) {
386    this.optOutLink = optOutLink;
387  }
388
389  /**
390   * @return The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100.
391   */
392  @java.lang.SuppressWarnings("all")
393  public Long getOriginAudienceId() {
394    return this.originAudienceId;
395  }
396
397  /**
398   * The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100.
399   */
400  @java.lang.SuppressWarnings("all")
401  public void setOriginAudienceId(final Long originAudienceId) {
402    this.originAudienceId = originAudienceId;
403  }
404
405  /**
406   * @return owner business of this object
407   */
408  @java.lang.SuppressWarnings("all")
409  public Business getOwnerBusiness() {
410    return this.ownerBusiness;
411  }
412
413  /**
414   * owner business of this object
415   */
416  @java.lang.SuppressWarnings("all")
417  public void setOwnerBusiness(final Business ownerBusiness) {
418    this.ownerBusiness = ownerBusiness;
419  }
420
421  /**
422   * @return JSON dictionary of permissions (string) to boolean value if the custom audience has that permission
423   */
424  @java.lang.SuppressWarnings("all")
425  public CustomAudiencePermission getPermissionForActions() {
426    return this.permissionForActions;
427  }
428
429  /**
430   * JSON dictionary of permissions (string) to boolean value if the custom audience has that permission
431   */
432  @java.lang.SuppressWarnings("all")
433  public void setPermissionForActions(final CustomAudiencePermission permissionForActions) {
434    this.permissionForActions = permissionForActions;
435  }
436
437  /**
438   * @return ID of the pixel which is collecting events for this Website Custom audience
439   */
440  @java.lang.SuppressWarnings("all")
441  public String getPixelId() {
442    return this.pixelId;
443  }
444
445  /**
446   * ID of the pixel which is collecting events for this Website Custom audience
447   */
448  @java.lang.SuppressWarnings("all")
449  public void setPixelId(final String pixelId) {
450    this.pixelId = pixelId;
451  }
452
453  /**
454   * @return Number of days to keep the user in this cluster.
455   */
456  @java.lang.SuppressWarnings("all")
457  public Long getRetentionDays() {
458    return this.retentionDays;
459  }
460
461  /**
462   * Number of days to keep the user in this cluster. You can use any value between 1 and 180 days. Defaults to 14 days
463   * if not specified
464   */
465  @java.lang.SuppressWarnings("all")
466  public void setRetentionDays(final Long retentionDays) {
467    this.retentionDays = retentionDays;
468  }
469
470  /**
471   * @return Audience rules to be applied on the referrer URL
472   */
473  @java.lang.SuppressWarnings("all")
474  public String getRule() {
475    return this.rule;
476  }
477
478  /**
479   * Audience rules to be applied on the referrer URL
480   */
481  @java.lang.SuppressWarnings("all")
482  public void setRule(final String rule) {
483    this.rule = rule;
484  }
485
486  /**
487   * @return Type of custom audience, derived from original data source
488   */
489  @java.lang.SuppressWarnings("all")
490  public String getSubtype() {
491    return this.subtype;
492  }
493
494  /**
495   * Type of custom audience, derived from original data source
496   */
497  @java.lang.SuppressWarnings("all")
498  public void setSubtype(final String subtype) {
499    this.subtype = subtype;
500  }
501
502  /**
503   * @return Last update of people in this custom audience
504   */
505  @java.lang.SuppressWarnings("all")
506  public Long getTimeContentUpdated() {
507    return this.timeContentUpdated;
508  }
509
510  /**
511   * Last update of people in this custom audience
512   */
513  @java.lang.SuppressWarnings("all")
514  public void setTimeContentUpdated(final Long timeContentUpdated) {
515    this.timeContentUpdated = timeContentUpdated;
516  }
517
518  /**
519   * @return Creation time
520   */
521  @java.lang.SuppressWarnings("all")
522  public Long getTimeCreated() {
523    return this.timeCreated;
524  }
525
526  /**
527   * Creation time
528   */
529  @java.lang.SuppressWarnings("all")
530  public void setTimeCreated(final Long timeCreated) {
531    this.timeCreated = timeCreated;
532  }
533
534  /**
535   * @return Last time this audience metadata was updated
536   */
537  @java.lang.SuppressWarnings("all")
538  public Long getTimeUpdated() {
539    return this.timeUpdated;
540  }
541
542  /**
543   * Last time this audience metadata was updated
544   */
545  @java.lang.SuppressWarnings("all")
546  public void setTimeUpdated(final Long timeUpdated) {
547    this.timeUpdated = timeUpdated;
548  }
549}