001// Generated by delombok at Fri Oct 11 21:56:29 CEST 2019
002/**
003 * Copyright (c) 2010-2019 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;
030
031/**
032 * Represents the <a href="https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group">Campaign</a>
033 * Marketing API type
034 */
035public class Campaign extends NamedAdsObject {
036  /**
037   * ID of the ad account that owns this campaign
038   */
039  @Facebook("account_id")
040  private String accountId;
041  /**
042   * Ad Labels associated with this campaign
043   */
044  @Facebook("adlabels")
045  private List<AdLabel> adlabels;
046  /**
047   * Buying type, possible values are:
048   * <ul>
049   * <li>AUCTION: default</li>
050   * <li>RESERVED: for reach and frequency ads</li>
051   * </ul>
052   */
053  @Facebook("buying_type")
054  private String buyingType;
055  /**
056   * Whether the campaign can set the spend cap
057   */
058  @Facebook("can_use_spend_cap")
059  private Boolean canUseSpendCap;
060  /**
061   * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status
062   * CAMPAIGN_PAUSED. Prefer using 'status' instead of this.
063   *
064   * possible values: ACTIVE, PAUSED, DELETED, ARCHIVED
065   */
066  @Facebook("configured_status")
067  private String configuredStatus;
068  /**
069   * Created Time
070   */
071  @Facebook("created_time")
072  private Date createdTime;
073  /**
074   * The effective status of this campaign.
075   *
076   * possible values: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO,
077   * CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED
078   */
079  @Facebook("effective_status")
080  private String effectiveStatus;
081  /**
082   * Issues for this campaign that prevented it from deliverying.
083   */
084  @Facebook("issues_info")
085  @GraphAPI(since = "3.2")
086  private List<AdCampaignIssuesInfo> issuesInfo = new ArrayList<>();
087  /**
088   * Campaign's objective
089   */
090  @Facebook
091  private String objective;
092  /**
093   * If there are recommendations for this campaign, this field includes them.
094   */
095  @Facebook
096  private List<AdRecommendation> recommendations = new ArrayList<>();
097  @Facebook("source_campaign")
098  private Campaign sourceCampaign;
099  /**
100   * A spend cap for the campaign, such that it will not spend more than this cap. Expressed as integer value of the
101   * subunit in your currency.
102   */
103  @Facebook("spend_cap")
104  private String spendCap;
105  /**
106   * Start Time
107   */
108  @Facebook("start_time")
109  private Date startTime;
110  /**
111   * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status
112   * CAMPAIGN_PAUSED. The field returns the same value as 'configured_status', and is the suggested one to use.
113   */
114  @Facebook
115  private String status;
116  /**
117   * Stop Time
118   */
119  @Facebook("stop_time")
120  private Date stopTime;
121  /**
122   * Updated Time
123   */
124  @Facebook("updated_time")
125  private Date updatedTime;
126
127  /**
128   * @return ID of the ad account that owns this campaign
129   */
130  @java.lang.SuppressWarnings("all")
131  public String getAccountId() {
132    return this.accountId;
133  }
134
135  /**
136   * ID of the ad account that owns this campaign
137   */
138  @java.lang.SuppressWarnings("all")
139  public void setAccountId(final String accountId) {
140    this.accountId = accountId;
141  }
142
143  /**
144   * @return Ad Labels associated with this campaign
145   */
146  @java.lang.SuppressWarnings("all")
147  public List<AdLabel> getAdlabels() {
148    return this.adlabels;
149  }
150
151  /**
152   * Ad Labels associated with this campaign
153   */
154  @java.lang.SuppressWarnings("all")
155  public void setAdlabels(final List<AdLabel> adlabels) {
156    this.adlabels = adlabels;
157  }
158
159  /**
160   * @return Buying type
161   */
162  @java.lang.SuppressWarnings("all")
163  public String getBuyingType() {
164    return this.buyingType;
165  }
166
167  /**
168   * Buying type, possible values are:
169   * <ul>
170   * <li>AUCTION: default</li>
171   * <li>RESERVED: for reach and frequency ads</li>
172   * </ul>
173   */
174  @java.lang.SuppressWarnings("all")
175  public void setBuyingType(final String buyingType) {
176    this.buyingType = buyingType;
177  }
178
179  /**
180   * @return Whether the campaign can set the spend cap
181   */
182  @java.lang.SuppressWarnings("all")
183  public Boolean getCanUseSpendCap() {
184    return this.canUseSpendCap;
185  }
186
187  /**
188   * Whether the campaign can set the spend cap
189   */
190  @java.lang.SuppressWarnings("all")
191  public void setCanUseSpendCap(final Boolean canUseSpendCap) {
192    this.canUseSpendCap = canUseSpendCap;
193  }
194
195  /**
196   * @return the configured status
197   */
198  @java.lang.SuppressWarnings("all")
199  public String getConfiguredStatus() {
200    return this.configuredStatus;
201  }
202
203  /**
204   * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status
205   * CAMPAIGN_PAUSED. Prefer using 'status' instead of this.
206   *
207   * possible values: ACTIVE, PAUSED, DELETED, ARCHIVED
208   */
209  @java.lang.SuppressWarnings("all")
210  public void setConfiguredStatus(final String configuredStatus) {
211    this.configuredStatus = configuredStatus;
212  }
213
214  /**
215   * @return Created Time
216   */
217  @java.lang.SuppressWarnings("all")
218  public Date getCreatedTime() {
219    return this.createdTime;
220  }
221
222  /**
223   * Created Time
224   */
225  @java.lang.SuppressWarnings("all")
226  public void setCreatedTime(final Date createdTime) {
227    this.createdTime = createdTime;
228  }
229
230  /**
231   * @return The effective status of this campaign
232   */
233  @java.lang.SuppressWarnings("all")
234  public String getEffectiveStatus() {
235    return this.effectiveStatus;
236  }
237
238  /**
239   * The effective status of this campaign.
240   *
241   * possible values: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO,
242   * CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED
243   */
244  @java.lang.SuppressWarnings("all")
245  public void setEffectiveStatus(final String effectiveStatus) {
246    this.effectiveStatus = effectiveStatus;
247  }
248
249  /**
250   * @return List of issues for this campaign that prevented it from deliverying.
251   */
252  @GraphAPI(since = "3.2")
253  @java.lang.SuppressWarnings("all")
254  public List<AdCampaignIssuesInfo> getIssuesInfo() {
255    return this.issuesInfo;
256  }
257
258  /**
259   * Issues for this campaign that prevented it from deliverying.
260   */
261  @java.lang.SuppressWarnings("all")
262  public void setIssuesInfo(final List<AdCampaignIssuesInfo> issuesInfo) {
263    this.issuesInfo = issuesInfo;
264  }
265
266  /**
267   * @return Campaign's objective
268   */
269  @java.lang.SuppressWarnings("all")
270  public String getObjective() {
271    return this.objective;
272  }
273
274  /**
275   * Campaign's objective
276   */
277  @java.lang.SuppressWarnings("all")
278  public void setObjective(final String objective) {
279    this.objective = objective;
280  }
281
282  /**
283   * @return If there are recommendations for this campaign, this field includes them.
284   */
285  @java.lang.SuppressWarnings("all")
286  public List<AdRecommendation> getRecommendations() {
287    return this.recommendations;
288  }
289
290  /**
291   * If there are recommendations for this campaign, this field includes them.
292   */
293  @java.lang.SuppressWarnings("all")
294  public void setRecommendations(final List<AdRecommendation> recommendations) {
295    this.recommendations = recommendations;
296  }
297
298  @java.lang.SuppressWarnings("all")
299  public Campaign getSourceCampaign() {
300    return this.sourceCampaign;
301  }
302
303  @java.lang.SuppressWarnings("all")
304  public void setSourceCampaign(final Campaign sourceCampaign) {
305    this.sourceCampaign = sourceCampaign;
306  }
307
308  /**
309   * @return A spend cap for the campaign, such that it will not spend more than this cap.
310   */
311  @java.lang.SuppressWarnings("all")
312  public String getSpendCap() {
313    return this.spendCap;
314  }
315
316  /**
317   * A spend cap for the campaign, such that it will not spend more than this cap. Expressed as integer value of the
318   * subunit in your currency.
319   */
320  @java.lang.SuppressWarnings("all")
321  public void setSpendCap(final String spendCap) {
322    this.spendCap = spendCap;
323  }
324
325  /**
326   * @return Start Time
327   */
328  @java.lang.SuppressWarnings("all")
329  public Date getStartTime() {
330    return this.startTime;
331  }
332
333  /**
334   * Start Time
335   */
336  @java.lang.SuppressWarnings("all")
337  public void setStartTime(final Date startTime) {
338    this.startTime = startTime;
339  }
340
341  /**
342   * @return the status
343   */
344  @java.lang.SuppressWarnings("all")
345  public String getStatus() {
346    return this.status;
347  }
348
349  /**
350   * If this status is PAUSED, all its active ad sets and ads will be paused and have an effective status
351   * CAMPAIGN_PAUSED. The field returns the same value as 'configured_status', and is the suggested one to use.
352   */
353  @java.lang.SuppressWarnings("all")
354  public void setStatus(final String status) {
355    this.status = status;
356  }
357
358  /**
359   * @return Stop Time
360   */
361  @java.lang.SuppressWarnings("all")
362  public Date getStopTime() {
363    return this.stopTime;
364  }
365
366  /**
367   * Stop Time
368   */
369  @java.lang.SuppressWarnings("all")
370  public void setStopTime(final Date stopTime) {
371    this.stopTime = stopTime;
372  }
373
374  /**
375   * @return Updated Time
376   */
377  @java.lang.SuppressWarnings("all")
378  public Date getUpdatedTime() {
379    return this.updatedTime;
380  }
381
382  /**
383   * Updated Time
384   */
385  @java.lang.SuppressWarnings("all")
386  public void setUpdatedTime(final Date updatedTime) {
387    this.updatedTime = updatedTime;
388  }
389}