All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adyen.model.balanceplatform.BalanceSweepConfigurationsResponse Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * 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 java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.balanceplatform.SweepConfigurationV2;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * BalanceSweepConfigurationsResponse
 */
@JsonPropertyOrder({
  BalanceSweepConfigurationsResponse.JSON_PROPERTY_HAS_NEXT,
  BalanceSweepConfigurationsResponse.JSON_PROPERTY_HAS_PREVIOUS,
  BalanceSweepConfigurationsResponse.JSON_PROPERTY_SWEEPS
})

public class BalanceSweepConfigurationsResponse {
  public static final String JSON_PROPERTY_HAS_NEXT = "hasNext";
  private Boolean hasNext;

  public static final String JSON_PROPERTY_HAS_PREVIOUS = "hasPrevious";
  private Boolean hasPrevious;

  public static final String JSON_PROPERTY_SWEEPS = "sweeps";
  private List sweeps;

  public BalanceSweepConfigurationsResponse() { 
  }

  /**
   * Indicates whether there are more items on the next page.
   *
   * @param hasNext Indicates whether there are more items on the next page.
   * @return the current {@code BalanceSweepConfigurationsResponse} instance, allowing for method chaining
   */
  public BalanceSweepConfigurationsResponse hasNext(Boolean hasNext) {
    this.hasNext = hasNext;
    return this;
  }

  /**
   * Indicates whether there are more items on the next page.
   * @return hasNext Indicates whether there are more items on the next page.
   */
  @JsonProperty(JSON_PROPERTY_HAS_NEXT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Boolean getHasNext() {
    return hasNext;
  }

  /**
   * Indicates whether there are more items on the next page.
   *
   * @param hasNext Indicates whether there are more items on the next page.
   */
  @JsonProperty(JSON_PROPERTY_HAS_NEXT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setHasNext(Boolean hasNext) {
    this.hasNext = hasNext;
  }

  /**
   * Indicates whether there are more items on the previous page.
   *
   * @param hasPrevious Indicates whether there are more items on the previous page.
   * @return the current {@code BalanceSweepConfigurationsResponse} instance, allowing for method chaining
   */
  public BalanceSweepConfigurationsResponse hasPrevious(Boolean hasPrevious) {
    this.hasPrevious = hasPrevious;
    return this;
  }

  /**
   * Indicates whether there are more items on the previous page.
   * @return hasPrevious Indicates whether there are more items on the previous page.
   */
  @JsonProperty(JSON_PROPERTY_HAS_PREVIOUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Boolean getHasPrevious() {
    return hasPrevious;
  }

  /**
   * Indicates whether there are more items on the previous page.
   *
   * @param hasPrevious Indicates whether there are more items on the previous page.
   */
  @JsonProperty(JSON_PROPERTY_HAS_PREVIOUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setHasPrevious(Boolean hasPrevious) {
    this.hasPrevious = hasPrevious;
  }

  /**
   * List of sweeps associated with the balance account.
   *
   * @param sweeps List of sweeps associated with the balance account.
   * @return the current {@code BalanceSweepConfigurationsResponse} instance, allowing for method chaining
   */
  public BalanceSweepConfigurationsResponse sweeps(List sweeps) {
    this.sweeps = sweeps;
    return this;
  }

  public BalanceSweepConfigurationsResponse addSweepsItem(SweepConfigurationV2 sweepsItem) {
    if (this.sweeps == null) {
      this.sweeps = new ArrayList<>();
    }
    this.sweeps.add(sweepsItem);
    return this;
  }

  /**
   * List of sweeps associated with the balance account.
   * @return sweeps List of sweeps associated with the balance account.
   */
  @JsonProperty(JSON_PROPERTY_SWEEPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getSweeps() {
    return sweeps;
  }

  /**
   * List of sweeps associated with the balance account.
   *
   * @param sweeps List of sweeps associated with the balance account.
   */
  @JsonProperty(JSON_PROPERTY_SWEEPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSweeps(List sweeps) {
    this.sweeps = sweeps;
  }

  /**
   * Return true if this BalanceSweepConfigurationsResponse object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BalanceSweepConfigurationsResponse balanceSweepConfigurationsResponse = (BalanceSweepConfigurationsResponse) o;
    return Objects.equals(this.hasNext, balanceSweepConfigurationsResponse.hasNext) &&
        Objects.equals(this.hasPrevious, balanceSweepConfigurationsResponse.hasPrevious) &&
        Objects.equals(this.sweeps, balanceSweepConfigurationsResponse.sweeps);
  }

  @Override
  public int hashCode() {
    return Objects.hash(hasNext, hasPrevious, sweeps);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BalanceSweepConfigurationsResponse {\n");
    sb.append("    hasNext: ").append(toIndentedString(hasNext)).append("\n");
    sb.append("    hasPrevious: ").append(toIndentedString(hasPrevious)).append("\n");
    sb.append("    sweeps: ").append(toIndentedString(sweeps)).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 BalanceSweepConfigurationsResponse given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of BalanceSweepConfigurationsResponse
   * @throws JsonProcessingException if the JSON string is invalid with respect to BalanceSweepConfigurationsResponse
   */
  public static BalanceSweepConfigurationsResponse fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, BalanceSweepConfigurationsResponse.class);
  }
/**
  * Convert an instance of BalanceSweepConfigurationsResponse to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy