001// Generated by delombok at Sun Jul 07 22:01:31 CEST 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 static java.util.Collections.unmodifiableList;
026import java.util.ArrayList;
027import java.util.Date;
028import java.util.List;
029import com.restfb.Facebook;
030import com.restfb.JsonMapper;
031import com.restfb.JsonMapper.JsonMappingCompleted;
032import com.restfb.annotation.GraphAPI;
033import com.restfb.exception.FacebookJsonMappingException;
034import com.restfb.json.Json;
035import com.restfb.json.JsonObject;
036import com.restfb.json.JsonValue;
037
038/**
039 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/post/">Post Graph API type</a>.
040 *
041 * @author <a href="http://restfb.com">Mark Allen</a>
042 * @since 1.5
043 */
044@SuppressWarnings("deprecation")
045public class Post extends FacebookType {
046  /**
047   * An object containing the ID and name of the user who posted the message.
048   */
049  @Facebook
050  private CategorizedFacebookType from;
051  /**
052   * Objectives under which this post can be advertised
053   */
054  @Facebook("allowed_advertising_objects")
055  private String allowedAdvertisingObjects;
056  /**
057   * Objectives under which this post can be advertised
058   */
059  @Facebook("allowed_advertising_objectives")
060  private List<String> allowedAdvertisingObjectives = new ArrayList<>();
061  /**
062   * The call to action type used in any Page posts for mobile app engagement ads
063   */
064  @Facebook("call_to_action")
065  private PostCallToAction callToAction;
066  @Facebook("child_attachments")
067  private List<Post> childAttachments = new ArrayList<>();
068  /**
069   * If comments are being mirrored to an external site, this function returns the domain of that external site.
070   */
071  @Facebook("comments_mirroring_domain")
072  private String commentsMirroringDomain;
073  /**
074   * The message.
075   */
076  @Facebook
077  private String message;
078  /**
079   * ID of the parent post
080   */
081  @Facebook("parent_id")
082  private String parentId;
083  /**
084   * The permanent static URL to the post on www.facebook.com.
085   * <p>
086   * Example: https://www.facebook.com/FacebookforDevelopers/posts/10153449196353553
087   * </p>
088   */
089  @Facebook("permalink_url")
090  private String permalinkUrl;
091  /**
092   * If available, a link to the picture included with this post.
093   */
094  @Facebook
095  private String picture;
096  /**
097   * The link attached to this post.
098   *
099   * Hint for Graph API 3.3: Use <code>attachment/url_unshimmed</code> instead
100   */
101  @Facebook
102  @GraphAPI(until = "3.2")
103  private String link;
104  /**
105   * The name of the link.
106   *
107   * Hint for Graph API 3.3: Use <code>attachment/title</code> instead
108   */
109  @Facebook
110  @GraphAPI(until = "3.2")
111  private String name;
112  /**
113   * The caption of the link (appears beneath the link name).
114   *
115   * Hint for Graph API 3.3: Use <code>attachment/title</code> instead
116   */
117  @Facebook
118  @GraphAPI(until = "3.2")
119  private String caption;
120  /**
121   * A description of the link (appears beneath the link caption).
122   *
123   * Hint for Graph API 3.3: Use <code>attachment/description</code> instead
124   */
125  @Facebook
126  @GraphAPI(until = "3.2")
127  private String description;
128  /**
129   * If available, the source link attached to this post (for example, a flash or video file).
130   *
131   * Hint for Graph API 3.3: Use <code>attachment/media/source</code> instead
132   */
133  @Facebook
134  @GraphAPI(until = "3.2")
135  private String source;
136  /**
137   * The application used to create this post.
138   */
139  @Facebook
140  private NamedFacebookType application;
141  /**
142   * A link to an icon representing the type of this post.
143   */
144  @Facebook
145  private String icon;
146  /**
147   * The privacy settings for this post.
148   */
149  @Facebook
150  private Privacy privacy;
151  /**
152   * Status of the promotion, if the post was promoted.
153   */
154  @Facebook("promotion_status")
155  private String promotionStatus;
156  /**
157   * Object that controls news feed targeting for this post.
158   *
159   * To force Facebook to fill the <code>feed_targeting</code> field you have to fetch the post with the
160   * <code>fields=feed_targeting</code> parameter, otherwise the feedTargeting is <code>null</code>.
161   *
162   *
163   * @since 1.11.0
164   */
165  @Facebook("feed_targeting")
166  private FeedTargeting feedTargeting;
167  /**
168   * Whether the viewer can send a private reply to this post (Page viewers only)
169   */
170  @Facebook("can_reply_privately")
171  @GraphAPI(since = "2.5")
172  private Boolean canReplyPrivately;
173  /**
174   * The profile this was posted on if different from the author.
175   */
176  @Facebook
177  @GraphAPI(since = "2.5")
178  private NamedFacebookType target;
179  /**
180   * Ads targeting information of the post.
181   */
182  @Facebook
183  private Targeting targeting;
184  /**
185   * Timeline visibility information of the post.
186   */
187  @Facebook("timeline_visibility")
188  private String timelineVisibility;
189  /**
190   * Duplicate mapping for "likes" since FB can return it differently in different situations.
191   */
192  @Facebook("likes")
193  private Long likesCount = 0L;
194  /**
195   * Duplicate mapping for "likes" since FB can return it differently in different situations.
196   *
197   * -- GETTER -- The likes on this post.
198   * <p>
199   * Sometimes this can be {@code null} - check {@link #getLikesCount()} instead in that case.
200   */
201  @Facebook
202  private Likes likes;
203  /**
204   * The time the post was initially published.
205   */
206  @Facebook("created_time")
207  private Date createdTime;
208  /**
209   * The time of the last comment on this post.
210   */
211  @Facebook("updated_time")
212  private Date updatedTime;
213  /**
214   * The Facebook object id for an uploaded photo or video.
215   *
216   * Hint for Graph API 3.3: Use <code>attachment/target/id</code> instead
217   *
218   * @since 1.6.5
219   */
220  @Facebook("object_id")
221  @GraphAPI(until = "3.2")
222  private String objectId;
223  /**
224   * The {@code status_type} of post this is, for example {@code "approved_friend"}.
225   *
226   * @since 1.6.12
227   */
228  @Facebook("status_type")
229  private String statusType;
230  /**
231   * Text from stories not intentionally generated by users
232   *
233   * @since 1.6.16
234   */
235  @Facebook
236  private String story;
237  /**
238   * The comments for this post.
239   */
240  @Facebook
241  private Comments comments;
242  /**
243   * The reactions for this post.
244   */
245  @Facebook
246  private Reactions reactions;
247  /**
248   * The place where this post occurred.
249   *
250   * @since 1.6.8
251   */
252  @Facebook
253  private Place place;
254  @Facebook
255  private List<NamedFacebookType> to = new ArrayList<>();
256  @Facebook
257  private List<Action> actions = new ArrayList<>();
258  @Facebook
259  private List<Property> properties = new ArrayList<>();
260  @Facebook("with_tags")
261  private List<NamedFacebookType> withTags = new ArrayList<>();
262  @Facebook("message_tags")
263  private transient String rawMessageTags;
264  private List<MessageTag> messageTags = new ArrayList<>();
265  @Facebook("story_tags")
266  private transient String rawStoryTags;
267  private List<MessageTag> storyTags = new ArrayList<>();
268  @Facebook("sponsor_tags")
269  private List<NamedFacebookType> sponsorTags = new ArrayList<>();
270  /**
271   * UNIX timestamp of the scheduled publish time for the post.
272   */
273  @Facebook("scheduled_publish_time")
274  private Date scheduledPublishTime;
275  /**
276   * Number of times the post has been shared.
277   */
278  @Facebook
279  private Shares shares;
280  /**
281   * ID of admin who created the post.
282   *
283   * Applies to pages only
284   *
285   * @since 1.10.0
286   */
287  @Facebook("admin_creator")
288  private NamedFacebookType adminCreator;
289  /**
290   * Whether the post can be promoted on Instagram.
291   * <p>
292   * It returns the enum <code>eligible</code> if it can be promoted. Otherwise it returns an enum for why it cannot be
293   * promoted
294   * </p>
295   */
296  @Facebook("instagram_eligibility")
297  private String instagramEligibility;
298  /**
299   * Whether or not the post references an app.
300   */
301  @Facebook("is_app_share")
302  private Boolean isAppShare;
303  @Facebook("is_eligible_for_promotion")
304  private Boolean isEligibleForPromotion;
305  /**
306   * Whether the post has expiration time that has passed
307   */
308  @Facebook("is_expired")
309  private Boolean isExpired;
310  /**
311   * If this post is marked as hidden (applies to Pages only).
312   *
313   * @since 1.10.0
314   */
315  @Facebook("is_hidden")
316  private Boolean isHidden;
317  /**
318   * Whether this post can be promoted in Instagram.
319   */
320  @Facebook("is_instagram_eligible")
321  private Boolean isInstagramEligible;
322  /**
323   * Whether the post is currently popular.
324   *
325   * Based on whether the total actions as a percentage of reach exceeds a certain threshold
326   */
327  @Facebook("is_popular")
328  private Boolean isPopular;
329  /**
330   * Indicates whether a scheduled post was published. (applies to scheduled Page Post only, for users post and
331   * instantly published posts this value is always <code>true</code>)
332   *
333   * @since 1.10.0
334   */
335  @Facebook("is_published")
336  private Boolean isPublished;
337  /**
338   * Whether the post is a spherical video post.
339   */
340  @Facebook("is_spherical")
341  private Boolean isSpherical;
342  /**
343   * Whether display the end card for a multi-link share post
344   */
345  @Facebook("multi_share_end_card")
346  private Boolean multiShareEndCard;
347  /**
348   * Whether automatically select the order of the links in multi-link share post when used in an ad
349   */
350  @Facebook("multi_share_optimized")
351  private Boolean multiShareOptimized;
352  /**
353   * Attachments added to a post.
354   *
355   * To force Facebook to fill the <code>attachments</code> field you have to fetch the post with the
356   * <code>fields=attachments</code> parameter, otherwise the attachments are <code>null</code>.
357   */
358  @Facebook
359  private Attachments attachments;
360  /**
361   * Full picture URL.
362   * 
363   * you get the url to this posts full picture.
364   * 
365   * To force Facebook to fill the <code>full_picture</code> field you have to fetch the post with the
366   * <code>fields=full_picture</code> parameter, otherwise the full_picture is <code>null</code>.
367   */
368  @Facebook("full_picture")
369  private String fullPicture;
370  /**
371   * ID of the user or Page the post was shared from
372   */
373  @Facebook
374  private String via;
375
376  /**
377   * A string indicating the object type of this post.
378   *
379   * Hint for Graph API 3.3: <code>attachment/media_type</code> If there is no <code>attachment</code> or <code>media_type=link</code>, the
380   * value is the same as <code>type=status</code>.
381   *
382   * @return A string indicating the object type of this post.
383   */
384  @Override
385  @GraphAPI(until = "3.2")
386  public String getType() {
387    return super.getType();
388  }
389
390  private static final long serialVersionUID = 3L;
391
392  /**
393   * Post-JSON-mapping operation that populates the {@code messageTags} field "by hand".
394   * <p>
395   * This is a temporary hack until we have formal public support for it/improved {@code JsonMapper} capabilities so it
396   * can handle arbitrary Map types.
397   *
398   * @param jsonMapper
399   *          The {@code JsonMapper} that was used to map to this type.
400   * @since 1.6.11
401   */
402  @JsonMappingCompleted
403  protected void jsonMappingCompleted(JsonMapper jsonMapper) {
404    if (rawMessageTags != null) {
405      messageTags = createTags(rawMessageTags, jsonMapper);
406    }
407    if (rawStoryTags != null) {
408      storyTags = createTags(rawStoryTags, jsonMapper);
409    }
410  }
411
412  private List<MessageTag> createTags(String rawTags, JsonMapper jsonMapper) {
413    try {
414      return jsonMapper.toJavaList(rawTags, MessageTag.class);
415    } catch (FacebookJsonMappingException je) {
416    }
417    // message tags not in Graph API 2.5 format, ignore this exception and try another way
418    try {
419      List<MessageTag> resultList = new ArrayList<>();
420      JsonObject rawMessageTagsObject = jsonMapper.toJavaObject(rawTags, JsonObject.class);
421      for (String key : rawMessageTagsObject.names()) {
422        String tagArrayString = rawMessageTagsObject.get(key).toString();
423        resultList.addAll(jsonMapper.toJavaList(tagArrayString, MessageTag.class));
424      }
425      return resultList;
426    } catch (FacebookJsonMappingException je) {
427      return new ArrayList<>();
428    }
429  }
430
431
432  /**
433   * Represents the undocumented {@code Property} type.
434   *
435   * @author <a href="http://restfb.com">Mark Allen</a>
436   * @since 1.6.4
437   */
438  public static class Property extends AbstractFacebookType {
439    /**
440     * The name of the property.
441     */
442    @Facebook
443    private String name;
444    /**
445     * The text of the property.
446     */
447    @Facebook
448    private String text;
449    /**
450     * The URL of the property.
451     */
452    @Facebook
453    private String href;
454    private static final long serialVersionUID = 1L;
455
456    /**
457     * The name of the property.
458     *
459     * @return The name of the property.
460     */
461    @java.lang.SuppressWarnings("all")
462    public String getName() {
463      return this.name;
464    }
465
466    /**
467     * The name of the property.
468     */
469    @java.lang.SuppressWarnings("all")
470    public void setName(final String name) {
471      this.name = name;
472    }
473
474    /**
475     * The text of the property.
476     *
477     * @return The text of the property.
478     */
479    @java.lang.SuppressWarnings("all")
480    public String getText() {
481      return this.text;
482    }
483
484    /**
485     * The text of the property.
486     */
487    @java.lang.SuppressWarnings("all")
488    public void setText(final String text) {
489      this.text = text;
490    }
491
492    /**
493     * The URL of the property.
494     *
495     * @return The URL of the property.
496     */
497    @java.lang.SuppressWarnings("all")
498    public String getHref() {
499      return this.href;
500    }
501
502    /**
503     * The URL of the property.
504     */
505    @java.lang.SuppressWarnings("all")
506    public void setHref(final String href) {
507      this.href = href;
508    }
509  }
510
511
512  /**
513   * Represents the <a href="http://developers.facebook.com/docs/reference/api/post">Action Graph API type</a>.
514   *
515   * @author <a href="http://restfb.com">Mark Allen</a>
516   * @since 1.5
517   */
518  public static class Action extends AbstractFacebookType {
519    /**
520     * Gets the name of the action.
521     */
522    @Facebook
523    private String name;
524    /**
525     * The link for the action.
526     */
527    @Facebook
528    private String link;
529    private static final long serialVersionUID = 1L;
530
531    /**
532     * Gets the name of the action.
533     *
534     * @return Gets the name of the action.
535     */
536    @java.lang.SuppressWarnings("all")
537    public String getName() {
538      return this.name;
539    }
540
541    /**
542     * Gets the name of the action.
543     */
544    @java.lang.SuppressWarnings("all")
545    public void setName(final String name) {
546      this.name = name;
547    }
548
549    /**
550     * The link for the action.
551     *
552     * @return The link for the action.
553     */
554    @java.lang.SuppressWarnings("all")
555    public String getLink() {
556      return this.link;
557    }
558
559    /**
560     * The link for the action.
561     */
562    @java.lang.SuppressWarnings("all")
563    public void setLink(final String link) {
564      this.link = link;
565    }
566  }
567
568
569  public static class KeyedType extends NamedFacebookType {
570    private static final long serialVersionUID = 1L;
571    @Facebook
572    private String key;
573
574    @JsonMappingCompleted
575    private void replaceId() {
576      if (getId() == null && key != null) {
577        setId(key);
578      }
579      if (key == null && getId() != null) {
580        setKey(getId());
581      }
582    }
583
584    @java.lang.SuppressWarnings("all")
585    public String getKey() {
586      return this.key;
587    }
588
589    @java.lang.SuppressWarnings("all")
590    public void setKey(final String key) {
591      this.key = key;
592    }
593  }
594
595
596  public static class Targeting extends AbstractFacebookType {
597    private static final long serialVersionUID = 1L;
598    @Facebook("geo_locations")
599    @GraphAPI(since = "2.8")
600    FeedTargeting geoLocations;
601    @Facebook
602    protected List<KeyedType> cities = new ArrayList<>();
603    @Facebook
604    protected List<String> countries = new ArrayList<>();
605    @Facebook
606    protected List<KeyedType> regions = new ArrayList<>();
607    @Facebook("regions")
608    private transient String rawRegionsString;
609
610    @JsonMappingCompleted
611    private void convertList(JsonMapper mapper) {
612      if (rawRegionsString != null) {
613        JsonValue jsonValue = Json.parse(rawRegionsString);
614        if (jsonValue.isObject()) {
615          JsonObject rawRegions = jsonValue.asObject();
616          for (String key : rawRegions.names()) {
617            String region = rawRegions.get(key).toString();
618            regions.add(mapper.toJavaObject(region, KeyedType.class));
619          }
620        }
621      }
622    }
623
624    @Facebook
625    protected List<Integer> locales = new ArrayList<>();
626
627    public boolean addCity(KeyedType city) {
628      if (geoLocations != null) {
629        return geoLocations.addCity(city);
630      }
631      return cities.add(city);
632    }
633
634    public boolean addCountry(String country) {
635      if (geoLocations != null) {
636        return geoLocations.addCountry(country);
637      }
638      return countries.add(country);
639    }
640
641    public boolean addLocale(Integer locale) {
642      if (geoLocations != null) {
643        return geoLocations.addLocale(locale);
644      }
645      return locales.add(locale);
646    }
647
648    public boolean addRegion(KeyedType region) {
649      if (geoLocations != null) {
650        return geoLocations.addRegion(region);
651      }
652      return regions.add(region);
653    }
654
655    /**
656     * Values of targeting cities.
657     *
658     * Use type of adcity to find Targeting Options and use the returned key to specify.
659     *
660     * @return list of cities
661     */
662    public List<KeyedType> getCities() {
663      if (geoLocations != null) {
664        return geoLocations.getCities();
665      }
666      return unmodifiableList(cities);
667    }
668
669    /**
670     * Values of targeting countries.
671     *
672     * You can specify up to 25 countries. Use ISO 3166 format codes.
673     *
674     * @return list of targeting countries.
675     */
676    public List<String> getCountries() {
677      if (geoLocations != null) {
678        return geoLocations.getCountries();
679      }
680      return unmodifiableList(countries);
681    }
682
683    /**
684     * Targeted locales.
685     *
686     * Use type of adlocale to find Targeting Options and use the returned key to specify.
687     *
688     * @return list of locales
689     */
690    public List<Integer> getLocales() {
691      if (geoLocations != null && !geoLocations.getLocales().isEmpty()) {
692        return geoLocations.getLocales();
693      }
694      return unmodifiableList(locales);
695    }
696
697    /**
698     * Values of targeting regions.
699     *
700     * Use type of adregion to find Targeting Options and use the returned key to specify.
701     *
702     * @return list of regions
703     */
704    public List<KeyedType> getRegions() {
705      if (geoLocations != null) {
706        return geoLocations.getRegions();
707      }
708      return unmodifiableList(regions);
709    }
710
711    public boolean removeCity(NamedFacebookType city) {
712      if (geoLocations != null) {
713        return geoLocations.removeCity(city);
714      }
715      return cities.remove(city);
716    }
717
718    public boolean removeCountry(String country) {
719      if (geoLocations != null) {
720        return geoLocations.removeCountry(country);
721      }
722      return countries.remove(country);
723    }
724
725    public boolean removeLocale(Integer locale) {
726      if (geoLocations != null) {
727        return geoLocations.removeLocale(locale);
728      }
729      return locales.remove(locale);
730    }
731
732    public boolean removeRegion(NamedFacebookType region) {
733      if (geoLocations != null) {
734        return geoLocations.removeRegion(region);
735      }
736      return regions.remove(region);
737    }
738
739    @GraphAPI(since = "2.8")
740    @java.lang.SuppressWarnings("all")
741    public FeedTargeting getGeoLocations() {
742      return this.geoLocations;
743    }
744
745    @java.lang.SuppressWarnings("all")
746    public void setGeoLocations(final FeedTargeting geoLocations) {
747      this.geoLocations = geoLocations;
748    }
749  }
750
751
752  /**
753   * Object that controls news feed targeting for this post.
754   *
755   * Anyone in these groups will be more likely to see this post, others will be less likely, but may still see it
756   * anyway. Any of the targeting fields shown here can be used, none are required (applies to Pages only).
757   *
758   * Represents the <a href="http://developers.facebook.com/docs/reference/api/post#fields">Feed Targeting API type</a>.
759   */
760  public static class FeedTargeting extends Targeting {
761    private static final long serialVersionUID = 1L;
762    /**
763     * Maximum age.
764     */
765    @Facebook("age_max")
766    private Integer ageMax;
767    /**
768     * Must be 13 or higher. Default is 0
769     */
770    @Facebook("age_min")
771    private Integer ageMin;
772    @Facebook("relevant_until_ts")
773    private Date relevantUntilTs;
774    @Facebook("college_majors")
775    private List<String> collegeMajors = new ArrayList<>();
776    @Facebook("college_networks")
777    private List<FacebookType> collegeNetworks = new ArrayList<>();
778    @Facebook("college_years")
779    private List<Integer> collegeYears = new ArrayList<>();
780    @Facebook("education_statuses")
781    private List<Integer> educationStatuses = new ArrayList<>();
782    @Facebook("fan_of")
783    private List<String> fanOf = new ArrayList<>();
784    @Facebook
785    private List<Integer> genders = new ArrayList<>();
786    @Facebook("interested_in")
787    private List<Integer> interestedIn = new ArrayList<>();
788    @Facebook
789    private List<String> interests = new ArrayList<>();
790    @Facebook("relationship_statuses")
791    private List<Integer> relationshipStatuses = new ArrayList<>();
792    @Facebook("work_networks")
793    private List<NamedFacebookType> workNetworks = new ArrayList<>();
794
795    /**
796     * Target people who majored in these college subjects.
797     *
798     * Limited to 200 college major values. Use type of adcollegemajor to find Targeting Options and use the returned
799     * name to specify.
800     *
801     * @return list of college majors
802     */
803    public List<String> getCollegeMajors() {
804      return unmodifiableList(collegeMajors);
805    }
806
807    public boolean addCollegeMajor(String collegeMajor) {
808      return collegeMajors.add(collegeMajor);
809    }
810
811    public boolean removeCollegeMajor(String collegeMajor) {
812      return collegeMajors.remove(collegeMajor);
813    }
814
815    /**
816     * Colleges, for college graduates.
817     *
818     * Limit is 200 values.
819     *
820     * @return list of colleges
821     */
822    public List<FacebookType> getCollegeNetworks() {
823      return unmodifiableList(collegeNetworks);
824    }
825
826    public boolean addCollegeNetwork(FacebookType collegeNetwork) {
827      return collegeNetworks.add(collegeNetwork);
828    }
829
830    public boolean removeCollegeNetwork(FacebookType collegeNetwork) {
831      return collegeNetworks.remove(collegeNetwork);
832    }
833
834    /**
835     * Array of integers for graduation year from college.
836     *
837     * @return graduation year list
838     */
839    public List<Integer> getCollegeYears() {
840      return unmodifiableList(collegeYears);
841    }
842
843    public boolean addCollegeYear(Integer collegeYear) {
844      return collegeYears.add(collegeYear);
845    }
846
847    public boolean removeCollegeYear(Integer collegeYear) {
848      return collegeYears.remove(collegeYear);
849    }
850
851    /**
852     * Array of integers for targeting based on education level.
853     *
854     * Use 1 for high school, 2 for undergraduate, and 3 for alum (or localized equivalents).
855     *
856     * @return list of education levels
857     */
858    public List<Integer> getEducationStatuses() {
859      return unmodifiableList(educationStatuses);
860    }
861
862    public boolean addEducationStatus(Integer educationStatus) {
863      return educationStatuses.add(educationStatus);
864    }
865
866    public boolean removeEducationStatus(Integer educationStatus) {
867      return educationStatuses.remove(educationStatus);
868    }
869
870    /**
871     * List of object ids.
872     *
873     * the user should be fan of these objects (interests).
874     *
875     * @return list of object ids
876     */
877    public List<String> getFanOf() {
878      return unmodifiableList(fanOf);
879    }
880
881    public boolean addFanOf(String interestId) {
882      return fanOf.add(interestId);
883    }
884
885    public boolean removeFanOf(String interestId) {
886      return fanOf.remove(interestId);
887    }
888
889    /**
890     * Target specific genders.
891     *
892     * 1 targets all male viewers and 2 females. Default is to target both.
893     *
894     * @return list of genders
895     */
896    public List<Integer> getGenders() {
897      return unmodifiableList(genders);
898    }
899
900    public boolean addGender(Integer gender) {
901      return genders.add(gender);
902    }
903
904    public boolean removeGender(Integer gender) {
905      return genders.remove(gender);
906    }
907
908    /**
909     * Indicates targeting based on the 'interested in' field of the user profile.
910     *
911     * You can specify an integer of 1 to indicate male, 2 indicates female. Default is all types.
912     *
913     * Please note 'interested in' targeting is not available in France due to local laws.
914     *
915     * @return list of 'interested in' types
916     */
917    public List<Integer> getInterestedIn() {
918      return unmodifiableList(interestedIn);
919    }
920
921    public boolean addInterestedIn(Integer interest) {
922      return interestedIn.add(interest);
923    }
924
925    public boolean removeInterestedIn(Integer interest) {
926      return interestedIn.remove(interest);
927    }
928
929    /**
930     * Indicates targeting based on the 'interests' field of the user profile.
931     *
932     * @return list of 'interests' types
933     */
934    public List<String> getInterests() {
935      return unmodifiableList(interests);
936    }
937
938    public boolean addInterests(String interest) {
939      return interests.add(interest);
940    }
941
942    public boolean removeInterests(String interest) {
943      return interests.remove(interest);
944    }
945
946    /**
947     * Array of integers for targeting based on relationship status.
948     *
949     * Use 1 for single, 2 for 'in a relationship', 3 for married, and 4 for engaged. Default is all types.
950     *
951     * @return list of relationship statuses
952     */
953    public List<Integer> getRelationshipStatuses() {
954      return unmodifiableList(relationshipStatuses);
955    }
956
957    public boolean addRelationshipStatus(Integer relationshipStatus) {
958      return relationshipStatuses.add(relationshipStatus);
959    }
960
961    public boolean removeRelationshipStatus(Integer relationshipStatus) {
962      return relationshipStatuses.remove(relationshipStatus);
963    }
964
965    /**
966     * Company, organization, or other workplace.
967     *
968     * <b>Name</b>: Name of targeted workplace. Use type of adworkplace to find Targeting Options and use the returned
969     * name to specify this.
970     *
971     * <b>Id</b>: Unique ID of targeted workplace. Use type of adworkplace to find Targeting Options and use the
972     * returned key to specify this (must match paired name value).
973     *
974     * @return list of work networks
975     */
976    public List<NamedFacebookType> getWorkNetworks() {
977      return unmodifiableList(workNetworks);
978    }
979
980    public boolean addWorkNetwork(NamedFacebookType workNetwork) {
981      return workNetworks.add(workNetwork);
982    }
983
984    public boolean removeWorkNetwork(NamedFacebookType workNetwork) {
985      return workNetworks.remove(workNetwork);
986    }
987
988    /**
989     * Maximum age.
990     */
991    @java.lang.SuppressWarnings("all")
992    public Integer getAgeMax() {
993      return this.ageMax;
994    }
995
996    /**
997     * Maximum age.
998     */
999    @java.lang.SuppressWarnings("all")
1000    public void setAgeMax(final Integer ageMax) {
1001      this.ageMax = ageMax;
1002    }
1003
1004    /**
1005     * Must be 13 or higher. Default is 0
1006     */
1007    @java.lang.SuppressWarnings("all")
1008    public Integer getAgeMin() {
1009      return this.ageMin;
1010    }
1011
1012    /**
1013     * Must be 13 or higher. Default is 0
1014     */
1015    @java.lang.SuppressWarnings("all")
1016    public void setAgeMin(final Integer ageMin) {
1017      this.ageMin = ageMin;
1018    }
1019
1020    @java.lang.SuppressWarnings("all")
1021    public Date getRelevantUntilTs() {
1022      return this.relevantUntilTs;
1023    }
1024
1025    @java.lang.SuppressWarnings("all")
1026    public void setRelevantUntilTs(final Date relevantUntilTs) {
1027      this.relevantUntilTs = relevantUntilTs;
1028    }
1029  }
1030
1031
1032  /**
1033   * Represents the Shares included the <a href="http://developers.facebook.com/docs/reference/api/post">Post</a>
1034   * response. Presently only supports count.
1035   *
1036   * @since 1.6.11
1037   */
1038  public static class Shares extends AbstractFacebookType {
1039    /**
1040     * The number of shares.
1041     */
1042    @Facebook
1043    private Long count = 0L;
1044    private static final long serialVersionUID = 1L;
1045
1046    /**
1047     * The number of shares.
1048     *
1049     * @return The number of shares.
1050     */
1051    @java.lang.SuppressWarnings("all")
1052    public Long getCount() {
1053      return this.count;
1054    }
1055
1056    /**
1057     * The number of shares.
1058     */
1059    @java.lang.SuppressWarnings("all")
1060    public void setCount(final Long count) {
1061      this.count = count;
1062    }
1063  }
1064
1065
1066  /**
1067   * Represents the attachments included in<a href="http://developers.facebook.com/docs/reference/api/post">Graph API
1068   * Post type</a>.
1069   *
1070   * @author <a href="https://github.com/kevinleturc/">Kevin Leturc</a>
1071   * @since 1.12.0
1072   */
1073  public static class Attachments extends AbstractFacebookType {
1074    /**
1075     * All media attachments associated with this post.
1076     *
1077     * @return All media attachments associated with this post.
1078     */
1079    @Facebook
1080    private List<StoryAttachment> data = new ArrayList<>();
1081    private static final long serialVersionUID = 1L;
1082
1083    /**
1084     * The attachments.
1085     *
1086     * @return The attachments.
1087     */
1088    public List<StoryAttachment> getData() {
1089      return unmodifiableList(data);
1090    }
1091
1092    public boolean addData(StoryAttachment attachment) {
1093      return data.add(attachment);
1094    }
1095
1096    public boolean removeData(StoryAttachment attachment) {
1097      return data.remove(attachment);
1098    }
1099  }
1100
1101  /**
1102   * The number of likes on this post.
1103   *
1104   * @return The number of likes on this post.
1105   */
1106  public Long getLikesCount() {
1107    if (getLikes() != null) {
1108      return getLikes().getTotalCount();
1109    }
1110    return likesCount;
1111  }
1112
1113  /**
1114   * The number of reactions on this post.
1115   *
1116   * @return The number of reactions on this post.
1117   */
1118  public Long getReactionsCount() {
1119    if (getReactions() != null) {
1120      return getReactions().getTotalCount();
1121    }
1122    return 0L;
1123  }
1124
1125  /**
1126   * The number of shares of this post.
1127   *
1128   * @return The number of shares of this post.
1129   */
1130  public Long getSharesCount() {
1131    if (shares != null) {
1132      return shares.getCount();
1133    }
1134    return 0L;
1135  }
1136
1137  /**
1138   * The number of comments of this post.
1139   *
1140   * @return The number of comments of this post.
1141   */
1142  public Long getCommentsCount() {
1143    if (comments != null) {
1144      return comments.getTotalCount();
1145    }
1146    return 0L;
1147  }
1148
1149  /**
1150   * A list of the profiles mentioned or targeted in this post.
1151   *
1152   * @return A list of the profiles mentioned or targeted in this post.
1153   */
1154  public List<NamedFacebookType> getTo() {
1155    return unmodifiableList(to);
1156  }
1157
1158  public boolean addTo(NamedFacebookType profile) {
1159    return to.add(profile);
1160  }
1161
1162  public boolean removeTo(NamedFacebookType profile) {
1163    return to.remove(profile);
1164  }
1165
1166  /**
1167   * A list of available action names and links (including commenting, liking, and an optional app-specified action).
1168   *
1169   * @return A list of available action names and links (including commenting, liking, and an optional app-specified
1170   *         action).
1171   */
1172  public List<Action> getActions() {
1173    return unmodifiableList(actions);
1174  }
1175
1176  public boolean addAction(Action action) {
1177    return actions.add(action);
1178  }
1179
1180  public boolean removeAction(Action action) {
1181    return actions.remove(action);
1182  }
1183
1184  /**
1185   * A list of properties for this post.
1186   * <p>
1187   * This field is undocumented.
1188   *
1189   * @return A list of properties for this post.
1190   */
1191  public List<Property> getProperties() {
1192    return unmodifiableList(properties);
1193  }
1194
1195  public boolean addProperty(Property property) {
1196    return properties.add(property);
1197  }
1198
1199  public boolean removeProperty(Property property) {
1200    return properties.remove(property);
1201  }
1202
1203  /**
1204   * Objects (Users, Pages, etc) tagged as being with the publisher of the post ("Who are you with?" on Facebook).
1205   *
1206   * @return Objects (Users, Pages, etc) tagged as being with the publisher of the post ("Who are you with?" on
1207   *         Facebook).
1208   * @since 1.6.10
1209   */
1210  @GraphAPI(until = "3.2")
1211  @Deprecated
1212  public List<NamedFacebookType> getWithTags() {
1213    return unmodifiableList(withTags);
1214  }
1215
1216  @GraphAPI(until = "3.2")
1217  @Deprecated
1218  public boolean addWithTag(NamedFacebookType withTag) {
1219    return withTags.add(withTag);
1220  }
1221
1222  @GraphAPI(until = "3.2")
1223  @Deprecated
1224  public boolean removeWithTag(NamedFacebookType withTag) {
1225    return withTags.remove(withTag);
1226  }
1227
1228  /**
1229   * Objects tagged in the message (Users, Pages, etc).
1230   *
1231   * @return Objects tagged in the message (Users, Pages, etc).
1232   * @since 1.6.10
1233   */
1234  public List<MessageTag> getMessageTags() {
1235    return unmodifiableList(messageTags);
1236  }
1237
1238  public void addMessageTag(MessageTag messageTag) {
1239    messageTags.add(messageTag);
1240  }
1241
1242  public void removeMessageTag(MessageTag messageTag) {
1243    messageTags.remove(messageTag);
1244  }
1245
1246  /**
1247   * Objects tagged in the story (Users, Pages, etc).
1248   *
1249   * @return Objects tagged in the story (Users, Pages, etc).
1250   */
1251  public List<MessageTag> getStoryTags() {
1252    return unmodifiableList(storyTags);
1253  }
1254
1255  public void addStoryTag(MessageTag messageTag) {
1256    storyTags.add(messageTag);
1257  }
1258
1259  public void removeStoryTag(MessageTag messageTag) {
1260    storyTags.remove(messageTag);
1261  }
1262
1263  /**
1264   * Sub-shares of a multi-link share post
1265   *
1266   * @return Sub-shares of a multi-link share post
1267   */
1268  public List<Post> getChildAttachments() {
1269    return unmodifiableList(childAttachments);
1270  }
1271
1272  public void addChildAttachment(Post childAttachment) {
1273    childAttachments.add(childAttachment);
1274  }
1275
1276  public void removeChildAttachment(Post childAttachment) {
1277    childAttachments.remove(childAttachment);
1278  }
1279
1280  /**
1281   * A sponsor tag points to a Facebook Page.
1282   *
1283   * (Page owners can allow their business partners to directly boost their posts.)
1284   */
1285  public List<NamedFacebookType> getSponsorTags() {
1286    return unmodifiableList(sponsorTags);
1287  }
1288
1289  public boolean addSponsorTag(NamedFacebookType sponsorTag) {
1290    return sponsorTags.add(sponsorTag);
1291  }
1292
1293  public boolean removeSponsorTag(NamedFacebookType sponsorTag) {
1294    return sponsorTags.remove(sponsorTag);
1295  }
1296
1297  /**
1298   * An object containing the ID and name of the user who posted the message.
1299   *
1300   * @return An object containing the ID and name of the user who posted the message.
1301   */
1302  @java.lang.SuppressWarnings("all")
1303  public CategorizedFacebookType getFrom() {
1304    return this.from;
1305  }
1306
1307  /**
1308   * An object containing the ID and name of the user who posted the message.
1309   */
1310  @java.lang.SuppressWarnings("all")
1311  public void setFrom(final CategorizedFacebookType from) {
1312    this.from = from;
1313  }
1314
1315  /**
1316   * Objectives under which this post can be advertised
1317   *
1318   * @return Objectives under which this post can be advertised
1319   */
1320  @java.lang.SuppressWarnings("all")
1321  public String getAllowedAdvertisingObjects() {
1322    return this.allowedAdvertisingObjects;
1323  }
1324
1325  /**
1326   * Objectives under which this post can be advertised
1327   */
1328  @java.lang.SuppressWarnings("all")
1329  public void setAllowedAdvertisingObjects(final String allowedAdvertisingObjects) {
1330    this.allowedAdvertisingObjects = allowedAdvertisingObjects;
1331  }
1332
1333  /**
1334   * Objectives under which this post can be advertised
1335   *
1336   * @return Objectives under which this post can be advertised
1337   */
1338  @java.lang.SuppressWarnings("all")
1339  public List<String> getAllowedAdvertisingObjectives() {
1340    return this.allowedAdvertisingObjectives;
1341  }
1342
1343  /**
1344   * Objectives under which this post can be advertised
1345   */
1346  @java.lang.SuppressWarnings("all")
1347  public void setAllowedAdvertisingObjectives(final List<String> allowedAdvertisingObjectives) {
1348    this.allowedAdvertisingObjectives = allowedAdvertisingObjectives;
1349  }
1350
1351  /**
1352   * The call to action type used in any Page posts for mobile app engagement ads
1353   */
1354  @java.lang.SuppressWarnings("all")
1355  public PostCallToAction getCallToAction() {
1356    return this.callToAction;
1357  }
1358
1359  /**
1360   * The call to action type used in any Page posts for mobile app engagement ads
1361   */
1362  @java.lang.SuppressWarnings("all")
1363  public void setCallToAction(final PostCallToAction callToAction) {
1364    this.callToAction = callToAction;
1365  }
1366
1367  /**
1368   * If comments are being mirrored to an external site, this function returns the domain of that external site.
1369   *
1370   * @return If comments are being mirrored to an external site, this function returns the domain of that external site.
1371   */
1372  @java.lang.SuppressWarnings("all")
1373  public String getCommentsMirroringDomain() {
1374    return this.commentsMirroringDomain;
1375  }
1376
1377  /**
1378   * If comments are being mirrored to an external site, this function returns the domain of that external site.
1379   */
1380  @java.lang.SuppressWarnings("all")
1381  public void setCommentsMirroringDomain(final String commentsMirroringDomain) {
1382    this.commentsMirroringDomain = commentsMirroringDomain;
1383  }
1384
1385  /**
1386   * The message.
1387   *
1388   * @return The message.
1389   */
1390  @java.lang.SuppressWarnings("all")
1391  public String getMessage() {
1392    return this.message;
1393  }
1394
1395  /**
1396   * The message.
1397   */
1398  @java.lang.SuppressWarnings("all")
1399  public void setMessage(final String message) {
1400    this.message = message;
1401  }
1402
1403  /**
1404   * ID of the parent post
1405   *
1406   * @return ID of the parent post
1407   */
1408  @java.lang.SuppressWarnings("all")
1409  public String getParentId() {
1410    return this.parentId;
1411  }
1412
1413  /**
1414   * ID of the parent post
1415   */
1416  @java.lang.SuppressWarnings("all")
1417  public void setParentId(final String parentId) {
1418    this.parentId = parentId;
1419  }
1420
1421  /**
1422   * The permanent static URL to the post on www.facebook.com.
1423   * <p>
1424   * Example: https://www.facebook.com/FacebookforDevelopers/posts/10153449196353553
1425   * </p>
1426   * 
1427   * @return The permanent static URL to the post on www.facebook.com.
1428   */
1429  @java.lang.SuppressWarnings("all")
1430  public String getPermalinkUrl() {
1431    return this.permalinkUrl;
1432  }
1433
1434  /**
1435   * The permanent static URL to the post on www.facebook.com.
1436   * <p>
1437   * Example: https://www.facebook.com/FacebookforDevelopers/posts/10153449196353553
1438   * </p>
1439   */
1440  @java.lang.SuppressWarnings("all")
1441  public void setPermalinkUrl(final String permalinkUrl) {
1442    this.permalinkUrl = permalinkUrl;
1443  }
1444
1445  /**
1446   * If available, a link to the picture included with this post.
1447   *
1448   * @return If available, a link to the picture included with this post.
1449   */
1450  @java.lang.SuppressWarnings("all")
1451  public String getPicture() {
1452    return this.picture;
1453  }
1454
1455  /**
1456   * If available, a link to the picture included with this post.
1457   */
1458  @java.lang.SuppressWarnings("all")
1459  public void setPicture(final String picture) {
1460    this.picture = picture;
1461  }
1462
1463  /**
1464   * The link attached to this post.
1465   *
1466   * Hint for Graph API 3.3: Use <code>attachment/url_unshimmed</code> instead
1467   *
1468   * @return The link attached to this post.
1469   */
1470  @GraphAPI(until = "3.2")
1471  @java.lang.SuppressWarnings("all")
1472  public String getLink() {
1473    return this.link;
1474  }
1475
1476  /**
1477   * The link attached to this post.
1478   *
1479   * Hint for Graph API 3.3: Use <code>attachment/url_unshimmed</code> instead
1480   */
1481  @java.lang.SuppressWarnings("all")
1482  public void setLink(final String link) {
1483    this.link = link;
1484  }
1485
1486  /**
1487   * The name of the link.
1488   *
1489   * Hint for Graph API 3.3: Use <code>attachment/title</code> instead
1490   *
1491   * @return The name of the link.
1492   */
1493  @GraphAPI(until = "3.2")
1494  @java.lang.SuppressWarnings("all")
1495  public String getName() {
1496    return this.name;
1497  }
1498
1499  /**
1500   * The name of the link.
1501   *
1502   * Hint for Graph API 3.3: Use <code>attachment/title</code> instead
1503   */
1504  @java.lang.SuppressWarnings("all")
1505  public void setName(final String name) {
1506    this.name = name;
1507  }
1508
1509  /**
1510   * The caption of the link (appears beneath the link name).
1511   *
1512   * Hint for Graph API 3.3: Use <code>attachment/title</code> instead
1513   *
1514   * @return The caption of the link (appears beneath the link name).
1515   */
1516  @GraphAPI(until = "3.2")
1517  @java.lang.SuppressWarnings("all")
1518  public String getCaption() {
1519    return this.caption;
1520  }
1521
1522  /**
1523   * The caption of the link (appears beneath the link name).
1524   *
1525   * Hint for Graph API 3.3: Use <code>attachment/title</code> instead
1526   */
1527  @java.lang.SuppressWarnings("all")
1528  public void setCaption(final String caption) {
1529    this.caption = caption;
1530  }
1531
1532  /**
1533   * A description of the link (appears beneath the link caption).
1534   *
1535   * Hint for Graph API 3.3: Use <code>attachment/description</code> instead
1536   *
1537   * @return A description of the link (appears beneath the link caption).
1538   */
1539  @GraphAPI(until = "3.2")
1540  @java.lang.SuppressWarnings("all")
1541  public String getDescription() {
1542    return this.description;
1543  }
1544
1545  /**
1546   * A description of the link (appears beneath the link caption).
1547   *
1548   * Hint for Graph API 3.3: Use <code>attachment/description</code> instead
1549   */
1550  @java.lang.SuppressWarnings("all")
1551  public void setDescription(final String description) {
1552    this.description = description;
1553  }
1554
1555  /**
1556   * If available, the source link attached to this post (for example, a flash or video file).
1557   *
1558   * Hint for Graph API 3.3: Use <code>attachment/media/source</code> instead
1559   *
1560   * @return If available, the source link attached to this post (for example, a flash or video file).
1561   */
1562  @GraphAPI(until = "3.2")
1563  @java.lang.SuppressWarnings("all")
1564  public String getSource() {
1565    return this.source;
1566  }
1567
1568  /**
1569   * If available, the source link attached to this post (for example, a flash or video file).
1570   *
1571   * Hint for Graph API 3.3: Use <code>attachment/media/source</code> instead
1572   */
1573  @java.lang.SuppressWarnings("all")
1574  public void setSource(final String source) {
1575    this.source = source;
1576  }
1577
1578  /**
1579   * The application used to create this post.
1580   *
1581   * @return The application used to create this post.
1582   */
1583  @java.lang.SuppressWarnings("all")
1584  public NamedFacebookType getApplication() {
1585    return this.application;
1586  }
1587
1588  /**
1589   * The application used to create this post.
1590   */
1591  @java.lang.SuppressWarnings("all")
1592  public void setApplication(final NamedFacebookType application) {
1593    this.application = application;
1594  }
1595
1596  /**
1597   * A link to an icon representing the type of this post.
1598   *
1599   * @return A link to an icon representing the type of this post.
1600   */
1601  @java.lang.SuppressWarnings("all")
1602  public String getIcon() {
1603    return this.icon;
1604  }
1605
1606  /**
1607   * A link to an icon representing the type of this post.
1608   */
1609  @java.lang.SuppressWarnings("all")
1610  public void setIcon(final String icon) {
1611    this.icon = icon;
1612  }
1613
1614  /**
1615   * The privacy settings for this post.
1616   *
1617   * @return The privacy settings for this post.
1618   */
1619  @java.lang.SuppressWarnings("all")
1620  public Privacy getPrivacy() {
1621    return this.privacy;
1622  }
1623
1624  /**
1625   * The privacy settings for this post.
1626   */
1627  @java.lang.SuppressWarnings("all")
1628  public void setPrivacy(final Privacy privacy) {
1629    this.privacy = privacy;
1630  }
1631
1632  /**
1633   * Status of the promotion, if the post was promoted.
1634   *
1635   * @return Status of the promotion, if the post was promoted
1636   */
1637  @java.lang.SuppressWarnings("all")
1638  public String getPromotionStatus() {
1639    return this.promotionStatus;
1640  }
1641
1642  /**
1643   * Status of the promotion, if the post was promoted.
1644   */
1645  @java.lang.SuppressWarnings("all")
1646  public void setPromotionStatus(final String promotionStatus) {
1647    this.promotionStatus = promotionStatus;
1648  }
1649
1650  /**
1651   * Object that controls news feed targeting for this post.
1652   *
1653   * To force Facebook to fill the <code>feed_targeting</code> field you have to fetch the post with the
1654   * <code>fields=feed_targeting</code> parameter, otherwise the feedTargeting is <code>null</code>.
1655   *
1656   *
1657   * @since 1.11.0
1658   */
1659  @java.lang.SuppressWarnings("all")
1660  public FeedTargeting getFeedTargeting() {
1661    return this.feedTargeting;
1662  }
1663
1664  /**
1665   * Object that controls news feed targeting for this post.
1666   *
1667   * To force Facebook to fill the <code>feed_targeting</code> field you have to fetch the post with the
1668   * <code>fields=feed_targeting</code> parameter, otherwise the feedTargeting is <code>null</code>.
1669   *
1670   *
1671   * @since 1.11.0
1672   */
1673  @java.lang.SuppressWarnings("all")
1674  public void setFeedTargeting(final FeedTargeting feedTargeting) {
1675    this.feedTargeting = feedTargeting;
1676  }
1677
1678  /**
1679   * Whether the viewer can send a private reply to this post (Page viewers only)
1680   *
1681   * @return Whether the viewer can send a private reply to this post
1682   */
1683  @GraphAPI(since = "2.5")
1684  @java.lang.SuppressWarnings("all")
1685  public Boolean getCanReplyPrivately() {
1686    return this.canReplyPrivately;
1687  }
1688
1689  /**
1690   * Whether the viewer can send a private reply to this post (Page viewers only)
1691   */
1692  @java.lang.SuppressWarnings("all")
1693  public void setCanReplyPrivately(final Boolean canReplyPrivately) {
1694    this.canReplyPrivately = canReplyPrivately;
1695  }
1696
1697  /**
1698   * The profile this was posted on if different from the author.
1699   *
1700   * @return The profile this was posted on if different from the author
1701   */
1702  @GraphAPI(since = "2.5")
1703  @java.lang.SuppressWarnings("all")
1704  public NamedFacebookType getTarget() {
1705    return this.target;
1706  }
1707
1708  /**
1709   * The profile this was posted on if different from the author.
1710   */
1711  @java.lang.SuppressWarnings("all")
1712  public void setTarget(final NamedFacebookType target) {
1713    this.target = target;
1714  }
1715
1716  /**
1717   * Ads targeting information of the post.
1718   *
1719   * @return Ads targeting information of the post
1720   */
1721  @java.lang.SuppressWarnings("all")
1722  public Targeting getTargeting() {
1723    return this.targeting;
1724  }
1725
1726  /**
1727   * Ads targeting information of the post.
1728   */
1729  @java.lang.SuppressWarnings("all")
1730  public void setTargeting(final Targeting targeting) {
1731    this.targeting = targeting;
1732  }
1733
1734  /**
1735   * Timeline visibility information of the post.
1736   *
1737   * @return imeline visibility information of the post
1738   */
1739  @java.lang.SuppressWarnings("all")
1740  public String getTimelineVisibility() {
1741    return this.timelineVisibility;
1742  }
1743
1744  /**
1745   * Timeline visibility information of the post.
1746   */
1747  @java.lang.SuppressWarnings("all")
1748  public void setTimelineVisibility(final String timelineVisibility) {
1749    this.timelineVisibility = timelineVisibility;
1750  }
1751
1752  /**
1753   * Duplicate mapping for "likes" since FB can return it differently in different situations.
1754   *
1755   * -- GETTER -- The likes on this post.
1756   * <p>
1757   * Sometimes this can be {@code null} - check {@link #getLikesCount()} instead in that case.
1758   *
1759   * @return The likes on this post.
1760   */
1761  @java.lang.SuppressWarnings("all")
1762  public Likes getLikes() {
1763    return this.likes;
1764  }
1765
1766  /**
1767   * Duplicate mapping for "likes" since FB can return it differently in different situations.
1768   *
1769   * -- GETTER -- The likes on this post.
1770   * <p>
1771   * Sometimes this can be {@code null} - check {@link #getLikesCount()} instead in that case.
1772   */
1773  @java.lang.SuppressWarnings("all")
1774  public void setLikes(final Likes likes) {
1775    this.likes = likes;
1776  }
1777
1778  /**
1779   * The time the post was initially published.
1780   *
1781   * @return The time the post was initially published.
1782   */
1783  @java.lang.SuppressWarnings("all")
1784  public Date getCreatedTime() {
1785    return this.createdTime;
1786  }
1787
1788  /**
1789   * The time the post was initially published.
1790   */
1791  @java.lang.SuppressWarnings("all")
1792  public void setCreatedTime(final Date createdTime) {
1793    this.createdTime = createdTime;
1794  }
1795
1796  /**
1797   * The time of the last comment on this post.
1798   *
1799   * @return The time of the last comment on this post.
1800   */
1801  @java.lang.SuppressWarnings("all")
1802  public Date getUpdatedTime() {
1803    return this.updatedTime;
1804  }
1805
1806  /**
1807   * The time of the last comment on this post.
1808   */
1809  @java.lang.SuppressWarnings("all")
1810  public void setUpdatedTime(final Date updatedTime) {
1811    this.updatedTime = updatedTime;
1812  }
1813
1814  /**
1815   * The Facebook object id for an uploaded photo or video.
1816   *
1817   * Hint for Graph API 3.3: Use <code>attachment/target/id</code> instead
1818   *
1819   * @return The Facebook object id for an uploaded photo or video.
1820   * @since 1.6.5
1821   */
1822  @GraphAPI(until = "3.2")
1823  @java.lang.SuppressWarnings("all")
1824  public String getObjectId() {
1825    return this.objectId;
1826  }
1827
1828  /**
1829   * The Facebook object id for an uploaded photo or video.
1830   *
1831   * Hint for Graph API 3.3: Use <code>attachment/target/id</code> instead
1832   *
1833   * @since 1.6.5
1834   */
1835  @java.lang.SuppressWarnings("all")
1836  public void setObjectId(final String objectId) {
1837    this.objectId = objectId;
1838  }
1839
1840  /**
1841   * The {@code status_type} of post this is, for example {@code "approved_friend"}.
1842   *
1843   * @return The {@code status_type} of post this is, for example {@code "approved_friend"}.
1844   * @since 1.6.12
1845   */
1846  @java.lang.SuppressWarnings("all")
1847  public String getStatusType() {
1848    return this.statusType;
1849  }
1850
1851  /**
1852   * The {@code status_type} of post this is, for example {@code "approved_friend"}.
1853   *
1854   * @since 1.6.12
1855   */
1856  @java.lang.SuppressWarnings("all")
1857  public void setStatusType(final String statusType) {
1858    this.statusType = statusType;
1859  }
1860
1861  /**
1862   * Text from stories not intentionally generated by users
1863   *
1864   * @return Text from stories not intentionally generated by users
1865   * @since 1.6.16
1866   */
1867  @java.lang.SuppressWarnings("all")
1868  public String getStory() {
1869    return this.story;
1870  }
1871
1872  /**
1873   * Text from stories not intentionally generated by users
1874   *
1875   * @since 1.6.16
1876   */
1877  @java.lang.SuppressWarnings("all")
1878  public void setStory(final String story) {
1879    this.story = story;
1880  }
1881
1882  /**
1883   * The comments for this post.
1884   *
1885   * @return The comments for this post.
1886   */
1887  @java.lang.SuppressWarnings("all")
1888  public Comments getComments() {
1889    return this.comments;
1890  }
1891
1892  /**
1893   * The comments for this post.
1894   */
1895  @java.lang.SuppressWarnings("all")
1896  public void setComments(final Comments comments) {
1897    this.comments = comments;
1898  }
1899
1900  /**
1901   * The reactions for this post.
1902   *
1903   * @return The reactions for this post.
1904   */
1905  @java.lang.SuppressWarnings("all")
1906  public Reactions getReactions() {
1907    return this.reactions;
1908  }
1909
1910  /**
1911   * The reactions for this post.
1912   */
1913  @java.lang.SuppressWarnings("all")
1914  public void setReactions(final Reactions reactions) {
1915    this.reactions = reactions;
1916  }
1917
1918  /**
1919   * The place where this post occurred.
1920   *
1921   * @return The place where this post occurred.
1922   * @since 1.6.8
1923   */
1924  @java.lang.SuppressWarnings("all")
1925  public Place getPlace() {
1926    return this.place;
1927  }
1928
1929  /**
1930   * The place where this post occurred.
1931   *
1932   * @since 1.6.8
1933   */
1934  @java.lang.SuppressWarnings("all")
1935  public void setPlace(final Place place) {
1936    this.place = place;
1937  }
1938
1939  /**
1940   * UNIX timestamp of the scheduled publish time for the post.
1941   *
1942   * @return UNIX timestamp of the scheduled publish time for the post
1943   */
1944  @java.lang.SuppressWarnings("all")
1945  public Date getScheduledPublishTime() {
1946    return this.scheduledPublishTime;
1947  }
1948
1949  /**
1950   * UNIX timestamp of the scheduled publish time for the post.
1951   */
1952  @java.lang.SuppressWarnings("all")
1953  public void setScheduledPublishTime(final Date scheduledPublishTime) {
1954    this.scheduledPublishTime = scheduledPublishTime;
1955  }
1956
1957  /**
1958   * Number of times the post has been shared.
1959   *
1960   * @return Number of times the post has been shared
1961   */
1962  @java.lang.SuppressWarnings("all")
1963  public Shares getShares() {
1964    return this.shares;
1965  }
1966
1967  /**
1968   * Number of times the post has been shared.
1969   */
1970  @java.lang.SuppressWarnings("all")
1971  public void setShares(final Shares shares) {
1972    this.shares = shares;
1973  }
1974
1975  /**
1976   * ID of admin who created the post.
1977   *
1978   * Applies to pages only
1979   *
1980   * @return ID of admin who created the post.
1981   * @since 1.10.0
1982   */
1983  @java.lang.SuppressWarnings("all")
1984  public NamedFacebookType getAdminCreator() {
1985    return this.adminCreator;
1986  }
1987
1988  /**
1989   * ID of admin who created the post.
1990   *
1991   * Applies to pages only
1992   *
1993   * @since 1.10.0
1994   */
1995  @java.lang.SuppressWarnings("all")
1996  public void setAdminCreator(final NamedFacebookType adminCreator) {
1997    this.adminCreator = adminCreator;
1998  }
1999
2000  /**
2001   * Whether the post can be promoted on Instagram.
2002   * <p>
2003   * It returns the enum <code>eligible</code> if it can be promoted. Otherwise it returns an enum for why it cannot be
2004   * promoted
2005   * </p>
2006   * 
2007   * @return Whether the post can be promoted on Instagram
2008   */
2009  @java.lang.SuppressWarnings("all")
2010  public String getInstagramEligibility() {
2011    return this.instagramEligibility;
2012  }
2013
2014  /**
2015   * Whether the post can be promoted on Instagram.
2016   * <p>
2017   * It returns the enum <code>eligible</code> if it can be promoted. Otherwise it returns an enum for why it cannot be
2018   * promoted
2019   * </p>
2020   */
2021  @java.lang.SuppressWarnings("all")
2022  public void setInstagramEligibility(final String instagramEligibility) {
2023    this.instagramEligibility = instagramEligibility;
2024  }
2025
2026  /**
2027   * Whether or not the post references an app.
2028   *
2029   * @return Whether or not the post references an app
2030   */
2031  @java.lang.SuppressWarnings("all")
2032  public Boolean getIsAppShare() {
2033    return this.isAppShare;
2034  }
2035
2036  /**
2037   * Whether or not the post references an app.
2038   */
2039  @java.lang.SuppressWarnings("all")
2040  public void setIsAppShare(final Boolean isAppShare) {
2041    this.isAppShare = isAppShare;
2042  }
2043
2044  @java.lang.SuppressWarnings("all")
2045  public Boolean getIsEligibleForPromotion() {
2046    return this.isEligibleForPromotion;
2047  }
2048
2049  @java.lang.SuppressWarnings("all")
2050  public void setIsEligibleForPromotion(final Boolean isEligibleForPromotion) {
2051    this.isEligibleForPromotion = isEligibleForPromotion;
2052  }
2053
2054  /**
2055   * Whether the post has expiration time that has passed
2056   *
2057   * @return Whether the post has expiration time that has passed
2058   */
2059  @java.lang.SuppressWarnings("all")
2060  public Boolean getIsExpired() {
2061    return this.isExpired;
2062  }
2063
2064  /**
2065   * Whether the post has expiration time that has passed
2066   */
2067  @java.lang.SuppressWarnings("all")
2068  public void setIsExpired(final Boolean isExpired) {
2069    this.isExpired = isExpired;
2070  }
2071
2072  /**
2073   * If this post is marked as hidden (applies to Pages only).
2074   *
2075   * @since 1.10.0
2076   * @return if this post is marked as hidden
2077   */
2078  @java.lang.SuppressWarnings("all")
2079  public Boolean getIsHidden() {
2080    return this.isHidden;
2081  }
2082
2083  /**
2084   * If this post is marked as hidden (applies to Pages only).
2085   *
2086   * @since 1.10.0
2087   */
2088  @java.lang.SuppressWarnings("all")
2089  public void setIsHidden(final Boolean isHidden) {
2090    this.isHidden = isHidden;
2091  }
2092
2093  /**
2094   * Whether this post can be promoted in Instagram.
2095   *
2096   * @return Whether this post can be promoted in Instagram
2097   */
2098  @java.lang.SuppressWarnings("all")
2099  public Boolean getIsInstagramEligible() {
2100    return this.isInstagramEligible;
2101  }
2102
2103  /**
2104   * Whether this post can be promoted in Instagram.
2105   */
2106  @java.lang.SuppressWarnings("all")
2107  public void setIsInstagramEligible(final Boolean isInstagramEligible) {
2108    this.isInstagramEligible = isInstagramEligible;
2109  }
2110
2111  /**
2112   * Whether the post is currently popular.
2113   *
2114   * Based on whether the total actions as a percentage of reach exceeds a certain threshold
2115   *
2116   * @return Whether the post is currently popular
2117   */
2118  @java.lang.SuppressWarnings("all")
2119  public Boolean getIsPopular() {
2120    return this.isPopular;
2121  }
2122
2123  /**
2124   * Whether the post is currently popular.
2125   *
2126   * Based on whether the total actions as a percentage of reach exceeds a certain threshold
2127   */
2128  @java.lang.SuppressWarnings("all")
2129  public void setIsPopular(final Boolean isPopular) {
2130    this.isPopular = isPopular;
2131  }
2132
2133  /**
2134   * Indicates whether a scheduled post was published. (applies to scheduled Page Post only, for users post and
2135   * instantly published posts this value is always <code>true</code>)
2136   *
2137   * @since 1.10.0
2138   * @return indicates whether a scheduled post was published
2139   */
2140  @java.lang.SuppressWarnings("all")
2141  public Boolean getIsPublished() {
2142    return this.isPublished;
2143  }
2144
2145  /**
2146   * Indicates whether a scheduled post was published. (applies to scheduled Page Post only, for users post and
2147   * instantly published posts this value is always <code>true</code>)
2148   *
2149   * @since 1.10.0
2150   */
2151  @java.lang.SuppressWarnings("all")
2152  public void setIsPublished(final Boolean isPublished) {
2153    this.isPublished = isPublished;
2154  }
2155
2156  /**
2157   * Whether the post is a spherical video post.
2158   *
2159   * @return Whether the post is a spherical video post
2160   */
2161  @java.lang.SuppressWarnings("all")
2162  public Boolean getIsSpherical() {
2163    return this.isSpherical;
2164  }
2165
2166  /**
2167   * Whether the post is a spherical video post.
2168   */
2169  @java.lang.SuppressWarnings("all")
2170  public void setIsSpherical(final Boolean isSpherical) {
2171    this.isSpherical = isSpherical;
2172  }
2173
2174  /**
2175   * Whether display the end card for a multi-link share post
2176   */
2177  @java.lang.SuppressWarnings("all")
2178  public Boolean getMultiShareEndCard() {
2179    return this.multiShareEndCard;
2180  }
2181
2182  /**
2183   * Whether display the end card for a multi-link share post
2184   */
2185  @java.lang.SuppressWarnings("all")
2186  public void setMultiShareEndCard(final Boolean multiShareEndCard) {
2187    this.multiShareEndCard = multiShareEndCard;
2188  }
2189
2190  /**
2191   * Whether automatically select the order of the links in multi-link share post when used in an ad
2192   */
2193  @java.lang.SuppressWarnings("all")
2194  public Boolean getMultiShareOptimized() {
2195    return this.multiShareOptimized;
2196  }
2197
2198  /**
2199   * Whether automatically select the order of the links in multi-link share post when used in an ad
2200   */
2201  @java.lang.SuppressWarnings("all")
2202  public void setMultiShareOptimized(final Boolean multiShareOptimized) {
2203    this.multiShareOptimized = multiShareOptimized;
2204  }
2205
2206  /**
2207   * Attachments added to a post.
2208   *
2209   * To force Facebook to fill the <code>attachments</code> field you have to fetch the post with the
2210   * <code>fields=attachments</code> parameter, otherwise the attachments are <code>null</code>.
2211   *
2212   * @return Attachment on the post
2213   */
2214  @java.lang.SuppressWarnings("all")
2215  public Attachments getAttachments() {
2216    return this.attachments;
2217  }
2218
2219  /**
2220   * Attachments added to a post.
2221   *
2222   * To force Facebook to fill the <code>attachments</code> field you have to fetch the post with the
2223   * <code>fields=attachments</code> parameter, otherwise the attachments are <code>null</code>.
2224   */
2225  @java.lang.SuppressWarnings("all")
2226  public void setAttachments(final Attachments attachments) {
2227    this.attachments = attachments;
2228  }
2229
2230  /**
2231   * Full picture URL.
2232   * 
2233   * you get the url to this posts full picture.
2234   * 
2235   * To force Facebook to fill the <code>full_picture</code> field you have to fetch the post with the
2236   * <code>fields=full_picture</code> parameter, otherwise the full_picture is <code>null</code>.
2237   * 
2238   * @return String representing the url to the post's full picture
2239   */
2240  @java.lang.SuppressWarnings("all")
2241  public String getFullPicture() {
2242    return this.fullPicture;
2243  }
2244
2245  /**
2246   * Full picture URL.
2247   * 
2248   * you get the url to this posts full picture.
2249   * 
2250   * To force Facebook to fill the <code>full_picture</code> field you have to fetch the post with the
2251   * <code>fields=full_picture</code> parameter, otherwise the full_picture is <code>null</code>.
2252   */
2253  @java.lang.SuppressWarnings("all")
2254  public void setFullPicture(final String fullPicture) {
2255    this.fullPicture = fullPicture;
2256  }
2257
2258  /**
2259   * ID of the user or Page the post was shared from
2260   */
2261  @java.lang.SuppressWarnings("all")
2262  public String getVia() {
2263    return this.via;
2264  }
2265
2266  /**
2267   * ID of the user or Page the post was shared from
2268   */
2269  @java.lang.SuppressWarnings("all")
2270  public void setVia(final String via) {
2271    this.via = via;
2272  }
2273}