content: /*
   * Configuration API
   *
   * The version of the OpenAPI document: 2
   *
   *
   * 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.balanceplatform;
  
  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.time.OffsetDateTime;
  import java.util.*;
  
  /** The transfer limit configured to regulate outgoing transfers. */
  @JsonPropertyOrder({
    TransferLimit.JSON_PROPERTY_AMOUNT,
    TransferLimit.JSON_PROPERTY_ENDS_AT,
    TransferLimit.JSON_PROPERTY_ID,
    TransferLimit.JSON_PROPERTY_LIMIT_STATUS,
    TransferLimit.JSON_PROPERTY_REFERENCE,
    TransferLimit.JSON_PROPERTY_SCA_INFORMATION,
    TransferLimit.JSON_PROPERTY_SCOPE,
    TransferLimit.JSON_PROPERTY_STARTS_AT,
    TransferLimit.JSON_PROPERTY_TRANSFER_TYPE
  })
  public class TransferLimit {
    public static final String JSON_PROPERTY_AMOUNT = "amount";
    private Amount amount;
  
    public static final String JSON_PROPERTY_ENDS_AT = "endsAt";
    private OffsetDateTime endsAt;
  
    public static final String JSON_PROPERTY_ID = "id";
    private String id;
  
    public static final String JSON_PROPERTY_LIMIT_STATUS = "limitStatus";
    private LimitStatus limitStatus;
  
    public static final String JSON_PROPERTY_REFERENCE = "reference";
    private String reference;
  
    public static final String JSON_PROPERTY_SCA_INFORMATION = "scaInformation";
    private ScaInformation scaInformation;
  
    public static final String JSON_PROPERTY_SCOPE = "scope";
    private Scope scope;
  
    public static final String JSON_PROPERTY_STARTS_AT = "startsAt";
    private OffsetDateTime startsAt;
  
    public static final String JSON_PROPERTY_TRANSFER_TYPE = "transferType";
    private TransferType transferType;
  
    public TransferLimit() {}
  
    /**
     * amount
     *
     * @param amount
     * @return the current {@code TransferLimit} instance, allowing for method chaining
     */
    public TransferLimit amount(Amount amount) {
      this.amount = amount;
      return this;
    }
  
    /**
     * Get amount
     *
     * @return amount
     */
    @JsonProperty(JSON_PROPERTY_AMOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Amount getAmount() {
      return amount;
    }
  
    /**
     * amount
     *
     * @param amount
     */
    @JsonProperty(JSON_PROPERTY_AMOUNT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAmount(Amount amount) {
      this.amount = amount;
    }
  
    /**
     * The date and time when the transfer limit becomes inactive. If you do not specify an end date,
     * the limit stays active until you override it with a new limit. Format [ISO
     * 8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD**
     *
     * @param endsAt The date and time when the transfer limit becomes inactive. If you do not specify
     *     an end date, the limit stays active until you override it with a new limit. Format [ISO
     *     8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD**
     * @return the current {@code TransferLimit} instance, allowing for method chaining
     */
    public TransferLimit endsAt(OffsetDateTime endsAt) {
      this.endsAt = endsAt;
      return this;
    }
  
    /**
     * The date and time when the transfer limit becomes inactive. If you do not specify an end date,
     * the limit stays active until you override it with a new limit. Format [ISO
     * 8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD**
     *
     * @return endsAt The date and time when the transfer limit becomes inactive. If you do not
     *     specify an end date, the limit stays active until you override it with a new limit. Format
     *     [ISO 8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD**
     */
    @JsonProperty(JSON_PROPERTY_ENDS_AT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public OffsetDateTime getEndsAt() {
      return endsAt;
    }
  
    /**
     * The date and time when the transfer limit becomes inactive. If you do not specify an end date,
     * the limit stays active until you override it with a new limit. Format [ISO
     * 8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD**
     *
     * @param endsAt The date and time when the transfer limit becomes inactive. If you do not specify
     *     an end date, the limit stays active until you override it with a new limit. Format [ISO
     *     8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD**
     */
    @JsonProperty(JSON_PROPERTY_ENDS_AT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setEndsAt(OffsetDateTime endsAt) {
      this.endsAt = endsAt;
    }
  
    /**
     * The unique identifier of the transfer limit.
     *
     * @param id The unique identifier of the transfer limit.
     * @return the current {@code TransferLimit} instance, allowing for method chaining
     */
    public TransferLimit id(String id) {
      this.id = id;
      return this;
    }
  
    /**
     * The unique identifier of the transfer limit.
     *
     * @return id The unique identifier of the transfer limit.
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getId() {
      return id;
    }
  
    /**
     * The unique identifier of the transfer limit.
     *
     * @param id The unique identifier of the transfer limit.
     */
    @JsonProperty(JSON_PROPERTY_ID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setId(String id) {
      this.id = id;
    }
  
    /**
     * limitStatus
     *
     * @param limitStatus
     * @return the current {@code TransferLimit} instance, allowing for method chaining
     */
    public TransferLimit limitStatus(LimitStatus limitStatus) {
      this.limitStatus = limitStatus;
      return this;
    }
  
    /**
     * Get limitStatus
     *
     * @return limitStatus
     */
    @JsonProperty(JSON_PROPERTY_LIMIT_STATUS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public LimitStatus getLimitStatus() {
      return limitStatus;
    }
  
    /**
     * limitStatus
     *
     * @param limitStatus
     */
    @JsonProperty(JSON_PROPERTY_LIMIT_STATUS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setLimitStatus(LimitStatus limitStatus) {
      this.limitStatus = limitStatus;
    }
  
    /**
     * Your reference for the transfer limit.
     *
     * @param reference Your reference for the transfer limit.
     * @return the current {@code TransferLimit} instance, allowing for method chaining
     */
    public TransferLimit reference(String reference) {
      this.reference = reference;
      return this;
    }
  
    /**
     * Your reference for the transfer limit.
     *
     * @return reference Your reference for the transfer limit.
     */
    @JsonProperty(JSON_PROPERTY_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getReference() {
      return reference;
    }
  
    /**
     * Your reference for the transfer limit.
     *
     * @param reference Your reference for the transfer limit.
     */
    @JsonProperty(JSON_PROPERTY_REFERENCE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setReference(String reference) {
      this.reference = reference;
    }
  
    /**
     * scaInformation
     *
     * @param scaInformation
     * @return the current {@code TransferLimit} instance, allowing for method chaining
     */
    public TransferLimit scaInformation(ScaInformation scaInformation) {
      this.scaInformation = scaInformation;
      return this;
    }
  
    /**
     * Get scaInformation
     *
     * @return scaInformation
     */
    @JsonProperty(JSON_PROPERTY_SCA_INFORMATION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public ScaInformation getScaInformation() {
      return scaInformation;
    }
  
    /**
     * scaInformation
     *
     * @param scaInformation
     */
    @JsonProperty(JSON_PROPERTY_SCA_INFORMATION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setScaInformation(ScaInformation scaInformation) {
      this.scaInformation = scaInformation;
    }
  
    /**
     * scope
     *
     * @param scope
     * @return the current {@code TransferLimit} instance, allowing for method chaining
     */
    public TransferLimit scope(Scope scope) {
      this.scope = scope;
      return this;
    }
  
    /**
     * Get scope
     *
     * @return scope
     */
    @JsonProperty(JSON_PROPERTY_SCOPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Scope getScope() {
      return scope;
    }
  
    /**
     * scope
     *
     * @param scope
     */
    @JsonProperty(JSON_PROPERTY_SCOPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setScope(Scope scope) {
      this.scope = scope;
    }
  
    /**
     * The date and time when the transfer limit becomes active. If you specify a date in the future,
     * we will schedule a transfer limit. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime):
     * **YYYY-MM-DDThh:mm:ss.sssTZD**
     *
     * @param startsAt The date and time when the transfer limit becomes active. If you specify a date
     *     in the future, we will schedule a transfer limit. Format [ISO
     *     8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD**
     * @return the current {@code TransferLimit} instance, allowing for method chaining
     */
    public TransferLimit startsAt(OffsetDateTime startsAt) {
      this.startsAt = startsAt;
      return this;
    }
  
    /**
     * The date and time when the transfer limit becomes active. If you specify a date in the future,
     * we will schedule a transfer limit. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime):
     * **YYYY-MM-DDThh:mm:ss.sssTZD**
     *
     * @return startsAt The date and time when the transfer limit becomes active. If you specify a
     *     date in the future, we will schedule a transfer limit. Format [ISO
     *     8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD**
     */
    @JsonProperty(JSON_PROPERTY_STARTS_AT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public OffsetDateTime getStartsAt() {
      return startsAt;
    }
  
    /**
     * The date and time when the transfer limit becomes active. If you specify a date in the future,
     * we will schedule a transfer limit. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime):
     * **YYYY-MM-DDThh:mm:ss.sssTZD**
     *
     * @param startsAt The date and time when the transfer limit becomes active. If you specify a date
     *     in the future, we will schedule a transfer limit. Format [ISO
     *     8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD**
     */
    @JsonProperty(JSON_PROPERTY_STARTS_AT)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setStartsAt(OffsetDateTime startsAt) {
      this.startsAt = startsAt;
    }
  
    /**
     * transferType
     *
     * @param transferType
     * @return the current {@code TransferLimit} instance, allowing for method chaining
     */
    public TransferLimit transferType(TransferType transferType) {
      this.transferType = transferType;
      return this;
    }
  
    /**
     * Get transferType
     *
     * @return transferType
     */
    @JsonProperty(JSON_PROPERTY_TRANSFER_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public TransferType getTransferType() {
      return transferType;
    }
  
    /**
     * transferType
     *
     * @param transferType
     */
    @JsonProperty(JSON_PROPERTY_TRANSFER_TYPE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setTransferType(TransferType transferType) {
      this.transferType = transferType;
    }
  
    /** Return true if this TransferLimit object is equal to o. */
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      TransferLimit transferLimit = (TransferLimit) o;
      return Objects.equals(this.amount, transferLimit.amount)
          && Objects.equals(this.endsAt, transferLimit.endsAt)
          && Objects.equals(this.id, transferLimit.id)
          && Objects.equals(this.limitStatus, transferLimit.limitStatus)
          && Objects.equals(this.reference, transferLimit.reference)
          && Objects.equals(this.scaInformation, transferLimit.scaInformation)
          && Objects.equals(this.scope, transferLimit.scope)
          && Objects.equals(this.startsAt, transferLimit.startsAt)
          && Objects.equals(this.transferType, transferLimit.transferType);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(
          amount, endsAt, id, limitStatus, reference, scaInformation, scope, startsAt, transferType);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class TransferLimit {\n");
      sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
      sb.append("    endsAt: ").append(toIndentedString(endsAt)).append("\n");
      sb.append("    id: ").append(toIndentedString(id)).append("\n");
      sb.append("    limitStatus: ").append(toIndentedString(limitStatus)).append("\n");
      sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
      sb.append("    scaInformation: ").append(toIndentedString(scaInformation)).append("\n");
      sb.append("    scope: ").append(toIndentedString(scope)).append("\n");
      sb.append("    startsAt: ").append(toIndentedString(startsAt)).append("\n");
      sb.append("    transferType: ").append(toIndentedString(transferType)).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 TransferLimit given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of TransferLimit
     * @throws JsonProcessingException if the JSON string is invalid with respect to TransferLimit
     */
    public static TransferLimit fromJson(String jsonString) throws JsonProcessingException {
      return JSON.getMapper().readValue(jsonString, TransferLimit.class);
    }
  
    /**
     * Convert an instance of TransferLimit to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  