/*
 * The Plaid API
 * The Plaid REST API. Please see https://plaid.com/docs/api for more details.
 *
 * The version of the OpenAPI document: 2020-09-14_1.680.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.plaid.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
 * OAuth token introspect response
 */
@ApiModel(description = "OAuth token introspect response")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class OAuthIntrospectResponse {
  public static final String SERIALIZED_NAME_ACTIVE = "active";
  @SerializedName(SERIALIZED_NAME_ACTIVE)
  private Boolean active;

  public static final String SERIALIZED_NAME_SCOPE = "scope";
  @SerializedName(SERIALIZED_NAME_SCOPE)
  private String scope;

  public static final String SERIALIZED_NAME_CLIENT_ID = "client_id";
  @SerializedName(SERIALIZED_NAME_CLIENT_ID)
  private String clientId;

  public static final String SERIALIZED_NAME_EXP = "exp";
  @SerializedName(SERIALIZED_NAME_EXP)
  private Integer exp;

  public static final String SERIALIZED_NAME_IAT = "iat";
  @SerializedName(SERIALIZED_NAME_IAT)
  private Integer iat;

  public static final String SERIALIZED_NAME_SUB = "sub";
  @SerializedName(SERIALIZED_NAME_SUB)
  private String sub;

  public static final String SERIALIZED_NAME_AUD = "aud";
  @SerializedName(SERIALIZED_NAME_AUD)
  private String aud;

  public static final String SERIALIZED_NAME_ISS = "iss";
  @SerializedName(SERIALIZED_NAME_ISS)
  private String iss;

  public static final String SERIALIZED_NAME_TOKEN_TYPE = "token_type";
  @SerializedName(SERIALIZED_NAME_TOKEN_TYPE)
  private String tokenType;

  public static final String SERIALIZED_NAME_USER_ID = "user_id";
  @SerializedName(SERIALIZED_NAME_USER_ID)
  private String userId;

  public static final String SERIALIZED_NAME_REQUEST_ID = "request_id";
  @SerializedName(SERIALIZED_NAME_REQUEST_ID)
  private String requestId;


  public OAuthIntrospectResponse active(Boolean active) {
    
    this.active = active;
    return this;
  }

   /**
   * Boolean indicator of whether or not the presented token is currently active. A &#x60;true&#x60; value indicates that the token has been issued, has not been revoked, and is within the time window of validity.
   * @return active
  **/
  @ApiModelProperty(required = true, value = "Boolean indicator of whether or not the presented token is currently active. A `true` value indicates that the token has been issued, has not been revoked, and is within the time window of validity.")

  public Boolean getActive() {
    return active;
  }


  public void setActive(Boolean active) {
    this.active = active;
  }


  public OAuthIntrospectResponse scope(String scope) {
    
    this.scope = scope;
    return this;
  }

   /**
   * A JSON string containing a space-separated list of scopes associated with this token, in the format described in [https://datatracker.ietf.org/doc/html/rfc6749#section-3.3](https://datatracker.ietf.org/doc/html/rfc6749#section-3.3). Currently accepted values are:  &#x60;user:read&#x60; allows reading user data. &#x60;user:write&#x60; allows writing user data. &#x60;exchange&#x60; allows exchanging a token using the &#x60;urn:plaid:params:oauth:user-token&#x60; grant type. &#x60;mcp:dashboard&#x60; allows access to the MCP dashboard server.
   * @return scope
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "user:read user:write exchange", value = "A JSON string containing a space-separated list of scopes associated with this token, in the format described in [https://datatracker.ietf.org/doc/html/rfc6749#section-3.3](https://datatracker.ietf.org/doc/html/rfc6749#section-3.3). Currently accepted values are:  `user:read` allows reading user data. `user:write` allows writing user data. `exchange` allows exchanging a token using the `urn:plaid:params:oauth:user-token` grant type. `mcp:dashboard` allows access to the MCP dashboard server.")

  public String getScope() {
    return scope;
  }


  public void setScope(String scope) {
    this.scope = scope;
  }


  public OAuthIntrospectResponse clientId(String clientId) {
    
    this.clientId = clientId;
    return this;
  }

   /**
   * Your Plaid API &#x60;client_id&#x60;. The &#x60;client_id&#x60; is required and may be provided either in the &#x60;PLAID-CLIENT-ID&#x60; header or as part of a request body.
   * @return clientId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.")

  public String getClientId() {
    return clientId;
  }


  public void setClientId(String clientId) {
    this.clientId = clientId;
  }


  public OAuthIntrospectResponse exp(Integer exp) {
    
    this.exp = exp;
    return this;
  }

   /**
   * Expiration time as UNIX timestamp since January 1 1970 UTC
   * @return exp
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "1670000000", value = "Expiration time as UNIX timestamp since January 1 1970 UTC")

  public Integer getExp() {
    return exp;
  }


  public void setExp(Integer exp) {
    this.exp = exp;
  }


  public OAuthIntrospectResponse iat(Integer iat) {
    
    this.iat = iat;
    return this;
  }

   /**
   * Issued at time as UNIX timestamp since January 1 1970 UTC
   * @return iat
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "1670000000", value = "Issued at time as UNIX timestamp since January 1 1970 UTC")

  public Integer getIat() {
    return iat;
  }


  public void setIat(Integer iat) {
    this.iat = iat;
  }


  public OAuthIntrospectResponse sub(String sub) {
    
    this.sub = sub;
    return this;
  }

   /**
   * Subject of the token
   * @return sub
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "68028ce48d2b0dec68747f6c", value = "Subject of the token")

  public String getSub() {
    return sub;
  }


  public void setSub(String sub) {
    this.sub = sub;
  }


  public OAuthIntrospectResponse aud(String aud) {
    
    this.aud = aud;
    return this;
  }

   /**
   * Audience of the token
   * @return aud
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "https://production.plaid.com", value = "Audience of the token")

  public String getAud() {
    return aud;
  }


  public void setAud(String aud) {
    this.aud = aud;
  }


  public OAuthIntrospectResponse iss(String iss) {
    
    this.iss = iss;
    return this;
  }

   /**
   * Issuer of the token
   * @return iss
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "https://production.plaid.com", value = "Issuer of the token")

  public String getIss() {
    return iss;
  }


  public void setIss(String iss) {
    this.iss = iss;
  }


  public OAuthIntrospectResponse tokenType(String tokenType) {
    
    this.tokenType = tokenType;
    return this;
  }

   /**
   * Type of the token
   * @return tokenType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Bearer", value = "Type of the token")

  public String getTokenType() {
    return tokenType;
  }


  public void setTokenType(String tokenType) {
    this.tokenType = tokenType;
  }


  public OAuthIntrospectResponse userId(String userId) {
    
    this.userId = userId;
    return this;
  }

   /**
   * User ID of the token
   * @return userId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "wz666MBjYWTp2PDzzggYhM6oWWmBb", value = "User ID of the token")

  public String getUserId() {
    return userId;
  }


  public void setUserId(String userId) {
    this.userId = userId;
  }


  public OAuthIntrospectResponse requestId(String requestId) {
    
    this.requestId = requestId;
    return this;
  }

   /**
   * A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
   * @return requestId
  **/
  @ApiModelProperty(required = true, value = "A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.")

  public String getRequestId() {
    return requestId;
  }


  public void setRequestId(String requestId) {
    this.requestId = requestId;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OAuthIntrospectResponse oauthIntrospectResponse = (OAuthIntrospectResponse) o;
    return Objects.equals(this.active, oauthIntrospectResponse.active) &&
        Objects.equals(this.scope, oauthIntrospectResponse.scope) &&
        Objects.equals(this.clientId, oauthIntrospectResponse.clientId) &&
        Objects.equals(this.exp, oauthIntrospectResponse.exp) &&
        Objects.equals(this.iat, oauthIntrospectResponse.iat) &&
        Objects.equals(this.sub, oauthIntrospectResponse.sub) &&
        Objects.equals(this.aud, oauthIntrospectResponse.aud) &&
        Objects.equals(this.iss, oauthIntrospectResponse.iss) &&
        Objects.equals(this.tokenType, oauthIntrospectResponse.tokenType) &&
        Objects.equals(this.userId, oauthIntrospectResponse.userId) &&
        Objects.equals(this.requestId, oauthIntrospectResponse.requestId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(active, scope, clientId, exp, iat, sub, aud, iss, tokenType, userId, requestId);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class OAuthIntrospectResponse {\n");
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
    sb.append("    scope: ").append(toIndentedString(scope)).append("\n");
    sb.append("    clientId: ").append(toIndentedString(clientId)).append("\n");
    sb.append("    exp: ").append(toIndentedString(exp)).append("\n");
    sb.append("    iat: ").append(toIndentedString(iat)).append("\n");
    sb.append("    sub: ").append(toIndentedString(sub)).append("\n");
    sb.append("    aud: ").append(toIndentedString(aud)).append("\n");
    sb.append("    iss: ").append(toIndentedString(iss)).append("\n");
    sb.append("    tokenType: ").append(toIndentedString(tokenType)).append("\n");
    sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
    sb.append("    requestId: ").append(toIndentedString(requestId)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

