001// Generated by delombok at Thu Aug 13 13:56:44 UTC 2026
002/*
003 * Copyright (c) 2010-2026 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  @lombok.Generated
081  public Boolean getIsPrimary() {
082    return this.isPrimary;
083  }
084
085  /**
086   * Is this the primary objective of the study
087   */
088  @java.lang.SuppressWarnings("all")
089  @lombok.Generated
090  public void setIsPrimary(final Boolean isPrimary) {
091    this.isPrimary = isPrimary;
092  }
093
094  /**
095   * The type of the objective
096   */
097  @java.lang.SuppressWarnings("all")
098  @lombok.Generated
099  public String getType() {
100    return this.type;
101  }
102
103  /**
104   * The type of the objective
105   */
106  @java.lang.SuppressWarnings("all")
107  @lombok.Generated
108  public void setType(final String type) {
109    this.type = type;
110  }
111}