content: /*
   * Open Banking API
   *
   * The version of the OpenAPI document: 1
   *
   *
   * 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.adyen.model.openbanking;
  
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  import java.util.ArrayList;
  import java.util.List;
  
  /** VerifiedAccount */
  @JsonPropertyOrder({
    VerifiedAccount.JSON_PROPERTY_ACCOUNT_ID,
    VerifiedAccount.JSON_PROPERTY_ACCOUNT_NAME,
    VerifiedAccount.JSON_PROPERTY_ACCOUNT_NUMBER,
    VerifiedAccount.JSON_PROPERTY_ACCOUNT_TYPE,
    VerifiedAccount.JSON_PROPERTY_BANK_NAME,
    VerifiedAccount.JSON_PROPERTY_CURRENCY,
    VerifiedAccount.JSON_PROPERTY_IDENTIFIERS,
    VerifiedAccount.JSON_PROPERTY_PARTIES
  })
  public class VerifiedAccount {
    public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId";
    private String accountId;
  
    public static final String JSON_PROPERTY_ACCOUNT_NAME = "accountName";
    private String accountName;
  
    public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber";
    private String accountNumber;
  
    public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType";
    private AccountType accountType;
  
    public static final String JSON_PROPERTY_BANK_NAME = "bankName";
    private String bankName;
  
    public static final String JSON_PROPERTY_CURRENCY = "currency";
    private String currency;
  
    public static final String JSON_PROPERTY_IDENTIFIERS = "identifiers";
    private AccountIdentifiers identifiers;
  
    public static final String JSON_PROPERTY_PARTIES = "parties";
    private List<AccountParty> parties;
  
    public VerifiedAccount() {}
  
    /**
     * The unique identifier for the bank account.
     *
     * @param accountId The unique identifier for the bank account.
     * @return the current {@code VerifiedAccount} instance, allowing for method chaining
     */
    public VerifiedAccount accountId(String accountId) {
      this.accountId = accountId;
      return this;
    }
  
    /**
     * The unique identifier for the bank account.
     *
     * @return accountId The unique identifier for the bank account.
     */
    @JsonProperty(JSON_PROPERTY_ACCOUNT_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getAccountId() {
      return accountId;
    }
  
    /**
     * The unique identifier for the bank account.
     *
     * @param accountId The unique identifier for the bank account.
     */
    @JsonProperty(JSON_PROPERTY_ACCOUNT_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAccountId(String accountId) {
      this.accountId = accountId;
    }
  
    /**
     * The name of the bank account. This name is assigned by the banking institution, and it
     * describes the type of bank account.
     *
     * @param accountName The name of the bank account. This name is assigned by the banking
     *     institution, and it describes the type of bank account.
     * @return the current {@code VerifiedAccount} instance, allowing for method chaining
     */
    public VerifiedAccount accountName(String accountName) {
      this.accountName = accountName;
      return this;
    }
  
    /**
     * The name of the bank account. This name is assigned by the banking institution, and it
     * describes the type of bank account.
     *
     * @return accountName The name of the bank account. This name is assigned by the banking
     *     institution, and it describes the type of bank account.
     */
    @JsonProperty(JSON_PROPERTY_ACCOUNT_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getAccountName() {
      return accountName;
    }
  
    /**
     * The name of the bank account. This name is assigned by the banking institution, and it
     * describes the type of bank account.
     *
     * @param accountName The name of the bank account. This name is assigned by the banking
     *     institution, and it describes the type of bank account.
     */
    @JsonProperty(JSON_PROPERTY_ACCOUNT_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAccountName(String accountName) {
      this.accountName = accountName;
    }
  
    /**
     * The account number of the bank account.
     *
     * @param accountNumber The account number of the bank account.
     * @return the current {@code VerifiedAccount} instance, allowing for method chaining
     */
    public VerifiedAccount accountNumber(String accountNumber) {
      this.accountNumber = accountNumber;
      return this;
    }
  
    /**
     * The account number of the bank account.
     *
     * @return accountNumber The account number of the bank account.
     */
    @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getAccountNumber() {
      return accountNumber;
    }
  
    /**
     * The account number of the bank account.
     *
     * @param accountNumber The account number of the bank account.
     */
    @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAccountNumber(String accountNumber) {
      this.accountNumber = accountNumber;
    }
  
    /**
     * accountType
     *
     * @param accountType
     * @return the current {@code VerifiedAccount} instance, allowing for method chaining
     */
    public VerifiedAccount accountType(AccountType accountType) {
      this.accountType = accountType;
      return this;
    }
  
    /**
     * Get accountType
     *
     * @return accountType
     */
    @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public AccountType getAccountType() {
      return accountType;
    }
  
    /**
     * accountType
     *
     * @param accountType
     */
    @JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAccountType(AccountType accountType) {
      this.accountType = accountType;
    }
  
    /**
     * The name of the banking institution where the bank account is held.
     *
     * @param bankName The name of the banking institution where the bank account is held.
     * @return the current {@code VerifiedAccount} instance, allowing for method chaining
     */
    public VerifiedAccount bankName(String bankName) {
      this.bankName = bankName;
      return this;
    }
  
    /**
     * The name of the banking institution where the bank account is held.
     *
     * @return bankName The name of the banking institution where the bank account is held.
     */
    @JsonProperty(JSON_PROPERTY_BANK_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getBankName() {
      return bankName;
    }
  
    /**
     * The name of the banking institution where the bank account is held.
     *
     * @param bankName The name of the banking institution where the bank account is held.
     */
    @JsonProperty(JSON_PROPERTY_BANK_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBankName(String bankName) {
      this.bankName = bankName;
    }
  
    /**
     * The currency of the funds in the bank account.
     *
     * @param currency The currency of the funds in the bank account.
     * @return the current {@code VerifiedAccount} instance, allowing for method chaining
     */
    public VerifiedAccount currency(String currency) {
      this.currency = currency;
      return this;
    }
  
    /**
     * The currency of the funds in the bank account.
     *
     * @return currency The currency of the funds in the bank account.
     */
    @JsonProperty(JSON_PROPERTY_CURRENCY)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getCurrency() {
      return currency;
    }
  
    /**
     * The currency of the funds in the bank account.
     *
     * @param currency The currency of the funds in the bank account.
     */
    @JsonProperty(JSON_PROPERTY_CURRENCY)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setCurrency(String currency) {
      this.currency = currency;
    }
  
    /**
     * identifiers
     *
     * @param identifiers
     * @return the current {@code VerifiedAccount} instance, allowing for method chaining
     */
    public VerifiedAccount identifiers(AccountIdentifiers identifiers) {
      this.identifiers = identifiers;
      return this;
    }
  
    /**
     * Get identifiers
     *
     * @return identifiers
     */
    @JsonProperty(JSON_PROPERTY_IDENTIFIERS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public AccountIdentifiers getIdentifiers() {
      return identifiers;
    }
  
    /**
     * identifiers
     *
     * @param identifiers
     */
    @JsonProperty(JSON_PROPERTY_IDENTIFIERS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setIdentifiers(AccountIdentifiers identifiers) {
      this.identifiers = identifiers;
    }
  
    /**
     * Contains details of all parties associated with the report.
     *
     * @param parties Contains details of all parties associated with the report.
     * @return the current {@code VerifiedAccount} instance, allowing for method chaining
     */
    public VerifiedAccount parties(List<AccountParty> parties) {
      this.parties = parties;
      return this;
    }
  
    public VerifiedAccount addPartiesItem(AccountParty partiesItem) {
      if (this.parties == null) {
        this.parties = new ArrayList<>();
      }
      this.parties.add(partiesItem);
      return this;
    }
  
    /**
     * Contains details of all parties associated with the report.
     *
     * @return parties Contains details of all parties associated with the report.
     */
    @JsonProperty(JSON_PROPERTY_PARTIES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<AccountParty> getParties() {
      return parties;
    }
  
    /**
     * Contains details of all parties associated with the report.
     *
     * @param parties Contains details of all parties associated with the report.
     */
    @JsonProperty(JSON_PROPERTY_PARTIES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setParties(List<AccountParty> parties) {
      this.parties = parties;
    }
  
    /** Return true if this VerifiedAccount object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      VerifiedAccount verifiedAccount = (VerifiedAccount) o;
      return Objects.equals(this.accountId, verifiedAccount.accountId)
          && Objects.equals(this.accountName, verifiedAccount.accountName)
          && Objects.equals(this.accountNumber, verifiedAccount.accountNumber)
          && Objects.equals(this.accountType, verifiedAccount.accountType)
          && Objects.equals(this.bankName, verifiedAccount.bankName)
          && Objects.equals(this.currency, verifiedAccount.currency)
          && Objects.equals(this.identifiers, verifiedAccount.identifiers)
          && Objects.equals(this.parties, verifiedAccount.parties);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(
          accountId,
          accountName,
          accountNumber,
          accountType,
          bankName,
          currency,
          identifiers,
          parties);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class VerifiedAccount {\n");
      sb.append("    accountId: ").append(toIndentedString(accountId)).append("\n");
      sb.append("    accountName: ").append(toIndentedString(accountName)).append("\n");
      sb.append("    accountNumber: ").append(toIndentedString(accountNumber)).append("\n");
      sb.append("    accountType: ").append(toIndentedString(accountType)).append("\n");
      sb.append("    bankName: ").append(toIndentedString(bankName)).append("\n");
      sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
      sb.append("    identifiers: ").append(toIndentedString(identifiers)).append("\n");
      sb.append("    parties: ").append(toIndentedString(parties)).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    ");
    }
  
    /**
     * Create an instance of VerifiedAccount given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of VerifiedAccount
     * @throws JsonProcessingException if the JSON string is invalid with respect to VerifiedAccount
     */
    public static VerifiedAccount fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, VerifiedAccount.class);
    }
  
    /**
     * Convert an instance of VerifiedAccount to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  