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