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

org.lockss.laaws.poller.model.UrlPager Maven / Gradle / Ivy

package org.lockss.laaws.poller.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
import org.lockss.laaws.poller.model.PageDesc;
import org.springframework.validation.annotation.Validated;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;

/**
 * A Pager for a list of urls found in poll details.
 */
@Schema(description = "A Pager for a list of urls found in poll details.")
@Validated



public class UrlPager   {
  @JsonProperty("pageDesc")
  private PageDesc pageDesc = null;

  @JsonProperty("urls")
  @Valid
  private List urls = null;

  public UrlPager pageDesc(PageDesc pageDesc) {
    this.pageDesc = pageDesc;
    return this;
  }

  /**
   * Get pageDesc
   * @return pageDesc
   **/
  @Schema(required = true, description = "")
      @NotNull

    @Valid
    public PageDesc getPageDesc() {
    return pageDesc;
  }

  public void setPageDesc(PageDesc pageDesc) {
    this.pageDesc = pageDesc;
  }

  public UrlPager urls(List urls) {
    this.urls = urls;
    return this;
  }

  public UrlPager addUrlsItem(String urlsItem) {
    if (this.urls == null) {
      this.urls = new ArrayList<>();
    }
    this.urls.add(urlsItem);
    return this;
  }

  /**
   * The urls on this page.
   * @return urls
   **/
  @Schema(description = "The urls on this page.")
  
    public List getUrls() {
    return urls;
  }

  public void setUrls(List urls) {
    this.urls = urls;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UrlPager urlPager = (UrlPager) o;
    return Objects.equals(this.pageDesc, urlPager.pageDesc) &&
        Objects.equals(this.urls, urlPager.urls);
  }

  @Override
  public int hashCode() {
    return Objects.hash(pageDesc, urls);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UrlPager {\n");
    
    sb.append("    pageDesc: ").append(toIndentedString(pageDesc)).append("\n");
    sb.append("    urls: ").append(toIndentedString(urls)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy