content: /*
   * Legal Entity Management API
   *
   * The version of the OpenAPI document: 4
   *
   *
   * 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.legalentitymanagement;
  
  import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonTypeName;
  import com.fasterxml.jackson.annotation.JsonValue;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import java.util.*;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.List;
  import java.util.logging.Logger;
  
  /** VerificationErrorRecursive */
  @JsonPropertyOrder({
    VerificationErrorRecursive.JSON_PROPERTY_CAPABILITIES,
    VerificationErrorRecursive.JSON_PROPERTY_CODE,
    VerificationErrorRecursive.JSON_PROPERTY_MESSAGE,
    VerificationErrorRecursive.JSON_PROPERTY_TYPE,
    VerificationErrorRecursive.JSON_PROPERTY_REMEDIATING_ACTIONS
  })
  @JsonTypeName("VerificationError-recursive")
  public class VerificationErrorRecursive {
    /** Gets or Sets capabilities */
    public enum CapabilitiesEnum {
      ACCEPTEXTERNALFUNDING(String.valueOf("acceptExternalFunding")),
  
      ACCEPTPSPFUNDING(String.valueOf("acceptPspFunding")),
  
      ACCEPTTRANSACTIONINRESTRICTEDCOUNTRIES(
          String.valueOf("acceptTransactionInRestrictedCountries")),
  
      ACCEPTTRANSACTIONINRESTRICTEDCOUNTRIESCOMMERCIAL(
          String.valueOf("acceptTransactionInRestrictedCountriesCommercial")),
  
      ACCEPTTRANSACTIONINRESTRICTEDCOUNTRIESCONSUMER(
          String.valueOf("acceptTransactionInRestrictedCountriesConsumer")),
  
      ACCEPTTRANSACTIONINRESTRICTEDINDUSTRIES(
          String.valueOf("acceptTransactionInRestrictedIndustries")),
  
      ACCEPTTRANSACTIONINRESTRICTEDINDUSTRIESCOMMERCIAL(
          String.valueOf("acceptTransactionInRestrictedIndustriesCommercial")),
  
      ACCEPTTRANSACTIONINRESTRICTEDINDUSTRIESCONSUMER(
          String.valueOf("acceptTransactionInRestrictedIndustriesConsumer")),
  
      ACQUIRING(String.valueOf("acquiring")),
  
      ATMWITHDRAWAL(String.valueOf("atmWithdrawal")),
  
      ATMWITHDRAWALCOMMERCIAL(String.valueOf("atmWithdrawalCommercial")),
  
      ATMWITHDRAWALCONSUMER(String.valueOf("atmWithdrawalConsumer")),
  
      ATMWITHDRAWALINRESTRICTEDCOUNTRIES(String.valueOf("atmWithdrawalInRestrictedCountries")),
  
      ATMWITHDRAWALINRESTRICTEDCOUNTRIESCOMMERCIAL(
          String.valueOf("atmWithdrawalInRestrictedCountriesCommercial")),
  
      ATMWITHDRAWALINRESTRICTEDCOUNTRIESCONSUMER(
          String.valueOf("atmWithdrawalInRestrictedCountriesConsumer")),
  
      AUTHORISEDPAYMENTINSTRUMENTUSER(String.valueOf("authorisedPaymentInstrumentUser")),
  
      GETGRANTOFFERS(String.valueOf("getGrantOffers")),
  
      ISSUEBANKACCOUNT(String.valueOf("issueBankAccount")),
  
      ISSUECARD(String.valueOf("issueCard")),
  
      ISSUECARDCOMMERCIAL(String.valueOf("issueCardCommercial")),
  
      ISSUECARDCONSUMER(String.valueOf("issueCardConsumer")),
  
      ISSUECHARGECARD(String.valueOf("issueChargeCard")),
  
      ISSUECHARGECARDCOMMERCIAL(String.valueOf("issueChargeCardCommercial")),
  
      ISSUECREDITLIMIT(String.valueOf("issueCreditLimit")),
  
      LOCALACCEPTANCE(String.valueOf("localAcceptance")),
  
      PAYOUT(String.valueOf("payout")),
  
      PAYOUTTOTRANSFERINSTRUMENT(String.valueOf("payoutToTransferInstrument")),
  
      PROCESSING(String.valueOf("processing")),
  
      RECEIVEFROMBALANCEACCOUNT(String.valueOf("receiveFromBalanceAccount")),
  
      RECEIVEFROMPLATFORMPAYMENTS(String.valueOf("receiveFromPlatformPayments")),
  
      RECEIVEFROMTHIRDPARTY(String.valueOf("receiveFromThirdParty")),
  
      RECEIVEFROMTRANSFERINSTRUMENT(String.valueOf("receiveFromTransferInstrument")),
  
      RECEIVEGRANTS(String.valueOf("receiveGrants")),
  
      RECEIVEPAYMENTS(String.valueOf("receivePayments")),
  
      SENDTOBALANCEACCOUNT(String.valueOf("sendToBalanceAccount")),
  
      SENDTOTHIRDPARTY(String.valueOf("sendToThirdParty")),
  
      SENDTOTRANSFERINSTRUMENT(String.valueOf("sendToTransferInstrument")),
  
      THIRDPARTYFUNDING(String.valueOf("thirdPartyFunding")),
  
      USECARD(String.valueOf("useCard")),
  
      USECARDCOMMERCIAL(String.valueOf("useCardCommercial")),
  
      USECARDCONSUMER(String.valueOf("useCardConsumer")),
  
      USECARDINRESTRICTEDCOUNTRIES(String.valueOf("useCardInRestrictedCountries")),
  
      USECARDINRESTRICTEDCOUNTRIESCOMMERCIAL(
          String.valueOf("useCardInRestrictedCountriesCommercial")),
  
      USECARDINRESTRICTEDCOUNTRIESCONSUMER(String.valueOf("useCardInRestrictedCountriesConsumer")),
  
      USECARDINRESTRICTEDINDUSTRIES(String.valueOf("useCardInRestrictedIndustries")),
  
      USECARDINRESTRICTEDINDUSTRIESCOMMERCIAL(
          String.valueOf("useCardInRestrictedIndustriesCommercial")),
  
      USECARDINRESTRICTEDINDUSTRIESCONSUMER(String.valueOf("useCardInRestrictedIndustriesConsumer")),
  
      USECHARGECARD(String.valueOf("useChargeCard")),
  
      USECHARGECARDCOMMERCIAL(String.valueOf("useChargeCardCommercial")),
  
      WITHDRAWFROMATM(String.valueOf("withdrawFromAtm")),
  
      WITHDRAWFROMATMCOMMERCIAL(String.valueOf("withdrawFromAtmCommercial")),
  
      WITHDRAWFROMATMCONSUMER(String.valueOf("withdrawFromAtmConsumer")),
  
      WITHDRAWFROMATMINRESTRICTEDCOUNTRIES(String.valueOf("withdrawFromAtmInRestrictedCountries")),
  
      WITHDRAWFROMATMINRESTRICTEDCOUNTRIESCOMMERCIAL(
          String.valueOf("withdrawFromAtmInRestrictedCountriesCommercial")),
  
      WITHDRAWFROMATMINRESTRICTEDCOUNTRIESCONSUMER(
          String.valueOf("withdrawFromAtmInRestrictedCountriesConsumer"));
  
      private static final Logger LOG = Logger.getLogger(CapabilitiesEnum.class.getName());
  
      private String value;
  
      CapabilitiesEnum(String value) {
        this.value = value;
      }
  
      @JsonValue
      public String getValue() {
        return value;
      }
  
      @Override
      public String toString() {
        return String.valueOf(value);
      }
  
      @JsonCreator
      public static CapabilitiesEnum fromValue(String value) {
        for (CapabilitiesEnum b : CapabilitiesEnum.values()) {
          if (b.value.equals(value)) {
            return b;
          }
        }
        // handling unexpected value
        LOG.warning(
            "CapabilitiesEnum: unexpected enum value '"
                + value
                + "' - Supported values are "
                + Arrays.toString(CapabilitiesEnum.values()));
        return null;
      }
    }
  
    public static final String JSON_PROPERTY_CAPABILITIES = "capabilities";
    private List<CapabilitiesEnum> capabilities;
  
    public static final String JSON_PROPERTY_CODE = "code";
    private String code;
  
    public static final String JSON_PROPERTY_MESSAGE = "message";
    private String message;
  
    /**
     * The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** *
     * **rejected** * **dataReview**
     */
    public enum TypeEnum {
      DATAMISSING(String.valueOf("dataMissing")),
  
      DATAREVIEW(String.valueOf("dataReview")),
  
      INVALIDINPUT(String.valueOf("invalidInput")),
  
      PENDINGSTATUS(String.valueOf("pendingStatus")),
  
      REJECTED(String.valueOf("rejected"));
  
      private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName());
  
      private String value;
  
      TypeEnum(String value) {
        this.value = value;
      }
  
      @JsonValue
      public String getValue() {
        return value;
      }
  
      @Override
      public String toString() {
        return String.valueOf(value);
      }
  
      @JsonCreator
      public static TypeEnum fromValue(String value) {
        for (TypeEnum b : TypeEnum.values()) {
          if (b.value.equals(value)) {
            return b;
          }
        }
        // handling unexpected value
        LOG.warning(
            "TypeEnum: unexpected enum value '"
                + value
                + "' - Supported values are "
                + Arrays.toString(TypeEnum.values()));
        return null;
      }
    }
  
    public static final String JSON_PROPERTY_TYPE = "type";
    private TypeEnum type;
  
    public static final String JSON_PROPERTY_REMEDIATING_ACTIONS = "remediatingActions";
    private List<RemediatingAction> remediatingActions;
  
    public VerificationErrorRecursive() {}
  
    /**
     * Contains key-value pairs that specify the actions that the legal entity can do in your
     * platform. The key is a capability required for your integration. For example, **issueCard** for
     * Issuing.The value is an object containing the settings for the capability.
     *
     * @param capabilities Contains key-value pairs that specify the actions that the legal entity can
     *     do in your platform. The key is a capability required for your integration. For example,
     *     **issueCard** for Issuing.The value is an object containing the settings for the
     *     capability.
     * @return the current {@code VerificationErrorRecursive} instance, allowing for method chaining
     */
    public VerificationErrorRecursive capabilities(List<CapabilitiesEnum> capabilities) {
      this.capabilities = capabilities;
      return this;
    }
  
    public VerificationErrorRecursive addCapabilitiesItem(CapabilitiesEnum capabilitiesItem) {
      if (this.capabilities == null) {
        this.capabilities = new ArrayList<>();
      }
      this.capabilities.add(capabilitiesItem);
      return this;
    }
  
    /**
     * Contains key-value pairs that specify the actions that the legal entity can do in your
     * platform. The key is a capability required for your integration. For example, **issueCard** for
     * Issuing.The value is an object containing the settings for the capability.
     *
     * @return capabilities Contains key-value pairs that specify the actions that the legal entity
     *     can do in your platform. The key is a capability required for your integration. For
     *     example, **issueCard** for Issuing.The value is an object containing the settings for the
     *     capability.
     */
    @JsonProperty(JSON_PROPERTY_CAPABILITIES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<CapabilitiesEnum> getCapabilities() {
      return capabilities;
    }
  
    /**
     * Contains key-value pairs that specify the actions that the legal entity can do in your
     * platform. The key is a capability required for your integration. For example, **issueCard** for
     * Issuing.The value is an object containing the settings for the capability.
     *
     * @param capabilities Contains key-value pairs that specify the actions that the legal entity can
     *     do in your platform. The key is a capability required for your integration. For example,
     *     **issueCard** for Issuing.The value is an object containing the settings for the
     *     capability.
     */
    @JsonProperty(JSON_PROPERTY_CAPABILITIES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setCapabilities(List<CapabilitiesEnum> capabilities) {
      this.capabilities = capabilities;
    }
  
    /**
     * The general error code.
     *
     * @param code The general error code.
     * @return the current {@code VerificationErrorRecursive} instance, allowing for method chaining
     */
    public VerificationErrorRecursive code(String code) {
      this.code = code;
      return this;
    }
  
    /**
     * The general error code.
     *
     * @return code The general error code.
     */
    @JsonProperty(JSON_PROPERTY_CODE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getCode() {
      return code;
    }
  
    /**
     * The general error code.
     *
     * @param code The general error code.
     */
    @JsonProperty(JSON_PROPERTY_CODE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setCode(String code) {
      this.code = code;
    }
  
    /**
     * The general error message.
     *
     * @param message The general error message.
     * @return the current {@code VerificationErrorRecursive} instance, allowing for method chaining
     */
    public VerificationErrorRecursive message(String message) {
      this.message = message;
      return this;
    }
  
    /**
     * The general error message.
     *
     * @return message The general error message.
     */
    @JsonProperty(JSON_PROPERTY_MESSAGE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getMessage() {
      return message;
    }
  
    /**
     * The general error message.
     *
     * @param message The general error message.
     */
    @JsonProperty(JSON_PROPERTY_MESSAGE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setMessage(String message) {
      this.message = message;
    }
  
    /**
     * The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** *
     * **rejected** * **dataReview**
     *
     * @param type The type of error. Possible values: * **invalidInput** * **dataMissing** *
     *     **pendingStatus** * **rejected** * **dataReview**
     * @return the current {@code VerificationErrorRecursive} instance, allowing for method chaining
     */
    public VerificationErrorRecursive type(TypeEnum type) {
      this.type = type;
      return this;
    }
  
    /**
     * The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** *
     * **rejected** * **dataReview**
     *
     * @return type The type of error. Possible values: * **invalidInput** * **dataMissing** *
     *     **pendingStatus** * **rejected** * **dataReview**
     */
    @JsonProperty(JSON_PROPERTY_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public TypeEnum getType() {
      return type;
    }
  
    /**
     * The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** *
     * **rejected** * **dataReview**
     *
     * @param type The type of error. Possible values: * **invalidInput** * **dataMissing** *
     *     **pendingStatus** * **rejected** * **dataReview**
     */
    @JsonProperty(JSON_PROPERTY_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setType(TypeEnum type) {
      this.type = type;
    }
  
    /**
     * An object containing possible solutions to fix a verification error.
     *
     * @param remediatingActions An object containing possible solutions to fix a verification error.
     * @return the current {@code VerificationErrorRecursive} instance, allowing for method chaining
     */
    public VerificationErrorRecursive remediatingActions(List<RemediatingAction> remediatingActions) {
      this.remediatingActions = remediatingActions;
      return this;
    }
  
    public VerificationErrorRecursive addRemediatingActionsItem(
        RemediatingAction remediatingActionsItem) {
      if (this.remediatingActions == null) {
        this.remediatingActions = new ArrayList<>();
      }
      this.remediatingActions.add(remediatingActionsItem);
      return this;
    }
  
    /**
     * An object containing possible solutions to fix a verification error.
     *
     * @return remediatingActions An object containing possible solutions to fix a verification error.
     */
    @JsonProperty(JSON_PROPERTY_REMEDIATING_ACTIONS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public List<RemediatingAction> getRemediatingActions() {
      return remediatingActions;
    }
  
    /**
     * An object containing possible solutions to fix a verification error.
     *
     * @param remediatingActions An object containing possible solutions to fix a verification error.
     */
    @JsonProperty(JSON_PROPERTY_REMEDIATING_ACTIONS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setRemediatingActions(List<RemediatingAction> remediatingActions) {
      this.remediatingActions = remediatingActions;
    }
  
    /** Return true if this VerificationError-recursive object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      VerificationErrorRecursive verificationErrorRecursive = (VerificationErrorRecursive) o;
      return Objects.equals(this.capabilities, verificationErrorRecursive.capabilities)
          && Objects.equals(this.code, verificationErrorRecursive.code)
          && Objects.equals(this.message, verificationErrorRecursive.message)
          && Objects.equals(this.type, verificationErrorRecursive.type)
          && Objects.equals(this.remediatingActions, verificationErrorRecursive.remediatingActions);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(capabilities, code, message, type, remediatingActions);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class VerificationErrorRecursive {\n");
      sb.append("    capabilities: ").append(toIndentedString(capabilities)).append("\n");
      sb.append("    code: ").append(toIndentedString(code)).append("\n");
      sb.append("    message: ").append(toIndentedString(message)).append("\n");
      sb.append("    type: ").append(toIndentedString(type)).append("\n");
      sb.append("    remediatingActions: ").append(toIndentedString(remediatingActions)).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 VerificationErrorRecursive given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of VerificationErrorRecursive
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     VerificationErrorRecursive
     */
    public static VerificationErrorRecursive fromJson(String jsonString)
        throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, VerificationErrorRecursive.class);
    }
  
    /**
     * Convert an instance of VerificationErrorRecursive to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  