Lista.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.utils.service.beans;

  21. import javax.validation.constraints.*;

  22. import io.swagger.v3.oas.annotations.media.Schema;
  23. import com.fasterxml.jackson.annotation.JsonProperty;
  24. import javax.validation.Valid;

  25. public class Lista extends ListaSenzaTotale {
  26.  
  27.   @Schema(required = true, description = "Number of items matching the filter criteria")
  28.  /**
  29.    * Number of items matching the filter criteria  
  30.   **/
  31.   private Long total = null;
  32.  
  33.   @Schema(description = "Link to last result page. Null if you are already on last page.")
  34.  /**
  35.    * Link to last result page. Null if you are already on last page.  
  36.   **/
  37.   private String last = null;
  38.  /**
  39.    * Number of items matching the filter criteria
  40.    * minimum: 0
  41.    * @return total
  42.   **/
  43.   @JsonProperty("total")
  44.   @NotNull
  45.   @Valid
  46.  @Min(0L)  public Long getTotal() {
  47.     return this.total;
  48.   }

  49.   public void setTotal(Long total) {
  50.     this.total = total;
  51.   }

  52.   public Lista total(Long total) {
  53.     this.total = total;
  54.     return this;
  55.   }

  56.  /**
  57.    * Link to last result page. Null if you are already on last page.
  58.    * @return last
  59.   **/
  60.   @JsonProperty("last")
  61.   @Valid
  62.   public String getLast() {
  63.     return this.last;
  64.   }

  65.   public void setLast(String last) {
  66.     this.last = last;
  67.   }

  68.   public Lista last(String last) {
  69.     this.last = last;
  70.     return this;
  71.   }


  72.   @Override
  73.   public String toString() {
  74.     StringBuilder sb = new StringBuilder();
  75.     sb.append("class Lista {\n");
  76.     sb.append("    ").append(Lista.toIndentedString(super.toString())).append("\n");
  77.     sb.append("    total: ").append(Lista.toIndentedString(this.total)).append("\n");
  78.     sb.append("    last: ").append(Lista.toIndentedString(this.last)).append("\n");
  79.     sb.append("}");
  80.     return sb.toString();
  81.   }

  82.   /**
  83.    * Convert the given object to string with each line indented by 4 spaces
  84.    * (except the first line).
  85.    */
  86.   private static String toIndentedString(java.lang.Object o) {
  87.     if (o == null) {
  88.       return "null";
  89.     }
  90.     return o.toString().replace("\n", "\n    ");
  91.   }
  92. }