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