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.   @Schema(description = "")
  44.   private ModISoggetto modi = null;
  45.  /**
  46.    * Get nome
  47.    * @return nome
  48.   **/
  49.   @JsonProperty("nome")
  50.   @NotNull
  51.   @Valid
  52.  @Pattern(regexp="^[0-9A-Za-z][\\-A-Za-z0-9]*$") @Size(max=255)  public String getNome() {
  53.     return this.nome;
  54.   }

  55.   public void setNome(String nome) {
  56.     this.nome = nome;
  57.   }

  58.   public Soggetto nome(String nome) {
  59.     this.nome = nome;
  60.     return this;
  61.   }

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

  71.   public void setDominio(DominioEnum dominio) {
  72.     this.dominio = dominio;
  73.   }

  74.   public Soggetto dominio(DominioEnum dominio) {
  75.     this.dominio = dominio;
  76.     return this;
  77.   }

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

  87.   public void setDescrizione(String descrizione) {
  88.     this.descrizione = descrizione;
  89.   }

  90.   public Soggetto descrizione(String descrizione) {
  91.     this.descrizione = descrizione;
  92.     return this;
  93.   }

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

  103.   public void setRuoli(List<String> ruoli) {
  104.     this.ruoli = ruoli;
  105.   }

  106.   public Soggetto ruoli(List<String> ruoli) {
  107.     this.ruoli = ruoli;
  108.     return this;
  109.   }

  110.   public Soggetto addRuoliItem(String ruoliItem) {
  111.     this.ruoli.add(ruoliItem);
  112.     return this;
  113.   }

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

  123.   public void setProprieta(List<Proprieta4000OpzioneCifratura> proprieta) {
  124.     this.proprieta = proprieta;
  125.   }

  126.   public Soggetto proprieta(List<Proprieta4000OpzioneCifratura> proprieta) {
  127.     this.proprieta = proprieta;
  128.     return this;
  129.   }

  130.   public Soggetto addProprietaItem(Proprieta4000OpzioneCifratura proprietaItem) {
  131.     this.proprieta.add(proprietaItem);
  132.     return this;
  133.   }

  134.  /**
  135.    * Get modi
  136.    * @return modi
  137.   **/
  138.   @JsonProperty("modi")
  139.   @Valid
  140.   public ModISoggetto getModi() {
  141.     return this.modi;
  142.   }

  143.   public void setModi(ModISoggetto modi) {
  144.     this.modi = modi;
  145.   }

  146.   public Soggetto modi(ModISoggetto modi) {
  147.     this.modi = modi;
  148.     return this;
  149.   }


  150.   @Override
  151.   public String toString() {
  152.     StringBuilder sb = new StringBuilder();
  153.     sb.append("class Soggetto {\n");
  154.     sb.append("    ").append(Soggetto.toIndentedString(super.toString())).append("\n");
  155.     sb.append("    nome: ").append(Soggetto.toIndentedString(this.nome)).append("\n");
  156.     sb.append("    dominio: ").append(Soggetto.toIndentedString(this.dominio)).append("\n");
  157.     sb.append("    descrizione: ").append(Soggetto.toIndentedString(this.descrizione)).append("\n");
  158.     sb.append("    ruoli: ").append(Soggetto.toIndentedString(this.ruoli)).append("\n");
  159.     sb.append("    proprieta: ").append(Soggetto.toIndentedString(this.proprieta)).append("\n");
  160.     sb.append("    modi: ").append(Soggetto.toIndentedString(this.modi)).append("\n");
  161.     sb.append("}");
  162.     return sb.toString();
  163.   }

  164.   /**
  165.    * Convert the given object to string with each line indented by 4 spaces
  166.    * (except the first line).
  167.    */
  168.   private static String toIndentedString(java.lang.Object o) {
  169.     if (o == null) {
  170.       return "null";
  171.     }
  172.     return o.toString().replace("\n", "\n    ");
  173.   }
  174. }