/*
 * 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 com.plaid.client.model.PrismCashScoreMetadata;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * The data from the CashScore® Detect product returned by Prism Data.
 */
@ApiModel(description = "The data from the CashScore® Detect product returned by Prism Data.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class PrismDetect {
  public static final String SERIALIZED_NAME_MODEL_VERSION = "model_version";
  @SerializedName(SERIALIZED_NAME_MODEL_VERSION)
  private String modelVersion;

  public static final String SERIALIZED_NAME_SCORE = "score";
  @SerializedName(SERIALIZED_NAME_SCORE)
  private Integer score;

  public static final String SERIALIZED_NAME_REASON_CODES = "reason_codes";
  @SerializedName(SERIALIZED_NAME_REASON_CODES)
  private List<String> reasonCodes = null;

  public static final String SERIALIZED_NAME_METADATA = "metadata";
  @SerializedName(SERIALIZED_NAME_METADATA)
  private PrismCashScoreMetadata metadata;

  public static final String SERIALIZED_NAME_ERROR_REASON = "error_reason";
  @SerializedName(SERIALIZED_NAME_ERROR_REASON)
  private String errorReason;


  public PrismDetect modelVersion(String modelVersion) {
    
    this.modelVersion = modelVersion;
    return this;
  }

   /**
   * The version of Prism Data&#39;s CashScore® Detect model used.
   * @return modelVersion
  **/
  @ApiModelProperty(required = true, value = "The version of Prism Data's CashScore® Detect model used.")

  public String getModelVersion() {
    return modelVersion;
  }


  public void setModelVersion(String modelVersion) {
    this.modelVersion = modelVersion;
  }


  public PrismDetect score(Integer score) {
    
    this.score = score;
    return this;
  }

   /**
   * The score returned by Prism Data. Ranges from 1-999, with higher score indicating lower risk.
   * @return score
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "The score returned by Prism Data. Ranges from 1-999, with higher score indicating lower risk.")

  public Integer getScore() {
    return score;
  }


  public void setScore(Integer score) {
    this.score = score;
  }


  public PrismDetect reasonCodes(List<String> reasonCodes) {
    
    this.reasonCodes = reasonCodes;
    return this;
  }

  public PrismDetect addReasonCodesItem(String reasonCodesItem) {
    if (this.reasonCodes == null) {
      this.reasonCodes = new ArrayList<>();
    }
    this.reasonCodes.add(reasonCodesItem);
    return this;
  }

   /**
   * The reasons for an individual having risk according to the CashScore® Detect score.
   * @return reasonCodes
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The reasons for an individual having risk according to the CashScore® Detect score.")

  public List<String> getReasonCodes() {
    return reasonCodes;
  }


  public void setReasonCodes(List<String> reasonCodes) {
    this.reasonCodes = reasonCodes;
  }


  public PrismDetect metadata(PrismCashScoreMetadata metadata) {
    
    this.metadata = metadata;
    return this;
  }

   /**
   * Get metadata
   * @return metadata
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public PrismCashScoreMetadata getMetadata() {
    return metadata;
  }


  public void setMetadata(PrismCashScoreMetadata metadata) {
    this.metadata = metadata;
  }


  public PrismDetect errorReason(String errorReason) {
    
    this.errorReason = errorReason;
    return this;
  }

   /**
   * The error returned by Prism for this product.
   * @return errorReason
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The error returned by Prism for this product.")

  public String getErrorReason() {
    return errorReason;
  }


  public void setErrorReason(String errorReason) {
    this.errorReason = errorReason;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PrismDetect prismDetect = (PrismDetect) o;
    return Objects.equals(this.modelVersion, prismDetect.modelVersion) &&
        Objects.equals(this.score, prismDetect.score) &&
        Objects.equals(this.reasonCodes, prismDetect.reasonCodes) &&
        Objects.equals(this.metadata, prismDetect.metadata) &&
        Objects.equals(this.errorReason, prismDetect.errorReason);
  }

  @Override
  public int hashCode() {
    return Objects.hash(modelVersion, score, reasonCodes, metadata, errorReason);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PrismDetect {\n");
    sb.append("    modelVersion: ").append(toIndentedString(modelVersion)).append("\n");
    sb.append("    score: ").append(toIndentedString(score)).append("\n");
    sb.append("    reasonCodes: ").append(toIndentedString(reasonCodes)).append("\n");
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
    sb.append("    errorReason: ").append(toIndentedString(errorReason)).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    ");
  }

}

