/*
 * 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.AccountSubtype;
import com.plaid.client.model.AccountType;
import com.plaid.client.model.BaseReportInvestments;
import com.plaid.client.model.ConsumerDispute;
import com.plaid.client.model.CraVoaReportAccountBalances;
import com.plaid.client.model.CraVoaReportTransactionsInsights;
import com.plaid.client.model.Owner;
import com.plaid.client.model.OwnershipType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * VOA Report information about an account.
 */
@ApiModel(description = "VOA Report information about an account.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class CraVoaReportAccount {
  public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_ID)
  private String accountId;

  public static final String SERIALIZED_NAME_BALANCES = "balances";
  @SerializedName(SERIALIZED_NAME_BALANCES)
  private CraVoaReportAccountBalances balances;

  public static final String SERIALIZED_NAME_CONSUMER_DISPUTES = "consumer_disputes";
  @SerializedName(SERIALIZED_NAME_CONSUMER_DISPUTES)
  private List<ConsumerDispute> consumerDisputes = new ArrayList<>();

  public static final String SERIALIZED_NAME_MASK = "mask";
  @SerializedName(SERIALIZED_NAME_MASK)
  private String mask;

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_OFFICIAL_NAME = "official_name";
  @SerializedName(SERIALIZED_NAME_OFFICIAL_NAME)
  private String officialName;

  public static final String SERIALIZED_NAME_TYPE = "type";
  @SerializedName(SERIALIZED_NAME_TYPE)
  private AccountType type;

  public static final String SERIALIZED_NAME_SUBTYPE = "subtype";
  @SerializedName(SERIALIZED_NAME_SUBTYPE)
  private AccountSubtype subtype;

  public static final String SERIALIZED_NAME_DAYS_AVAILABLE = "days_available";
  @SerializedName(SERIALIZED_NAME_DAYS_AVAILABLE)
  private Double daysAvailable;

  public static final String SERIALIZED_NAME_TRANSACTIONS_INSIGHTS = "transactions_insights";
  @SerializedName(SERIALIZED_NAME_TRANSACTIONS_INSIGHTS)
  private CraVoaReportTransactionsInsights transactionsInsights;

  public static final String SERIALIZED_NAME_OWNERS = "owners";
  @SerializedName(SERIALIZED_NAME_OWNERS)
  private List<Owner> owners = new ArrayList<>();

  public static final String SERIALIZED_NAME_OWNERSHIP_TYPE = "ownership_type";
  @SerializedName(SERIALIZED_NAME_OWNERSHIP_TYPE)
  private OwnershipType ownershipType;

  public static final String SERIALIZED_NAME_INVESTMENTS = "investments";
  @SerializedName(SERIALIZED_NAME_INVESTMENTS)
  private BaseReportInvestments investments;


  public CraVoaReportAccount accountId(String accountId) {
    
    this.accountId = accountId;
    return this;
  }

   /**
   * Plaid’s unique identifier for the account. This value will not change unless Plaid can&#39;t reconcile the account with the data returned by the financial institution. This may occur, for example, when the name of the account changes. If this happens a new &#x60;account_id&#x60; will be assigned to the account.  If an account with a specific &#x60;account_id&#x60; disappears instead of changing, the account is likely closed. Closed accounts are not returned by the Plaid API.  Like all Plaid identifiers, the &#x60;account_id&#x60; is case sensitive.
   * @return accountId
  **/
  @ApiModelProperty(required = true, value = "Plaid’s unique identifier for the account. This value will not change unless Plaid can't reconcile the account with the data returned by the financial institution. This may occur, for example, when the name of the account changes. If this happens a new `account_id` will be assigned to the account.  If an account with a specific `account_id` disappears instead of changing, the account is likely closed. Closed accounts are not returned by the Plaid API.  Like all Plaid identifiers, the `account_id` is case sensitive.")

  public String getAccountId() {
    return accountId;
  }


  public void setAccountId(String accountId) {
    this.accountId = accountId;
  }


  public CraVoaReportAccount balances(CraVoaReportAccountBalances balances) {
    
    this.balances = balances;
    return this;
  }

   /**
   * Get balances
   * @return balances
  **/
  @ApiModelProperty(required = true, value = "")

  public CraVoaReportAccountBalances getBalances() {
    return balances;
  }


  public void setBalances(CraVoaReportAccountBalances balances) {
    this.balances = balances;
  }


  public CraVoaReportAccount consumerDisputes(List<ConsumerDispute> consumerDisputes) {
    
    this.consumerDisputes = consumerDisputes;
    return this;
  }

  public CraVoaReportAccount addConsumerDisputesItem(ConsumerDispute consumerDisputesItem) {
    this.consumerDisputes.add(consumerDisputesItem);
    return this;
  }

   /**
   * The information about previously submitted valid dispute statements by the consumer
   * @return consumerDisputes
  **/
  @ApiModelProperty(required = true, value = "The information about previously submitted valid dispute statements by the consumer")

  public List<ConsumerDispute> getConsumerDisputes() {
    return consumerDisputes;
  }


  public void setConsumerDisputes(List<ConsumerDispute> consumerDisputes) {
    this.consumerDisputes = consumerDisputes;
  }


  public CraVoaReportAccount mask(String mask) {
    
    this.mask = mask;
    return this;
  }

   /**
   * The last 2-4 alphanumeric characters of an account&#39;s official account number. Note that the mask may be non-unique between an Item&#39;s accounts, and it may also not match the mask that the bank displays to the user.
   * @return mask
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "The last 2-4 alphanumeric characters of an account's official account number. Note that the mask may be non-unique between an Item's accounts, and it may also not match the mask that the bank displays to the user.")

  public String getMask() {
    return mask;
  }


  public void setMask(String mask) {
    this.mask = mask;
  }


  public CraVoaReportAccount name(String name) {
    
    this.name = name;
    return this;
  }

   /**
   * The name of the account, either assigned by the user or by the financial institution itself.
   * @return name
  **/
  @ApiModelProperty(required = true, value = "The name of the account, either assigned by the user or by the financial institution itself.")

  public String getName() {
    return name;
  }


  public void setName(String name) {
    this.name = name;
  }


  public CraVoaReportAccount officialName(String officialName) {
    
    this.officialName = officialName;
    return this;
  }

   /**
   * The official name of the account as given by the financial institution.
   * @return officialName
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "The official name of the account as given by the financial institution.")

  public String getOfficialName() {
    return officialName;
  }


  public void setOfficialName(String officialName) {
    this.officialName = officialName;
  }


  public CraVoaReportAccount type(AccountType type) {
    
    this.type = type;
    return this;
  }

   /**
   * Get type
   * @return type
  **/
  @ApiModelProperty(required = true, value = "")

  public AccountType getType() {
    return type;
  }


  public void setType(AccountType type) {
    this.type = type;
  }


  public CraVoaReportAccount subtype(AccountSubtype subtype) {
    
    this.subtype = subtype;
    return this;
  }

   /**
   * Get subtype
   * @return subtype
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "")

  public AccountSubtype getSubtype() {
    return subtype;
  }


  public void setSubtype(AccountSubtype subtype) {
    this.subtype = subtype;
  }


  public CraVoaReportAccount daysAvailable(Double daysAvailable) {
    
    this.daysAvailable = daysAvailable;
    return this;
  }

   /**
   * The duration of transaction history available within this report for this Item, typically defined as the time since the date of the earliest transaction in that account.
   * @return daysAvailable
  **/
  @ApiModelProperty(required = true, value = "The duration of transaction history available within this report for this Item, typically defined as the time since the date of the earliest transaction in that account.")

  public Double getDaysAvailable() {
    return daysAvailable;
  }


  public void setDaysAvailable(Double daysAvailable) {
    this.daysAvailable = daysAvailable;
  }


  public CraVoaReportAccount transactionsInsights(CraVoaReportTransactionsInsights transactionsInsights) {
    
    this.transactionsInsights = transactionsInsights;
    return this;
  }

   /**
   * Get transactionsInsights
   * @return transactionsInsights
  **/
  @ApiModelProperty(required = true, value = "")

  public CraVoaReportTransactionsInsights getTransactionsInsights() {
    return transactionsInsights;
  }


  public void setTransactionsInsights(CraVoaReportTransactionsInsights transactionsInsights) {
    this.transactionsInsights = transactionsInsights;
  }


  public CraVoaReportAccount owners(List<Owner> owners) {
    
    this.owners = owners;
    return this;
  }

  public CraVoaReportAccount addOwnersItem(Owner ownersItem) {
    this.owners.add(ownersItem);
    return this;
  }

   /**
   * Data returned by the financial institution about the account owner or owners.
   * @return owners
  **/
  @ApiModelProperty(required = true, value = "Data returned by the financial institution about the account owner or owners.")

  public List<Owner> getOwners() {
    return owners;
  }


  public void setOwners(List<Owner> owners) {
    this.owners = owners;
  }


  public CraVoaReportAccount ownershipType(OwnershipType ownershipType) {
    
    this.ownershipType = ownershipType;
    return this;
  }

   /**
   * Get ownershipType
   * @return ownershipType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "")

  public OwnershipType getOwnershipType() {
    return ownershipType;
  }


  public void setOwnershipType(OwnershipType ownershipType) {
    this.ownershipType = ownershipType;
  }


  public CraVoaReportAccount investments(BaseReportInvestments investments) {
    
    this.investments = investments;
    return this;
  }

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

  public BaseReportInvestments getInvestments() {
    return investments;
  }


  public void setInvestments(BaseReportInvestments investments) {
    this.investments = investments;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CraVoaReportAccount craVoaReportAccount = (CraVoaReportAccount) o;
    return Objects.equals(this.accountId, craVoaReportAccount.accountId) &&
        Objects.equals(this.balances, craVoaReportAccount.balances) &&
        Objects.equals(this.consumerDisputes, craVoaReportAccount.consumerDisputes) &&
        Objects.equals(this.mask, craVoaReportAccount.mask) &&
        Objects.equals(this.name, craVoaReportAccount.name) &&
        Objects.equals(this.officialName, craVoaReportAccount.officialName) &&
        Objects.equals(this.type, craVoaReportAccount.type) &&
        Objects.equals(this.subtype, craVoaReportAccount.subtype) &&
        Objects.equals(this.daysAvailable, craVoaReportAccount.daysAvailable) &&
        Objects.equals(this.transactionsInsights, craVoaReportAccount.transactionsInsights) &&
        Objects.equals(this.owners, craVoaReportAccount.owners) &&
        Objects.equals(this.ownershipType, craVoaReportAccount.ownershipType) &&
        Objects.equals(this.investments, craVoaReportAccount.investments);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accountId, balances, consumerDisputes, mask, name, officialName, type, subtype, daysAvailable, transactionsInsights, owners, ownershipType, investments);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CraVoaReportAccount {\n");
    sb.append("    accountId: ").append(toIndentedString(accountId)).append("\n");
    sb.append("    balances: ").append(toIndentedString(balances)).append("\n");
    sb.append("    consumerDisputes: ").append(toIndentedString(consumerDisputes)).append("\n");
    sb.append("    mask: ").append(toIndentedString(mask)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    officialName: ").append(toIndentedString(officialName)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
    sb.append("    daysAvailable: ").append(toIndentedString(daysAvailable)).append("\n");
    sb.append("    transactionsInsights: ").append(toIndentedString(transactionsInsights)).append("\n");
    sb.append("    owners: ").append(toIndentedString(owners)).append("\n");
    sb.append("    ownershipType: ").append(toIndentedString(ownershipType)).append("\n");
    sb.append("    investments: ").append(toIndentedString(investments)).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    ");
  }

}

