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.*;
  
  /** EFTAccountIdentifier */
  @JsonPropertyOrder({
    EFTAccountIdentifier.JSON_PROPERTY_ACCOUNT_NUMBER,
    EFTAccountIdentifier.JSON_PROPERTY_BRANCH,
    EFTAccountIdentifier.JSON_PROPERTY_INSTITUTION
  })
  public class EFTAccountIdentifier {
    public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber";
    private String accountNumber;
  
    public static final String JSON_PROPERTY_BRANCH = "branch";
    private String branch;
  
    public static final String JSON_PROPERTY_INSTITUTION = "institution";
    private String institution;
  
    public EFTAccountIdentifier() {}
  
    /**
     * The account number of the bank account.
     *
     * @param accountNumber The account number of the bank account.
     * @return the current {@code EFTAccountIdentifier} instance, allowing for method chaining
     */
    public EFTAccountIdentifier 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;
    }
  
    /**
     * Identifies the specific branch where the account is held within the Canadian banking system.
     *
     * @param branch Identifies the specific branch where the account is held within the Canadian
     *     banking system.
     * @return the current {@code EFTAccountIdentifier} instance, allowing for method chaining
     */
    public EFTAccountIdentifier branch(String branch) {
      this.branch = branch;
      return this;
    }
  
    /**
     * Identifies the specific branch where the account is held within the Canadian banking system.
     *
     * @return branch Identifies the specific branch where the account is held within the Canadian
     *     banking system.
     */
    @JsonProperty(JSON_PROPERTY_BRANCH)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getBranch() {
      return branch;
    }
  
    /**
     * Identifies the specific branch where the account is held within the Canadian banking system.
     *
     * @param branch Identifies the specific branch where the account is held within the Canadian
     *     banking system.
     */
    @JsonProperty(JSON_PROPERTY_BRANCH)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBranch(String branch) {
      this.branch = branch;
    }
  
    /**
     * The financial institution that identifies the bank in Canada.
     *
     * @param institution The financial institution that identifies the bank in Canada.
     * @return the current {@code EFTAccountIdentifier} instance, allowing for method chaining
     */
    public EFTAccountIdentifier institution(String institution) {
      this.institution = institution;
      return this;
    }
  
    /**
     * The financial institution that identifies the bank in Canada.
     *
     * @return institution The financial institution that identifies the bank in Canada.
     */
    @JsonProperty(JSON_PROPERTY_INSTITUTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getInstitution() {
      return institution;
    }
  
    /**
     * The financial institution that identifies the bank in Canada.
     *
     * @param institution The financial institution that identifies the bank in Canada.
     */
    @JsonProperty(JSON_PROPERTY_INSTITUTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setInstitution(String institution) {
      this.institution = institution;
    }
  
    /** Return true if this EFTAccountIdentifier object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      EFTAccountIdentifier efTAccountIdentifier = (EFTAccountIdentifier) o;
      return Objects.equals(this.accountNumber, efTAccountIdentifier.accountNumber)
          && Objects.equals(this.branch, efTAccountIdentifier.branch)
          && Objects.equals(this.institution, efTAccountIdentifier.institution);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(accountNumber, branch, institution);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class EFTAccountIdentifier {\n");
      sb.append("    accountNumber: ").append(toIndentedString(accountNumber)).append("\n");
      sb.append("    branch: ").append(toIndentedString(branch)).append("\n");
      sb.append("    institution: ").append(toIndentedString(institution)).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 EFTAccountIdentifier given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of EFTAccountIdentifier
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     EFTAccountIdentifier
     */
    public static EFTAccountIdentifier fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, EFTAccountIdentifier.class);
    }
  
    /**
     * Convert an instance of EFTAccountIdentifier to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  