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

JavaClient.PaginatedResponse.mustache Maven / Gradle / Ivy

Go to download

This artefact generates other artefacts such as API client, API server out of API Model

There is a newer version: 1.1.1
Show newest version
{{>licenseInfo}}
package {{modelPackage}};

import java.util.Objects;

public class PaginatedResponse {

  protected LinksPaginated links;

  protected MetaPaginated meta;

  /**
   * The links attribute contains a Links object with links to
   * related API end points. This will include links to support
   * pagination.
   * @return links
   */
  public LinksPaginated getLinks() {
    return links;
  }

  public void setLinks(LinksPaginated links) {
    this.links = links;
  }

  /**
   * The meta object is used to provide additional information
   * such as second factor authorisation data, traffic
   * management, pagination counts or other purposes that are
   * complementary to the workings of the API.
   * @return meta
   */
  public MetaPaginated getMeta() {
    return meta;
  }

  public void setMeta(MetaPaginated meta) {
    this.meta = meta;
  }

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    PaginatedResponse inputModel = (PaginatedResponse) o;
    if (!(links.equals(inputModel.getLinks()))) {
      return false;
    }
    return meta.equals(inputModel.getMeta());
  }

  @Override
  public int hashCode() {
    return Objects.hash(
        links,
        meta);
  }

  @Override
  public String toString() {
    return "class PaginatedResponse {\n" +
        "    links: " + toIndentedString(links) + "\n" +
        "    meta: " + toIndentedString(meta) + "\n" +
        "}";
  }

  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy