001// Generated by delombok at Sun Jul 31 22:49:44 CEST 2022
002/*
003 * Copyright (c) 2010-2022 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 com.restfb.util.DateUtils.toDateFromShortFormat;
026import static com.restfb.util.StringUtils.isBlank;
027import static java.util.Collections.unmodifiableList;
028import java.math.BigDecimal;
029import java.util.ArrayList;
030import java.util.Date;
031import java.util.List;
032import com.restfb.Facebook;
033import com.restfb.JsonMapper;
034import com.restfb.JsonMapper.JsonMappingCompleted;
035import com.restfb.annotation.GraphAPI;
036import com.restfb.types.features.HasCover;
037import com.restfb.types.features.HasProfilePicture;
038
039/**
040 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/user">User Graph API type</a>.
041 * 
042 * @author <a href="http://restfb.com">Mark Allen</a>
043 * @author Patrick Alberts
044 * @since 1.5
045 */
046public class User extends NamedFacebookType implements HasProfilePicture, HasCover {
047  /**
048   * Social context for this person
049   */
050  @Facebook
051  private FacebookType context;
052  /**
053   * The user's first name.
054   * 
055   */
056  @Facebook("first_name")
057  private String firstName;
058  /**
059   * The user's middle name.
060   * 
061   */
062  @Facebook("middle_name")
063  private String middleName;
064  /**
065   * The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.
066   */
067  @Facebook("name_format")
068  private String nameFormat;
069  /**
070   * The person's payment pricepoints
071   */
072  @Facebook("payment_pricepoints")
073  private PaymentPricepoints paymentPricepoints;
074  /**
075   * The user's last name.
076   * 
077   */
078  @Facebook("last_name")
079  private String lastName;
080  /**
081   * Shortened, locale-aware name for the person.
082   */
083  @Facebook("short_name")
084  @GraphAPI(since = "2.9")
085  private String shortName;
086  /**
087   * The person's cover photo
088   */
089  @Facebook
090  private CoverPhoto cover;
091  /**
092   * A link to the user's profile.
093   * 
094   */
095  @Facebook
096  private String link;
097  /**
098   * The user's biographical snippet.
099   */
100  @Facebook
101  @GraphAPI(until = "2.7")
102  private String bio;
103  /**
104   * The user's favorite quotes.
105   * 
106   */
107  @Facebook
108  private String quotes;
109  /**
110   * Unspecific age range that this person's age fits into.
111   * 
112   */
113  @Facebook("age_range")
114  private AgeRange ageRange;
115  /**
116   * The user's birthday as a {@code String}.
117   * <p>
118   * Will always succeed, even if the user has specified month/year format only. If you'd like to use a typed version of
119   * this accessor, call {@link #getBirthdayAsDate()} instead.
120   * 
121   */
122  @Facebook
123  private String birthday;
124  /**
125   * The proxied or contact email address granted by the user.
126   * 
127   */
128  @Facebook
129  private String email;
130  /**
131   * The user's timezone offset.
132   * 
133   */
134  @Facebook
135  private Double timezone;
136  /**
137   * Indicates whether the account has been verified. This is distinct from the <code>is_verified</code> field. Someone
138   * is considered verified if they take any of the following actions:
139   * <ul>
140   * <li>Register for mobile</li>
141   * <li>Confirm their account via SMS</li>
142   * <li>Enter a valid credit card</li>
143   * </ul>
144   * 
145   */
146  @Facebook
147  private Boolean verified;
148  /**
149   * Video upload limits
150   */
151  @Facebook("video_upload_limits")
152  private VideoUploadLimits videoUploadLimits;
153  /**
154   * The user's gender.
155   * 
156   */
157  @Facebook
158  private String gender;
159  /**
160   * The user's locale.
161   * 
162   */
163  @Facebook
164  private String locale;
165  /**
166   * The person's PGP public key
167   */
168  @Facebook("public_key")
169  private String publicKey;
170  /**
171   * The user's Likes
172   */
173  @Facebook
174  private Likes likes;
175  @Facebook("picture")
176  private transient String rawPicture;
177  /**
178   * The user's picture, if provided.
179   * 
180   * To force Facebook to fill the <code>picture</code> field you have to fetch the user with the
181   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
182   * 
183   * @since 1.6.16
184   */
185  private ProfilePictureSource picture;
186  /**
187   * Duplicate mapping for "hometown" since FB can return it differently in different situations.
188   * 
189   * -- GETTER -- The user's hometown.
190   * <p>
191   * Sometimes this can be {@code null} - check {@link #getHometownName()} instead in that case.
192   * 
193   */
194  @Facebook
195  private NamedFacebookType hometown;
196  /**
197   * Duplicate mapping for "hometown" since FB can return it differently in different situations.
198   */
199  @Facebook("hometown")
200  private String hometownAsString;
201  /**
202   * The user's current location.
203   * 
204   */
205  @Facebook
206  private NamedFacebookType location;
207  /**
208   * The time that the shared loginneeds to be upgraded to Business Manager by
209   */
210  @Facebook("shared_login_upgrade_required_by")
211  private Date sharedLoginUpgradeRequiredBy;
212  /**
213   * The user's significant other.
214   * 
215   */
216  @Facebook("significant_other")
217  private NamedFacebookType significantOther;
218  /**
219   * Date the user's profile was updated.
220   * 
221   */
222  @Facebook("updated_time")
223  private Date updatedTime;
224  /**
225   * An anonymous, but unique identifier for the user.
226   * 
227   */
228  @Facebook("third_party_id")
229  private String thirdPartyId;
230  /**
231   * The user's currency preferences.
232   * <p>
233   * Further documentation available on Facebook's
234   * <a href="https://developers.facebook.com/docs/payments/user_currency">Displaying prices in user's currency</a>
235   * page.
236   * 
237   * @since 1.6.12
238   */
239  @Facebook
240  private Currency currency;
241  /**
242   * This returns a string which is the same for this person across all the apps managed by the same Business Manager.
243   * 
244   * @since 1.7.0
245   */
246  @Facebook("token_for_business")
247  private String tokenForBusiness;
248  /**
249   * Install type.
250   */
251  @Facebook("install_type")
252  private String installType;
253  /**
254   * Is the app making the request installed?
255   */
256  @Facebook
257  private Boolean installed;
258  /**
259   * People with large numbers of followers can have the authenticity of their identity manually verified by Facebook.
260   * This field indicates whether the person's profile is verified in this way.
261   *
262   * This is distinct from the <code>verified</code> field
263   */
264  @Facebook("is_verified")
265  private Boolean isVerified;
266  /**
267   * if the current user is a guest user. should always return false.
268   */
269  @Facebook("is_guest_user")
270  private Boolean isGuestUser;
271  @Facebook("meeting_for")
272  private List<String> meetingFor = new ArrayList<>();
273  @Facebook
274  private List<UserDevice> devices = new ArrayList<>();
275  @Facebook
276  private List<Sport> sports = new ArrayList<>();
277  @Facebook("favorite_teams")
278  private List<Experience> favoriteTeams = new ArrayList<>();
279  @Facebook("favorite_athletes")
280  private List<Experience> favoriteAthletes = new ArrayList<>();
281  @Facebook("inspirational_people")
282  private List<Experience> inspirationalPeople = new ArrayList<>();
283  @Facebook
284  private List<Experience> languages = new ArrayList<>();
285  @Facebook
286  private List<PageLabel> labels = new ArrayList<>();
287  @Facebook("ids_for_apps")
288  private List<UserIDForApp> idsForApps = new ArrayList<>();
289  @Facebook("ids_for_business")
290  private List<UserIDForApp> idsForBusiness = new ArrayList<>();
291  @Facebook("ids_for_pages")
292  private List<UserIDForPage> idsForPages = new ArrayList<>();
293  @Facebook("invitable_friends")
294  private List<UserInvitableFriend> invitableFriends = new ArrayList<>();
295  private static final long serialVersionUID = 1L;
296
297
298  /**
299   * Represents the <a href="http://developers.facebook.com/docs/reference/api/user">Sport Graph API type</a>.
300   * 
301   * @author Patrick Alberts
302   * @since 1.6.3
303   */
304  public static class Sport extends NamedFacebookType {
305    @Facebook
306    private List<NamedFacebookType> with = new ArrayList<>();
307    private static final long serialVersionUID = 1L;
308
309    /**
310     * Friends associated with this sport.
311     * 
312     * @return Friends associated with this sport.
313     */
314    public List<NamedFacebookType> getWith() {
315      return unmodifiableList(with);
316    }
317
318    public boolean addWith(NamedFacebookType withSport) {
319      return with.add(withSport);
320    }
321
322    public boolean removeWith(NamedFacebookType withSport) {
323      return with.remove(withSport);
324    }
325  }
326
327
328  /**
329   * Represents the <a href="https://developers.facebook.com/docs/payments/user_currency">Currency Graph API type</a>.
330   * 
331   * @author <a href="http://restfb.com">Mark Allen</a>
332   * @since 1.6.12
333   */
334  public static class Currency extends AbstractFacebookType {
335    /**
336     * The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
337     * 
338     */
339    @Facebook("user_currency")
340    private String userCurrency;
341    /**
342     * The number of Facebook Credits that equate in value to one unit of {@code user_currency}.
343     * 
344     */
345    @Facebook("currency_exchange")
346    private BigDecimal currencyExchange;
347    /**
348     * The number of units of {@code user_currency} that equate in value to one Credit.
349     * <p>
350     * To calculate the local currency amount based on the credits price, compute
351     * {@code credits_price * currency_exchange_inverse}.
352     * 
353     */
354    @Facebook("currency_exchange_inverse")
355    private BigDecimal currencyExchangeInverse;
356    /**
357     * The number by which a price should be divided for display in {@code user_currency} units.
358     * <p>
359     * For example, a price of $1.20 will be represented by the Facebook API as "120", which you should divide by the
360     * USD {@code currency_offset} of 100 to arrive back at 1.20.
361     * 
362     */
363    @Facebook("currency_offset")
364    private BigDecimal currencyOffset;
365    private static final long serialVersionUID = 1L;
366
367    /**
368     * The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
369     * 
370     * @return The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
371     */
372    @java.lang.SuppressWarnings("all")
373    public String getUserCurrency() {
374      return this.userCurrency;
375    }
376
377    /**
378     * The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
379     * 
380     */
381    @java.lang.SuppressWarnings("all")
382    public void setUserCurrency(final String userCurrency) {
383      this.userCurrency = userCurrency;
384    }
385
386    /**
387     * The number of Facebook Credits that equate in value to one unit of {@code user_currency}.
388     * 
389     * @return The number of Facebook Credits that equate in value to one unit of {@code user_currency}.
390     */
391    @java.lang.SuppressWarnings("all")
392    public BigDecimal getCurrencyExchange() {
393      return this.currencyExchange;
394    }
395
396    /**
397     * The number of Facebook Credits that equate in value to one unit of {@code user_currency}.
398     * 
399     */
400    @java.lang.SuppressWarnings("all")
401    public void setCurrencyExchange(final BigDecimal currencyExchange) {
402      this.currencyExchange = currencyExchange;
403    }
404
405    /**
406     * The number of units of {@code user_currency} that equate in value to one Credit.
407     * <p>
408     * To calculate the local currency amount based on the credits price, compute
409     * {@code credits_price * currency_exchange_inverse}.
410     * 
411     * @return The number of units of {@code user_currency} that equate in value to one Credit.
412     */
413    @java.lang.SuppressWarnings("all")
414    public BigDecimal getCurrencyExchangeInverse() {
415      return this.currencyExchangeInverse;
416    }
417
418    /**
419     * The number of units of {@code user_currency} that equate in value to one Credit.
420     * <p>
421     * To calculate the local currency amount based on the credits price, compute
422     * {@code credits_price * currency_exchange_inverse}.
423     * 
424     */
425    @java.lang.SuppressWarnings("all")
426    public void setCurrencyExchangeInverse(final BigDecimal currencyExchangeInverse) {
427      this.currencyExchangeInverse = currencyExchangeInverse;
428    }
429
430    /**
431     * The number by which a price should be divided for display in {@code user_currency} units.
432     * <p>
433     * For example, a price of $1.20 will be represented by the Facebook API as "120", which you should divide by the
434     * USD {@code currency_offset} of 100 to arrive back at 1.20.
435     * 
436     * @return The number by which a price should be divided for display in {@code user_currency} units.
437     */
438    @java.lang.SuppressWarnings("all")
439    public BigDecimal getCurrencyOffset() {
440      return this.currencyOffset;
441    }
442
443    /**
444     * The number by which a price should be divided for display in {@code user_currency} units.
445     * <p>
446     * For example, a price of $1.20 will be represented by the Facebook API as "120", which you should divide by the
447     * USD {@code currency_offset} of 100 to arrive back at 1.20.
448     * 
449     */
450    @java.lang.SuppressWarnings("all")
451    public void setCurrencyOffset(final BigDecimal currencyOffset) {
452      this.currencyOffset = currencyOffset;
453    }
454  }
455
456
457  /**
458   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/user-device/">Use">User Device
459   * Graph API type</a>.
460   * 
461   * @author <a href="http://restfb.com">Norbert Bartels</a>
462   */
463  public static class UserDevice extends AbstractFacebookType {
464    private static final long serialVersionUID = 1L;
465    @Facebook
466    private String hardware;
467    @Facebook
468    private String os;
469
470    @java.lang.SuppressWarnings("all")
471    public String getHardware() {
472      return this.hardware;
473    }
474
475    @java.lang.SuppressWarnings("all")
476    public void setHardware(final String hardware) {
477      this.hardware = hardware;
478    }
479
480    @java.lang.SuppressWarnings("all")
481    public String getOs() {
482      return this.os;
483    }
484
485    @java.lang.SuppressWarnings("all")
486    public void setOs(final String os) {
487      this.os = os;
488    }
489  }
490
491
492  public static class AgeRange extends AbstractFacebookType {
493    private static final long serialVersionUID = 1L;
494    /**
495     * The lower bounds of the range for this person's age.
496     * 
497     */
498    @Facebook
499    private Integer min;
500    /**
501     * The upper bounds of the range for this person's age.
502     * 
503     */
504    @Facebook
505    private Integer max;
506
507    /**
508     * The lower bounds of the range for this person's age.
509     * 
510     * @return The lower bounds of the range for this person's age.
511     */
512    @java.lang.SuppressWarnings("all")
513    public Integer getMin() {
514      return this.min;
515    }
516
517    /**
518     * The lower bounds of the range for this person's age.
519     * 
520     */
521    @java.lang.SuppressWarnings("all")
522    public void setMin(final Integer min) {
523      this.min = min;
524    }
525
526    /**
527     * The upper bounds of the range for this person's age.
528     * 
529     * @return The upper bounds of the range for this person's age.
530     */
531    @java.lang.SuppressWarnings("all")
532    public Integer getMax() {
533      return this.max;
534    }
535
536    /**
537     * The upper bounds of the range for this person's age.
538     * 
539     */
540    @java.lang.SuppressWarnings("all")
541    public void setMax(final Integer max) {
542      this.max = max;
543    }
544  }
545
546  /**
547   * The user's birthday, typed to {@code java.util.Date} if possible.
548   * 
549   * @return The user's birthday, or {@code null} if unavailable or only available in month/year format.
550   */
551  public Date getBirthdayAsDate() {
552    if (isBlank(getBirthday()) || getBirthday().split("/").length < 2) {
553      return null;
554    }
555    return toDateFromShortFormat(birthday);
556  }
557
558  @JsonMappingCompleted
559  protected void jsonMappingCompleted(JsonMapper jsonMapper) {
560    picture = convertPicture(jsonMapper, rawPicture);
561  }
562
563  /**
564   * The user's hometown name.
565   * 
566   * @return The user's hometown name.
567   */
568  public String getHometownName() {
569    if (getHometown() != null) return getHometown().getName();
570    return hometownAsString;
571  }
572
573  /**
574   * Businesses can claim ownership of multiple apps using Business Manager.
575   *
576   * This method returns the list of IDs that this user has in any of those other apps
577   * 
578   * @return list of ids a user has in other apps
579   */
580  public List<UserIDForApp> getIdsForApps() {
581    return unmodifiableList(idsForApps);
582  }
583
584  public boolean addIdsForApps(UserIDForApp userId) {
585    return idsForApps.add(userId);
586  }
587
588  public boolean removeIdsForApps(UserIDForApp userId) {
589    return idsForApps.remove(userId);
590  }
591
592  /**
593   * Businesses can claim ownership of multiple apps using Business Manager.
594   *
595   * This edge returns the list of IDs that this user has in any of those other apps
596   *
597   * @return list of ids a user has in other apps
598   */
599  public List<UserIDForApp> getIdsForBusiness() {
600    return unmodifiableList(idsForBusiness);
601  }
602
603  public boolean addIdsForBusiness(UserIDForApp userId) {
604    return idsForBusiness.add(userId);
605  }
606
607  public boolean removeIdsForBusiness(UserIDForApp userId) {
608    return idsForBusiness.remove(userId);
609  }
610
611  /**
612   * Businesses can claim ownership of apps and pages using Business Manager.
613   *
614   * This edge returns the list of IDs that this user has in any of the pages owned by this business.
615   *
616   * @return list of ids a user has in other pages
617   */
618  public List<UserIDForPage> getIdsForPages() {
619    return unmodifiableList(idsForPages);
620  }
621
622  public boolean addIdsForPages(UserIDForPage userId) {
623    return idsForPages.add(userId);
624  }
625
626  public boolean removeIdsForPages(UserIDForPage userId) {
627    return idsForPages.remove(userId);
628  }
629
630  /**
631   * What genders the user is interested in meeting.
632   * 
633   * @return What genders the user is interested in meeting.
634   */
635  public List<String> getMeetingFor() {
636    return unmodifiableList(meetingFor);
637  }
638
639  public boolean addMeetingFor(String gender) {
640    return meetingFor.add(gender);
641  }
642
643  public boolean removeMeetingFor(String gender) {
644    return meetingFor.remove(gender);
645  }
646
647  /**
648   * The list of devices the person is using.
649   * 
650   * This will return only iOS and Android devices
651   * 
652   * @return The list of devices the person is using.
653   */
654  public List<UserDevice> getDevices() {
655    return unmodifiableList(devices);
656  }
657
658  public boolean addDevice(UserDevice device) {
659    return devices.add(device);
660  }
661
662  public boolean removeDevice(UserDevice device) {
663    return devices.remove(device);
664  }
665
666  /**
667   * A list of the sports from the user's profile.
668   * 
669   * @return A list of the sports from this user's profile.
670   */
671  public List<Sport> getSports() {
672    return unmodifiableList(sports);
673  }
674
675  public boolean addSport(Sport sportItem) {
676    return sports.add(sportItem);
677  }
678
679  public boolean removeSport(Sport sportItem) {
680    return sports.remove(sportItem);
681  }
682
683  /**
684   * A list of the favorite sports teams from the user's profile.
685   * 
686   * @return A list of the favorite sports teams from the user's profile.
687   */
688  public List<Experience> getFavoriteTeams() {
689    return unmodifiableList(favoriteTeams);
690  }
691
692  public boolean addFavoriteTeam(Experience team) {
693    return favoriteTeams.add(team);
694  }
695
696  public boolean removeFavoriteTeam(Experience team) {
697    return favoriteTeams.remove(team);
698  }
699
700  /**
701   * A list of the favorite athletes from the user's profile.
702   * 
703   * @return A list of the favorite athletes from the user's profile.
704   */
705  public List<Experience> getFavoriteAthletes() {
706    return unmodifiableList(favoriteAthletes);
707  }
708
709  public boolean addFavoriteAthlete(Experience athlet) {
710    return favoriteAthletes.add(athlet);
711  }
712
713  public boolean removeFavoriteAthlete(Experience athlet) {
714    return favoriteAthletes.remove(athlet);
715  }
716
717  /**
718   * The person's inspirational people.
719   *
720   * @return The person's inspirational people.
721   */
722  public List<Experience> getInspirationalPeople() {
723    return unmodifiableList(inspirationalPeople);
724  }
725
726  public boolean addInspirationalPeople(Experience person) {
727    return inspirationalPeople.add(person);
728  }
729
730  public boolean removeInspirationalPeople(Experience person) {
731    return inspirationalPeople.remove(person);
732  }
733
734  /**
735   * A list of the languages from the user's profile.
736   * 
737   * @return A list of the languages from the user's profile.
738   */
739  public List<Experience> getLanguages() {
740    return unmodifiableList(languages);
741  }
742
743  public boolean addLanguage(Experience language) {
744    return languages.add(language);
745  }
746
747  public boolean removeLanguage(Experience language) {
748    return languages.remove(language);
749  }
750
751  /**
752   * Page labels of this user
753   *
754   * @return labels of this user
755   */
756  @GraphAPI(since = "2.6")
757  public List<PageLabel> getLabels() {
758    return unmodifiableList(labels);
759  }
760
761  public boolean addLabel(PageLabel label) {
762    return labels.add(label);
763  }
764
765  public boolean removeLabels(PageLabel label) {
766    return labels.remove(label);
767  }
768
769  /**
770   * A list of friends that can be invited to install a Facebook Canvas app
771   * 
772   * @return A list of friends that can be invited to install a Facebook Canvas app
773   */
774  public List<UserInvitableFriend> getInvitableFriends() {
775    return unmodifiableList(invitableFriends);
776  }
777
778  public boolean addInvitableFriend(UserInvitableFriend friend) {
779    return invitableFriends.add(friend);
780  }
781
782  public boolean removeInvitableFriend(UserInvitableFriend friend) {
783    return invitableFriends.remove(friend);
784  }
785
786
787  /**
788   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/secure-browsing/">Secure Browsing
789   * Graph API type</a>.
790   */
791  public static class SecureBrowsing extends AbstractFacebookType {
792    /**
793     * Enabled
794     */
795    @Facebook
796    private Boolean enabled;
797
798    /**
799     * Enabled
800     *
801     * @return Enabled
802     */
803    @java.lang.SuppressWarnings("all")
804    public Boolean getEnabled() {
805      return this.enabled;
806    }
807
808    /**
809     * Enabled
810     */
811    @java.lang.SuppressWarnings("all")
812    public void setEnabled(final Boolean enabled) {
813      this.enabled = enabled;
814    }
815  }
816
817
818  /**
819   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/payment-pricepoints/">Payment
820   * Pricepoints Graph API type</a>.
821   */
822  public static class PaymentPricepoints extends AbstractFacebookType {
823    @Facebook
824    private List<PaymentPricepoint> mobile = new ArrayList<>();
825
826    /**
827     * Mobile payment pricepoints
828     * 
829     * @return Mobile payment pricepoints
830     */
831    public List<PaymentPricepoint> getMobile() {
832      return unmodifiableList(mobile);
833    }
834
835    public boolean addMobile(PaymentPricepoint language) {
836      return mobile.add(language);
837    }
838
839    public boolean removeMobile(PaymentPricepoint language) {
840      return mobile.remove(language);
841    }
842  }
843
844
845  /**
846   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/payment-pricepoint/">Payment
847   * Pricepoint Graph API type</a>.
848   */
849  public static class PaymentPricepoint extends AbstractFacebookType {
850    @Facebook
851    private Double credits;
852    @Facebook("local_currency")
853    private String localCurrency;
854    @Facebook("user_price")
855    private String userPrice;
856
857    @java.lang.SuppressWarnings("all")
858    public Double getCredits() {
859      return this.credits;
860    }
861
862    @java.lang.SuppressWarnings("all")
863    public void setCredits(final Double credits) {
864      this.credits = credits;
865    }
866
867    @java.lang.SuppressWarnings("all")
868    public String getLocalCurrency() {
869      return this.localCurrency;
870    }
871
872    @java.lang.SuppressWarnings("all")
873    public void setLocalCurrency(final String localCurrency) {
874      this.localCurrency = localCurrency;
875    }
876
877    @java.lang.SuppressWarnings("all")
878    public String getUserPrice() {
879      return this.userPrice;
880    }
881
882    @java.lang.SuppressWarnings("all")
883    public void setUserPrice(final String userPrice) {
884      this.userPrice = userPrice;
885    }
886  }
887
888
889  /**
890   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/video-upload-limits/">Video Upload
891   * Limits Graph API type</a>.
892   */
893  public static class VideoUploadLimits extends AbstractFacebookType {
894    @Facebook
895    private Long length;
896    @Facebook
897    private Long size;
898
899    @java.lang.SuppressWarnings("all")
900    public Long getLength() {
901      return this.length;
902    }
903
904    @java.lang.SuppressWarnings("all")
905    public void setLength(final Long length) {
906      this.length = length;
907    }
908
909    @java.lang.SuppressWarnings("all")
910    public Long getSize() {
911      return this.size;
912    }
913
914    @java.lang.SuppressWarnings("all")
915    public void setSize(final Long size) {
916      this.size = size;
917    }
918  }
919
920
921  public static class Experience extends NamedFacebookType {
922    @Facebook
923    private String description;
924    @Facebook
925    private User from;
926    @Facebook
927    private List<User> with = new ArrayList<>();
928
929    /**
930     * Tagged users
931     * 
932     * @return Tagged users
933     */
934    public List<User> getWith() {
935      return unmodifiableList(with);
936    }
937
938    public boolean addWith(User with) {
939      return this.with.add(with);
940    }
941
942    public boolean removeWith(User with) {
943      return this.with.remove(with);
944    }
945
946    @java.lang.SuppressWarnings("all")
947    public String getDescription() {
948      return this.description;
949    }
950
951    @java.lang.SuppressWarnings("all")
952    public void setDescription(final String description) {
953      this.description = description;
954    }
955
956    @java.lang.SuppressWarnings("all")
957    public User getFrom() {
958      return this.from;
959    }
960
961    @java.lang.SuppressWarnings("all")
962    public void setFrom(final User from) {
963      this.from = from;
964    }
965  }
966
967  /**
968   * Social context for this person
969   *
970   * @return Social context for this person
971   */
972  @java.lang.SuppressWarnings("all")
973  public FacebookType getContext() {
974    return this.context;
975  }
976
977  /**
978   * Social context for this person
979   */
980  @java.lang.SuppressWarnings("all")
981  public void setContext(final FacebookType context) {
982    this.context = context;
983  }
984
985  /**
986   * The user's first name.
987   * 
988   * @return The user's first name.
989   */
990  @java.lang.SuppressWarnings("all")
991  public String getFirstName() {
992    return this.firstName;
993  }
994
995  /**
996   * The user's first name.
997   * 
998   */
999  @java.lang.SuppressWarnings("all")
1000  public void setFirstName(final String firstName) {
1001    this.firstName = firstName;
1002  }
1003
1004  /**
1005   * The user's middle name.
1006   * 
1007   * @return The user's middle name.
1008   */
1009  @java.lang.SuppressWarnings("all")
1010  public String getMiddleName() {
1011    return this.middleName;
1012  }
1013
1014  /**
1015   * The user's middle name.
1016   * 
1017   */
1018  @java.lang.SuppressWarnings("all")
1019  public void setMiddleName(final String middleName) {
1020    this.middleName = middleName;
1021  }
1022
1023  /**
1024   * The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.
1025   *
1026   * @return The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering
1027   */
1028  @java.lang.SuppressWarnings("all")
1029  public String getNameFormat() {
1030    return this.nameFormat;
1031  }
1032
1033  /**
1034   * The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.
1035   */
1036  @java.lang.SuppressWarnings("all")
1037  public void setNameFormat(final String nameFormat) {
1038    this.nameFormat = nameFormat;
1039  }
1040
1041  /**
1042   * The person's payment pricepoints
1043   *
1044   * @return The person's payment pricepoints
1045   */
1046  @java.lang.SuppressWarnings("all")
1047  public PaymentPricepoints getPaymentPricepoints() {
1048    return this.paymentPricepoints;
1049  }
1050
1051  /**
1052   * The person's payment pricepoints
1053   */
1054  @java.lang.SuppressWarnings("all")
1055  public void setPaymentPricepoints(final PaymentPricepoints paymentPricepoints) {
1056    this.paymentPricepoints = paymentPricepoints;
1057  }
1058
1059  /**
1060   * The user's last name.
1061   * 
1062   * @return The user's last name.
1063   */
1064  @java.lang.SuppressWarnings("all")
1065  public String getLastName() {
1066    return this.lastName;
1067  }
1068
1069  /**
1070   * The user's last name.
1071   * 
1072   */
1073  @java.lang.SuppressWarnings("all")
1074  public void setLastName(final String lastName) {
1075    this.lastName = lastName;
1076  }
1077
1078  /**
1079   * Shortened, locale-aware name for the person.
1080   *
1081   * @return Shortened, locale-aware name for the person
1082   */
1083  @GraphAPI(since = "2.9")
1084  @java.lang.SuppressWarnings("all")
1085  public String getShortName() {
1086    return this.shortName;
1087  }
1088
1089  /**
1090   * Shortened, locale-aware name for the person.
1091   */
1092  @java.lang.SuppressWarnings("all")
1093  public void setShortName(final String shortName) {
1094    this.shortName = shortName;
1095  }
1096
1097  /**
1098   * The person's cover photo
1099   *
1100   * @return The person's cover photo
1101   */
1102  @Override
1103  @java.lang.SuppressWarnings("all")
1104  public CoverPhoto getCover() {
1105    return this.cover;
1106  }
1107
1108  /**
1109   * The person's cover photo
1110   */
1111  @java.lang.SuppressWarnings("all")
1112  public void setCover(final CoverPhoto cover) {
1113    this.cover = cover;
1114  }
1115
1116  /**
1117   * A link to the user's profile.
1118   * 
1119   * @return A link to the user's profile.
1120   */
1121  @java.lang.SuppressWarnings("all")
1122  public String getLink() {
1123    return this.link;
1124  }
1125
1126  /**
1127   * A link to the user's profile.
1128   * 
1129   */
1130  @java.lang.SuppressWarnings("all")
1131  public void setLink(final String link) {
1132    this.link = link;
1133  }
1134
1135  /**
1136   * The user's biographical snippet.
1137   *
1138   * @return The user's biographical snippet.
1139   */
1140  @GraphAPI(until = "2.7")
1141  @java.lang.SuppressWarnings("all")
1142  public String getBio() {
1143    return this.bio;
1144  }
1145
1146  /**
1147   * The user's biographical snippet.
1148   */
1149  @java.lang.SuppressWarnings("all")
1150  public void setBio(final String bio) {
1151    this.bio = bio;
1152  }
1153
1154  /**
1155   * The user's favorite quotes.
1156   * 
1157   * @return The user's favorite quotes.
1158   */
1159  @java.lang.SuppressWarnings("all")
1160  public String getQuotes() {
1161    return this.quotes;
1162  }
1163
1164  /**
1165   * The user's favorite quotes.
1166   * 
1167   */
1168  @java.lang.SuppressWarnings("all")
1169  public void setQuotes(final String quotes) {
1170    this.quotes = quotes;
1171  }
1172
1173  /**
1174   * Unspecific age range that this person's age fits into.
1175   * 
1176   * @return The user's age range
1177   */
1178  @java.lang.SuppressWarnings("all")
1179  public AgeRange getAgeRange() {
1180    return this.ageRange;
1181  }
1182
1183  /**
1184   * Unspecific age range that this person's age fits into.
1185   * 
1186   */
1187  @java.lang.SuppressWarnings("all")
1188  public void setAgeRange(final AgeRange ageRange) {
1189    this.ageRange = ageRange;
1190  }
1191
1192  /**
1193   * The user's birthday as a {@code String}.
1194   * <p>
1195   * Will always succeed, even if the user has specified month/year format only. If you'd like to use a typed version of
1196   * this accessor, call {@link #getBirthdayAsDate()} instead.
1197   * 
1198   * @return The user's birthday as a {@code String}.
1199   */
1200  @java.lang.SuppressWarnings("all")
1201  public String getBirthday() {
1202    return this.birthday;
1203  }
1204
1205  /**
1206   * The user's birthday as a {@code String}.
1207   * <p>
1208   * Will always succeed, even if the user has specified month/year format only. If you'd like to use a typed version of
1209   * this accessor, call {@link #getBirthdayAsDate()} instead.
1210   * 
1211   */
1212  @java.lang.SuppressWarnings("all")
1213  public void setBirthday(final String birthday) {
1214    this.birthday = birthday;
1215  }
1216
1217  /**
1218   * The proxied or contact email address granted by the user.
1219   * 
1220   * @return The proxied or contact email address granted by the user.
1221   */
1222  @java.lang.SuppressWarnings("all")
1223  public String getEmail() {
1224    return this.email;
1225  }
1226
1227  /**
1228   * The proxied or contact email address granted by the user.
1229   * 
1230   */
1231  @java.lang.SuppressWarnings("all")
1232  public void setEmail(final String email) {
1233    this.email = email;
1234  }
1235
1236  /**
1237   * The user's timezone offset.
1238   * 
1239   * @return The user's timezone offset.
1240   */
1241  @java.lang.SuppressWarnings("all")
1242  public Double getTimezone() {
1243    return this.timezone;
1244  }
1245
1246  /**
1247   * The user's timezone offset.
1248   * 
1249   */
1250  @java.lang.SuppressWarnings("all")
1251  public void setTimezone(final Double timezone) {
1252    this.timezone = timezone;
1253  }
1254
1255  /**
1256   * Indicates whether the account has been verified. This is distinct from the <code>is_verified</code> field. Someone
1257   * is considered verified if they take any of the following actions:
1258   * <ul>
1259   * <li>Register for mobile</li>
1260   * <li>Confirm their account via SMS</li>
1261   * <li>Enter a valid credit card</li>
1262   * </ul>
1263   * 
1264   * @return User verification status.
1265   */
1266  @java.lang.SuppressWarnings("all")
1267  public Boolean getVerified() {
1268    return this.verified;
1269  }
1270
1271  /**
1272   * Indicates whether the account has been verified. This is distinct from the <code>is_verified</code> field. Someone
1273   * is considered verified if they take any of the following actions:
1274   * <ul>
1275   * <li>Register for mobile</li>
1276   * <li>Confirm their account via SMS</li>
1277   * <li>Enter a valid credit card</li>
1278   * </ul>
1279   * 
1280   */
1281  @java.lang.SuppressWarnings("all")
1282  public void setVerified(final Boolean verified) {
1283    this.verified = verified;
1284  }
1285
1286  /**
1287   * Video upload limits
1288   *
1289   * @return Video upload limits
1290   */
1291  @java.lang.SuppressWarnings("all")
1292  public VideoUploadLimits getVideoUploadLimits() {
1293    return this.videoUploadLimits;
1294  }
1295
1296  /**
1297   * Video upload limits
1298   */
1299  @java.lang.SuppressWarnings("all")
1300  public void setVideoUploadLimits(final VideoUploadLimits videoUploadLimits) {
1301    this.videoUploadLimits = videoUploadLimits;
1302  }
1303
1304  /**
1305   * The user's gender.
1306   * 
1307   * @return The user's gender.
1308   */
1309  @java.lang.SuppressWarnings("all")
1310  public String getGender() {
1311    return this.gender;
1312  }
1313
1314  /**
1315   * The user's gender.
1316   * 
1317   */
1318  @java.lang.SuppressWarnings("all")
1319  public void setGender(final String gender) {
1320    this.gender = gender;
1321  }
1322
1323  /**
1324   * The user's locale.
1325   * 
1326   * @return The user's locale.
1327   */
1328  @java.lang.SuppressWarnings("all")
1329  public String getLocale() {
1330    return this.locale;
1331  }
1332
1333  /**
1334   * The user's locale.
1335   * 
1336   */
1337  @java.lang.SuppressWarnings("all")
1338  public void setLocale(final String locale) {
1339    this.locale = locale;
1340  }
1341
1342  /**
1343   * The person's PGP public key
1344   *
1345   * @return The person's PGP public key
1346   */
1347  @java.lang.SuppressWarnings("all")
1348  public String getPublicKey() {
1349    return this.publicKey;
1350  }
1351
1352  /**
1353   * The person's PGP public key
1354   */
1355  @java.lang.SuppressWarnings("all")
1356  public void setPublicKey(final String publicKey) {
1357    this.publicKey = publicKey;
1358  }
1359
1360  /**
1361   * The user's Likes
1362   *
1363   * @return the user's Likes
1364   */
1365  @java.lang.SuppressWarnings("all")
1366  public Likes getLikes() {
1367    return this.likes;
1368  }
1369
1370  /**
1371   * The user's Likes
1372   */
1373  @java.lang.SuppressWarnings("all")
1374  public void setLikes(final Likes likes) {
1375    this.likes = likes;
1376  }
1377
1378  /**
1379   * The user's picture, if provided.
1380   * 
1381   * To force Facebook to fill the <code>picture</code> field you have to fetch the user with the
1382   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
1383   * 
1384   * @return the user's picture as ProfilePictureSource object
1385   * @since 1.6.16
1386   */
1387  @Override
1388  @java.lang.SuppressWarnings("all")
1389  public ProfilePictureSource getPicture() {
1390    return this.picture;
1391  }
1392
1393  /**
1394   * The user's picture, if provided.
1395   * 
1396   * To force Facebook to fill the <code>picture</code> field you have to fetch the user with the
1397   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
1398   * 
1399   * @since 1.6.16
1400   */
1401  @java.lang.SuppressWarnings("all")
1402  public void setPicture(final ProfilePictureSource picture) {
1403    this.picture = picture;
1404  }
1405
1406  /**
1407   * Duplicate mapping for "hometown" since FB can return it differently in different situations.
1408   * 
1409   * -- GETTER -- The user's hometown.
1410   * <p>
1411   * Sometimes this can be {@code null} - check {@link #getHometownName()} instead in that case.
1412   * 
1413   * @return The user's hometown.
1414   */
1415  @java.lang.SuppressWarnings("all")
1416  public NamedFacebookType getHometown() {
1417    return this.hometown;
1418  }
1419
1420  /**
1421   * Duplicate mapping for "hometown" since FB can return it differently in different situations.
1422   * 
1423   * -- GETTER -- The user's hometown.
1424   * <p>
1425   * Sometimes this can be {@code null} - check {@link #getHometownName()} instead in that case.
1426   * 
1427   */
1428  @java.lang.SuppressWarnings("all")
1429  public void setHometown(final NamedFacebookType hometown) {
1430    this.hometown = hometown;
1431  }
1432
1433  /**
1434   * The user's current location.
1435   * 
1436   * @return The user's current location.
1437   */
1438  @java.lang.SuppressWarnings("all")
1439  public NamedFacebookType getLocation() {
1440    return this.location;
1441  }
1442
1443  /**
1444   * The user's current location.
1445   * 
1446   */
1447  @java.lang.SuppressWarnings("all")
1448  public void setLocation(final NamedFacebookType location) {
1449    this.location = location;
1450  }
1451
1452  /**
1453   * The time that the shared loginneeds to be upgraded to Business Manager by
1454   *
1455   * @return The time that the shared loginneeds to be upgraded to Business Manager by
1456   */
1457  @java.lang.SuppressWarnings("all")
1458  public Date getSharedLoginUpgradeRequiredBy() {
1459    return this.sharedLoginUpgradeRequiredBy;
1460  }
1461
1462  /**
1463   * The time that the shared loginneeds to be upgraded to Business Manager by
1464   */
1465  @java.lang.SuppressWarnings("all")
1466  public void setSharedLoginUpgradeRequiredBy(final Date sharedLoginUpgradeRequiredBy) {
1467    this.sharedLoginUpgradeRequiredBy = sharedLoginUpgradeRequiredBy;
1468  }
1469
1470  /**
1471   * The user's significant other.
1472   * 
1473   * @return The user's significant other.
1474   */
1475  @java.lang.SuppressWarnings("all")
1476  public NamedFacebookType getSignificantOther() {
1477    return this.significantOther;
1478  }
1479
1480  /**
1481   * The user's significant other.
1482   * 
1483   */
1484  @java.lang.SuppressWarnings("all")
1485  public void setSignificantOther(final NamedFacebookType significantOther) {
1486    this.significantOther = significantOther;
1487  }
1488
1489  /**
1490   * Date the user's profile was updated.
1491   * 
1492   * @return Date the user's profile was updated.
1493   */
1494  @java.lang.SuppressWarnings("all")
1495  public Date getUpdatedTime() {
1496    return this.updatedTime;
1497  }
1498
1499  /**
1500   * Date the user's profile was updated.
1501   * 
1502   */
1503  @java.lang.SuppressWarnings("all")
1504  public void setUpdatedTime(final Date updatedTime) {
1505    this.updatedTime = updatedTime;
1506  }
1507
1508  /**
1509   * An anonymous, but unique identifier for the user.
1510   * 
1511   * @return An anonymous, but unique identifier for the user.
1512   */
1513  @java.lang.SuppressWarnings("all")
1514  public String getThirdPartyId() {
1515    return this.thirdPartyId;
1516  }
1517
1518  /**
1519   * An anonymous, but unique identifier for the user.
1520   * 
1521   */
1522  @java.lang.SuppressWarnings("all")
1523  public void setThirdPartyId(final String thirdPartyId) {
1524    this.thirdPartyId = thirdPartyId;
1525  }
1526
1527  /**
1528   * The user's currency preferences.
1529   * <p>
1530   * Further documentation available on Facebook's
1531   * <a href="https://developers.facebook.com/docs/payments/user_currency">Displaying prices in user's currency</a>
1532   * page.
1533   * 
1534   * @return The user's currency preferences.
1535   * @since 1.6.12
1536   */
1537  @java.lang.SuppressWarnings("all")
1538  public Currency getCurrency() {
1539    return this.currency;
1540  }
1541
1542  /**
1543   * The user's currency preferences.
1544   * <p>
1545   * Further documentation available on Facebook's
1546   * <a href="https://developers.facebook.com/docs/payments/user_currency">Displaying prices in user's currency</a>
1547   * page.
1548   * 
1549   * @since 1.6.12
1550   */
1551  @java.lang.SuppressWarnings("all")
1552  public void setCurrency(final Currency currency) {
1553    this.currency = currency;
1554  }
1555
1556  /**
1557   * This returns a string which is the same for this person across all the apps managed by the same Business Manager.
1558   * 
1559   * @return string which is the same for a person across all apps managed by one company
1560   * @since 1.7.0
1561   */
1562  @java.lang.SuppressWarnings("all")
1563  public String getTokenForBusiness() {
1564    return this.tokenForBusiness;
1565  }
1566
1567  /**
1568   * This returns a string which is the same for this person across all the apps managed by the same Business Manager.
1569   * 
1570   * @since 1.7.0
1571   */
1572  @java.lang.SuppressWarnings("all")
1573  public void setTokenForBusiness(final String tokenForBusiness) {
1574    this.tokenForBusiness = tokenForBusiness;
1575  }
1576
1577  /**
1578   * Install type.
1579   *
1580   * @return Install type.
1581   */
1582  @java.lang.SuppressWarnings("all")
1583  public String getInstallType() {
1584    return this.installType;
1585  }
1586
1587  /**
1588   * Install type.
1589   */
1590  @java.lang.SuppressWarnings("all")
1591  public void setInstallType(final String installType) {
1592    this.installType = installType;
1593  }
1594
1595  /**
1596   * Is the app making the request installed?
1597   *
1598   * @return Is the app making the request installed?
1599   */
1600  @java.lang.SuppressWarnings("all")
1601  public Boolean getInstalled() {
1602    return this.installed;
1603  }
1604
1605  /**
1606   * Is the app making the request installed?
1607   */
1608  @java.lang.SuppressWarnings("all")
1609  public void setInstalled(final Boolean installed) {
1610    this.installed = installed;
1611  }
1612
1613  /**
1614   * People with large numbers of followers can have the authenticity of their identity manually verified by Facebook.
1615   * This field indicates whether the person's profile is verified in this way.
1616   *
1617   * This is distinct from the <code>verified</code> field
1618   *
1619   * @return Is the user verified
1620   */
1621  @java.lang.SuppressWarnings("all")
1622  public Boolean getIsVerified() {
1623    return this.isVerified;
1624  }
1625
1626  /**
1627   * People with large numbers of followers can have the authenticity of their identity manually verified by Facebook.
1628   * This field indicates whether the person's profile is verified in this way.
1629   *
1630   * This is distinct from the <code>verified</code> field
1631   */
1632  @java.lang.SuppressWarnings("all")
1633  public void setIsVerified(final Boolean isVerified) {
1634    this.isVerified = isVerified;
1635  }
1636
1637  /**
1638   * if the current user is a guest user. should always return false.
1639   */
1640  @java.lang.SuppressWarnings("all")
1641  public Boolean getIsGuestUser() {
1642    return this.isGuestUser;
1643  }
1644
1645  /**
1646   * if the current user is a guest user. should always return false.
1647   */
1648  @java.lang.SuppressWarnings("all")
1649  public void setIsGuestUser(final Boolean isGuestUser) {
1650    this.isGuestUser = isGuestUser;
1651  }
1652}