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.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_access_expire_time")
146  private Date userAccessExpireTime;
147  @Facebook("user_tasks")
148  private List<String> userTasks = new ArrayList<>();
149
150  public JsonObject getTosAccepted() {
151    if (tosAccepted != null) {
152      return Json.parse(tosAccepted).asObject();
153    } else {
154      return null;
155    }
156  }
157
158  public void setTosAccepted(JsonObject tosAccepted) {
159    if (tosAccepted != null) {
160      this.tosAccepted = tosAccepted.toString();
161    }
162  }
163
164  public boolean addUserTask(String userTask) {
165    return userTasks.add(userTask);
166  }
167
168  public boolean removeUserTask(String userTask) {
169    return userTasks.remove(userTask);
170  }
171
172  public List<String> getUserTasks() {
173    return Collections.unmodifiableList(userTasks);
174  }
175
176  public boolean addAdAccountGroup(AdAccountGroup adAccountGroup) {
177    return accountGroups.add(adAccountGroup);
178  }
179
180  public boolean removeAdAccountGroup(AdAccountGroup adAccountGroup) {
181    return accountGroups.remove(adAccountGroup);
182  }
183
184  public List<AdAccountGroup> getAccountsGroups() {
185    return Collections.unmodifiableList(accountGroups);
186  }
187
188  public boolean addCapability(String capability) {
189    return capabilities.add(capability);
190  }
191
192  public boolean removeCapability(String capability) {
193    return capabilities.remove(capability);
194  }
195
196  public List<String> getCapabilities() {
197    return Collections.unmodifiableList(capabilities);
198  }
199
200  public boolean addFailedDeliveryCheck(AdDeliveryCheck adDevliveryCheck) {
201    return failedDeliveryChecks.add(adDevliveryCheck);
202  }
203
204  public boolean removeFailedDeliveryCheck(AdDeliveryCheck adDevliveryCheck) {
205    return failedDeliveryChecks.remove(adDevliveryCheck);
206  }
207
208  public List<AdDeliveryCheck> getFailedDeliveryChecks() {
209    return Collections.unmodifiableList(failedDeliveryChecks);
210  }
211
212  public boolean addLineNumber(Integer lineNumber) {
213    return lineNumbers.add(lineNumber);
214  }
215
216  public boolean removeLineNumber(Integer lineNumber) {
217    return lineNumbers.remove(lineNumber);
218  }
219
220  public List<Integer> getLineNumbers() {
221    return Collections.unmodifiableList(lineNumbers);
222  }
223
224  @java.lang.SuppressWarnings("all")
225  public AdAccountCreationRequest getAdAccountCreationRequest() {
226    return this.adAccountCreationRequest;
227  }
228
229  @java.lang.SuppressWarnings("all")
230  public void setAdAccountCreationRequest(final AdAccountCreationRequest adAccountCreationRequest) {
231    this.adAccountCreationRequest = adAccountCreationRequest;
232  }
233
234  @java.lang.SuppressWarnings("all")
235  public AdAccountPromotableObjects getAdAccountPromotableObjects() {
236    return this.adAccountPromotableObjects;
237  }
238
239  @java.lang.SuppressWarnings("all")
240  public void setAdAccountPromotableObjects(final AdAccountPromotableObjects adAccountPromotableObjects) {
241    this.adAccountPromotableObjects = adAccountPromotableObjects;
242  }
243
244  @java.lang.SuppressWarnings("all")
245  public String getAccountId() {
246    return this.accountId;
247  }
248
249  @java.lang.SuppressWarnings("all")
250  public void setAccountId(final String accountId) {
251    this.accountId = accountId;
252  }
253
254  @java.lang.SuppressWarnings("all")
255  public Integer getAccountStatus() {
256    return this.accountStatus;
257  }
258
259  @java.lang.SuppressWarnings("all")
260  public void setAccountStatus(final Integer accountStatus) {
261    this.accountStatus = accountStatus;
262  }
263
264  @java.lang.SuppressWarnings("all")
265  public Float getAge() {
266    return this.age;
267  }
268
269  @java.lang.SuppressWarnings("all")
270  public void setAge(final Float age) {
271    this.age = age;
272  }
273
274  @java.lang.SuppressWarnings("all")
275  public AgencyClientDeclaration getAgencyClientDeclaration() {
276    return this.agencyClientDeclaration;
277  }
278
279  @java.lang.SuppressWarnings("all")
280  public void setAgencyClientDeclaration(final AgencyClientDeclaration agencyClientDeclaration) {
281    this.agencyClientDeclaration = agencyClientDeclaration;
282  }
283
284  @java.lang.SuppressWarnings("all")
285  public String getBusinessCity() {
286    return this.businessCity;
287  }
288
289  @java.lang.SuppressWarnings("all")
290  public void setBusinessCity(final String businessCity) {
291    this.businessCity = businessCity;
292  }
293
294  @java.lang.SuppressWarnings("all")
295  public String getBusinessCountryCode() {
296    return this.businessCountryCode;
297  }
298
299  @java.lang.SuppressWarnings("all")
300  public void setBusinessCountryCode(final String businessCountryCode) {
301    this.businessCountryCode = businessCountryCode;
302  }
303
304  @java.lang.SuppressWarnings("all")
305  public String getBusinessName() {
306    return this.businessName;
307  }
308
309  @java.lang.SuppressWarnings("all")
310  public void setBusinessName(final String businessName) {
311    this.businessName = businessName;
312  }
313
314  @java.lang.SuppressWarnings("all")
315  public String getBusinessState() {
316    return this.businessState;
317  }
318
319  @java.lang.SuppressWarnings("all")
320  public void setBusinessState(final String businessState) {
321    this.businessState = businessState;
322  }
323
324  @java.lang.SuppressWarnings("all")
325  public String getBusinessStreet() {
326    return this.businessStreet;
327  }
328
329  @java.lang.SuppressWarnings("all")
330  public void setBusinessStreet(final String businessStreet) {
331    this.businessStreet = businessStreet;
332  }
333
334  @java.lang.SuppressWarnings("all")
335  public String getBusinessStreet2() {
336    return this.businessStreet2;
337  }
338
339  @java.lang.SuppressWarnings("all")
340  public void setBusinessStreet2(final String businessStreet2) {
341    this.businessStreet2 = businessStreet2;
342  }
343
344  @java.lang.SuppressWarnings("all")
345  public String getBusinessZip() {
346    return this.businessZip;
347  }
348
349  @java.lang.SuppressWarnings("all")
350  public void setBusinessZip(final String businessZip) {
351    this.businessZip = businessZip;
352  }
353
354  @Override
355  @java.lang.SuppressWarnings("all")
356  public Date getCreatedTime() {
357    return this.createdTime;
358  }
359
360  @java.lang.SuppressWarnings("all")
361  public void setCreatedTime(final Date createdTime) {
362    this.createdTime = createdTime;
363  }
364
365  @java.lang.SuppressWarnings("all")
366  public String getCurrency() {
367    return this.currency;
368  }
369
370  @java.lang.SuppressWarnings("all")
371  public void setCurrency(final String currency) {
372    this.currency = currency;
373  }
374
375  @java.lang.SuppressWarnings("all")
376  public Integer getDisableReason() {
377    return this.disableReason;
378  }
379
380  @java.lang.SuppressWarnings("all")
381  public void setDisableReason(final Integer disableReason) {
382    this.disableReason = disableReason;
383  }
384
385  @java.lang.SuppressWarnings("all")
386  public String getEndAdvertiser() {
387    return this.endAdvertiser;
388  }
389
390  @java.lang.SuppressWarnings("all")
391  public void setEndAdvertiser(final String endAdvertiser) {
392    this.endAdvertiser = endAdvertiser;
393  }
394
395  @java.lang.SuppressWarnings("all")
396  public String getEndAdvertiserName() {
397    return this.endAdvertiserName;
398  }
399
400  @java.lang.SuppressWarnings("all")
401  public void setEndAdvertiserName(final String endAdvertiserName) {
402    this.endAdvertiserName = endAdvertiserName;
403  }
404
405  @java.lang.SuppressWarnings("all")
406  public ExtendedCreditInvoiceGroup getExtendedCreditInvoiceGroup() {
407    return this.extendedCreditInvoiceGroup;
408  }
409
410  @java.lang.SuppressWarnings("all")
411  public void setExtendedCreditInvoiceGroup(final ExtendedCreditInvoiceGroup extendedCreditInvoiceGroup) {
412    this.extendedCreditInvoiceGroup = extendedCreditInvoiceGroup;
413  }
414
415  @java.lang.SuppressWarnings("all")
416  public String getFundingSource() {
417    return this.fundingSource;
418  }
419
420  @java.lang.SuppressWarnings("all")
421  public void setFundingSource(final String fundingSource) {
422    this.fundingSource = fundingSource;
423  }
424
425  @java.lang.SuppressWarnings("all")
426  public FundingSourceDetails getFundingSourceDetails() {
427    return this.fundingSourceDetails;
428  }
429
430  @java.lang.SuppressWarnings("all")
431  public void setFundingSourceDetails(final FundingSourceDetails fundingSourceDetails) {
432    this.fundingSourceDetails = fundingSourceDetails;
433  }
434
435  @java.lang.SuppressWarnings("all")
436  public Boolean getHasMigratedPermissions() {
437    return this.hasMigratedPermissions;
438  }
439
440  @java.lang.SuppressWarnings("all")
441  public void setHasMigratedPermissions(final Boolean hasMigratedPermissions) {
442    this.hasMigratedPermissions = hasMigratedPermissions;
443  }
444
445  @java.lang.SuppressWarnings("all")
446  public String getIoNumber() {
447    return this.ioNumber;
448  }
449
450  @java.lang.SuppressWarnings("all")
451  public void setIoNumber(final String ioNumber) {
452    this.ioNumber = ioNumber;
453  }
454
455  @java.lang.SuppressWarnings("all")
456  public String getIsPersonal() {
457    return this.isPersonal;
458  }
459
460  @java.lang.SuppressWarnings("all")
461  public void setIsPersonal(final String isPersonal) {
462    this.isPersonal = isPersonal;
463  }
464
465  @java.lang.SuppressWarnings("all")
466  public Boolean getIsPrepayAccount() {
467    return this.isPrepayAccount;
468  }
469
470  @java.lang.SuppressWarnings("all")
471  public void setIsPrepayAccount(final Boolean isPrepayAccount) {
472    this.isPrepayAccount = isPrepayAccount;
473  }
474
475  @java.lang.SuppressWarnings("all")
476  public Boolean getIsTaxIdRequired() {
477    return this.isTaxIdRequired;
478  }
479
480  @java.lang.SuppressWarnings("all")
481  public void setIsTaxIdRequired(final Boolean isTaxIdRequired) {
482    this.isTaxIdRequired = isTaxIdRequired;
483  }
484
485  @java.lang.SuppressWarnings("all")
486  public String getMediaAgency() {
487    return this.mediaAgency;
488  }
489
490  @java.lang.SuppressWarnings("all")
491  public void setMediaAgency(final String mediaAgency) {
492    this.mediaAgency = mediaAgency;
493  }
494
495  @java.lang.SuppressWarnings("all")
496  public String getMinCampaignGroupSpendCap() {
497    return this.minCampaignGroupSpendCap;
498  }
499
500  @java.lang.SuppressWarnings("all")
501  public void setMinCampaignGroupSpendCap(final String minCampaignGroupSpendCap) {
502    this.minCampaignGroupSpendCap = minCampaignGroupSpendCap;
503  }
504
505  @java.lang.SuppressWarnings("all")
506  public Integer getMinDailyBudget() {
507    return this.minDailyBudget;
508  }
509
510  @java.lang.SuppressWarnings("all")
511  public void setMinDailyBudget(final Integer minDailyBudget) {
512    this.minDailyBudget = minDailyBudget;
513  }
514
515  @java.lang.SuppressWarnings("all")
516  public String getOwner() {
517    return this.owner;
518  }
519
520  @java.lang.SuppressWarnings("all")
521  public void setOwner(final String owner) {
522    this.owner = owner;
523  }
524
525  @java.lang.SuppressWarnings("all")
526  public Boolean getOffsitePixelsTosAccepted() {
527    return this.offsitePixelsTosAccepted;
528  }
529
530  @java.lang.SuppressWarnings("all")
531  public void setOffsitePixelsTosAccepted(final Boolean offsitePixelsTosAccepted) {
532    this.offsitePixelsTosAccepted = offsitePixelsTosAccepted;
533  }
534
535  @java.lang.SuppressWarnings("all")
536  public String getPartner() {
537    return this.partner;
538  }
539
540  @java.lang.SuppressWarnings("all")
541  public void setPartner(final String partner) {
542    this.partner = partner;
543  }
544
545  @java.lang.SuppressWarnings("all")
546  public String getTaxId() {
547    return this.taxId;
548  }
549
550  @java.lang.SuppressWarnings("all")
551  public void setTaxId(final String taxId) {
552    this.taxId = taxId;
553  }
554
555  @java.lang.SuppressWarnings("all")
556  public Integer getTaxIdStatus() {
557    return this.taxIdStatus;
558  }
559
560  @java.lang.SuppressWarnings("all")
561  public void setTaxIdStatus(final Integer taxIdStatus) {
562    this.taxIdStatus = taxIdStatus;
563  }
564
565  @java.lang.SuppressWarnings("all")
566  public String getTaxIdType() {
567    return this.taxIdType;
568  }
569
570  @java.lang.SuppressWarnings("all")
571  public void setTaxIdType(final String taxIdType) {
572    this.taxIdType = taxIdType;
573  }
574
575  @java.lang.SuppressWarnings("all")
576  public Integer getTimezoneId() {
577    return this.timezoneId;
578  }
579
580  @java.lang.SuppressWarnings("all")
581  public void setTimezoneId(final Integer timezoneId) {
582    this.timezoneId = timezoneId;
583  }
584
585  @java.lang.SuppressWarnings("all")
586  public String getTimezoneName() {
587    return this.timezoneName;
588  }
589
590  @java.lang.SuppressWarnings("all")
591  public void setTimezoneName(final String timezoneName) {
592    this.timezoneName = timezoneName;
593  }
594
595  @java.lang.SuppressWarnings("all")
596  public Float getTimezoneOffsetHoursUtc() {
597    return this.timezoneOffsetHoursUtc;
598  }
599
600  @java.lang.SuppressWarnings("all")
601  public void setTimezoneOffsetHoursUtc(final Float timezoneOffsetHoursUtc) {
602    this.timezoneOffsetHoursUtc = timezoneOffsetHoursUtc;
603  }
604
605  @java.lang.SuppressWarnings("all")
606  public ReachFrequencySpec getRfSpec() {
607    return this.rfSpec;
608  }
609
610  @java.lang.SuppressWarnings("all")
611  public void setRfSpec(final ReachFrequencySpec rfSpec) {
612    this.rfSpec = rfSpec;
613  }
614
615  @java.lang.Deprecated
616  @java.lang.SuppressWarnings("all")
617  public String getUserRole() {
618    return this.userRole;
619  }
620
621  @java.lang.Deprecated
622  @java.lang.SuppressWarnings("all")
623  public void setUserRole(final String userRole) {
624    this.userRole = userRole;
625  }
626
627  @java.lang.SuppressWarnings("all")
628  public String getVerticalName() {
629    return this.verticalName;
630  }
631
632  @java.lang.SuppressWarnings("all")
633  public void setVerticalName(final String verticalName) {
634    this.verticalName = verticalName;
635  }
636
637  @java.lang.SuppressWarnings("all")
638  public String getAmountSpent() {
639    return this.amountSpent;
640  }
641
642  @java.lang.SuppressWarnings("all")
643  public void setAmountSpent(final String amountSpent) {
644    this.amountSpent = amountSpent;
645  }
646
647  @java.lang.SuppressWarnings("all")
648  public String getSpendCap() {
649    return this.spendCap;
650  }
651
652  @java.lang.SuppressWarnings("all")
653  public void setSpendCap(final String spendCap) {
654    this.spendCap = spendCap;
655  }
656
657  @java.lang.SuppressWarnings("all")
658  public String getBalance() {
659    return this.balance;
660  }
661
662  @java.lang.SuppressWarnings("all")
663  public void setBalance(final String balance) {
664    this.balance = balance;
665  }
666
667  @java.lang.SuppressWarnings("all")
668  public Business getBusiness() {
669    return this.business;
670  }
671
672  @java.lang.SuppressWarnings("all")
673  public void setBusiness(final Business business) {
674    this.business = business;
675  }
676
677  @java.lang.SuppressWarnings("all")
678  public Business getOwnerBusiness() {
679    return this.ownerBusiness;
680  }
681
682  @java.lang.SuppressWarnings("all")
683  public void setOwnerBusiness(final Business ownerBusiness) {
684    this.ownerBusiness = ownerBusiness;
685  }
686
687  @java.lang.SuppressWarnings("all")
688  public Date getLastUsedTime() {
689    return this.lastUsedTime;
690  }
691
692  @java.lang.SuppressWarnings("all")
693  public void setLastUsedTime(final Date lastUsedTime) {
694    this.lastUsedTime = lastUsedTime;
695  }
696
697  @java.lang.SuppressWarnings("all")
698  public Date getUserAccessExpireTime() {
699    return this.userAccessExpireTime;
700  }
701
702  @java.lang.SuppressWarnings("all")
703  public void setUserAccessExpireTime(final Date userAccessExpireTime) {
704    this.userAccessExpireTime = userAccessExpireTime;
705  }
706}