001// Generated by delombok at Sun Apr 14 14:59:49 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.send;
024
025import java.util.ArrayList;
026import java.util.List;
027import com.restfb.Facebook;
028import com.restfb.types.AbstractFacebookType;
029
030/**
031 * Represents the <a href=
032 * "https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/target-audience">Messenger
033 * Profile Target Audience</a>
034 */
035public class TargetAudience extends AbstractFacebookType {
036  /**
037   * Audience type. Valid values include all, custom, or none.
038   */
039  @Facebook("audience_type")
040  private String audienceType;
041  /**
042   * country object. Needs to be specified only when audience_type is custom.
043   */
044  @Facebook
045  private Countries countries;
046
047
048  public static class Countries extends AbstractFacebookType {
049    /**
050     * List of ISO 3166 Alpha-2 codes.
051     *
052     * Users in any of the whitelist countries will see your bot on discovery surfaces on Messenger Platform.
053     */
054    @Facebook
055    private List<String> whitelist = new ArrayList<>();
056    /**
057     * List of ISO 3166 Alpha-2 codes.
058     *
059     * Users in any of the blacklist countries won't see your bot on discovery surfaces on Messenger Platform.
060     */
061    @Facebook
062    private List<String> blacklist = new ArrayList<>();
063
064    @java.lang.SuppressWarnings("all")
065    public List<String> getWhitelist() {
066      return this.whitelist;
067    }
068
069    @java.lang.SuppressWarnings("all")
070    public void setWhitelist(final List<String> whitelist) {
071      this.whitelist = whitelist;
072    }
073
074    @java.lang.SuppressWarnings("all")
075    public List<String> getBlacklist() {
076      return this.blacklist;
077    }
078
079    @java.lang.SuppressWarnings("all")
080    public void setBlacklist(final List<String> blacklist) {
081      this.blacklist = blacklist;
082    }
083  }
084
085  /**
086   * Audience type. Valid values include all, custom, or none.
087   */
088  @java.lang.SuppressWarnings("all")
089  public String getAudienceType() {
090    return this.audienceType;
091  }
092
093  /**
094   * Audience type. Valid values include all, custom, or none.
095   */
096  @java.lang.SuppressWarnings("all")
097  public void setAudienceType(final String audienceType) {
098    this.audienceType = audienceType;
099  }
100
101  /**
102   * country object. Needs to be specified only when audience_type is custom.
103   */
104  @java.lang.SuppressWarnings("all")
105  public Countries getCountries() {
106    return this.countries;
107  }
108
109  /**
110   * country object. Needs to be specified only when audience_type is custom.
111   */
112  @java.lang.SuppressWarnings("all")
113  public void setCountries(final Countries countries) {
114    this.countries = countries;
115  }
116}