001// Generated by delombok at Fri Oct 11 21:56:29 CEST 2019
002/**
003 * Copyright (c) 2010-2019 Mark Allen, Norbert Bartels.
004 *
005 * Permission is hereby granted, free of charge, to any person obtaining a copy
006 * of this software and associated documentation files (the "Software"), to deal
007 * in the Software without restriction, including without limitation the rights
008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
009 * copies of the Software, and to permit persons to whom the Software is
010 * furnished to do so, subject to the following conditions:
011 *
012 * The above copyright notice and this permission notice shall be included in
013 * all copies or substantial portions of the Software.
014 *
015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
021 * THE SOFTWARE.
022 */
023package com.restfb.types;
024
025import static 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.util.MappingUtils;
037
038/**
039 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/user">User Graph API type</a>.
040 * 
041 * @author <a href="http://restfb.com">Mark Allen</a>
042 * @author Patrick Alberts
043 * @since 1.5
044 */
045public class User extends NamedFacebookType {
046  /**
047   * Social context for this person
048   */
049  @Facebook
050  private FacebookType context;
051  /**
052   * The user's first name.
053   */
054  @Facebook("first_name")
055  private String firstName;
056  /**
057   * The user's middle name.
058   */
059  @Facebook("middle_name")
060  private String middleName;
061  /**
062   * The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.
063   */
064  @Facebook("name_format")
065  private String nameFormat;
066  /**
067   * The person's payment pricepoints
068   */
069  @Facebook("payment_pricepoints")
070  private PaymentPricepoints paymentPricepoints;
071  /**
072   * The user's last name.
073   */
074  @Facebook("last_name")
075  private String lastName;
076  /**
077   * Shortened, locale-aware name for the person.
078   */
079  @Facebook("short_name")
080  @GraphAPI(since = "2.9")
081  private String shortName;
082  /**
083   * The person's cover photo
084   */
085  @Facebook
086  private CoverPhoto cover;
087  /**
088   * A link to the user's profile.
089   */
090  @Facebook
091  private String link;
092  /**
093   * The user's biographical snippet.
094   */
095  @Facebook
096  @GraphAPI(until = "2.7")
097  private String bio;
098  /**
099   * The user's favorite quotes.
100   */
101  @Facebook
102  private String quotes;
103  /**
104   * The user's blurb that appears under their profile picture.
105   *
106   * @deprecated since breaking change on 4 April, 2018
107   */
108  @Facebook
109  @Deprecated
110  private String about;
111  /**
112   * The user's relationship status.
113   *
114   * @deprecated since breaking change on 4 April, 2018
115   */
116  @Facebook("relationship_status")
117  @Deprecated
118  private String relationshipStatus;
119  /**
120   * The user's religion.
121   *
122   * @deprecated since breaking change on 4 April, 2018
123   */
124  @Facebook
125  @Deprecated
126  private String religion;
127  /**
128   * Unspecific age range that this person's age fits into.
129   */
130  @Facebook("age_range")
131  private AgeRange ageRange;
132  /**
133   * A link to the user's personal website.
134   *
135   * @deprecated since breaking change on 4 April, 2018
136   */
137  @Facebook
138  @Deprecated
139  private String website;
140  /**
141   * The user's birthday as a {@code String}.
142   * <p>
143   * Will always succeed, even if the user has specified month/year format only. If you'd like to use a typed version of
144   * this accessor, call {@link #getBirthdayAsDate()} instead.
145   */
146  @Facebook
147  private String birthday;
148  /**
149   * The proxied or contact email address granted by the user.
150   */
151  @Facebook
152  private String email;
153  /**
154   * The user's timezone offset.
155   */
156  @Facebook
157  private Double timezone;
158  /**
159   * Indicates whether the account has been verified. This is distinct from the <code>is_verified</code> field. Someone
160   * is considered verified if they take any of the following actions:
161   * <ul>
162   * <li>Register for mobile</li>
163   * <li>Confirm their account via SMS</li>
164   * <li>Enter a valid credit card</li>
165   * </ul>
166   */
167  @Facebook
168  private Boolean verified;
169  /**
170   * Video upload limits
171   */
172  @Facebook("video_upload_limits")
173  private VideoUploadLimits videoUploadLimits;
174  /**
175   * Can the viewer send a gift to this person?
176   */
177  @Facebook("viewer_can_send_gift")
178  private Boolean viewerCanSendGift;
179  /**
180   * The user's gender.
181   */
182  @Facebook
183  private String gender;
184  /**
185   * The user's political affiliation.
186   *
187   * @deprecated since breaking change on 4 April, 2018
188   */
189  @Facebook
190  @Deprecated
191  private String political;
192  /**
193   * The user's locale.
194   */
195  @Facebook
196  private String locale;
197  /**
198   * The user's Facebook username.
199   *
200   * @since 1.6.5
201   * @deprecated since graph api 2.0
202   */
203  @Deprecated
204  @Facebook
205  private String username;
206  /**
207   * The person's PGP public key
208   */
209  @Facebook("public_key")
210  private String publicKey;
211  /**
212   * The user's Likes
213   */
214  @Facebook
215  private Likes likes;
216  @Facebook("picture")
217  private transient String rawPicture;
218  /**
219   * The user's picture, if provided.
220   * 
221   * To force Facebook to fill the <code>picture</code> field you have to fetch the user with the
222   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
223   *
224   * @since 1.6.16
225   */
226  private ProfilePictureSource picture;
227  /**
228   * Duplicate mapping for "hometown" since FB can return it differently in different situations.
229   * 
230   * -- GETTER -- The user's hometown.
231   * <p>
232   * Sometimes this can be {@code null} - check {@link #getHometownName()} instead in that case.
233   */
234  @Facebook
235  private NamedFacebookType hometown;
236  /**
237   * Duplicate mapping for "hometown" since FB can return it differently in different situations.
238   */
239  @Facebook("hometown")
240  private String hometownAsString;
241  /**
242   * The user's current location.
243   */
244  @Facebook
245  private NamedFacebookType location;
246  /**
247   * Security settings
248   */
249  @Facebook("security_settings")
250  private SecuritySettings securitySettings;
251  /**
252   * The time that the shared loginneeds to be upgraded to Business Manager by
253   */
254  @Facebook("shared_login_upgrade_required_by")
255  private Date sharedLoginUpgradeRequiredBy;
256  /**
257   * The user's significant other.
258   */
259  @Facebook("significant_other")
260  private NamedFacebookType significantOther;
261  /**
262   * Platform test group
263   */
264  @Facebook("test_group")
265  private Long testGroup;
266  /**
267   * Date the user's profile was updated.
268   */
269  @Facebook("updated_time")
270  private Date updatedTime;
271  /**
272   * An anonymous, but unique identifier for the user.
273   */
274  @Facebook("third_party_id")
275  private String thirdPartyId;
276  /**
277   * The user's currency preferences.
278   * <p>
279   * Further documentation available on Facebook's
280   * <a href="https://developers.facebook.com/docs/payments/user_currency">Displaying prices in user's currency</a>
281   * page.
282   *
283   * @since 1.6.12
284   */
285  @Facebook
286  private Currency currency;
287  /**
288   * This returns a string which is the same for this person across all the apps managed by the same Business Manager.
289   *
290   * @since 1.7.0
291   */
292  @Facebook("token_for_business")
293  private String tokenForBusiness;
294  /**
295   * Install type.
296   */
297  @Facebook("install_type")
298  private String installType;
299  /**
300   * Is the app making the request installed?
301   */
302  @Facebook
303  private Boolean installed;
304  /**
305   * Is this a shared login (e.g. a gray user)
306   */
307  @Facebook("is_shared_login")
308  private Boolean isSharedLogin;
309  /**
310   * People with large numbers of followers can have the authenticity of their identity manually verified by Facebook.
311   * This field indicates whether the person's profile is verified in this way.
312   *
313   * This is distinct from the <code>verified</code> field
314   */
315  @Facebook("is_verified")
316  private Boolean isVerified;
317  @Deprecated
318  @Facebook("interested_in")
319  private List<String> interestedIn = new ArrayList<>();
320  @Facebook("meeting_for")
321  private List<String> meetingFor = new ArrayList<>();
322  @Facebook
323  private List<UserDevice> devices = new ArrayList<>();
324  @Facebook
325  @Deprecated
326  private List<WorkExperience> work = new ArrayList<>();
327  @Facebook
328  @Deprecated
329  private List<Education> education = new ArrayList<>();
330  @Facebook
331  private List<Sport> sports = new ArrayList<>();
332  @Facebook("favorite_teams")
333  private List<Experience> favoriteTeams = new ArrayList<>();
334  @Facebook("favorite_athletes")
335  private List<Experience> favoriteAthletes = new ArrayList<>();
336  @Facebook("inspirational_people")
337  private List<Experience> inspirationalPeople = new ArrayList<>();
338  @Facebook
339  private List<Experience> languages = new ArrayList<>();
340  @Facebook
341  private List<PageLabel> labels = new ArrayList<>();
342  @Facebook("ids_for_apps")
343  private List<UserIDForApp> idsForApps = new ArrayList<>();
344  @Facebook("ids_for_business")
345  private List<UserIDForApp> idsForBusiness = new ArrayList<>();
346  @Facebook("ids_for_pages")
347  private List<UserIDForPage> idsForPages = new ArrayList<>();
348  @Facebook("invitable_friends")
349  private List<UserInvitableFriend> invitableFriends = new ArrayList<>();
350  private static final long serialVersionUID = 1L;
351
352
353  /**
354   * Represents the <a href="http://developers.facebook.com/docs/reference/api/user">Education Graph API type</a>.
355   * 
356   * @author <a href="http://restfb.com">Mark Allen</a>
357   * @author Patrick Alberts
358   * @deprecated since breaking change on 4 April, 2018
359   */
360  @Deprecated
361  public static class Education extends AbstractFacebookType {
362    /**
363     * The school name and ID.
364     */
365    @Facebook
366    private NamedFacebookType school;
367    /**
368     * Graduation year.
369     */
370    @Facebook
371    private NamedFacebookType year;
372    /**
373     * Description for this year.
374     * 
375     * It is possible for Facebook to return either this value or {@link #getYear()}. If {@link #getYear()} returns
376     * {@code null}, then check this method to see if it has data, e.g. {@code "1997"}.
377     *
378     * @since 1.7.1
379     */
380    @Facebook("year")
381    private String yearAsString;
382    /**
383     * Degree acquired.
384     */
385    @Facebook
386    private NamedFacebookType degree;
387    /**
388     * Type of school, e.g. {@code College}.
389     */
390    @Facebook
391    private String type;
392    @Facebook
393    private List<NamedFacebookType> concentration = new ArrayList<>();
394    @Facebook
395    private List<NamedFacebookType> with = new ArrayList<>();
396    @Facebook
397    private List<EducationClass> classes = new ArrayList<>();
398    private static final long serialVersionUID = 2L;
399
400    /**
401     * Concentrations/minors.
402     * 
403     * @return Concentrations/minors.
404     */
405    public List<NamedFacebookType> getConcentration() {
406      return unmodifiableList(concentration);
407    }
408
409    public boolean addConcentration(NamedFacebookType minor) {
410      return concentration.add(minor);
411    }
412
413    public boolean removeConcentration(NamedFacebookType minor) {
414      return concentration.remove(minor);
415    }
416
417    /**
418     * Friends associated with this school.
419     * 
420     * @return Friends associated with this school.
421     * @since 1.6.3
422     */
423    public List<NamedFacebookType> getWith() {
424      return unmodifiableList(with);
425    }
426
427    public boolean addWith(NamedFacebookType friend) {
428      return with.add(friend);
429    }
430
431    public boolean removeWith(NamedFacebookType friend) {
432      return with.remove(friend);
433    }
434
435    /**
436     * Classes taken at this school.
437     * 
438     * @return Classes taken at this school.
439     * @since 1.6.8
440     */
441    public List<EducationClass> getClasses() {
442      return unmodifiableList(classes);
443    }
444
445    public boolean addClasses(EducationClass eduClass) {
446      return classes.add(eduClass);
447    }
448
449    public boolean removeClasses(EducationClass eduClass) {
450      return classes.remove(eduClass);
451    }
452
453    /**
454     * The school name and ID.
455     * 
456     * @return The school name and ID.
457     */
458    @java.lang.SuppressWarnings("all")
459    public NamedFacebookType getSchool() {
460      return this.school;
461    }
462
463    /**
464     * The school name and ID.
465     */
466    @java.lang.SuppressWarnings("all")
467    public void setSchool(final NamedFacebookType school) {
468      this.school = school;
469    }
470
471    /**
472     * Graduation year.
473     * 
474     * @return Graduation year.
475     */
476    @java.lang.SuppressWarnings("all")
477    public NamedFacebookType getYear() {
478      return this.year;
479    }
480
481    /**
482     * Graduation year.
483     */
484    @java.lang.SuppressWarnings("all")
485    public void setYear(final NamedFacebookType year) {
486      this.year = year;
487    }
488
489    /**
490     * Description for this year.
491     * 
492     * It is possible for Facebook to return either this value or {@link #getYear()}. If {@link #getYear()} returns
493     * {@code null}, then check this method to see if it has data, e.g. {@code "1997"}.
494     * 
495     * @return Description for this year.
496     * @since 1.7.1
497     */
498    @java.lang.SuppressWarnings("all")
499    public String getYearAsString() {
500      return this.yearAsString;
501    }
502
503    /**
504     * Description for this year.
505     * 
506     * It is possible for Facebook to return either this value or {@link #getYear()}. If {@link #getYear()} returns
507     * {@code null}, then check this method to see if it has data, e.g. {@code "1997"}.
508     *
509     * @since 1.7.1
510     */
511    @java.lang.SuppressWarnings("all")
512    public void setYearAsString(final String yearAsString) {
513      this.yearAsString = yearAsString;
514    }
515
516    /**
517     * Degree acquired.
518     * 
519     * @return Degree acquired.
520     */
521    @java.lang.SuppressWarnings("all")
522    public NamedFacebookType getDegree() {
523      return this.degree;
524    }
525
526    /**
527     * Degree acquired.
528     */
529    @java.lang.SuppressWarnings("all")
530    public void setDegree(final NamedFacebookType degree) {
531      this.degree = degree;
532    }
533
534    /**
535     * Type of school, e.g. {@code College}.
536     * 
537     * @return Type of school.
538     */
539    @java.lang.SuppressWarnings("all")
540    public String getType() {
541      return this.type;
542    }
543
544    /**
545     * Type of school, e.g. {@code College}.
546     */
547    @java.lang.SuppressWarnings("all")
548    public void setType(final String type) {
549      this.type = type;
550    }
551  }
552
553
554  /**
555   * Represents the <a href="http://developers.facebook.com/docs/reference/api/user">Class Graph API type</a>.
556   * 
557   * @author Mark Allen
558   * @since 1.6.8
559   */
560  public static class EducationClass extends NamedFacebookType {
561    @Facebook
562    private List<NamedFacebookType> with = new ArrayList<>();
563    /**
564     * The description of this class.
565     */
566    @Facebook
567    private String description;
568    private static final long serialVersionUID = 1L;
569
570    /**
571     * Friends associated with this class.
572     * 
573     * @return Friends associated with this class.
574     */
575    public List<NamedFacebookType> getWith() {
576      return unmodifiableList(with);
577    }
578
579    public boolean addWith(NamedFacebookType friend) {
580      return with.add(friend);
581    }
582
583    public boolean removeWith(NamedFacebookType friend) {
584      return with.remove(friend);
585    }
586
587    /**
588     * The description of this class.
589     * 
590     * @return The description of this class.
591     */
592    @java.lang.SuppressWarnings("all")
593    public String getDescription() {
594      return this.description;
595    }
596
597    /**
598     * The description of this class.
599     */
600    @java.lang.SuppressWarnings("all")
601    public void setDescription(final String description) {
602      this.description = description;
603    }
604  }
605
606
607  /**
608   * Represents the <a href="http://developers.facebook.com/docs/reference/api/user">Sport Graph API type</a>.
609   * 
610   * @author Patrick Alberts
611   * @since 1.6.3
612   */
613  public static class Sport extends NamedFacebookType {
614    @Facebook
615    private List<NamedFacebookType> with = new ArrayList<>();
616    private static final long serialVersionUID = 1L;
617
618    /**
619     * Friends associated with this sport.
620     * 
621     * @return Friends associated with this sport.
622     */
623    public List<NamedFacebookType> getWith() {
624      return unmodifiableList(with);
625    }
626
627    public boolean addWith(NamedFacebookType withSport) {
628      return with.add(withSport);
629    }
630
631    public boolean removeWith(NamedFacebookType withSport) {
632      return with.remove(withSport);
633    }
634  }
635
636
637  /**
638   * Represents the <a href="https://developers.facebook.com/docs/payments/user_currency">Currency Graph API type</a>.
639   * 
640   * @author <a href="http://restfb.com">Mark Allen</a>
641   * @since 1.6.12
642   */
643  public static class Currency extends AbstractFacebookType {
644    /**
645     * The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
646     */
647    @Facebook("user_currency")
648    private String userCurrency;
649    /**
650     * The number of Facebook Credits that equate in value to one unit of {@code user_currency}.
651     */
652    @Facebook("currency_exchange")
653    private BigDecimal currencyExchange;
654    /**
655     * The number of units of {@code user_currency} that equate in value to one Credit.
656     * <p>
657     * To calculate the local currency amount based on the credits price, compute
658     * {@code credits_price * currency_exchange_inverse}.
659     */
660    @Facebook("currency_exchange_inverse")
661    private BigDecimal currencyExchangeInverse;
662    /**
663     * The number by which a price should be divided for display in {@code user_currency} units.
664     * <p>
665     * For example, a price of $1.20 will be represented by the Facebook API as "120", which you should divide by the
666     * USD {@code currency_offset} of 100 to arrive back at 1.20.
667     */
668    @Facebook("currency_offset")
669    private BigDecimal currencyOffset;
670    private static final long serialVersionUID = 1L;
671
672    /**
673     * The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
674     * 
675     * @return The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
676     */
677    @java.lang.SuppressWarnings("all")
678    public String getUserCurrency() {
679      return this.userCurrency;
680    }
681
682    /**
683     * The ISO-4217-3 code for the user's preferred currency (defaulting to USD if the user hasn't set one).
684     */
685    @java.lang.SuppressWarnings("all")
686    public void setUserCurrency(final String userCurrency) {
687      this.userCurrency = userCurrency;
688    }
689
690    /**
691     * The number of Facebook Credits that equate in value to one unit of {@code user_currency}.
692     * 
693     * @return The number of Facebook Credits that equate in value to one unit of {@code user_currency}.
694     */
695    @java.lang.SuppressWarnings("all")
696    public BigDecimal getCurrencyExchange() {
697      return this.currencyExchange;
698    }
699
700    /**
701     * The number of Facebook Credits that equate in value to one unit of {@code user_currency}.
702     */
703    @java.lang.SuppressWarnings("all")
704    public void setCurrencyExchange(final BigDecimal currencyExchange) {
705      this.currencyExchange = currencyExchange;
706    }
707
708    /**
709     * The number of units of {@code user_currency} that equate in value to one Credit.
710     * <p>
711     * To calculate the local currency amount based on the credits price, compute
712     * {@code credits_price * currency_exchange_inverse}.
713     * 
714     * @return The number of units of {@code user_currency} that equate in value to one Credit.
715     */
716    @java.lang.SuppressWarnings("all")
717    public BigDecimal getCurrencyExchangeInverse() {
718      return this.currencyExchangeInverse;
719    }
720
721    /**
722     * The number of units of {@code user_currency} that equate in value to one Credit.
723     * <p>
724     * To calculate the local currency amount based on the credits price, compute
725     * {@code credits_price * currency_exchange_inverse}.
726     */
727    @java.lang.SuppressWarnings("all")
728    public void setCurrencyExchangeInverse(final BigDecimal currencyExchangeInverse) {
729      this.currencyExchangeInverse = currencyExchangeInverse;
730    }
731
732    /**
733     * The number by which a price should be divided for display in {@code user_currency} units.
734     * <p>
735     * For example, a price of $1.20 will be represented by the Facebook API as "120", which you should divide by the
736     * USD {@code currency_offset} of 100 to arrive back at 1.20.
737     * 
738     * @return The number by which a price should be divided for display in {@code user_currency} units.
739     */
740    @java.lang.SuppressWarnings("all")
741    public BigDecimal getCurrencyOffset() {
742      return this.currencyOffset;
743    }
744
745    /**
746     * The number by which a price should be divided for display in {@code user_currency} units.
747     * <p>
748     * For example, a price of $1.20 will be represented by the Facebook API as "120", which you should divide by the
749     * USD {@code currency_offset} of 100 to arrive back at 1.20.
750     */
751    @java.lang.SuppressWarnings("all")
752    public void setCurrencyOffset(final BigDecimal currencyOffset) {
753      this.currencyOffset = currencyOffset;
754    }
755  }
756
757
758  /**
759   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/user-device/">Use">User Device
760   * Graph API type</a>.
761   * 
762   * @author <a href="http://restfb.com">Norbert Bartels</a>
763   */
764  public static class UserDevice extends AbstractFacebookType {
765    private static final long serialVersionUID = 1L;
766    @Facebook
767    private String hardware;
768    @Facebook
769    private String os;
770
771    @java.lang.SuppressWarnings("all")
772    public String getHardware() {
773      return this.hardware;
774    }
775
776    @java.lang.SuppressWarnings("all")
777    public void setHardware(final String hardware) {
778      this.hardware = hardware;
779    }
780
781    @java.lang.SuppressWarnings("all")
782    public String getOs() {
783      return this.os;
784    }
785
786    @java.lang.SuppressWarnings("all")
787    public void setOs(final String os) {
788      this.os = os;
789    }
790  }
791
792
793  public static class AgeRange extends AbstractFacebookType {
794    private static final long serialVersionUID = 1L;
795    /**
796     * The lower bounds of the range for this person's age.
797     */
798    @Facebook
799    private Integer min;
800    /**
801     * The upper bounds of the range for this person's age.
802     */
803    @Facebook
804    private Integer max;
805
806    /**
807     * The lower bounds of the range for this person's age.
808     * 
809     * @return The lower bounds of the range for this person's age.
810     */
811    @java.lang.SuppressWarnings("all")
812    public Integer getMin() {
813      return this.min;
814    }
815
816    /**
817     * The lower bounds of the range for this person's age.
818     */
819    @java.lang.SuppressWarnings("all")
820    public void setMin(final Integer min) {
821      this.min = min;
822    }
823
824    /**
825     * The upper bounds of the range for this person's age.
826     * 
827     * @return The upper bounds of the range for this person's age.
828     */
829    @java.lang.SuppressWarnings("all")
830    public Integer getMax() {
831      return this.max;
832    }
833
834    /**
835     * The upper bounds of the range for this person's age.
836     */
837    @java.lang.SuppressWarnings("all")
838    public void setMax(final Integer max) {
839      this.max = max;
840    }
841  }
842
843  /**
844   * The user's birthday, typed to {@code java.util.Date} if possible.
845   * 
846   * @return The user's birthday, or {@code null} if unavailable or only available in month/year format.
847   */
848  public Date getBirthdayAsDate() {
849    if (isBlank(getBirthday()) || getBirthday().split("/").length < 2) {
850      return null;
851    }
852    return toDateFromShortFormat(birthday);
853  }
854
855  @JsonMappingCompleted
856  protected void jsonMappingCompleted(JsonMapper jsonMapper) {
857    MappingUtils mappingUtils = new MappingUtils(jsonMapper);
858    picture = mappingUtils.convertPicture(rawPicture);
859  }
860
861  /**
862   * The user's hometown name.
863   * 
864   * @return The user's hometown name.
865   */
866  public String getHometownName() {
867    if (getHometown() != null) return getHometown().getName();
868    return hometownAsString;
869  }
870
871  /**
872   * Businesses can claim ownership of multiple apps using Business Manager.
873   *
874   * This method returns the list of IDs that this user has in any of those other apps
875   * 
876   * @return list of ids a user has in other apps
877   */
878  public List<UserIDForApp> getIdsForApps() {
879    return unmodifiableList(idsForApps);
880  }
881
882  public boolean addIdsForApps(UserIDForApp userId) {
883    return idsForApps.add(userId);
884  }
885
886  public boolean removeIdsForApps(UserIDForApp userId) {
887    return idsForApps.remove(userId);
888  }
889
890  /**
891   * Businesses can claim ownership of multiple apps using Business Manager.
892   *
893   * This edge returns the list of IDs that this user has in any of those other apps
894   *
895   * @return list of ids a user has in other apps
896   */
897  public List<UserIDForApp> getIdsForBusiness() {
898    return unmodifiableList(idsForBusiness);
899  }
900
901  public boolean addIdsForBusiness(UserIDForApp userId) {
902    return idsForBusiness.add(userId);
903  }
904
905  public boolean removeIdsForBusiness(UserIDForApp userId) {
906    return idsForBusiness.remove(userId);
907  }
908
909  /**
910   * Businesses can claim ownership of apps and pages using Business Manager.
911   *
912   * This edge returns the list of IDs that this user has in any of the pages owned by this business.
913   *
914   * @return list of ids a user has in other pages
915   */
916  public List<UserIDForPage> getIdsForPages() {
917    return unmodifiableList(idsForPages);
918  }
919
920  public boolean addIdsForPages(UserIDForPage userId) {
921    return idsForPages.add(userId);
922  }
923
924  public boolean removeIdsForPages(UserIDForPage userId) {
925    return idsForPages.remove(userId);
926  }
927
928  /**
929   * The genders the user is interested in.
930   * 
931   * @return The genders the user is interested in.
932   * @deprecated since breaking change on 4 April, 2018
933   */
934  @Deprecated
935  public List<String> getInterestedIn() {
936    return unmodifiableList(interestedIn);
937  }
938
939  /**
940   * Add a gender the user is interested in.
941   *
942   * @param gender
943   *          the gender that should be added
944   * @deprecated since breaking change on 4 April, 2018
945   * @return {@code true} if the gender could be added
946   */
947  @Deprecated
948  public boolean addInterestedIn(String gender) {
949    return interestedIn.add(gender);
950  }
951
952  /**
953   * Remove a gender the user is interested in.
954   *
955   * @param gender
956   *          the gender that should be removed
957   * @deprecated since breaking change on 4 April, 2018
958   * @return {@code true} if the gender could be removed
959   */
960  @Deprecated
961  public boolean removeInterestedIn(String gender) {
962    return interestedIn.remove(gender);
963  }
964
965  /**
966   * What genders the user is interested in meeting.
967   * 
968   * @return What genders the user is interested in meeting.
969   */
970  public List<String> getMeetingFor() {
971    return unmodifiableList(meetingFor);
972  }
973
974  public boolean addMeetingFor(String gender) {
975    return meetingFor.add(gender);
976  }
977
978  public boolean removeMeetingFor(String gender) {
979    return meetingFor.remove(gender);
980  }
981
982  /**
983   * A list of the work history from the user's profile.
984   * 
985   * @return A list of the work history from the user's profile.
986   * @deprecated since breaking change on 4 April, 2018
987   */
988  @Deprecated
989  public List<WorkExperience> getWork() {
990    return unmodifiableList(work);
991  }
992
993  /**
994   * Adds the {@link WorkExperience} from the work experience list
995   *
996   * @param workHistoryItem
997   *          the WorkExperience that should be added
998   * @deprecated since breaking change on 4 April, 2018
999   * @return {@code true} if the {@link WorkExperience} could be added
1000   */
1001  @Deprecated
1002  public boolean addWork(WorkExperience workHistoryItem) {
1003    return work.add(workHistoryItem);
1004  }
1005
1006  /**
1007   * Removes the {@link WorkExperience} from the work experience list
1008   *
1009   * @param workHistoryItem
1010   *          the WorkExperience that should be removed
1011   * @deprecated since breaking change on 4 April, 2018
1012   * @return {@code true} if the {@link WorkExperience} could be removed
1013   */
1014  @Deprecated
1015  public boolean removeWork(WorkExperience workHistoryItem) {
1016    return work.remove(workHistoryItem);
1017  }
1018
1019  /**
1020   * The list of devices the person is using.
1021   * 
1022   * This will return only iOS and Android devices
1023   * 
1024   * @return The list of devices the person is using.
1025   */
1026  public List<UserDevice> getDevices() {
1027    return unmodifiableList(devices);
1028  }
1029
1030  public boolean addDevice(UserDevice device) {
1031    return devices.add(device);
1032  }
1033
1034  public boolean removeDevice(UserDevice device) {
1035    return devices.remove(device);
1036  }
1037
1038  /**
1039   * A list of the education history from the user's profile.
1040   * 
1041   * @return A list of the education history from the user's profile.
1042   * @deprecated since breaking change on 4 April, 2018
1043   */
1044  @Deprecated
1045  public List<Education> getEducation() {
1046    return unmodifiableList(education);
1047  }
1048
1049  /**
1050   * Adds the {@link Education} from the education list
1051   *
1052   * @param educationHistoryItem
1053   *          the Education that should be added
1054   * @deprecated since breaking change on 4 April, 2018
1055   * @return {@code true} if the {@link Education} could be added
1056   */
1057  @Deprecated
1058  public boolean addEducation(Education educationHistoryItem) {
1059    return education.add(educationHistoryItem);
1060  }
1061
1062  /**
1063   * Removes the {@link Education} from the education list
1064   *
1065   * @param educationHistoryItem
1066   *          the Education that should be removed
1067   * @deprecated since breaking change on 4 April, 2018
1068   * @return {@code true} if the {@link Education} could be removed
1069   */
1070  @Deprecated
1071  public boolean removeEducation(Education educationHistoryItem) {
1072    return education.remove(educationHistoryItem);
1073  }
1074
1075  /**
1076   * A list of the sports from the user's profile.
1077   * 
1078   * @return A list of the sports from this user's profile.
1079   */
1080  public List<Sport> getSports() {
1081    return unmodifiableList(sports);
1082  }
1083
1084  public boolean addSport(Sport sportItem) {
1085    return sports.add(sportItem);
1086  }
1087
1088  public boolean removeSport(Sport sportItem) {
1089    return sports.remove(sportItem);
1090  }
1091
1092  /**
1093   * A list of the favorite sports teams from the user's profile.
1094   * 
1095   * @return A list of the favorite sports teams from the user's profile.
1096   */
1097  public List<Experience> getFavoriteTeams() {
1098    return unmodifiableList(favoriteTeams);
1099  }
1100
1101  public boolean addFavoriteTeam(Experience team) {
1102    return favoriteTeams.add(team);
1103  }
1104
1105  public boolean removeFavoriteTeam(Experience team) {
1106    return favoriteTeams.remove(team);
1107  }
1108
1109  /**
1110   * A list of the favorite athletes from the user's profile.
1111   * 
1112   * @return A list of the favorite athletes from the user's profile.
1113   */
1114  public List<Experience> getFavoriteAthletes() {
1115    return unmodifiableList(favoriteAthletes);
1116  }
1117
1118  public boolean addFavoriteAthlete(Experience athlet) {
1119    return favoriteAthletes.add(athlet);
1120  }
1121
1122  public boolean removeFavoriteAthlete(Experience athlet) {
1123    return favoriteAthletes.remove(athlet);
1124  }
1125
1126  /**
1127   * The person's inspirational people.
1128   *
1129   * @return The person's inspirational people.
1130   */
1131  public List<Experience> getInspirationalPeople() {
1132    return unmodifiableList(inspirationalPeople);
1133  }
1134
1135  public boolean addInspirationalPeople(Experience person) {
1136    return inspirationalPeople.add(person);
1137  }
1138
1139  public boolean removeInspirationalPeople(Experience person) {
1140    return inspirationalPeople.remove(person);
1141  }
1142
1143  /**
1144   * A list of the languages from the user's profile.
1145   * 
1146   * @return A list of the languages from the user's profile.
1147   */
1148  public List<Experience> getLanguages() {
1149    return unmodifiableList(languages);
1150  }
1151
1152  public boolean addLanguage(Experience language) {
1153    return languages.add(language);
1154  }
1155
1156  public boolean removeLanguage(Experience language) {
1157    return languages.remove(language);
1158  }
1159
1160  /**
1161   * Page labels of this user
1162   *
1163   * @return labels of this user
1164   */
1165  @GraphAPI(since = "2.6")
1166  public List<PageLabel> getLabels() {
1167    return unmodifiableList(labels);
1168  }
1169
1170  public boolean addLabel(PageLabel label) {
1171    return labels.add(label);
1172  }
1173
1174  public boolean removeLabels(PageLabel label) {
1175    return labels.remove(label);
1176  }
1177
1178  /**
1179   * A list of friends that can be invited to install a Facebook Canvas app
1180   * 
1181   * @return A list of friends that can be invited to install a Facebook Canvas app
1182   */
1183  public List<UserInvitableFriend> getInvitableFriends() {
1184    return unmodifiableList(invitableFriends);
1185  }
1186
1187  public boolean addInvitableFriend(UserInvitableFriend friend) {
1188    return invitableFriends.add(friend);
1189  }
1190
1191  public boolean removeInvitableFriend(UserInvitableFriend friend) {
1192    return invitableFriends.remove(friend);
1193  }
1194
1195
1196  /**
1197   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/security-settings/">Security
1198   * Settings Graph API type</a>
1199   */
1200  public static class SecuritySettings extends AbstractFacebookType {
1201    /**
1202     * Secure browsing settings
1203     */
1204    @Facebook("secure_browsing")
1205    private SecureBrowsing secureBrowsing;
1206
1207    /**
1208     * Secure browsing settings
1209     *
1210     * @return Secure browsing settings
1211     */
1212    @java.lang.SuppressWarnings("all")
1213    public SecureBrowsing getSecureBrowsing() {
1214      return this.secureBrowsing;
1215    }
1216
1217    /**
1218     * Secure browsing settings
1219     */
1220    @java.lang.SuppressWarnings("all")
1221    public void setSecureBrowsing(final SecureBrowsing secureBrowsing) {
1222      this.secureBrowsing = secureBrowsing;
1223    }
1224  }
1225
1226
1227  /**
1228   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/secure-browsing/">Secure Browsing
1229   * Graph API type</a>.
1230   */
1231  public static class SecureBrowsing extends AbstractFacebookType {
1232    /**
1233     * Enabled
1234     */
1235    @Facebook
1236    private Boolean enabled;
1237
1238    /**
1239     * Enabled
1240     *
1241     * @return Enabled
1242     */
1243    @java.lang.SuppressWarnings("all")
1244    public Boolean getEnabled() {
1245      return this.enabled;
1246    }
1247
1248    /**
1249     * Enabled
1250     */
1251    @java.lang.SuppressWarnings("all")
1252    public void setEnabled(final Boolean enabled) {
1253      this.enabled = enabled;
1254    }
1255  }
1256
1257
1258  /**
1259   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/payment-pricepoints/">Payment
1260   * Pricepoints Graph API type</a>.
1261   */
1262  public static class PaymentPricepoints extends AbstractFacebookType {
1263    @Facebook
1264    private List<PaymentPricepoint> mobile = new ArrayList<>();
1265
1266    /**
1267     * Mobile payment pricepoints
1268     * 
1269     * @return Mobile payment pricepoints
1270     */
1271    public List<PaymentPricepoint> getMobile() {
1272      return unmodifiableList(mobile);
1273    }
1274
1275    public boolean addMobile(PaymentPricepoint language) {
1276      return mobile.add(language);
1277    }
1278
1279    public boolean removeMobile(PaymentPricepoint language) {
1280      return mobile.remove(language);
1281    }
1282  }
1283
1284
1285  /**
1286   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/payment-pricepoint/">Payment
1287   * Pricepoint Graph API type</a>.
1288   */
1289  public static class PaymentPricepoint extends AbstractFacebookType {
1290    @Facebook
1291    private Double credits;
1292    @Facebook("local_currency")
1293    private String localCurrency;
1294    @Facebook("user_price")
1295    private String userPrice;
1296
1297    @java.lang.SuppressWarnings("all")
1298    public Double getCredits() {
1299      return this.credits;
1300    }
1301
1302    @java.lang.SuppressWarnings("all")
1303    public void setCredits(final Double credits) {
1304      this.credits = credits;
1305    }
1306
1307    @java.lang.SuppressWarnings("all")
1308    public String getLocalCurrency() {
1309      return this.localCurrency;
1310    }
1311
1312    @java.lang.SuppressWarnings("all")
1313    public void setLocalCurrency(final String localCurrency) {
1314      this.localCurrency = localCurrency;
1315    }
1316
1317    @java.lang.SuppressWarnings("all")
1318    public String getUserPrice() {
1319      return this.userPrice;
1320    }
1321
1322    @java.lang.SuppressWarnings("all")
1323    public void setUserPrice(final String userPrice) {
1324      this.userPrice = userPrice;
1325    }
1326  }
1327
1328
1329  /**
1330   * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/video-upload-limits/">Video Upload
1331   * Limits Graph API type</a>.
1332   */
1333  public static class VideoUploadLimits extends AbstractFacebookType {
1334    @Facebook
1335    private Long length;
1336    @Facebook
1337    private Long size;
1338
1339    @java.lang.SuppressWarnings("all")
1340    public Long getLength() {
1341      return this.length;
1342    }
1343
1344    @java.lang.SuppressWarnings("all")
1345    public void setLength(final Long length) {
1346      this.length = length;
1347    }
1348
1349    @java.lang.SuppressWarnings("all")
1350    public Long getSize() {
1351      return this.size;
1352    }
1353
1354    @java.lang.SuppressWarnings("all")
1355    public void setSize(final Long size) {
1356      this.size = size;
1357    }
1358  }
1359
1360
1361  public static class Experience extends NamedFacebookType {
1362    @Facebook
1363    private String description;
1364    @Facebook
1365    private User from;
1366    @Facebook
1367    private List<User> with = new ArrayList<>();
1368
1369    /**
1370     * Tagged users
1371     * 
1372     * @return Tagged users
1373     */
1374    public List<User> getWith() {
1375      return unmodifiableList(with);
1376    }
1377
1378    public boolean addWith(User with) {
1379      return this.with.add(with);
1380    }
1381
1382    public boolean removeWith(User with) {
1383      return this.with.remove(with);
1384    }
1385
1386    @java.lang.SuppressWarnings("all")
1387    public String getDescription() {
1388      return this.description;
1389    }
1390
1391    @java.lang.SuppressWarnings("all")
1392    public void setDescription(final String description) {
1393      this.description = description;
1394    }
1395
1396    @java.lang.SuppressWarnings("all")
1397    public User getFrom() {
1398      return this.from;
1399    }
1400
1401    @java.lang.SuppressWarnings("all")
1402    public void setFrom(final User from) {
1403      this.from = from;
1404    }
1405  }
1406
1407  /**
1408   * Social context for this person
1409   *
1410   * @return Social context for this person
1411   */
1412  @java.lang.SuppressWarnings("all")
1413  public FacebookType getContext() {
1414    return this.context;
1415  }
1416
1417  /**
1418   * Social context for this person
1419   */
1420  @java.lang.SuppressWarnings("all")
1421  public void setContext(final FacebookType context) {
1422    this.context = context;
1423  }
1424
1425  /**
1426   * The user's first name.
1427   * 
1428   * @return The user's first name.
1429   */
1430  @java.lang.SuppressWarnings("all")
1431  public String getFirstName() {
1432    return this.firstName;
1433  }
1434
1435  /**
1436   * The user's first name.
1437   */
1438  @java.lang.SuppressWarnings("all")
1439  public void setFirstName(final String firstName) {
1440    this.firstName = firstName;
1441  }
1442
1443  /**
1444   * The user's middle name.
1445   * 
1446   * @return The user's middle name.
1447   */
1448  @java.lang.SuppressWarnings("all")
1449  public String getMiddleName() {
1450    return this.middleName;
1451  }
1452
1453  /**
1454   * The user's middle name.
1455   */
1456  @java.lang.SuppressWarnings("all")
1457  public void setMiddleName(final String middleName) {
1458    this.middleName = middleName;
1459  }
1460
1461  /**
1462   * The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.
1463   *
1464   * @return The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering
1465   */
1466  @java.lang.SuppressWarnings("all")
1467  public String getNameFormat() {
1468    return this.nameFormat;
1469  }
1470
1471  /**
1472   * The person's name formatted to correctly handle Chinese, Japanese, or Korean ordering.
1473   */
1474  @java.lang.SuppressWarnings("all")
1475  public void setNameFormat(final String nameFormat) {
1476    this.nameFormat = nameFormat;
1477  }
1478
1479  /**
1480   * The person's payment pricepoints
1481   *
1482   * @return The person's payment pricepoints
1483   */
1484  @java.lang.SuppressWarnings("all")
1485  public PaymentPricepoints getPaymentPricepoints() {
1486    return this.paymentPricepoints;
1487  }
1488
1489  /**
1490   * The person's payment pricepoints
1491   */
1492  @java.lang.SuppressWarnings("all")
1493  public void setPaymentPricepoints(final PaymentPricepoints paymentPricepoints) {
1494    this.paymentPricepoints = paymentPricepoints;
1495  }
1496
1497  /**
1498   * The user's last name.
1499   * 
1500   * @return The user's last name.
1501   */
1502  @java.lang.SuppressWarnings("all")
1503  public String getLastName() {
1504    return this.lastName;
1505  }
1506
1507  /**
1508   * The user's last name.
1509   */
1510  @java.lang.SuppressWarnings("all")
1511  public void setLastName(final String lastName) {
1512    this.lastName = lastName;
1513  }
1514
1515  /**
1516   * Shortened, locale-aware name for the person.
1517   *
1518   * @return Shortened, locale-aware name for the person
1519   */
1520  @GraphAPI(since = "2.9")
1521  @java.lang.SuppressWarnings("all")
1522  public String getShortName() {
1523    return this.shortName;
1524  }
1525
1526  /**
1527   * Shortened, locale-aware name for the person.
1528   */
1529  @java.lang.SuppressWarnings("all")
1530  public void setShortName(final String shortName) {
1531    this.shortName = shortName;
1532  }
1533
1534  /**
1535   * The person's cover photo
1536   *
1537   * @return The person's cover photo
1538   */
1539  @java.lang.SuppressWarnings("all")
1540  public CoverPhoto getCover() {
1541    return this.cover;
1542  }
1543
1544  /**
1545   * The person's cover photo
1546   */
1547  @java.lang.SuppressWarnings("all")
1548  public void setCover(final CoverPhoto cover) {
1549    this.cover = cover;
1550  }
1551
1552  /**
1553   * A link to the user's profile.
1554   * 
1555   * @return A link to the user's profile.
1556   */
1557  @java.lang.SuppressWarnings("all")
1558  public String getLink() {
1559    return this.link;
1560  }
1561
1562  /**
1563   * A link to the user's profile.
1564   */
1565  @java.lang.SuppressWarnings("all")
1566  public void setLink(final String link) {
1567    this.link = link;
1568  }
1569
1570  /**
1571   * The user's biographical snippet.
1572   *
1573   * @return The user's biographical snippet.
1574   */
1575  @GraphAPI(until = "2.7")
1576  @java.lang.SuppressWarnings("all")
1577  public String getBio() {
1578    return this.bio;
1579  }
1580
1581  /**
1582   * The user's biographical snippet.
1583   */
1584  @java.lang.SuppressWarnings("all")
1585  public void setBio(final String bio) {
1586    this.bio = bio;
1587  }
1588
1589  /**
1590   * The user's favorite quotes.
1591   * 
1592   * @return The user's favorite quotes.
1593   */
1594  @java.lang.SuppressWarnings("all")
1595  public String getQuotes() {
1596    return this.quotes;
1597  }
1598
1599  /**
1600   * The user's favorite quotes.
1601   */
1602  @java.lang.SuppressWarnings("all")
1603  public void setQuotes(final String quotes) {
1604    this.quotes = quotes;
1605  }
1606
1607  /**
1608   * The user's blurb that appears under their profile picture.
1609   *
1610   * @deprecated since breaking change on 4 April, 2018
1611   *
1612   * @return The user's blurb that appears under their profile picture.
1613   */
1614  @java.lang.Deprecated
1615  @java.lang.SuppressWarnings("all")
1616  public String getAbout() {
1617    return this.about;
1618  }
1619
1620  /**
1621   * The user's blurb that appears under their profile picture.
1622   *
1623   * @deprecated since breaking change on 4 April, 2018
1624   */
1625  @java.lang.Deprecated
1626  @java.lang.SuppressWarnings("all")
1627  public void setAbout(final String about) {
1628    this.about = about;
1629  }
1630
1631  /**
1632   * The user's relationship status.
1633   * 
1634   * @return The user's relationship status.
1635   * @deprecated since breaking change on 4 April, 2018
1636   */
1637  @java.lang.Deprecated
1638  @java.lang.SuppressWarnings("all")
1639  public String getRelationshipStatus() {
1640    return this.relationshipStatus;
1641  }
1642
1643  /**
1644   * The user's relationship status.
1645   *
1646   * @deprecated since breaking change on 4 April, 2018
1647   */
1648  @java.lang.Deprecated
1649  @java.lang.SuppressWarnings("all")
1650  public void setRelationshipStatus(final String relationshipStatus) {
1651    this.relationshipStatus = relationshipStatus;
1652  }
1653
1654  /**
1655   * The user's religion.
1656   * 
1657   * @return The user's religion.
1658   * @deprecated since breaking change on 4 April, 2018
1659   */
1660  @java.lang.Deprecated
1661  @java.lang.SuppressWarnings("all")
1662  public String getReligion() {
1663    return this.religion;
1664  }
1665
1666  /**
1667   * The user's religion.
1668   *
1669   * @deprecated since breaking change on 4 April, 2018
1670   */
1671  @java.lang.Deprecated
1672  @java.lang.SuppressWarnings("all")
1673  public void setReligion(final String religion) {
1674    this.religion = religion;
1675  }
1676
1677  /**
1678   * Unspecific age range that this person's age fits into.
1679   * 
1680   * @return The user's age range
1681   */
1682  @java.lang.SuppressWarnings("all")
1683  public AgeRange getAgeRange() {
1684    return this.ageRange;
1685  }
1686
1687  /**
1688   * Unspecific age range that this person's age fits into.
1689   */
1690  @java.lang.SuppressWarnings("all")
1691  public void setAgeRange(final AgeRange ageRange) {
1692    this.ageRange = ageRange;
1693  }
1694
1695  /**
1696   * A link to the user's personal website.
1697   * 
1698   * @return A link to the user's personal website.
1699   * @deprecated since breaking change on 4 April, 2018
1700   */
1701  @java.lang.Deprecated
1702  @java.lang.SuppressWarnings("all")
1703  public String getWebsite() {
1704    return this.website;
1705  }
1706
1707  /**
1708   * A link to the user's personal website.
1709   *
1710   * @deprecated since breaking change on 4 April, 2018
1711   */
1712  @java.lang.Deprecated
1713  @java.lang.SuppressWarnings("all")
1714  public void setWebsite(final String website) {
1715    this.website = website;
1716  }
1717
1718  /**
1719   * The user's birthday as a {@code String}.
1720   * <p>
1721   * Will always succeed, even if the user has specified month/year format only. If you'd like to use a typed version of
1722   * this accessor, call {@link #getBirthdayAsDate()} instead.
1723   * 
1724   * @return The user's birthday as a {@code String}.
1725   */
1726  @java.lang.SuppressWarnings("all")
1727  public String getBirthday() {
1728    return this.birthday;
1729  }
1730
1731  /**
1732   * The user's birthday as a {@code String}.
1733   * <p>
1734   * Will always succeed, even if the user has specified month/year format only. If you'd like to use a typed version of
1735   * this accessor, call {@link #getBirthdayAsDate()} instead.
1736   */
1737  @java.lang.SuppressWarnings("all")
1738  public void setBirthday(final String birthday) {
1739    this.birthday = birthday;
1740  }
1741
1742  /**
1743   * The proxied or contact email address granted by the user.
1744   * 
1745   * @return The proxied or contact email address granted by the user.
1746   */
1747  @java.lang.SuppressWarnings("all")
1748  public String getEmail() {
1749    return this.email;
1750  }
1751
1752  /**
1753   * The proxied or contact email address granted by the user.
1754   */
1755  @java.lang.SuppressWarnings("all")
1756  public void setEmail(final String email) {
1757    this.email = email;
1758  }
1759
1760  /**
1761   * The user's timezone offset.
1762   * 
1763   * @return The user's timezone offset.
1764   */
1765  @java.lang.SuppressWarnings("all")
1766  public Double getTimezone() {
1767    return this.timezone;
1768  }
1769
1770  /**
1771   * The user's timezone offset.
1772   */
1773  @java.lang.SuppressWarnings("all")
1774  public void setTimezone(final Double timezone) {
1775    this.timezone = timezone;
1776  }
1777
1778  /**
1779   * Indicates whether the account has been verified. This is distinct from the <code>is_verified</code> field. Someone
1780   * is considered verified if they take any of the following actions:
1781   * <ul>
1782   * <li>Register for mobile</li>
1783   * <li>Confirm their account via SMS</li>
1784   * <li>Enter a valid credit card</li>
1785   * </ul>
1786   * 
1787   * @return User verification status.
1788   */
1789  @java.lang.SuppressWarnings("all")
1790  public Boolean getVerified() {
1791    return this.verified;
1792  }
1793
1794  /**
1795   * Indicates whether the account has been verified. This is distinct from the <code>is_verified</code> field. Someone
1796   * is considered verified if they take any of the following actions:
1797   * <ul>
1798   * <li>Register for mobile</li>
1799   * <li>Confirm their account via SMS</li>
1800   * <li>Enter a valid credit card</li>
1801   * </ul>
1802   */
1803  @java.lang.SuppressWarnings("all")
1804  public void setVerified(final Boolean verified) {
1805    this.verified = verified;
1806  }
1807
1808  /**
1809   * Video upload limits
1810   *
1811   * @return Video upload limits
1812   */
1813  @java.lang.SuppressWarnings("all")
1814  public VideoUploadLimits getVideoUploadLimits() {
1815    return this.videoUploadLimits;
1816  }
1817
1818  /**
1819   * Video upload limits
1820   */
1821  @java.lang.SuppressWarnings("all")
1822  public void setVideoUploadLimits(final VideoUploadLimits videoUploadLimits) {
1823    this.videoUploadLimits = videoUploadLimits;
1824  }
1825
1826  /**
1827   * Can the viewer send a gift to this person?
1828   *
1829   * @return Can the viewer send a gift to this person?
1830   */
1831  @java.lang.SuppressWarnings("all")
1832  public Boolean getViewerCanSendGift() {
1833    return this.viewerCanSendGift;
1834  }
1835
1836  /**
1837   * Can the viewer send a gift to this person?
1838   */
1839  @java.lang.SuppressWarnings("all")
1840  public void setViewerCanSendGift(final Boolean viewerCanSendGift) {
1841    this.viewerCanSendGift = viewerCanSendGift;
1842  }
1843
1844  /**
1845   * The user's gender.
1846   * 
1847   * @return The user's gender.
1848   */
1849  @java.lang.SuppressWarnings("all")
1850  public String getGender() {
1851    return this.gender;
1852  }
1853
1854  /**
1855   * The user's gender.
1856   */
1857  @java.lang.SuppressWarnings("all")
1858  public void setGender(final String gender) {
1859    this.gender = gender;
1860  }
1861
1862  /**
1863   * The user's political affiliation.
1864   * 
1865   * @return The user's political affiliation.
1866   * @deprecated since breaking change on 4 April, 2018
1867   */
1868  @java.lang.Deprecated
1869  @java.lang.SuppressWarnings("all")
1870  public String getPolitical() {
1871    return this.political;
1872  }
1873
1874  /**
1875   * The user's political affiliation.
1876   *
1877   * @deprecated since breaking change on 4 April, 2018
1878   */
1879  @java.lang.Deprecated
1880  @java.lang.SuppressWarnings("all")
1881  public void setPolitical(final String political) {
1882    this.political = political;
1883  }
1884
1885  /**
1886   * The user's locale.
1887   * 
1888   * @return The user's locale.
1889   */
1890  @java.lang.SuppressWarnings("all")
1891  public String getLocale() {
1892    return this.locale;
1893  }
1894
1895  /**
1896   * The user's locale.
1897   */
1898  @java.lang.SuppressWarnings("all")
1899  public void setLocale(final String locale) {
1900    this.locale = locale;
1901  }
1902
1903  /**
1904   * The user's Facebook username.
1905   *
1906   * @return The user's Facebook username.
1907   * @since 1.6.5
1908   * @deprecated since graph api 2.0
1909   */
1910  @java.lang.Deprecated
1911  @java.lang.SuppressWarnings("all")
1912  public String getUsername() {
1913    return this.username;
1914  }
1915
1916  /**
1917   * The user's Facebook username.
1918   *
1919   * @since 1.6.5
1920   * @deprecated since graph api 2.0
1921   */
1922  @java.lang.Deprecated
1923  @java.lang.SuppressWarnings("all")
1924  public void setUsername(final String username) {
1925    this.username = username;
1926  }
1927
1928  /**
1929   * The person's PGP public key
1930   *
1931   * @return The person's PGP public key
1932   */
1933  @java.lang.SuppressWarnings("all")
1934  public String getPublicKey() {
1935    return this.publicKey;
1936  }
1937
1938  /**
1939   * The person's PGP public key
1940   */
1941  @java.lang.SuppressWarnings("all")
1942  public void setPublicKey(final String publicKey) {
1943    this.publicKey = publicKey;
1944  }
1945
1946  /**
1947   * The user's Likes
1948   *
1949   * @return the user's Likes
1950   */
1951  @java.lang.SuppressWarnings("all")
1952  public Likes getLikes() {
1953    return this.likes;
1954  }
1955
1956  /**
1957   * The user's Likes
1958   */
1959  @java.lang.SuppressWarnings("all")
1960  public void setLikes(final Likes likes) {
1961    this.likes = likes;
1962  }
1963
1964  /**
1965   * The user's picture, if provided.
1966   * 
1967   * To force Facebook to fill the <code>picture</code> field you have to fetch the user with the
1968   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
1969   * 
1970   * @return the user's picture as ProfilePictureSource object
1971   * @since 1.6.16
1972   */
1973  @java.lang.SuppressWarnings("all")
1974  public ProfilePictureSource getPicture() {
1975    return this.picture;
1976  }
1977
1978  /**
1979   * The user's picture, if provided.
1980   * 
1981   * To force Facebook to fill the <code>picture</code> field you have to fetch the user with the
1982   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
1983   *
1984   * @since 1.6.16
1985   */
1986  @java.lang.SuppressWarnings("all")
1987  public void setPicture(final ProfilePictureSource picture) {
1988    this.picture = picture;
1989  }
1990
1991  /**
1992   * Duplicate mapping for "hometown" since FB can return it differently in different situations.
1993   * 
1994   * -- GETTER -- The user's hometown.
1995   * <p>
1996   * Sometimes this can be {@code null} - check {@link #getHometownName()} instead in that case.
1997   * 
1998   * @return The user's hometown.
1999   */
2000  @java.lang.SuppressWarnings("all")
2001  public NamedFacebookType getHometown() {
2002    return this.hometown;
2003  }
2004
2005  /**
2006   * Duplicate mapping for "hometown" since FB can return it differently in different situations.
2007   * 
2008   * -- GETTER -- The user's hometown.
2009   * <p>
2010   * Sometimes this can be {@code null} - check {@link #getHometownName()} instead in that case.
2011   */
2012  @java.lang.SuppressWarnings("all")
2013  public void setHometown(final NamedFacebookType hometown) {
2014    this.hometown = hometown;
2015  }
2016
2017  /**
2018   * The user's current location.
2019   * 
2020   * @return The user's current location.
2021   */
2022  @java.lang.SuppressWarnings("all")
2023  public NamedFacebookType getLocation() {
2024    return this.location;
2025  }
2026
2027  /**
2028   * The user's current location.
2029   */
2030  @java.lang.SuppressWarnings("all")
2031  public void setLocation(final NamedFacebookType location) {
2032    this.location = location;
2033  }
2034
2035  /**
2036   * Security settings
2037   *
2038   * @return Security settings
2039   */
2040  @java.lang.SuppressWarnings("all")
2041  public SecuritySettings getSecuritySettings() {
2042    return this.securitySettings;
2043  }
2044
2045  /**
2046   * Security settings
2047   */
2048  @java.lang.SuppressWarnings("all")
2049  public void setSecuritySettings(final SecuritySettings securitySettings) {
2050    this.securitySettings = securitySettings;
2051  }
2052
2053  /**
2054   * The time that the shared loginneeds to be upgraded to Business Manager by
2055   *
2056   * @return The time that the shared loginneeds to be upgraded to Business Manager by
2057   */
2058  @java.lang.SuppressWarnings("all")
2059  public Date getSharedLoginUpgradeRequiredBy() {
2060    return this.sharedLoginUpgradeRequiredBy;
2061  }
2062
2063  /**
2064   * The time that the shared loginneeds to be upgraded to Business Manager by
2065   */
2066  @java.lang.SuppressWarnings("all")
2067  public void setSharedLoginUpgradeRequiredBy(final Date sharedLoginUpgradeRequiredBy) {
2068    this.sharedLoginUpgradeRequiredBy = sharedLoginUpgradeRequiredBy;
2069  }
2070
2071  /**
2072   * The user's significant other.
2073   * 
2074   * @return The user's significant other.
2075   */
2076  @java.lang.SuppressWarnings("all")
2077  public NamedFacebookType getSignificantOther() {
2078    return this.significantOther;
2079  }
2080
2081  /**
2082   * The user's significant other.
2083   */
2084  @java.lang.SuppressWarnings("all")
2085  public void setSignificantOther(final NamedFacebookType significantOther) {
2086    this.significantOther = significantOther;
2087  }
2088
2089  /**
2090   * Platform test group
2091   *
2092   * @return Platform test group
2093   */
2094  @java.lang.SuppressWarnings("all")
2095  public Long getTestGroup() {
2096    return this.testGroup;
2097  }
2098
2099  /**
2100   * Platform test group
2101   */
2102  @java.lang.SuppressWarnings("all")
2103  public void setTestGroup(final Long testGroup) {
2104    this.testGroup = testGroup;
2105  }
2106
2107  /**
2108   * Date the user's profile was updated.
2109   * 
2110   * @return Date the user's profile was updated.
2111   */
2112  @java.lang.SuppressWarnings("all")
2113  public Date getUpdatedTime() {
2114    return this.updatedTime;
2115  }
2116
2117  /**
2118   * Date the user's profile was updated.
2119   */
2120  @java.lang.SuppressWarnings("all")
2121  public void setUpdatedTime(final Date updatedTime) {
2122    this.updatedTime = updatedTime;
2123  }
2124
2125  /**
2126   * An anonymous, but unique identifier for the user.
2127   * 
2128   * @return An anonymous, but unique identifier for the user.
2129   */
2130  @java.lang.SuppressWarnings("all")
2131  public String getThirdPartyId() {
2132    return this.thirdPartyId;
2133  }
2134
2135  /**
2136   * An anonymous, but unique identifier for the user.
2137   */
2138  @java.lang.SuppressWarnings("all")
2139  public void setThirdPartyId(final String thirdPartyId) {
2140    this.thirdPartyId = thirdPartyId;
2141  }
2142
2143  /**
2144   * The user's currency preferences.
2145   * <p>
2146   * Further documentation available on Facebook's
2147   * <a href="https://developers.facebook.com/docs/payments/user_currency">Displaying prices in user's currency</a>
2148   * page.
2149   * 
2150   * @return The user's currency preferences.
2151   * @since 1.6.12
2152   */
2153  @java.lang.SuppressWarnings("all")
2154  public Currency getCurrency() {
2155    return this.currency;
2156  }
2157
2158  /**
2159   * The user's currency preferences.
2160   * <p>
2161   * Further documentation available on Facebook's
2162   * <a href="https://developers.facebook.com/docs/payments/user_currency">Displaying prices in user's currency</a>
2163   * page.
2164   *
2165   * @since 1.6.12
2166   */
2167  @java.lang.SuppressWarnings("all")
2168  public void setCurrency(final Currency currency) {
2169    this.currency = currency;
2170  }
2171
2172  /**
2173   * This returns a string which is the same for this person across all the apps managed by the same Business Manager.
2174   * 
2175   * @return string which is the same for a person across all apps managed by one company
2176   * @since 1.7.0
2177   */
2178  @java.lang.SuppressWarnings("all")
2179  public String getTokenForBusiness() {
2180    return this.tokenForBusiness;
2181  }
2182
2183  /**
2184   * This returns a string which is the same for this person across all the apps managed by the same Business Manager.
2185   *
2186   * @since 1.7.0
2187   */
2188  @java.lang.SuppressWarnings("all")
2189  public void setTokenForBusiness(final String tokenForBusiness) {
2190    this.tokenForBusiness = tokenForBusiness;
2191  }
2192
2193  /**
2194   * Install type.
2195   *
2196   * @return Install type.
2197   */
2198  @java.lang.SuppressWarnings("all")
2199  public String getInstallType() {
2200    return this.installType;
2201  }
2202
2203  /**
2204   * Install type.
2205   */
2206  @java.lang.SuppressWarnings("all")
2207  public void setInstallType(final String installType) {
2208    this.installType = installType;
2209  }
2210
2211  /**
2212   * Is the app making the request installed?
2213   *
2214   * @return Is the app making the request installed?
2215   */
2216  @java.lang.SuppressWarnings("all")
2217  public Boolean getInstalled() {
2218    return this.installed;
2219  }
2220
2221  /**
2222   * Is the app making the request installed?
2223   */
2224  @java.lang.SuppressWarnings("all")
2225  public void setInstalled(final Boolean installed) {
2226    this.installed = installed;
2227  }
2228
2229  /**
2230   * Is this a shared login (e.g. a gray user)
2231   *
2232   * @return Is this a shared login (e.g. a gray user)
2233   */
2234  @java.lang.SuppressWarnings("all")
2235  public Boolean getIsSharedLogin() {
2236    return this.isSharedLogin;
2237  }
2238
2239  /**
2240   * Is this a shared login (e.g. a gray user)
2241   */
2242  @java.lang.SuppressWarnings("all")
2243  public void setIsSharedLogin(final Boolean isSharedLogin) {
2244    this.isSharedLogin = isSharedLogin;
2245  }
2246
2247  /**
2248   * People with large numbers of followers can have the authenticity of their identity manually verified by Facebook.
2249   * This field indicates whether the person's profile is verified in this way.
2250   *
2251   * This is distinct from the <code>verified</code> field
2252   *
2253   * @return Is the user verified
2254   */
2255  @java.lang.SuppressWarnings("all")
2256  public Boolean getIsVerified() {
2257    return this.isVerified;
2258  }
2259
2260  /**
2261   * People with large numbers of followers can have the authenticity of their identity manually verified by Facebook.
2262   * This field indicates whether the person's profile is verified in this way.
2263   *
2264   * This is distinct from the <code>verified</code> field
2265   */
2266  @java.lang.SuppressWarnings("all")
2267  public void setIsVerified(final Boolean isVerified) {
2268    this.isVerified = isVerified;
2269  }
2270}