content: /*
   * Fund API
   * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead.  The Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account.  For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic/). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example:   ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ```  Alternatively, you can use the username and password to connect to the API using basic authentication. For example:  ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).  ## Versioning The Fund API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.  For example: ``` https://cal-test.adyen.com/cal/services/Fund/v6/accountHolderBalance ```
   *
   * The version of the OpenAPI document: 6
   *
   *
   * 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.marketpayfund;
  
  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 io.swagger.annotations.ApiModelProperty;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.Objects;
  
  /** DebitAccountHolderRequest */
  @JsonPropertyOrder({
    DebitAccountHolderRequest.JSON_PROPERTY_ACCOUNT_HOLDER_CODE,
    DebitAccountHolderRequest.JSON_PROPERTY_AMOUNT,
    DebitAccountHolderRequest.JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D,
    DebitAccountHolderRequest.JSON_PROPERTY_DESCRIPTION,
    DebitAccountHolderRequest.JSON_PROPERTY_MERCHANT_ACCOUNT,
    DebitAccountHolderRequest.JSON_PROPERTY_SPLITS
  })
  public class DebitAccountHolderRequest {
    public static final String JSON_PROPERTY_ACCOUNT_HOLDER_CODE = "accountHolderCode";
    private String accountHolderCode;
  
    public static final String JSON_PROPERTY_AMOUNT = "amount";
    private Amount amount;
  
    public static final String JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D = "bankAccountUUID";
    private String bankAccountUUID;
  
    public static final String JSON_PROPERTY_DESCRIPTION = "description";
    private String description;
  
    public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount";
    private String merchantAccount;
  
    public static final String JSON_PROPERTY_SPLITS = "splits";
    private List<Split> splits = new ArrayList<>();
  
    public DebitAccountHolderRequest() {}
  
    public DebitAccountHolderRequest accountHolderCode(String accountHolderCode) {
      this.accountHolderCode = accountHolderCode;
      return this;
    }
  
    /**
     * The code of the account holder.
     *
     * @return accountHolderCode
     */
    @ApiModelProperty(required = true, value = "The code of the account holder.")
    @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getAccountHolderCode() {
      return accountHolderCode;
    }
  
    @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_CODE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAccountHolderCode(String accountHolderCode) {
      this.accountHolderCode = accountHolderCode;
    }
  
    public DebitAccountHolderRequest amount(Amount amount) {
      this.amount = amount;
      return this;
    }
  
    /**
     * Get amount
     *
     * @return amount
     */
    @ApiModelProperty(required = true, value = "")
    @JsonProperty(JSON_PROPERTY_AMOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Amount getAmount() {
      return amount;
    }
  
    @JsonProperty(JSON_PROPERTY_AMOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAmount(Amount amount) {
      this.amount = amount;
    }
  
    public DebitAccountHolderRequest bankAccountUUID(String bankAccountUUID) {
      this.bankAccountUUID = bankAccountUUID;
      return this;
    }
  
    /**
     * The Adyen-generated unique alphanumeric identifier (UUID) of the account holder&#39;s bank
     * account.
     *
     * @return bankAccountUUID
     */
    @ApiModelProperty(
        required = true,
        value =
            "The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account.")
    @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getBankAccountUUID() {
      return bankAccountUUID;
    }
  
    @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_U_U_I_D)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBankAccountUUID(String bankAccountUUID) {
      this.bankAccountUUID = bankAccountUUID;
    }
  
    public DebitAccountHolderRequest description(String description) {
      this.description = description;
      return this;
    }
  
    /**
     * A description of the direct debit. Maximum length: 35 characters. Allowed characters: **a-z**,
     * **A-Z**, **0-9**, and special characters **_/?:().,&#39;+ \&quot;;**.
     *
     * @return description
     */
    @ApiModelProperty(
        value =
            "A description of the direct debit. Maximum length: 35 characters.  Allowed characters: **a-z**, **A-Z**, **0-9**, and special characters **_/?:().,'+ \";**.")
    @JsonProperty(JSON_PROPERTY_DESCRIPTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getDescription() {
      return description;
    }
  
    @JsonProperty(JSON_PROPERTY_DESCRIPTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setDescription(String description) {
      this.description = description;
    }
  
    public DebitAccountHolderRequest merchantAccount(String merchantAccount) {
      this.merchantAccount = merchantAccount;
      return this;
    }
  
    /**
     * Your merchant account.
     *
     * @return merchantAccount
     */
    @ApiModelProperty(required = true, value = "Your merchant account.")
    @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getMerchantAccount() {
      return merchantAccount;
    }
  
    @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setMerchantAccount(String merchantAccount) {
      this.merchantAccount = merchantAccount;
    }
  
    public DebitAccountHolderRequest splits(List<Split> splits) {
      this.splits = splits;
      return this;
    }
  
    public DebitAccountHolderRequest addSplitsItem(Split splitsItem) {
      this.splits.add(splitsItem);
      return this;
    }
  
    /**
     * Contains instructions on how to split the funds between the accounts in your platform. The
     * request must have at least one split item.
     *
     * @return splits
     */
    @ApiModelProperty(
        required = true,
        value =
            "Contains instructions on how to split the funds between the accounts in your platform. The request must have at least one split item.")
    @JsonProperty(JSON_PROPERTY_SPLITS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<Split> getSplits() {
      return splits;
    }
  
    @JsonProperty(JSON_PROPERTY_SPLITS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSplits(List<Split> splits) {
      this.splits = splits;
    }
  
    /** Return true if this DebitAccountHolderRequest object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      DebitAccountHolderRequest debitAccountHolderRequest = (DebitAccountHolderRequest) o;
      return Objects.equals(this.accountHolderCode, debitAccountHolderRequest.accountHolderCode)
          && Objects.equals(this.amount, debitAccountHolderRequest.amount)
          && Objects.equals(this.bankAccountUUID, debitAccountHolderRequest.bankAccountUUID)
          && Objects.equals(this.description, debitAccountHolderRequest.description)
          && Objects.equals(this.merchantAccount, debitAccountHolderRequest.merchantAccount)
          && Objects.equals(this.splits, debitAccountHolderRequest.splits);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(
          accountHolderCode, amount, bankAccountUUID, description, merchantAccount, splits);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class DebitAccountHolderRequest {\n");
      sb.append("    accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
      sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
      sb.append("    bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n");
      sb.append("    description: ").append(toIndentedString(description)).append("\n");
      sb.append("    merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
      sb.append("    splits: ").append(toIndentedString(splits)).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 DebitAccountHolderRequest given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of DebitAccountHolderRequest
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     DebitAccountHolderRequest
     */
    public static DebitAccountHolderRequest fromJson(String jsonString)
        throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, DebitAccountHolderRequest.class);
    }
  
    /**
     * Convert an instance of DebitAccountHolderRequest to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  