AuthorizationRequest.java 5.04 KB
package com.bitstrips.imoji.monouser.models;

import android.net.Uri;
import android.net.Uri.Builder;
import android.support.annotation.Nullable;
import android.text.TextUtils;
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 AuthorizationRequest
  implements Serializable
{
  private static final long serialVersionUID = -8678122209446596677L;
  @Expose
  @SerializedName("mResponseType")
  private String a;
  @Expose
  @SerializedName("mClientId")
  private String b;
  @Expose
  @SerializedName("mScope")
  private String c;
  @Expose
  @SerializedName("mRedirectUri")
  private String d;
  @Expose
  @SerializedName("mState")
  private String e;
  @Expose
  @SerializedName("mCodeVerifier")
  private String f;
  @Expose
  @SerializedName("mCodeChallengeMethod")
  private String g;
  @Expose
  @SerializedName("mCodeChallenge")
  private String h;
  
  public boolean equals(Object paramObject)
  {
    if (paramObject == this) {
      return true;
    }
    if (!(paramObject instanceof AuthorizationRequest)) {
      return false;
    }
    paramObject = (AuthorizationRequest)paramObject;
    return new EqualsBuilder().append(this.a, ((AuthorizationRequest)paramObject).a).append(this.b, ((AuthorizationRequest)paramObject).b).append(this.c, ((AuthorizationRequest)paramObject).c).append(this.d, ((AuthorizationRequest)paramObject).d).append(this.e, ((AuthorizationRequest)paramObject).e).append(this.f, ((AuthorizationRequest)paramObject).f).append(this.g, ((AuthorizationRequest)paramObject).g).append(this.h, ((AuthorizationRequest)paramObject).h).isEquals();
  }
  
  public String getClientId()
  {
    return this.b;
  }
  
  public String getCodeChallenge()
  {
    return this.h;
  }
  
  public String getCodeChallengeMethod()
  {
    return this.g;
  }
  
  public String getCodeVerifier()
  {
    return this.f;
  }
  
  public String getRedirectUri()
  {
    return this.d;
  }
  
  public String getResponseType()
  {
    return this.a;
  }
  
  public String getScope()
  {
    return this.c;
  }
  
  public String getState()
  {
    return this.e;
  }
  
  public int hashCode()
  {
    return new HashCodeBuilder().append(this.a).append(this.b).append(this.c).append(this.d).append(this.e).append(this.f).append(this.g).append(this.h).toHashCode();
  }
  
  public void setClientId(String paramString)
  {
    this.b = paramString;
  }
  
  public void setCodeChallenge(String paramString)
  {
    this.h = paramString;
  }
  
  public void setCodeChallengeMethod(String paramString)
  {
    this.g = paramString;
  }
  
  public void setCodeVerifier(String paramString)
  {
    this.f = paramString;
  }
  
  public void setRedirectUri(String paramString)
  {
    this.d = paramString;
  }
  
  public void setResponseType(String paramString)
  {
    this.a = paramString;
  }
  
  public void setScope(String paramString)
  {
    this.c = paramString;
  }
  
  public void setState(String paramString)
  {
    this.e = paramString;
  }
  
  public String toJson()
  {
    return new Gson().toJson(this);
  }
  
  public String toString()
  {
    return ToStringBuilder.reflectionToString(this);
  }
  
  public Uri toUri(@Nullable String paramString)
  {
    String str = paramString;
    if (TextUtils.isEmpty(paramString)) {
      str = OAuth2Constants.OAUTH2_ACCOUNTS_ENDPOINT + "/accounts";
    }
    return Uri.parse(str + "/oauth2/auth").buildUpon().appendQueryParameter("response_type", this.a).appendQueryParameter("client_id", this.b).appendQueryParameter("redirect_uri", this.d).appendQueryParameter("scope", this.c).appendQueryParameter("state", this.e).appendQueryParameter("code_challenge_method", this.g).appendQueryParameter("code_challenge", this.h).build();
  }
  
  public AuthorizationRequest withClientId(String paramString)
  {
    this.b = paramString;
    return this;
  }
  
  public AuthorizationRequest withCodeChallenge(String paramString)
  {
    this.h = paramString;
    return this;
  }
  
  public AuthorizationRequest withCodeChallengeMethod(String paramString)
  {
    this.g = paramString;
    return this;
  }
  
  public AuthorizationRequest withCodeVerifier(String paramString)
  {
    this.f = paramString;
    return this;
  }
  
  public AuthorizationRequest withRedirectUri(String paramString)
  {
    this.d = paramString;
    return this;
  }
  
  public AuthorizationRequest withResponseType(String paramString)
  {
    this.a = paramString;
    return this;
  }
  
  public AuthorizationRequest withScope(String paramString)
  {
    this.c = paramString;
    return this;
  }
  
  public AuthorizationRequest withState(String paramString)
  {
    this.e = paramString;
    return this;
  }
}


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