ApiInformazioniGeneraliView.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.core.config.rs.server.model;

  21. import org.openspcoop2.utils.service.beans.BaseItem;
  22. import javax.validation.constraints.*;

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

  26. public class ApiInformazioniGeneraliView extends BaseItem {
  27.  
  28.   @Schema(required = true, description = "")
  29.   private String nome = null;
  30.  
  31.   @Schema(example = "1", required = true, description = "")
  32.   private Integer versione = null;
  33.  /**
  34.    * Get nome
  35.    * @return nome
  36.   **/
  37.   @JsonProperty("nome")
  38.   @NotNull
  39.   @Valid
  40.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getNome() {
  41.     return this.nome;
  42.   }

  43.   public void setNome(String nome) {
  44.     this.nome = nome;
  45.   }

  46.   public ApiInformazioniGeneraliView nome(String nome) {
  47.     this.nome = nome;
  48.     return this;
  49.   }

  50.  /**
  51.    * Get versione
  52.    * minimum: 1
  53.    * @return versione
  54.   **/
  55.   @JsonProperty("versione")
  56.   @NotNull
  57.   @Valid
  58.  @Min(1)  public Integer getVersione() {
  59.     return this.versione;
  60.   }

  61.   public void setVersione(Integer versione) {
  62.     this.versione = versione;
  63.   }

  64.   public ApiInformazioniGeneraliView versione(Integer versione) {
  65.     this.versione = versione;
  66.     return this;
  67.   }


  68.   @Override
  69.   public String toString() {
  70.     StringBuilder sb = new StringBuilder();
  71.     sb.append("class ApiInformazioniGeneraliView {\n");
  72.     sb.append("    ").append(ApiInformazioniGeneraliView.toIndentedString(super.toString())).append("\n");
  73.     sb.append("    nome: ").append(ApiInformazioniGeneraliView.toIndentedString(this.nome)).append("\n");
  74.     sb.append("    versione: ").append(ApiInformazioniGeneraliView.toIndentedString(this.versione)).append("\n");
  75.     sb.append("}");
  76.     return sb.toString();
  77.   }

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