content: /*
   * Account 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 Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them.  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 Account 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/Account/v6/createAccountHolder ```
   *
   * 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.marketpayaccount;
  
  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.JsonValue;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import io.swagger.annotations.ApiModelProperty;
  import java.util.Objects;
  
  /** UpdatePayoutScheduleRequest */
  @JsonPropertyOrder({
    UpdatePayoutScheduleRequest.JSON_PROPERTY_ACTION,
    UpdatePayoutScheduleRequest.JSON_PROPERTY_REASON,
    UpdatePayoutScheduleRequest.JSON_PROPERTY_SCHEDULE
  })
  public class UpdatePayoutScheduleRequest {
    /**
     * Direction on how to handle any payouts that have already been scheduled. Permitted values: *
     * &#x60;CLOSE&#x60; will close the existing batch of payouts. * &#x60;UPDATE&#x60; will
     * reschedule the existing batch to the new schedule. * &#x60;NOTHING&#x60; (**default**) will
     * allow the payout to proceed.
     */
    public enum ActionEnum {
      CLOSE("CLOSE"),
  
      NOTHING("NOTHING"),
  
      UPDATE("UPDATE");
  
      private String value;
  
      ActionEnum(String value) {
        this.value = value;
      }
  
      @JsonValue
      public String getValue() {
        return value;
      }
  
      @Override
      public String toString() {
        return String.valueOf(value);
      }
  
      @JsonCreator
      public static ActionEnum fromValue(String value) {
        for (ActionEnum b : ActionEnum.values()) {
          if (b.value.equals(value)) {
            return b;
          }
        }
        throw new IllegalArgumentException("Unexpected value '" + value + "'");
      }
    }
  
    public static final String JSON_PROPERTY_ACTION = "action";
    private ActionEnum action;
  
    public static final String JSON_PROPERTY_REASON = "reason";
    private String reason;
  
    /**
     * The payout schedule to which the account is to be updated. Permitted values: &#x60;DAILY&#x60;,
     * &#x60;DAILY_US&#x60;, &#x60;DAILY_EU&#x60;, &#x60;DAILY_AU&#x60;, &#x60;DAILY_SG&#x60;,
     * &#x60;WEEKLY&#x60;, &#x60;WEEKLY_ON_TUE_FRI_MIDNIGHT&#x60;,
     * &#x60;BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT&#x60;, &#x60;MONTHLY&#x60;, &#x60;HOLD&#x60;.
     * &#x60;HOLD&#x60; will prevent scheduled payouts from happening but will still allow manual
     * payouts to occur.
     */
    public enum ScheduleEnum {
      BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT("BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT"),
  
      DAILY("DAILY"),
  
      DAILY_AU("DAILY_AU"),
  
      DAILY_EU("DAILY_EU"),
  
      DAILY_SG("DAILY_SG"),
  
      DAILY_US("DAILY_US"),
  
      HOLD("HOLD"),
  
      MONTHLY("MONTHLY"),
  
      WEEKLY("WEEKLY"),
  
      WEEKLY_MON_TO_FRI_AU("WEEKLY_MON_TO_FRI_AU"),
  
      WEEKLY_MON_TO_FRI_EU("WEEKLY_MON_TO_FRI_EU"),
  
      WEEKLY_MON_TO_FRI_US("WEEKLY_MON_TO_FRI_US"),
  
      WEEKLY_ON_TUE_FRI_MIDNIGHT("WEEKLY_ON_TUE_FRI_MIDNIGHT"),
  
      WEEKLY_SUN_TO_THU_AU("WEEKLY_SUN_TO_THU_AU"),
  
      WEEKLY_SUN_TO_THU_US("WEEKLY_SUN_TO_THU_US");
  
      private String value;
  
      ScheduleEnum(String value) {
        this.value = value;
      }
  
      @JsonValue
      public String getValue() {
        return value;
      }
  
      @Override
      public String toString() {
        return String.valueOf(value);
      }
  
      @JsonCreator
      public static ScheduleEnum fromValue(String value) {
        for (ScheduleEnum b : ScheduleEnum.values()) {
          if (b.value.equals(value)) {
            return b;
          }
        }
        throw new IllegalArgumentException("Unexpected value '" + value + "'");
      }
    }
  
    public static final String JSON_PROPERTY_SCHEDULE = "schedule";
    private ScheduleEnum schedule;
  
    public UpdatePayoutScheduleRequest() {}
  
    public UpdatePayoutScheduleRequest action(ActionEnum action) {
      this.action = action;
      return this;
    }
  
    /**
     * Direction on how to handle any payouts that have already been scheduled. Permitted values: *
     * &#x60;CLOSE&#x60; will close the existing batch of payouts. * &#x60;UPDATE&#x60; will
     * reschedule the existing batch to the new schedule. * &#x60;NOTHING&#x60; (**default**) will
     * allow the payout to proceed.
     *
     * @return action
     */
    @ApiModelProperty(
        value =
            "Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed.")
    @JsonProperty(JSON_PROPERTY_ACTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public ActionEnum getAction() {
      return action;
    }
  
    @JsonProperty(JSON_PROPERTY_ACTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAction(ActionEnum action) {
      this.action = action;
    }
  
    public UpdatePayoutScheduleRequest reason(String reason) {
      this.reason = reason;
      return this;
    }
  
    /**
     * The reason for the payout schedule update. &gt; This field is required when the
     * &#x60;schedule&#x60; parameter is set to &#x60;HOLD&#x60;.
     *
     * @return reason
     */
    @ApiModelProperty(
        value =
            "The reason for the payout schedule update. > This field is required when the `schedule` parameter is set to `HOLD`.")
    @JsonProperty(JSON_PROPERTY_REASON)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getReason() {
      return reason;
    }
  
    @JsonProperty(JSON_PROPERTY_REASON)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setReason(String reason) {
      this.reason = reason;
    }
  
    public UpdatePayoutScheduleRequest schedule(ScheduleEnum schedule) {
      this.schedule = schedule;
      return this;
    }
  
    /**
     * The payout schedule to which the account is to be updated. Permitted values: &#x60;DAILY&#x60;,
     * &#x60;DAILY_US&#x60;, &#x60;DAILY_EU&#x60;, &#x60;DAILY_AU&#x60;, &#x60;DAILY_SG&#x60;,
     * &#x60;WEEKLY&#x60;, &#x60;WEEKLY_ON_TUE_FRI_MIDNIGHT&#x60;,
     * &#x60;BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT&#x60;, &#x60;MONTHLY&#x60;, &#x60;HOLD&#x60;.
     * &#x60;HOLD&#x60; will prevent scheduled payouts from happening but will still allow manual
     * payouts to occur.
     *
     * @return schedule
     */
    @ApiModelProperty(
        required = true,
        value =
            "The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur.")
    @JsonProperty(JSON_PROPERTY_SCHEDULE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public ScheduleEnum getSchedule() {
      return schedule;
    }
  
    @JsonProperty(JSON_PROPERTY_SCHEDULE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSchedule(ScheduleEnum schedule) {
      this.schedule = schedule;
    }
  
    /** Return true if this UpdatePayoutScheduleRequest object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      UpdatePayoutScheduleRequest updatePayoutScheduleRequest = (UpdatePayoutScheduleRequest) o;
      return Objects.equals(this.action, updatePayoutScheduleRequest.action)
          && Objects.equals(this.reason, updatePayoutScheduleRequest.reason)
          && Objects.equals(this.schedule, updatePayoutScheduleRequest.schedule);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(action, reason, schedule);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class UpdatePayoutScheduleRequest {\n");
      sb.append("    action: ").append(toIndentedString(action)).append("\n");
      sb.append("    reason: ").append(toIndentedString(reason)).append("\n");
      sb.append("    schedule: ").append(toIndentedString(schedule)).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 UpdatePayoutScheduleRequest given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of UpdatePayoutScheduleRequest
     * @throws JsonProcessingException if the JSON string is invalid with respect to
     *     UpdatePayoutScheduleRequest
     */
    public static UpdatePayoutScheduleRequest fromJson(String jsonString)
        throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, UpdatePayoutScheduleRequest.class);
    }
  
    /**
     * Convert an instance of UpdatePayoutScheduleRequest to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  