001// Generated by delombok at Wed Nov 11 21:20:25 CET 2020
002/*
003 * Copyright (c) 2010-2020 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.Collections;
027import java.util.Date;
028import java.util.List;
029import com.restfb.Facebook;
030import com.restfb.json.Json;
031import com.restfb.json.JsonObject;
032import com.restfb.types.features.HasCreatedTime;
033
034/**
035 * Represents the <a href="https://developers.facebook.com/docs/marketing-api/reference/ad-account">AdGroup Account
036 * Type</a>.
037 */
038public class AdAccount extends NamedAdsObject implements HasCreatedTime {
039  private static final long serialVersionUID = 1L;
040  @Facebook("ad_account_creation_request")
041  private AdAccountCreationRequest adAccountCreationRequest;
042  @Facebook("ad_account_promotable_objects")
043  private AdAccountPromotableObjects adAccountPromotableObjects;
044  @Facebook("account_groups")
045  private List<AdAccountGroup> accountGroups = new ArrayList<>();
046  @Facebook("account_id")
047  private String accountId;
048  @Facebook("account_status")
049  private Integer accountStatus;
050  @Facebook
051  private Float age;
052  @Facebook("agency_client_declaration")
053  private AgencyClientDeclaration agencyClientDeclaration;
054  @Facebook("business_city")
055  private String businessCity;
056  @Facebook("business_country_code")
057  private String businessCountryCode;
058  @Facebook("business_name")
059  private String businessName;
060  @Facebook("business_state")
061  private String businessState;
062  @Facebook("business_street")
063  private String businessStreet;
064  @Facebook("business_street2")
065  private String businessStreet2;
066  @Facebook("business_zip")
067  private String businessZip;
068  @Facebook
069  private List<String> capabilities = new ArrayList<>();
070  @Facebook("created_time")
071  private Date createdTime;
072  @Facebook
073  private String currency;
074  @Facebook("disable_reason")
075  private Integer disableReason;
076  @Facebook("end_advertiser")
077  private String endAdvertiser;
078  @Facebook("end_advertiser_name")
079  private String endAdvertiserName;
080  @Facebook("extended_credit_invoice_group")
081  private ExtendedCreditInvoiceGroup extendedCreditInvoiceGroup;
082  @Facebook("failed_delivery_checks")
083  private List<AdDeliveryCheck> failedDeliveryChecks = new ArrayList<>();
084  @Facebook("funding_source")
085  private String fundingSource;
086  @Facebook("funding_source_details")
087  private FundingSourceDetails fundingSourceDetails;
088  @Facebook("has_migrated_permissions")
089  private Boolean hasMigratedPermissions;
090  @Facebook("io_number")
091  private String ioNumber;
092  @Facebook("is_personal")
093  private String isPersonal;
094  @Facebook("is_prepay_account")
095  private Boolean isPrepayAccount;
096  @Facebook("is_tax_id_required")
097  private Boolean isTaxIdRequired;
098  @Facebook("line_numbers")
099  private List<Integer> lineNumbers = new ArrayList<>();
100  @Facebook("media_agency")
101  private String mediaAgency;
102  @Facebook("min_campaign_group_spend_cap")
103  private String minCampaignGroupSpendCap;
104  @Facebook("min_daily_budget")
105  private Integer minDailyBudget;
106  @Facebook
107  private String owner;
108  @Facebook("offsite_pixels_tos_accepted")
109  private Boolean offsitePixelsTosAccepted;
110  @Facebook
111  private String partner;
112  @Facebook("tax_id")
113  private String taxId;
114  @Facebook("tax_id_status")
115  private Integer taxIdStatus;
116  @Facebook("tax_id_type")
117  private String taxIdType;
118  @Facebook("timezone_id")
119  private Integer timezoneId;
120  @Facebook("timezone_name")
121  private String timezoneName;
122  @Facebook("timezone_offset_hours_utc")
123  private Float timezoneOffsetHoursUtc;
124  @Facebook("rf_spec")
125  private ReachFrequencySpec rfSpec;
126  @Facebook("tos_accepted")
127  private String tosAccepted;
128  @Facebook("user_role")
129  @Deprecated
130  private String userRole;
131  @Facebook("vertical_name")
132  private String verticalName;
133  @Facebook("amount_spent")
134  private String amountSpent;
135  @Facebook("spend_cap")
136  private String spendCap;
137  @Facebook
138  private String balance;
139  @Facebook
140  private Business business;
141  @Facebook("owner_business")
142  private Business ownerBusiness;
143  @Facebook("last_used_time")
144  private Date lastUsedTime;
145  @Facebook("user_tasks")
146  private List<String> userTasks = new ArrayList<>();
147
148  public JsonObject getTosAccepted() {
149    if (tosAccepted != null) {
150      return Json.parse(tosAccepted).asObject();
151    } else {
152      return null;
153    }
154  }
155
156  public void setTosAccepted(JsonObject tosAccepted) {
157    if (tosAccepted != null) {
158      this.tosAccepted = tosAccepted.toString();
159    }
160  }
161
162  public boolean addUserTask(String userTask) {
163    return userTasks.add(userTask);
164  }
165
166  public boolean removeUserTask(String userTask) {
167    return userTasks.remove(userTask);
168  }
169
170  public List<String> getUserTasks() {
171    return Collections.unmodifiableList(userTasks);
172  }
173
174  public boolean addAdAccountGroup(AdAccountGroup adAccountGroup) {
175    return accountGroups.add(adAccountGroup);
176  }
177
178  public boolean removeAdAccountGroup(AdAccountGroup adAccountGroup) {
179    return accountGroups.remove(adAccountGroup);
180  }
181
182  public List<AdAccountGroup> getAccountsGroups() {
183    return Collections.unmodifiableList(accountGroups);
184  }
185
186  public boolean addCapability(String capability) {
187    return capabilities.add(capability);
188  }
189
190  public boolean removeCapability(String capability) {
191    return capabilities.remove(capability);
192  }
193
194  public List<String> getCapabilities() {
195    return Collections.unmodifiableList(capabilities);
196  }
197
198  public boolean addFailedDeliveryCheck(AdDeliveryCheck adDevliveryCheck) {
199    return failedDeliveryChecks.add(adDevliveryCheck);
200  }
201
202  public boolean removeFailedDeliveryCheck(AdDeliveryCheck adDevliveryCheck) {
203    return failedDeliveryChecks.remove(adDevliveryCheck);
204  }
205
206  public List<AdDeliveryCheck> getFailedDeliveryChecks() {
207    return Collections.unmodifiableList(failedDeliveryChecks);
208  }
209
210  public boolean addLineNumber(Integer lineNumber) {
211    return lineNumbers.add(lineNumber);
212  }
213
214  public boolean removeLineNumber(Integer lineNumber) {
215    return lineNumbers.remove(lineNumber);
216  }
217
218  public List<Integer> getLineNumbers() {
219    return Collections.unmodifiableList(lineNumbers);
220  }
221
222  @java.lang.SuppressWarnings("all")
223  public AdAccountCreationRequest getAdAccountCreationRequest() {
224    return this.adAccountCreationRequest;
225  }
226
227  @java.lang.SuppressWarnings("all")
228  public void setAdAccountCreationRequest(final AdAccountCreationRequest adAccountCreationRequest) {
229    this.adAccountCreationRequest = adAccountCreationRequest;
230  }
231
232  @java.lang.SuppressWarnings("all")
233  public AdAccountPromotableObjects getAdAccountPromotableObjects() {
234    return this.adAccountPromotableObjects;
235  }
236
237  @java.lang.SuppressWarnings("all")
238  public void setAdAccountPromotableObjects(final AdAccountPromotableObjects adAccountPromotableObjects) {
239    this.adAccountPromotableObjects = adAccountPromotableObjects;
240  }
241
242  @java.lang.SuppressWarnings("all")
243  public String getAccountId() {
244    return this.accountId;
245  }
246
247  @java.lang.SuppressWarnings("all")
248  public void setAccountId(final String accountId) {
249    this.accountId = accountId;
250  }
251
252  @java.lang.SuppressWarnings("all")
253  public Integer getAccountStatus() {
254    return this.accountStatus;
255  }
256
257  @java.lang.SuppressWarnings("all")
258  public void setAccountStatus(final Integer accountStatus) {
259    this.accountStatus = accountStatus;
260  }
261
262  @java.lang.SuppressWarnings("all")
263  public Float getAge() {
264    return this.age;
265  }
266
267  @java.lang.SuppressWarnings("all")
268  public void setAge(final Float age) {
269    this.age = age;
270  }
271
272  @java.lang.SuppressWarnings("all")
273  public AgencyClientDeclaration getAgencyClientDeclaration() {
274    return this.agencyClientDeclaration;
275  }
276
277  @java.lang.SuppressWarnings("all")
278  public void setAgencyClientDeclaration(final AgencyClientDeclaration agencyClientDeclaration) {
279    this.agencyClientDeclaration = agencyClientDeclaration;
280  }
281
282  @java.lang.SuppressWarnings("all")
283  public String getBusinessCity() {
284    return this.businessCity;
285  }
286
287  @java.lang.SuppressWarnings("all")
288  public void setBusinessCity(final String businessCity) {
289    this.businessCity = businessCity;
290  }
291
292  @java.lang.SuppressWarnings("all")
293  public String getBusinessCountryCode() {
294    return this.businessCountryCode;
295  }
296
297  @java.lang.SuppressWarnings("all")
298  public void setBusinessCountryCode(final String businessCountryCode) {
299    this.businessCountryCode = businessCountryCode;
300  }
301
302  @java.lang.SuppressWarnings("all")
303  public String getBusinessName() {
304    return this.businessName;
305  }
306
307  @java.lang.SuppressWarnings("all")
308  public void setBusinessName(final String businessName) {
309    this.businessName = businessName;
310  }
311
312  @java.lang.SuppressWarnings("all")
313  public String getBusinessState() {
314    return this.businessState;
315  }
316
317  @java.lang.SuppressWarnings("all")
318  public void setBusinessState(final String businessState) {
319    this.businessState = businessState;
320  }
321
322  @java.lang.SuppressWarnings("all")
323  public String getBusinessStreet() {
324    return this.businessStreet;
325  }
326
327  @java.lang.SuppressWarnings("all")
328  public void setBusinessStreet(final String businessStreet) {
329    this.businessStreet = businessStreet;
330  }
331
332  @java.lang.SuppressWarnings("all")
333  public String getBusinessStreet2() {
334    return this.businessStreet2;
335  }
336
337  @java.lang.SuppressWarnings("all")
338  public void setBusinessStreet2(final String businessStreet2) {
339    this.businessStreet2 = businessStreet2;
340  }
341
342  @java.lang.SuppressWarnings("all")
343  public String getBusinessZip() {
344    return this.businessZip;
345  }
346
347  @java.lang.SuppressWarnings("all")
348  public void setBusinessZip(final String businessZip) {
349    this.businessZip = businessZip;
350  }
351
352  @Override
353  @java.lang.SuppressWarnings("all")
354  public Date getCreatedTime() {
355    return this.createdTime;
356  }
357
358  @java.lang.SuppressWarnings("all")
359  public void setCreatedTime(final Date createdTime) {
360    this.createdTime = createdTime;
361  }
362
363  @java.lang.SuppressWarnings("all")
364  public String getCurrency() {
365    return this.currency;
366  }
367
368  @java.lang.SuppressWarnings("all")
369  public void setCurrency(final String currency) {
370    this.currency = currency;
371  }
372
373  @java.lang.SuppressWarnings("all")
374  public Integer getDisableReason() {
375    return this.disableReason;
376  }
377
378  @java.lang.SuppressWarnings("all")
379  public void setDisableReason(final Integer disableReason) {
380    this.disableReason = disableReason;
381  }
382
383  @java.lang.SuppressWarnings("all")
384  public String getEndAdvertiser() {
385    return this.endAdvertiser;
386  }
387
388  @java.lang.SuppressWarnings("all")
389  public void setEndAdvertiser(final String endAdvertiser) {
390    this.endAdvertiser = endAdvertiser;
391  }
392
393  @java.lang.SuppressWarnings("all")
394  public String getEndAdvertiserName() {
395    return this.endAdvertiserName;
396  }
397
398  @java.lang.SuppressWarnings("all")
399  public void setEndAdvertiserName(final String endAdvertiserName) {
400    this.endAdvertiserName = endAdvertiserName;
401  }
402
403  @java.lang.SuppressWarnings("all")
404  public ExtendedCreditInvoiceGroup getExtendedCreditInvoiceGroup() {
405    return this.extendedCreditInvoiceGroup;
406  }
407
408  @java.lang.SuppressWarnings("all")
409  public void setExtendedCreditInvoiceGroup(final ExtendedCreditInvoiceGroup extendedCreditInvoiceGroup) {
410    this.extendedCreditInvoiceGroup = extendedCreditInvoiceGroup;
411  }
412
413  @java.lang.SuppressWarnings("all")
414  public String getFundingSource() {
415    return this.fundingSource;
416  }
417
418  @java.lang.SuppressWarnings("all")
419  public void setFundingSource(final String fundingSource) {
420    this.fundingSource = fundingSource;
421  }
422
423  @java.lang.SuppressWarnings("all")
424  public FundingSourceDetails getFundingSourceDetails() {
425    return this.fundingSourceDetails;
426  }
427
428  @java.lang.SuppressWarnings("all")
429  public void setFundingSourceDetails(final FundingSourceDetails fundingSourceDetails) {
430    this.fundingSourceDetails = fundingSourceDetails;
431  }
432
433  @java.lang.SuppressWarnings("all")
434  public Boolean getHasMigratedPermissions() {
435    return this.hasMigratedPermissions;
436  }
437
438  @java.lang.SuppressWarnings("all")
439  public void setHasMigratedPermissions(final Boolean hasMigratedPermissions) {
440    this.hasMigratedPermissions = hasMigratedPermissions;
441  }
442
443  @java.lang.SuppressWarnings("all")
444  public String getIoNumber() {
445    return this.ioNumber;
446  }
447
448  @java.lang.SuppressWarnings("all")
449  public void setIoNumber(final String ioNumber) {
450    this.ioNumber = ioNumber;
451  }
452
453  @java.lang.SuppressWarnings("all")
454  public String getIsPersonal() {
455    return this.isPersonal;
456  }
457
458  @java.lang.SuppressWarnings("all")
459  public void setIsPersonal(final String isPersonal) {
460    this.isPersonal = isPersonal;
461  }
462
463  @java.lang.SuppressWarnings("all")
464  public Boolean getIsPrepayAccount() {
465    return this.isPrepayAccount;
466  }
467
468  @java.lang.SuppressWarnings("all")
469  public void setIsPrepayAccount(final Boolean isPrepayAccount) {
470    this.isPrepayAccount = isPrepayAccount;
471  }
472
473  @java.lang.SuppressWarnings("all")
474  public Boolean getIsTaxIdRequired() {
475    return this.isTaxIdRequired;
476  }
477
478  @java.lang.SuppressWarnings("all")
479  public void setIsTaxIdRequired(final Boolean isTaxIdRequired) {
480    this.isTaxIdRequired = isTaxIdRequired;
481  }
482
483  @java.lang.SuppressWarnings("all")
484  public String getMediaAgency() {
485    return this.mediaAgency;
486  }
487
488  @java.lang.SuppressWarnings("all")
489  public void setMediaAgency(final String mediaAgency) {
490    this.mediaAgency = mediaAgency;
491  }
492
493  @java.lang.SuppressWarnings("all")
494  public String getMinCampaignGroupSpendCap() {
495    return this.minCampaignGroupSpendCap;
496  }
497
498  @java.lang.SuppressWarnings("all")
499  public void setMinCampaignGroupSpendCap(final String minCampaignGroupSpendCap) {
500    this.minCampaignGroupSpendCap = minCampaignGroupSpendCap;
501  }
502
503  @java.lang.SuppressWarnings("all")
504  public Integer getMinDailyBudget() {
505    return this.minDailyBudget;
506  }
507
508  @java.lang.SuppressWarnings("all")
509  public void setMinDailyBudget(final Integer minDailyBudget) {
510    this.minDailyBudget = minDailyBudget;
511  }
512
513  @java.lang.SuppressWarnings("all")
514  public String getOwner() {
515    return this.owner;
516  }
517
518  @java.lang.SuppressWarnings("all")
519  public void setOwner(final String owner) {
520    this.owner = owner;
521  }
522
523  @java.lang.SuppressWarnings("all")
524  public Boolean getOffsitePixelsTosAccepted() {
525    return this.offsitePixelsTosAccepted;
526  }
527
528  @java.lang.SuppressWarnings("all")
529  public void setOffsitePixelsTosAccepted(final Boolean offsitePixelsTosAccepted) {
530    this.offsitePixelsTosAccepted = offsitePixelsTosAccepted;
531  }
532
533  @java.lang.SuppressWarnings("all")
534  public String getPartner() {
535    return this.partner;
536  }
537
538  @java.lang.SuppressWarnings("all")
539  public void setPartner(final String partner) {
540    this.partner = partner;
541  }
542
543  @java.lang.SuppressWarnings("all")
544  public String getTaxId() {
545    return this.taxId;
546  }
547
548  @java.lang.SuppressWarnings("all")
549  public void setTaxId(final String taxId) {
550    this.taxId = taxId;
551  }
552
553  @java.lang.SuppressWarnings("all")
554  public Integer getTaxIdStatus() {
555    return this.taxIdStatus;
556  }
557
558  @java.lang.SuppressWarnings("all")
559  public void setTaxIdStatus(final Integer taxIdStatus) {
560    this.taxIdStatus = taxIdStatus;
561  }
562
563  @java.lang.SuppressWarnings("all")
564  public String getTaxIdType() {
565    return this.taxIdType;
566  }
567
568  @java.lang.SuppressWarnings("all")
569  public void setTaxIdType(final String taxIdType) {
570    this.taxIdType = taxIdType;
571  }
572
573  @java.lang.SuppressWarnings("all")
574  public Integer getTimezoneId() {
575    return this.timezoneId;
576  }
577
578  @java.lang.SuppressWarnings("all")
579  public void setTimezoneId(final Integer timezoneId) {
580    this.timezoneId = timezoneId;
581  }
582
583  @java.lang.SuppressWarnings("all")
584  public String getTimezoneName() {
585    return this.timezoneName;
586  }
587
588  @java.lang.SuppressWarnings("all")
589  public void setTimezoneName(final String timezoneName) {
590    this.timezoneName = timezoneName;
591  }
592
593  @java.lang.SuppressWarnings("all")
594  public Float getTimezoneOffsetHoursUtc() {
595    return this.timezoneOffsetHoursUtc;
596  }
597
598  @java.lang.SuppressWarnings("all")
599  public void setTimezoneOffsetHoursUtc(final Float timezoneOffsetHoursUtc) {
600    this.timezoneOffsetHoursUtc = timezoneOffsetHoursUtc;
601  }
602
603  @java.lang.SuppressWarnings("all")
604  public ReachFrequencySpec getRfSpec() {
605    return this.rfSpec;
606  }
607
608  @java.lang.SuppressWarnings("all")
609  public void setRfSpec(final ReachFrequencySpec rfSpec) {
610    this.rfSpec = rfSpec;
611  }
612
613  @java.lang.Deprecated
614  @java.lang.SuppressWarnings("all")
615  public String getUserRole() {
616    return this.userRole;
617  }
618
619  @java.lang.Deprecated
620  @java.lang.SuppressWarnings("all")
621  public void setUserRole(final String userRole) {
622    this.userRole = userRole;
623  }
624
625  @java.lang.SuppressWarnings("all")
626  public String getVerticalName() {
627    return this.verticalName;
628  }
629
630  @java.lang.SuppressWarnings("all")
631  public void setVerticalName(final String verticalName) {
632    this.verticalName = verticalName;
633  }
634
635  @java.lang.SuppressWarnings("all")
636  public String getAmountSpent() {
637    return this.amountSpent;
638  }
639
640  @java.lang.SuppressWarnings("all")
641  public void setAmountSpent(final String amountSpent) {
642    this.amountSpent = amountSpent;
643  }
644
645  @java.lang.SuppressWarnings("all")
646  public String getSpendCap() {
647    return this.spendCap;
648  }
649
650  @java.lang.SuppressWarnings("all")
651  public void setSpendCap(final String spendCap) {
652    this.spendCap = spendCap;
653  }
654
655  @java.lang.SuppressWarnings("all")
656  public String getBalance() {
657    return this.balance;
658  }
659
660  @java.lang.SuppressWarnings("all")
661  public void setBalance(final String balance) {
662    this.balance = balance;
663  }
664
665  @java.lang.SuppressWarnings("all")
666  public Business getBusiness() {
667    return this.business;
668  }
669
670  @java.lang.SuppressWarnings("all")
671  public void setBusiness(final Business business) {
672    this.business = business;
673  }
674
675  @java.lang.SuppressWarnings("all")
676  public Business getOwnerBusiness() {
677    return this.ownerBusiness;
678  }
679
680  @java.lang.SuppressWarnings("all")
681  public void setOwnerBusiness(final Business ownerBusiness) {
682    this.ownerBusiness = ownerBusiness;
683  }
684
685  @java.lang.SuppressWarnings("all")
686  public Date getLastUsedTime() {
687    return this.lastUsedTime;
688  }
689
690  @java.lang.SuppressWarnings("all")
691  public void setLastUsedTime(final Date lastUsedTime) {
692    this.lastUsedTime = lastUsedTime;
693  }
694}