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.*;
  
  /** ACHAccountIdentifier */
  @JsonPropertyOrder({
    ACHAccountIdentifier.JSON_PROPERTY_ACCOUNT_NUMBER,
    ACHAccountIdentifier.JSON_PROPERTY_ROUTING_NUMBER
  })
  public class ACHAccountIdentifier {
    public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber";
    private String accountNumber;
  
    public static final String JSON_PROPERTY_ROUTING_NUMBER = "routingNumber";
    private String routingNumber;
  
    public ACHAccountIdentifier() {}
  
    /**
     * The account number of the bank account.
     *
     * @param accountNumber The account number of the bank account.
     * @return the current {@code ACHAccountIdentifier} instance, allowing for method chaining
     */
    public ACHAccountIdentifier 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;
    }
  
    /**
     * The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without
     * separators or whitespace.
     *
     * @param routingNumber The [routing
     *     number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
     *     whitespace.
     * @return the current {@code ACHAccountIdentifier} instance, allowing for method chaining
     */
    public ACHAccountIdentifier routingNumber(String routingNumber) {
      this.routingNumber = routingNumber;
      return this;
    }
  
    /**
     * The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without
     * separators or whitespace.
     *
     * @return routingNumber The [routing
     *     number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
     *     whitespace.
     */
    @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getRoutingNumber() {
      return routingNumber;
    }
  
    /**
     * The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without
     * separators or whitespace.
     *
     * @param routingNumber The [routing
     *     number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or
     *     whitespace.
     */
    @JsonProperty(JSON_PROPERTY_ROUTING_NUMBER)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setRoutingNumber(String routingNumber) {
      this.routingNumber = routingNumber;
    }
  
    /** Return true if this ACHAccountIdentifier object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      ACHAccountIdentifier acHAccountIdentifier = (ACHAccountIdentifier) o;
      return Objects.equals(this.accountNumber, acHAccountIdentifier.accountNumber)
          && Objects.equals(this.routingNumber, acHAccountIdentifier.routingNumber);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(accountNumber, routingNumber);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class ACHAccountIdentifier {\n");
      sb.append("    accountNumber: ").append(toIndentedString(accountNumber)).append("\n");
      sb.append("    routingNumber: ").append(toIndentedString(routingNumber)).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 ACHAccountIdentifier given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of ACHAccountIdentifier
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     ACHAccountIdentifier
     */
    public static ACHAccountIdentifier fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, ACHAccountIdentifier.class);
    }
  
    /**
     * Convert an instance of ACHAccountIdentifier to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  