AuthToken.java 3.05 KB
package com.bitstrips.imoji.monouser.models;

import com.google.gson.Gson;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

public class AuthToken
  implements Serializable
{
  private static final long serialVersionUID = 2128145895370237959L;
  @Expose
  @SerializedName("access_token")
  private String a;
  @Expose
  @SerializedName("token_type")
  private String b;
  @Expose
  @SerializedName("refresh_token")
  private String c;
  @Expose
  @SerializedName("expires_in")
  private long d;
  @Expose
  @SerializedName("last_updated")
  private long e;
  
  public boolean equals(Object paramObject)
  {
    if (paramObject == this) {
      return true;
    }
    if (!(paramObject instanceof AuthToken)) {
      return false;
    }
    paramObject = (AuthToken)paramObject;
    return new EqualsBuilder().append(this.a, ((AuthToken)paramObject).a).append(this.b, ((AuthToken)paramObject).b).append(this.c, ((AuthToken)paramObject).c).append(this.d, ((AuthToken)paramObject).d).append(this.e, ((AuthToken)paramObject).e).isEquals();
  }
  
  public String getAccessToken()
  {
    return this.a;
  }
  
  public long getExpiresIn()
  {
    return this.d;
  }
  
  public long getExpiresInMillis()
  {
    return this.d * 1000L;
  }
  
  public long getLastUpdated()
  {
    return this.e;
  }
  
  public String getRefreshToken()
  {
    return this.c;
  }
  
  public String getTokenType()
  {
    return this.b;
  }
  
  public int hashCode()
  {
    return new HashCodeBuilder().append(this.a).append(this.b).append(this.c).append(this.d).append(this.e).toHashCode();
  }
  
  public void setAccessToken(String paramString)
  {
    this.a = paramString;
  }
  
  public void setExpiresIn(long paramLong)
  {
    this.d = paramLong;
  }
  
  public void setLastUpdated(long paramLong)
  {
    this.e = paramLong;
  }
  
  public void setRefreshToken(String paramString)
  {
    this.c = paramString;
  }
  
  public void setTokenType(String paramString)
  {
    this.b = paramString;
  }
  
  public String toJson()
  {
    return new Gson().toJson(this);
  }
  
  public String toString()
  {
    return ToStringBuilder.reflectionToString(this);
  }
  
  public AuthToken withAccessToken(String paramString)
  {
    this.a = paramString;
    return this;
  }
  
  public AuthToken withExpiresIn(long paramLong)
  {
    this.d = paramLong;
    return this;
  }
  
  public AuthToken withLastUpdated(long paramLong)
  {
    this.e = paramLong;
    return this;
  }
  
  public AuthToken withRefreshToken(String paramString)
  {
    this.c = paramString;
    return this;
  }
  
  public AuthToken withTokenType(String paramString)
  {
    this.b = paramString;
    return this;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/monouser/models/AuthToken.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */