content: /*
   * Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
   */
  
  package io.airbyte.config;
  
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyDescription;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.Objects;
  
  /**
   * AuthRefreshToken
   * <p>
   * A refresh token that can be used to retrieve a new access token for auth.
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "value",
    "sessionId",
    "revoked",
    "createdAt",
    "updatedAt"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class AuthRefreshToken implements Serializable {
  
    /**
     * The token value itself (Required)
     *
     */
    @JsonProperty("value")
    @JsonPropertyDescription("The token value itself")
    private String value;
    /**
     * Id of the session that the token is associated with (Required)
     *
     */
    @JsonProperty("sessionId")
    @JsonPropertyDescription("Id of the session that the token is associated with")
    private String sessionId;
    /**
     * True if the token can no longer be used to retrieve a new access token (Required)
     *
     */
    @JsonProperty("revoked")
    @JsonPropertyDescription("True if the token can no longer be used to retrieve a new access token")
    private Boolean revoked;
    /**
     * creation timestamp of the refresh token (Required)
     *
     */
    @JsonProperty("createdAt")
    @JsonPropertyDescription("creation timestamp of the refresh token")
    private Long createdAt;
    /**
     * last updated timestamp of the refresh token (Required)
     *
     */
    @JsonProperty("updatedAt")
    @JsonPropertyDescription("last updated timestamp of the refresh token")
    private Long updatedAt;
    private final static long serialVersionUID = 2453910443583085437L;
  
    /**
     * The token value itself (Required)
     *
     */
    @JsonProperty("value")
    public String getValue() {
      return value;
    }
  
    /**
     * The token value itself (Required)
     *
     */
    @JsonProperty("value")
    public void setValue(String value) {
      this.value = value;
    }
  
    public AuthRefreshToken withValue(String value) {
      this.value = value;
      return this;
    }
  
    /**
     * Id of the session that the token is associated with (Required)
     *
     */
    @JsonProperty("sessionId")
    public String getSessionId() {
      return sessionId;
    }
  
    /**
     * Id of the session that the token is associated with (Required)
     *
     */
    @JsonProperty("sessionId")
    public void setSessionId(String sessionId) {
      this.sessionId = sessionId;
    }
  
    public AuthRefreshToken withSessionId(String sessionId) {
      this.sessionId = sessionId;
      return this;
    }
  
    /**
     * True if the token can no longer be used to retrieve a new access token (Required)
     *
     */
    @JsonProperty("revoked")
    public Boolean getRevoked() {
      return revoked;
    }
  
    /**
     * True if the token can no longer be used to retrieve a new access token (Required)
     *
     */
    @JsonProperty("revoked")
    public void setRevoked(Boolean revoked) {
      this.revoked = revoked;
    }
  
    public AuthRefreshToken withRevoked(Boolean revoked) {
      this.revoked = revoked;
      return this;
    }
  
    /**
     * creation timestamp of the refresh token (Required)
     *
     */
    @JsonProperty("createdAt")
    public Long getCreatedAt() {
      return createdAt;
    }
  
    /**
     * creation timestamp of the refresh token (Required)
     *
     */
    @JsonProperty("createdAt")
    public void setCreatedAt(Long createdAt) {
      this.createdAt = createdAt;
    }
  
    public AuthRefreshToken withCreatedAt(Long createdAt) {
      this.createdAt = createdAt;
      return this;
    }
  
    /**
     * last updated timestamp of the refresh token (Required)
     *
     */
    @JsonProperty("updatedAt")
    public Long getUpdatedAt() {
      return updatedAt;
    }
  
    /**
     * last updated timestamp of the refresh token (Required)
     *
     */
    @JsonProperty("updatedAt")
    public void setUpdatedAt(Long updatedAt) {
      this.updatedAt = updatedAt;
    }
  
    public AuthRefreshToken withUpdatedAt(Long updatedAt) {
      this.updatedAt = updatedAt;
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(AuthRefreshToken.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("value");
      sb.append('=');
      sb.append(((this.value == null) ? "<null>" : this.value));
      sb.append(',');
      sb.append("sessionId");
      sb.append('=');
      sb.append(((this.sessionId == null) ? "<null>" : this.sessionId));
      sb.append(',');
      sb.append("revoked");
      sb.append('=');
      sb.append(((this.revoked == null) ? "<null>" : this.revoked));
      sb.append(',');
      sb.append("createdAt");
      sb.append('=');
      sb.append(((this.createdAt == null) ? "<null>" : this.createdAt));
      sb.append(',');
      sb.append("updatedAt");
      sb.append('=');
      sb.append(((this.updatedAt == null) ? "<null>" : this.updatedAt));
      sb.append(',');
      if (sb.charAt((sb.length() - 1)) == ',') {
        sb.setCharAt((sb.length() - 1), ']');
      } else {
        sb.append(']');
      }
      return sb.toString();
    }
  
    @Override
    public int hashCode() {
      int result = 1;
      result = ((result * 31) + ((this.createdAt == null) ? 0 : this.createdAt.hashCode()));
      result = ((result * 31) + ((this.sessionId == null) ? 0 : this.sessionId.hashCode()));
      result = ((result * 31) + ((this.revoked == null) ? 0 : this.revoked.hashCode()));
      result = ((result * 31) + ((this.value == null) ? 0 : this.value.hashCode()));
      result = ((result * 31) + ((this.updatedAt == null) ? 0 : this.updatedAt.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof AuthRefreshToken) == false) {
        return false;
      }
      AuthRefreshToken rhs = ((AuthRefreshToken) other);
      return ((((((Objects.equals(this.createdAt, rhs.createdAt)) || ((this.createdAt != null) && this.createdAt.equals(rhs.createdAt)))
          && (Objects.equals(this.sessionId, rhs.sessionId)))
          && ((this.revoked == rhs.revoked) || ((this.revoked != null) && this.revoked.equals(rhs.revoked))))
          && ((Objects.equals(this.value, rhs.value)) || ((this.value != null) && this.value.equals(rhs.value))))
          && ((Objects.equals(this.updatedAt, rhs.updatedAt)) || ((this.updatedAt != null) && this.updatedAt.equals(rhs.updatedAt))));
    }
  
  }
  