001// Generated by delombok at Fri Nov 22 22:30:56 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;
024
025import java.util.*;
026import com.restfb.Facebook;
027
028/**
029 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/open-graph-action-type/">Open Graph
030 * Action Type</a>
031 */
032public class OpenGraphActionType extends NamedFacebookType {
033  /**
034   * Whether multiple objects can be referenced by the action
035   */
036  @Facebook("allow_multiple_references")
037  private Boolean allowMultipleReferences;
038  /**
039   * The preposition used to address the app
040   */
041  @Facebook("app_preposition")
042  private String appPreposition;
043  /**
044   * Button text
045   */
046  @Facebook("button_text")
047  private String buttonText;
048  /**
049   * Description
050   */
051  @Facebook
052  private String description;
053  /**
054   * Whether the app secret is required for API calls related to actions of this type
055   */
056  @Facebook("is_app_secret_required")
057  private Boolean isAppSecretRequired;
058  @Facebook("object_types")
059  private List<String> objectTypes = new ArrayList<>();
060  /**
061   * The plural past form of the action
062   */
063  @Facebook("plural_past")
064  private String pluralPast;
065  /**
066   * The plural present form of the action
067   */
068  @Facebook("plural_present")
069  private String pluralPresent;
070  @Facebook("property_config")
071  private Map<String, OpenGraphPropertyConfig> propertyConfig = new HashMap<>();
072  /**
073   * The singular past form of the action
074   */
075  @Facebook("singular_past")
076  private String singularPast;
077  /**
078   * The singular present form of the action
079   */
080  @Facebook("singular_present")
081  private String singularPresent;
082  /**
083   * Bitmap of tenses that are disabled (the least significant bit relates to past tense, the second least significant
084   * relates to present tense
085   */
086  @Facebook("tenses_disabled")
087  private Integer tensesDisabled;
088
089  /**
090   * Per-property config
091   *
092   * @return Per-property config
093   */
094  public Map<String, OpenGraphPropertyConfig> getPropertyConfig() {
095    return Collections.unmodifiableMap(propertyConfig);
096  }
097
098  public void addPropertyConfig(String key, OpenGraphPropertyConfig value) {
099    propertyConfig.put(key, value);
100  }
101
102  public void removePropertyConfig(String key) {
103    propertyConfig.remove(key);
104  }
105
106  /**
107   * Object types associated with this action type
108   *
109   * @return Object types associated with this action type
110   */
111  public List<String> getObjectTypes() {
112    return Collections.unmodifiableList(objectTypes);
113  }
114
115  public boolean addObjectType(String objectType) {
116    return objectTypes.add(objectType);
117  }
118
119  public boolean removeObjectType(String objectType) {
120    return objectTypes.remove(objectType);
121  }
122
123  /**
124   * Whether multiple objects can be referenced by the action
125   */
126  @java.lang.SuppressWarnings("all")
127  public Boolean getAllowMultipleReferences() {
128    return this.allowMultipleReferences;
129  }
130
131  /**
132   * Whether multiple objects can be referenced by the action
133   */
134  @java.lang.SuppressWarnings("all")
135  public void setAllowMultipleReferences(final Boolean allowMultipleReferences) {
136    this.allowMultipleReferences = allowMultipleReferences;
137  }
138
139  /**
140   * The preposition used to address the app
141   */
142  @java.lang.SuppressWarnings("all")
143  public String getAppPreposition() {
144    return this.appPreposition;
145  }
146
147  /**
148   * The preposition used to address the app
149   */
150  @java.lang.SuppressWarnings("all")
151  public void setAppPreposition(final String appPreposition) {
152    this.appPreposition = appPreposition;
153  }
154
155  /**
156   * Button text
157   */
158  @java.lang.SuppressWarnings("all")
159  public String getButtonText() {
160    return this.buttonText;
161  }
162
163  /**
164   * Button text
165   */
166  @java.lang.SuppressWarnings("all")
167  public void setButtonText(final String buttonText) {
168    this.buttonText = buttonText;
169  }
170
171  /**
172   * Description
173   */
174  @java.lang.SuppressWarnings("all")
175  public String getDescription() {
176    return this.description;
177  }
178
179  /**
180   * Description
181   */
182  @java.lang.SuppressWarnings("all")
183  public void setDescription(final String description) {
184    this.description = description;
185  }
186
187  /**
188   * Whether the app secret is required for API calls related to actions of this type
189   */
190  @java.lang.SuppressWarnings("all")
191  public Boolean getIsAppSecretRequired() {
192    return this.isAppSecretRequired;
193  }
194
195  /**
196   * Whether the app secret is required for API calls related to actions of this type
197   */
198  @java.lang.SuppressWarnings("all")
199  public void setIsAppSecretRequired(final Boolean isAppSecretRequired) {
200    this.isAppSecretRequired = isAppSecretRequired;
201  }
202
203  /**
204   * The plural past form of the action
205   */
206  @java.lang.SuppressWarnings("all")
207  public String getPluralPast() {
208    return this.pluralPast;
209  }
210
211  /**
212   * The plural past form of the action
213   */
214  @java.lang.SuppressWarnings("all")
215  public void setPluralPast(final String pluralPast) {
216    this.pluralPast = pluralPast;
217  }
218
219  /**
220   * The plural present form of the action
221   */
222  @java.lang.SuppressWarnings("all")
223  public String getPluralPresent() {
224    return this.pluralPresent;
225  }
226
227  /**
228   * The plural present form of the action
229   */
230  @java.lang.SuppressWarnings("all")
231  public void setPluralPresent(final String pluralPresent) {
232    this.pluralPresent = pluralPresent;
233  }
234
235  /**
236   * The singular past form of the action
237   */
238  @java.lang.SuppressWarnings("all")
239  public String getSingularPast() {
240    return this.singularPast;
241  }
242
243  /**
244   * The singular past form of the action
245   */
246  @java.lang.SuppressWarnings("all")
247  public void setSingularPast(final String singularPast) {
248    this.singularPast = singularPast;
249  }
250
251  /**
252   * The singular present form of the action
253   */
254  @java.lang.SuppressWarnings("all")
255  public String getSingularPresent() {
256    return this.singularPresent;
257  }
258
259  /**
260   * The singular present form of the action
261   */
262  @java.lang.SuppressWarnings("all")
263  public void setSingularPresent(final String singularPresent) {
264    this.singularPresent = singularPresent;
265  }
266
267  /**
268   * Bitmap of tenses that are disabled (the least significant bit relates to past tense, the second least significant
269   * relates to present tense
270   */
271  @java.lang.SuppressWarnings("all")
272  public Integer getTensesDisabled() {
273    return this.tensesDisabled;
274  }
275
276  /**
277   * Bitmap of tenses that are disabled (the least significant bit relates to past tense, the second least significant
278   * relates to present tense
279   */
280  @java.lang.SuppressWarnings("all")
281  public void setTensesDisabled(final Integer tensesDisabled) {
282    this.tensesDisabled = tensesDisabled;
283  }
284}