/*
 * 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.StatementsStatement;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * Account associated with the Item.
 */
@ApiModel(description = "Account associated with the Item.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class StatementsAccount {
  public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_ID)
  private String accountId;

  public static final String SERIALIZED_NAME_ACCOUNT_MASK = "account_mask";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_MASK)
  private String accountMask;

  public static final String SERIALIZED_NAME_ACCOUNT_NAME = "account_name";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_NAME)
  private String accountName;

  public static final String SERIALIZED_NAME_ACCOUNT_OFFICIAL_NAME = "account_official_name";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_OFFICIAL_NAME)
  private String accountOfficialName;

  public static final String SERIALIZED_NAME_ACCOUNT_SUBTYPE = "account_subtype";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_SUBTYPE)
  private String accountSubtype;

  public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE)
  private String accountType;

  public static final String SERIALIZED_NAME_STATEMENTS = "statements";
  @SerializedName(SERIALIZED_NAME_STATEMENTS)
  private List<StatementsStatement> statements = new ArrayList<>();


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

   /**
   * Plaid&#39;s unique identifier for the account.
   * @return accountId
  **/
  @ApiModelProperty(required = true, value = "Plaid's unique identifier for the account.")

  public String getAccountId() {
    return accountId;
  }


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


  public StatementsAccount accountMask(String accountMask) {
    
    this.accountMask = accountMask;
    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 accountMask
  **/
  @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 getAccountMask() {
    return accountMask;
  }


  public void setAccountMask(String accountMask) {
    this.accountMask = accountMask;
  }


  public StatementsAccount accountName(String accountName) {
    
    this.accountName = accountName;
    return this;
  }

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

  public String getAccountName() {
    return accountName;
  }


  public void setAccountName(String accountName) {
    this.accountName = accountName;
  }


  public StatementsAccount accountOfficialName(String accountOfficialName) {
    
    this.accountOfficialName = accountOfficialName;
    return this;
  }

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

  public String getAccountOfficialName() {
    return accountOfficialName;
  }


  public void setAccountOfficialName(String accountOfficialName) {
    this.accountOfficialName = accountOfficialName;
  }


  public StatementsAccount accountSubtype(String accountSubtype) {
    
    this.accountSubtype = accountSubtype;
    return this;
  }

   /**
   * The subtype of the account. For a full list of valid types and subtypes, see the [Account schema](https://plaid.com/docs/api/accounts#account-type-schema).
   * @return accountSubtype
  **/
  @ApiModelProperty(required = true, value = "The subtype of the account. For a full list of valid types and subtypes, see the [Account schema](https://plaid.com/docs/api/accounts#account-type-schema).")

  public String getAccountSubtype() {
    return accountSubtype;
  }


  public void setAccountSubtype(String accountSubtype) {
    this.accountSubtype = accountSubtype;
  }


  public StatementsAccount accountType(String accountType) {
    
    this.accountType = accountType;
    return this;
  }

   /**
   * The type of account. For a full list of valid types and subtypes, see the [Account schema](https://plaid.com/docs/api/accounts#account-type-schema).
   * @return accountType
  **/
  @ApiModelProperty(required = true, value = "The type of account. For a full list of valid types and subtypes, see the [Account schema](https://plaid.com/docs/api/accounts#account-type-schema).")

  public String getAccountType() {
    return accountType;
  }


  public void setAccountType(String accountType) {
    this.accountType = accountType;
  }


  public StatementsAccount statements(List<StatementsStatement> statements) {
    
    this.statements = statements;
    return this;
  }

  public StatementsAccount addStatementsItem(StatementsStatement statementsItem) {
    this.statements.add(statementsItem);
    return this;
  }

   /**
   * The list of statements&#39; metadata associated with this account.
   * @return statements
  **/
  @ApiModelProperty(required = true, value = "The list of statements' metadata associated with this account.")

  public List<StatementsStatement> getStatements() {
    return statements;
  }


  public void setStatements(List<StatementsStatement> statements) {
    this.statements = statements;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StatementsAccount statementsAccount = (StatementsAccount) o;
    return Objects.equals(this.accountId, statementsAccount.accountId) &&
        Objects.equals(this.accountMask, statementsAccount.accountMask) &&
        Objects.equals(this.accountName, statementsAccount.accountName) &&
        Objects.equals(this.accountOfficialName, statementsAccount.accountOfficialName) &&
        Objects.equals(this.accountSubtype, statementsAccount.accountSubtype) &&
        Objects.equals(this.accountType, statementsAccount.accountType) &&
        Objects.equals(this.statements, statementsAccount.statements);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accountId, accountMask, accountName, accountOfficialName, accountSubtype, accountType, statements);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StatementsAccount {\n");
    sb.append("    accountId: ").append(toIndentedString(accountId)).append("\n");
    sb.append("    accountMask: ").append(toIndentedString(accountMask)).append("\n");
    sb.append("    accountName: ").append(toIndentedString(accountName)).append("\n");
    sb.append("    accountOfficialName: ").append(toIndentedString(accountOfficialName)).append("\n");
    sb.append("    accountSubtype: ").append(toIndentedString(accountSubtype)).append("\n");
    sb.append("    accountType: ").append(toIndentedString(accountType)).append("\n");
    sb.append("    statements: ").append(toIndentedString(statements)).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    ");
  }

}

