001// Generated by delombok at Fri Nov 22 22:30:55 CET 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.Collections;
027import java.util.List;
028import com.restfb.Facebook;
029
030public class AdStudyObjective extends NamedAdsObject {
031  /**
032   * Detected custom attributes for this objective
033   */
034  @Facebook("custom_attributes")
035  private List<String> customAttributes = new ArrayList<>();
036  /**
037   * Is this the primary objective of the study
038   */
039  @Facebook("is_primary")
040  private Boolean isPrimary;
041  /**
042   * Results of the study for this objective
043   */
044  @Facebook
045  private List<String> results = new ArrayList<>();
046  /**
047   * The type of the objective
048   */
049  @Facebook
050  private String type;
051
052  public boolean addCustomAttribute(String attribute) {
053    return customAttributes.add(attribute);
054  }
055
056  public boolean removeCustomAttribute(String attribute) {
057    return customAttributes.remove(attribute);
058  }
059
060  public List<String> getCustomAttributes() {
061    return Collections.unmodifiableList(customAttributes);
062  }
063
064  public boolean addResult(String result) {
065    return results.add(result);
066  }
067
068  public boolean removeResult(String result) {
069    return results.remove(result);
070  }
071
072  public List<String> getResults() {
073    return Collections.unmodifiableList(results);
074  }
075
076  /**
077   * Is this the primary objective of the study
078   */
079  @java.lang.SuppressWarnings("all")
080  public Boolean getIsPrimary() {
081    return this.isPrimary;
082  }
083
084  /**
085   * Is this the primary objective of the study
086   */
087  @java.lang.SuppressWarnings("all")
088  public void setIsPrimary(final Boolean isPrimary) {
089    this.isPrimary = isPrimary;
090  }
091
092  /**
093   * The type of the objective
094   */
095  @java.lang.SuppressWarnings("all")
096  public String getType() {
097    return this.type;
098  }
099
100  /**
101   * The type of the objective
102   */
103  @java.lang.SuppressWarnings("all")
104  public void setType(final String type) {
105    this.type = type;
106  }
107}