/*
 * Kubernetes
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v1.11.4
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package io.kubernetes.client.models;

import java.util.Objects;
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.kubernetes.client.models.V1beta1UserInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
 * TokenReviewStatus is the result of the token authentication request.
 */
@ApiModel(description = "TokenReviewStatus is the result of the token authentication request.")

public class V1beta1TokenReviewStatus {
  @SerializedName("authenticated")
  private Boolean authenticated = null;

  @SerializedName("error")
  private String error = null;

  @SerializedName("user")
  private V1beta1UserInfo user = null;

  public V1beta1TokenReviewStatus authenticated(Boolean authenticated) {
    this.authenticated = authenticated;
    return this;
  }

   /**
   * Authenticated indicates that the token was associated with a known user.
   * @return authenticated
  **/
  @ApiModelProperty(value = "Authenticated indicates that the token was associated with a known user.")
  public Boolean isAuthenticated() {
    return authenticated;
  }

  public void setAuthenticated(Boolean authenticated) {
    this.authenticated = authenticated;
  }

  public V1beta1TokenReviewStatus error(String error) {
    this.error = error;
    return this;
  }

   /**
   * Error indicates that the token couldn&#39;t be checked
   * @return error
  **/
  @ApiModelProperty(value = "Error indicates that the token couldn't be checked")
  public String getError() {
    return error;
  }

  public void setError(String error) {
    this.error = error;
  }

  public V1beta1TokenReviewStatus user(V1beta1UserInfo user) {
    this.user = user;
    return this;
  }

   /**
   * User is the UserInfo associated with the provided token.
   * @return user
  **/
  @ApiModelProperty(value = "User is the UserInfo associated with the provided token.")
  public V1beta1UserInfo getUser() {
    return user;
  }

  public void setUser(V1beta1UserInfo user) {
    this.user = user;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1beta1TokenReviewStatus v1beta1TokenReviewStatus = (V1beta1TokenReviewStatus) o;
    return Objects.equals(this.authenticated, v1beta1TokenReviewStatus.authenticated) &&
        Objects.equals(this.error, v1beta1TokenReviewStatus.error) &&
        Objects.equals(this.user, v1beta1TokenReviewStatus.user);
  }

  @Override
  public int hashCode() {
    return Objects.hash(authenticated, error, user);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1beta1TokenReviewStatus {\n");
    
    sb.append("    authenticated: ").append(toIndentedString(authenticated)).append("\n");
    sb.append("    error: ").append(toIndentedString(error)).append("\n");
    sb.append("    user: ").append(toIndentedString(user)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

