001// Generated by delombok at Tue Dec 10 13:42:03 UTC 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.List;
028import com.restfb.Facebook;
029import com.restfb.types.AbstractFacebookType;
030
031public class LookalikeSpec extends AbstractFacebookType {
032  @Facebook
033  private String country;
034  @Facebook("is_financial_service")
035  private Boolean isFinancialService;
036  @Facebook("origin")
037  private List<Origin> origin = new ArrayList<>();
038  @Facebook
039  private Double ratio;
040  @Facebook("starting_ratio")
041  private Double startingRatio;
042  @Facebook
043  private String type;
044  @Facebook("target_countries")
045  private List<String> targetCountries = new ArrayList<>();
046
047  public boolean addOrigin(Origin object) {
048    return origin.add(object);
049  }
050
051  public boolean removeOrigin(Origin object) {
052    return origin.remove(object);
053  }
054
055  public List<Origin> getOrigin() {
056    return Collections.unmodifiableList(origin);
057  }
058
059  public boolean addTargetCountry(String targetCountry) {
060    return targetCountries.add(targetCountry);
061  }
062
063  public boolean removeTargetCountry(String targetCountry) {
064    return targetCountries.remove(targetCountry);
065  }
066
067  public List<String> getTargetCountries() {
068    return Collections.unmodifiableList(targetCountries);
069  }
070
071
072  public static class Origin extends NamedAdsObject {
073    /**
074     * {@code true}, returned only when the origin is deleted
075     * -- GETTER --
076     *
077     * @return {@code true}, returned only when the origin is deleted
078     */
079    @Facebook
080    private Boolean deleted;
081    /**
082     * {@code custom_audience} or {@code conversion_pixel} or {@code page} or {@code app}
083     * -- GETTER --
084     *
085     * @return {@code custom_audience} or {@code conversion_pixel} or {@code page} or {@code app}
086     */
087    @Facebook
088    private String type;
089
090    @java.lang.SuppressWarnings("all")
091    public Boolean getDeleted() {
092      return this.deleted;
093    }
094
095    @java.lang.SuppressWarnings("all")
096    public void setDeleted(final Boolean deleted) {
097      this.deleted = deleted;
098    }
099
100    @java.lang.SuppressWarnings("all")
101    public String getType() {
102      return this.type;
103    }
104
105    @java.lang.SuppressWarnings("all")
106    public void setType(final String type) {
107      this.type = type;
108    }
109  }
110
111  @java.lang.SuppressWarnings("all")
112  public String getCountry() {
113    return this.country;
114  }
115
116  @java.lang.SuppressWarnings("all")
117  public void setCountry(final String country) {
118    this.country = country;
119  }
120
121  @java.lang.SuppressWarnings("all")
122  public Boolean getIsFinancialService() {
123    return this.isFinancialService;
124  }
125
126  @java.lang.SuppressWarnings("all")
127  public void setIsFinancialService(final Boolean isFinancialService) {
128    this.isFinancialService = isFinancialService;
129  }
130
131  @java.lang.SuppressWarnings("all")
132  public Double getRatio() {
133    return this.ratio;
134  }
135
136  @java.lang.SuppressWarnings("all")
137  public void setRatio(final Double ratio) {
138    this.ratio = ratio;
139  }
140
141  @java.lang.SuppressWarnings("all")
142  public Double getStartingRatio() {
143    return this.startingRatio;
144  }
145
146  @java.lang.SuppressWarnings("all")
147  public void setStartingRatio(final Double startingRatio) {
148    this.startingRatio = startingRatio;
149  }
150
151  @java.lang.SuppressWarnings("all")
152  public String getType() {
153    return this.type;
154  }
155
156  @java.lang.SuppressWarnings("all")
157  public void setType(final String type) {
158    this.type = type;
159  }
160}