Ruolo.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 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 Ruolo  {
  26.  
  27.   @Schema(required = true, description = "")
  28.   private String nome = null;
  29.  
  30.   @Schema(example = "descrizione del ruolo", description = "")
  31.   private String descrizione = null;
  32.  
  33.   @Schema(description = "")
  34.   private FonteEnum fonte = null;
  35.  
  36.   @Schema(example = "urn://accesso_sola_lettura", description = "")
  37.   private String identificativoEsterno = null;
  38.  
  39.   @Schema(description = "")
  40.   private ContestoEnum contesto = null;
  41.  /**
  42.    * Get nome
  43.    * @return nome
  44.   **/
  45.   @JsonProperty("nome")
  46.   @NotNull
  47.   @Valid
  48.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getNome() {
  49.     return this.nome;
  50.   }

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

  54.   public Ruolo nome(String nome) {
  55.     this.nome = nome;
  56.     return this;
  57.   }

  58.  /**
  59.    * Get descrizione
  60.    * @return descrizione
  61.   **/
  62.   @JsonProperty("descrizione")
  63.   @Valid
  64.  @Size(max=4000)  public String getDescrizione() {
  65.     return this.descrizione;
  66.   }

  67.   public void setDescrizione(String descrizione) {
  68.     this.descrizione = descrizione;
  69.   }

  70.   public Ruolo descrizione(String descrizione) {
  71.     this.descrizione = descrizione;
  72.     return this;
  73.   }

  74.  /**
  75.    * Get fonte
  76.    * @return fonte
  77.   **/
  78.   @JsonProperty("fonte")
  79.   @Valid
  80.   public FonteEnum getFonte() {
  81.     return this.fonte;
  82.   }

  83.   public void setFonte(FonteEnum fonte) {
  84.     this.fonte = fonte;
  85.   }

  86.   public Ruolo fonte(FonteEnum fonte) {
  87.     this.fonte = fonte;
  88.     return this;
  89.   }

  90.  /**
  91.    * Get identificativoEsterno
  92.    * @return identificativoEsterno
  93.   **/
  94.   @JsonProperty("identificativo_esterno")
  95.   @Valid
  96.  @Size(max=255)  public String getIdentificativoEsterno() {
  97.     return this.identificativoEsterno;
  98.   }

  99.   public void setIdentificativoEsterno(String identificativoEsterno) {
  100.     this.identificativoEsterno = identificativoEsterno;
  101.   }

  102.   public Ruolo identificativoEsterno(String identificativoEsterno) {
  103.     this.identificativoEsterno = identificativoEsterno;
  104.     return this;
  105.   }

  106.  /**
  107.    * Get contesto
  108.    * @return contesto
  109.   **/
  110.   @JsonProperty("contesto")
  111.   @Valid
  112.   public ContestoEnum getContesto() {
  113.     return this.contesto;
  114.   }

  115.   public void setContesto(ContestoEnum contesto) {
  116.     this.contesto = contesto;
  117.   }

  118.   public Ruolo contesto(ContestoEnum contesto) {
  119.     this.contesto = contesto;
  120.     return this;
  121.   }


  122.   @Override
  123.   public String toString() {
  124.     StringBuilder sb = new StringBuilder();
  125.     sb.append("class Ruolo {\n");
  126.    
  127.     sb.append("    nome: ").append(Ruolo.toIndentedString(this.nome)).append("\n");
  128.     sb.append("    descrizione: ").append(Ruolo.toIndentedString(this.descrizione)).append("\n");
  129.     sb.append("    fonte: ").append(Ruolo.toIndentedString(this.fonte)).append("\n");
  130.     sb.append("    identificativoEsterno: ").append(Ruolo.toIndentedString(this.identificativoEsterno)).append("\n");
  131.     sb.append("    contesto: ").append(Ruolo.toIndentedString(this.contesto)).append("\n");
  132.     sb.append("}");
  133.     return sb.toString();
  134.   }

  135.   /**
  136.    * Convert the given object to string with each line indented by 4 spaces
  137.    * (except the first line).
  138.    */
  139.   private static String toIndentedString(java.lang.Object o) {
  140.     if (o == null) {
  141.       return "null";
  142.     }
  143.     return o.toString().replace("\n", "\n    ");
  144.   }
  145. }