Soggetto.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 java.util.List;
  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 Soggetto extends BaseCredenziali {
  27.  
  28.   @Schema(required = true, description = "")
  29.   private String nome = null;
  30.  
  31.   @Schema(description = "")
  32.   private DominioEnum dominio = null;
  33.  
  34.   @Schema(example = "descrizione del soggetto EnteEsterno", description = "")
  35.   private String descrizione = null;
  36.  
  37.   @Schema(example = "[\"ruolo1\",\"ruolo2\"]", description = "")
  38.   private List<String> ruoli = null;
  39.  
  40.   @Schema(description = "")
  41.   private List<Proprieta4000OpzioneCifratura> proprieta = null;
  42.  /**
  43.    * Get nome
  44.    * @return nome
  45.   **/
  46.   @JsonProperty("nome")
  47.   @NotNull
  48.   @Valid
  49.  @Pattern(regexp="^[0-9A-Za-z][\\-A-Za-z0-9]*$") @Size(max=255)  public String getNome() {
  50.     return this.nome;
  51.   }

  52.   public void setNome(String nome) {
  53.     this.nome = nome;
  54.   }

  55.   public Soggetto nome(String nome) {
  56.     this.nome = nome;
  57.     return this;
  58.   }

  59.  /**
  60.    * Get dominio
  61.    * @return dominio
  62.   **/
  63.   @JsonProperty("dominio")
  64.   @Valid
  65.   public DominioEnum getDominio() {
  66.     return this.dominio;
  67.   }

  68.   public void setDominio(DominioEnum dominio) {
  69.     this.dominio = dominio;
  70.   }

  71.   public Soggetto dominio(DominioEnum dominio) {
  72.     this.dominio = dominio;
  73.     return this;
  74.   }

  75.  /**
  76.    * Get descrizione
  77.    * @return descrizione
  78.   **/
  79.   @JsonProperty("descrizione")
  80.   @Valid
  81.  @Size(max=4000)  public String getDescrizione() {
  82.     return this.descrizione;
  83.   }

  84.   public void setDescrizione(String descrizione) {
  85.     this.descrizione = descrizione;
  86.   }

  87.   public Soggetto descrizione(String descrizione) {
  88.     this.descrizione = descrizione;
  89.     return this;
  90.   }

  91.  /**
  92.    * Get ruoli
  93.    * @return ruoli
  94.   **/
  95.   @JsonProperty("ruoli")
  96.   @Valid
  97.   public List<String> getRuoli() {
  98.     return this.ruoli;
  99.   }

  100.   public void setRuoli(List<String> ruoli) {
  101.     this.ruoli = ruoli;
  102.   }

  103.   public Soggetto ruoli(List<String> ruoli) {
  104.     this.ruoli = ruoli;
  105.     return this;
  106.   }

  107.   public Soggetto addRuoliItem(String ruoliItem) {
  108.     this.ruoli.add(ruoliItem);
  109.     return this;
  110.   }

  111.  /**
  112.    * Get proprieta
  113.    * @return proprieta
  114.   **/
  115.   @JsonProperty("proprieta")
  116.   @Valid
  117.   public List<Proprieta4000OpzioneCifratura> getProprieta() {
  118.     return this.proprieta;
  119.   }

  120.   public void setProprieta(List<Proprieta4000OpzioneCifratura> proprieta) {
  121.     this.proprieta = proprieta;
  122.   }

  123.   public Soggetto proprieta(List<Proprieta4000OpzioneCifratura> proprieta) {
  124.     this.proprieta = proprieta;
  125.     return this;
  126.   }

  127.   public Soggetto addProprietaItem(Proprieta4000OpzioneCifratura proprietaItem) {
  128.     this.proprieta.add(proprietaItem);
  129.     return this;
  130.   }


  131.   @Override
  132.   public String toString() {
  133.     StringBuilder sb = new StringBuilder();
  134.     sb.append("class Soggetto {\n");
  135.     sb.append("    ").append(Soggetto.toIndentedString(super.toString())).append("\n");
  136.     sb.append("    nome: ").append(Soggetto.toIndentedString(this.nome)).append("\n");
  137.     sb.append("    dominio: ").append(Soggetto.toIndentedString(this.dominio)).append("\n");
  138.     sb.append("    descrizione: ").append(Soggetto.toIndentedString(this.descrizione)).append("\n");
  139.     sb.append("    ruoli: ").append(Soggetto.toIndentedString(this.ruoli)).append("\n");
  140.     sb.append("    proprieta: ").append(Soggetto.toIndentedString(this.proprieta)).append("\n");
  141.     sb.append("}");
  142.     return sb.toString();
  143.   }

  144.   /**
  145.    * Convert the given object to string with each line indented by 4 spaces
  146.    * (except the first line).
  147.    */
  148.   private static String toIndentedString(java.lang.Object o) {
  149.     if (o == null) {
  150.       return "null";
  151.     }
  152.     return o.toString().replace("\n", "\n    ");
  153.   }
  154. }