Applicativo.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 Applicativo extends BaseCredenziali {
  27.  
  28.   @Schema(required = true, description = "")
  29.   private String nome = null;
  30.  
  31.   @Schema(example = "descrizione dell'applicativo", description = "")
  32.   private String descrizione = null;
  33.  
  34.   @Schema(example = "[\"ruolo1\",\"ruolo2\"]", description = "")
  35.   private List<String> ruoli = null;
  36.  
  37.   @Schema(description = "")
  38.   private List<Proprieta4000OpzioneCifratura> proprieta = null;
  39.  
  40.   @Schema(description = "")
  41.   @com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXISTING_PROPERTY, property = "dominio", visible = true )
  42.   @com.fasterxml.jackson.annotation.JsonSubTypes({
  43.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = ModIApplicativoInterno.class, name = "interno"),
  44.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = ModIApplicativoEsterno.class, name = "esterno")  })
  45.   private OneOfApplicativoModi modi = null;
  46.  /**
  47.    * Get nome
  48.    * @return nome
  49.   **/
  50.   @JsonProperty("nome")
  51.   @NotNull
  52.   @Valid
  53.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getNome() {
  54.     return this.nome;
  55.   }

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

  59.   public Applicativo nome(String nome) {
  60.     this.nome = nome;
  61.     return this;
  62.   }

  63.  /**
  64.    * Get descrizione
  65.    * @return descrizione
  66.   **/
  67.   @JsonProperty("descrizione")
  68.   @Valid
  69.  @Size(max=4000)  public String getDescrizione() {
  70.     return this.descrizione;
  71.   }

  72.   public void setDescrizione(String descrizione) {
  73.     this.descrizione = descrizione;
  74.   }

  75.   public Applicativo descrizione(String descrizione) {
  76.     this.descrizione = descrizione;
  77.     return this;
  78.   }

  79.  /**
  80.    * Get ruoli
  81.    * @return ruoli
  82.   **/
  83.   @JsonProperty("ruoli")
  84.   @Valid
  85.   public List<String> getRuoli() {
  86.     return this.ruoli;
  87.   }

  88.   public void setRuoli(List<String> ruoli) {
  89.     this.ruoli = ruoli;
  90.   }

  91.   public Applicativo ruoli(List<String> ruoli) {
  92.     this.ruoli = ruoli;
  93.     return this;
  94.   }

  95.   public Applicativo addRuoliItem(String ruoliItem) {
  96.     this.ruoli.add(ruoliItem);
  97.     return this;
  98.   }

  99.  /**
  100.    * Get proprieta
  101.    * @return proprieta
  102.   **/
  103.   @JsonProperty("proprieta")
  104.   @Valid
  105.   public List<Proprieta4000OpzioneCifratura> getProprieta() {
  106.     return this.proprieta;
  107.   }

  108.   public void setProprieta(List<Proprieta4000OpzioneCifratura> proprieta) {
  109.     this.proprieta = proprieta;
  110.   }

  111.   public Applicativo proprieta(List<Proprieta4000OpzioneCifratura> proprieta) {
  112.     this.proprieta = proprieta;
  113.     return this;
  114.   }

  115.   public Applicativo addProprietaItem(Proprieta4000OpzioneCifratura proprietaItem) {
  116.     this.proprieta.add(proprietaItem);
  117.     return this;
  118.   }

  119.  /**
  120.    * Get modi
  121.    * @return modi
  122.   **/
  123.   @JsonProperty("modi")
  124.   @Valid
  125.   public OneOfApplicativoModi getModi() {
  126.     return this.modi;
  127.   }

  128.   public void setModi(OneOfApplicativoModi modi) {
  129.     this.modi = modi;
  130.   }

  131.   public Applicativo modi(OneOfApplicativoModi modi) {
  132.     this.modi = modi;
  133.     return this;
  134.   }


  135.   @Override
  136.   public String toString() {
  137.     StringBuilder sb = new StringBuilder();
  138.     sb.append("class Applicativo {\n");
  139.     sb.append("    ").append(Applicativo.toIndentedString(super.toString())).append("\n");
  140.     sb.append("    nome: ").append(Applicativo.toIndentedString(this.nome)).append("\n");
  141.     sb.append("    descrizione: ").append(Applicativo.toIndentedString(this.descrizione)).append("\n");
  142.     sb.append("    ruoli: ").append(Applicativo.toIndentedString(this.ruoli)).append("\n");
  143.     sb.append("    proprieta: ").append(Applicativo.toIndentedString(this.proprieta)).append("\n");
  144.     sb.append("    modi: ").append(Applicativo.toIndentedString(this.modi)).append("\n");
  145.     sb.append("}");
  146.     return sb.toString();
  147.   }

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