SoggettoItem.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 SoggettoItem extends BaseItem {
  27.  
  28.   @Schema(required = true, description = "")
  29.   private String nome = null;
  30.  
  31.   @Schema(required = true, description = "")
  32.   private DominioEnum dominio = null;
  33.  
  34.   @Schema(example = "0", description = "")
  35.   private Integer countRuoli = null;
  36.  /**
  37.    * Get nome
  38.    * @return nome
  39.   **/
  40.   @JsonProperty("nome")
  41.   @NotNull
  42.   @Valid
  43.  @Pattern(regexp="^[0-9A-Za-z][\\-A-Za-z0-9]*$") @Size(max=255)  public String getNome() {
  44.     return this.nome;
  45.   }

  46.   public void setNome(String nome) {
  47.     this.nome = nome;
  48.   }

  49.   public SoggettoItem nome(String nome) {
  50.     this.nome = nome;
  51.     return this;
  52.   }

  53.  /**
  54.    * Get dominio
  55.    * @return dominio
  56.   **/
  57.   @JsonProperty("dominio")
  58.   @NotNull
  59.   @Valid
  60.   public DominioEnum getDominio() {
  61.     return this.dominio;
  62.   }

  63.   public void setDominio(DominioEnum dominio) {
  64.     this.dominio = dominio;
  65.   }

  66.   public SoggettoItem dominio(DominioEnum dominio) {
  67.     this.dominio = dominio;
  68.     return this;
  69.   }

  70.  /**
  71.    * Get countRuoli
  72.    * minimum: 0
  73.    * @return countRuoli
  74.   **/
  75.   @JsonProperty("count_ruoli")
  76.   @Valid
  77.  @Min(0)  public Integer getCountRuoli() {
  78.     return this.countRuoli;
  79.   }

  80.   public void setCountRuoli(Integer countRuoli) {
  81.     this.countRuoli = countRuoli;
  82.   }

  83.   public SoggettoItem countRuoli(Integer countRuoli) {
  84.     this.countRuoli = countRuoli;
  85.     return this;
  86.   }


  87.   @Override
  88.   public String toString() {
  89.     StringBuilder sb = new StringBuilder();
  90.     sb.append("class SoggettoItem {\n");
  91.     sb.append("    ").append(SoggettoItem.toIndentedString(super.toString())).append("\n");
  92.     sb.append("    nome: ").append(SoggettoItem.toIndentedString(this.nome)).append("\n");
  93.     sb.append("    dominio: ").append(SoggettoItem.toIndentedString(this.dominio)).append("\n");
  94.     sb.append("    countRuoli: ").append(SoggettoItem.toIndentedString(this.countRuoli)).append("\n");
  95.     sb.append("}");
  96.     return sb.toString();
  97.   }

  98.   /**
  99.    * Convert the given object to string with each line indented by 4 spaces
  100.    * (except the first line).
  101.    */
  102.   private static String toIndentedString(java.lang.Object o) {
  103.     if (o == null) {
  104.       return "null";
  105.     }
  106.     return o.toString().replace("\n", "\n    ");
  107.   }
  108. }