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.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    /**
065     * List of ISO 3166 Alpha-2 codes.
066     *
067     * Users in any of the whitelist countries will see your bot on discovery surfaces on Messenger Platform.
068     */
069    @java.lang.SuppressWarnings("all")
070    @lombok.Generated
071    public List<String> getWhitelist() {
072      return this.whitelist;
073    }
074
075    /**
076     * List of ISO 3166 Alpha-2 codes.
077     *
078     * Users in any of the whitelist countries will see your bot on discovery surfaces on Messenger Platform.
079     */
080    @java.lang.SuppressWarnings("all")
081    @lombok.Generated
082    public void setWhitelist(final List<String> whitelist) {
083      this.whitelist = whitelist;
084    }
085
086    /**
087     * List of ISO 3166 Alpha-2 codes.
088     *
089     * Users in any of the blacklist countries won't see your bot on discovery surfaces on Messenger Platform.
090     */
091    @java.lang.SuppressWarnings("all")
092    @lombok.Generated
093    public List<String> getBlacklist() {
094      return this.blacklist;
095    }
096
097    /**
098     * List of ISO 3166 Alpha-2 codes.
099     *
100     * Users in any of the blacklist countries won't see your bot on discovery surfaces on Messenger Platform.
101     */
102    @java.lang.SuppressWarnings("all")
103    @lombok.Generated
104    public void setBlacklist(final List<String> blacklist) {
105      this.blacklist = blacklist;
106    }
107  }
108
109  /**
110   * Audience type. Valid values include all, custom, or none.
111   */
112  @java.lang.SuppressWarnings("all")
113  @lombok.Generated
114  public String getAudienceType() {
115    return this.audienceType;
116  }
117
118  /**
119   * Audience type. Valid values include all, custom, or none.
120   */
121  @java.lang.SuppressWarnings("all")
122  @lombok.Generated
123  public void setAudienceType(final String audienceType) {
124    this.audienceType = audienceType;
125  }
126
127  /**
128   * country object. Needs to be specified only when audience_type is custom.
129   */
130  @java.lang.SuppressWarnings("all")
131  @lombok.Generated
132  public Countries getCountries() {
133    return this.countries;
134  }
135
136  /**
137   * country object. Needs to be specified only when audience_type is custom.
138   */
139  @java.lang.SuppressWarnings("all")
140  @lombok.Generated
141  public void setCountries(final Countries countries) {
142    this.countries = countries;
143  }
144}