001// Generated by delombok at Fri Oct 04 16:05:59 CEST 2024
002/*
003 * Copyright (c) 2010-2024 Mark Allen, Norbert Bartels.
004 *
005 * Permission is hereby granted, free of charge, to any person obtaining a copy
006 * of this software and associated documentation files (the "Software"), to deal
007 * in the Software without restriction, including without limitation the rights
008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
009 * copies of the Software, and to permit persons to whom the Software is
010 * furnished to do so, subject to the following conditions:
011 *
012 * The above copyright notice and this permission notice shall be included in
013 * all copies or substantial portions of the Software.
014 *
015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
021 * THE SOFTWARE.
022 */
023package com.restfb.types;
024
025import com.restfb.Facebook;
026
027public class DeviceCode extends AbstractFacebookType {
028  private static final long serialVersionUID = 1L;
029  /**
030   * Code used in the authorization poll
031   */
032  @Facebook
033  private String code;
034  /**
035   * String to be shown to the user
036   */
037  @Facebook("user_code")
038  private String userCode;
039  /**
040   * Url the user should call.
041   * <p>
042   * Here he should add the user code
043   */
044  @Facebook("verification_uri")
045  private String verificationUri;
046  /**
047   * The code expires in these seconds.
048   * <p>
049   * You should cancel the login flow after that time if you do not receive an access token
050   */
051  @Facebook("expires_in")
052  private Integer expiresIn;
053  /**
054   * Your device should poll the Device Login API every <code>interval</code> seconds to see if the authorization has
055   * been successful
056   */
057  @Facebook
058  private Integer interval;
059
060  /**
061   * Code used in the authorization poll
062   */
063  @java.lang.SuppressWarnings("all")
064  public String getCode() {
065    return this.code;
066  }
067
068  /**
069   * Code used in the authorization poll
070   */
071  @java.lang.SuppressWarnings("all")
072  public void setCode(final String code) {
073    this.code = code;
074  }
075
076  /**
077   * String to be shown to the user
078   */
079  @java.lang.SuppressWarnings("all")
080  public String getUserCode() {
081    return this.userCode;
082  }
083
084  /**
085   * String to be shown to the user
086   */
087  @java.lang.SuppressWarnings("all")
088  public void setUserCode(final String userCode) {
089    this.userCode = userCode;
090  }
091
092  /**
093   * Url the user should call.
094   * <p>
095   * Here he should add the user code
096   */
097  @java.lang.SuppressWarnings("all")
098  public String getVerificationUri() {
099    return this.verificationUri;
100  }
101
102  /**
103   * Url the user should call.
104   * <p>
105   * Here he should add the user code
106   */
107  @java.lang.SuppressWarnings("all")
108  public void setVerificationUri(final String verificationUri) {
109    this.verificationUri = verificationUri;
110  }
111
112  /**
113   * The code expires in these seconds.
114   * <p>
115   * You should cancel the login flow after that time if you do not receive an access token
116   */
117  @java.lang.SuppressWarnings("all")
118  public Integer getExpiresIn() {
119    return this.expiresIn;
120  }
121
122  /**
123   * The code expires in these seconds.
124   * <p>
125   * You should cancel the login flow after that time if you do not receive an access token
126   */
127  @java.lang.SuppressWarnings("all")
128  public void setExpiresIn(final Integer expiresIn) {
129    this.expiresIn = expiresIn;
130  }
131
132  /**
133   * Your device should poll the Device Login API every <code>interval</code> seconds to see if the authorization has
134   * been successful
135   */
136  @java.lang.SuppressWarnings("all")
137  public Integer getInterval() {
138    return this.interval;
139  }
140
141  /**
142   * Your device should poll the Device Login API every <code>interval</code> seconds to see if the authorization has
143   * been successful
144   */
145  @java.lang.SuppressWarnings("all")
146  public void setInterval(final Integer interval) {
147    this.interval = interval;
148  }
149}