APIImplAutorizzazioneAbilitataNew.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 APIImplAutorizzazioneAbilitataNew  implements OneOfAPIImplAutorizzazione {
  26.  
  27.   @Schema(required = true, description = "")
  28.   private TipoAutorizzazioneEnum tipo = null;
  29.  
  30.   @Schema(example = "false", required = true, description = "")
  31.   private Boolean richiedente = true;
  32.  
  33.   @Schema(description = "")
  34.   private String soggetto = null;
  35.  
  36.   @Schema(example = "false", required = true, description = "")
  37.   private Boolean ruoli = false;
  38.  
  39.   @Schema(description = "")
  40.   private FonteEnum ruoliFonte = null;
  41.  
  42.   @Schema(description = "")
  43.   private AllAnyEnum ruoliRichiesti = null;
  44.  
  45.   @Schema(description = "")
  46.   private String ruolo = null;
  47.  /**
  48.    * Get tipo
  49.    * @return tipo
  50.   **/
  51.   @Override
  52. @JsonProperty("tipo")
  53.   @NotNull
  54.   @Valid
  55.   public TipoAutorizzazioneEnum getTipo() {
  56.     return this.tipo;
  57.   }

  58.   public void setTipo(TipoAutorizzazioneEnum tipo) {
  59.     this.tipo = tipo;
  60.   }

  61.   public APIImplAutorizzazioneAbilitataNew tipo(TipoAutorizzazioneEnum tipo) {
  62.     this.tipo = tipo;
  63.     return this;
  64.   }

  65.  /**
  66.    * Get richiedente
  67.    * @return richiedente
  68.   **/
  69.   @JsonProperty("richiedente")
  70.   @NotNull
  71.   @Valid
  72.   public Boolean isRichiedente() {
  73.     return this.richiedente;
  74.   }

  75.   public void setRichiedente(Boolean richiedente) {
  76.     this.richiedente = richiedente;
  77.   }

  78.   public APIImplAutorizzazioneAbilitataNew richiedente(Boolean richiedente) {
  79.     this.richiedente = richiedente;
  80.     return this;
  81.   }

  82.  /**
  83.    * Get soggetto
  84.    * @return soggetto
  85.   **/
  86.   @JsonProperty("soggetto")
  87.   @Valid
  88.  @Pattern(regexp="^[0-9A-Za-z][\\-A-Za-z0-9]*$") @Size(max=255)  public String getSoggetto() {
  89.     return this.soggetto;
  90.   }

  91.   public void setSoggetto(String soggetto) {
  92.     this.soggetto = soggetto;
  93.   }

  94.   public APIImplAutorizzazioneAbilitataNew soggetto(String soggetto) {
  95.     this.soggetto = soggetto;
  96.     return this;
  97.   }

  98.  /**
  99.    * Get ruoli
  100.    * @return ruoli
  101.   **/
  102.   @JsonProperty("ruoli")
  103.   @NotNull
  104.   @Valid
  105.   public Boolean isRuoli() {
  106.     return this.ruoli;
  107.   }

  108.   public void setRuoli(Boolean ruoli) {
  109.     this.ruoli = ruoli;
  110.   }

  111.   public APIImplAutorizzazioneAbilitataNew ruoli(Boolean ruoli) {
  112.     this.ruoli = ruoli;
  113.     return this;
  114.   }

  115.  /**
  116.    * Get ruoliFonte
  117.    * @return ruoliFonte
  118.   **/
  119.   @JsonProperty("ruoli_fonte")
  120.   @Valid
  121.   public FonteEnum getRuoliFonte() {
  122.     return this.ruoliFonte;
  123.   }

  124.   public void setRuoliFonte(FonteEnum ruoliFonte) {
  125.     this.ruoliFonte = ruoliFonte;
  126.   }

  127.   public APIImplAutorizzazioneAbilitataNew ruoliFonte(FonteEnum ruoliFonte) {
  128.     this.ruoliFonte = ruoliFonte;
  129.     return this;
  130.   }

  131.  /**
  132.    * Get ruoliRichiesti
  133.    * @return ruoliRichiesti
  134.   **/
  135.   @JsonProperty("ruoli_richiesti")
  136.   @Valid
  137.   public AllAnyEnum getRuoliRichiesti() {
  138.     return this.ruoliRichiesti;
  139.   }

  140.   public void setRuoliRichiesti(AllAnyEnum ruoliRichiesti) {
  141.     this.ruoliRichiesti = ruoliRichiesti;
  142.   }

  143.   public APIImplAutorizzazioneAbilitataNew ruoliRichiesti(AllAnyEnum ruoliRichiesti) {
  144.     this.ruoliRichiesti = ruoliRichiesti;
  145.     return this;
  146.   }

  147.  /**
  148.    * Get ruolo
  149.    * @return ruolo
  150.   **/
  151.   @JsonProperty("ruolo")
  152.   @Valid
  153.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getRuolo() {
  154.     return this.ruolo;
  155.   }

  156.   public void setRuolo(String ruolo) {
  157.     this.ruolo = ruolo;
  158.   }

  159.   public APIImplAutorizzazioneAbilitataNew ruolo(String ruolo) {
  160.     this.ruolo = ruolo;
  161.     return this;
  162.   }


  163.   @Override
  164.   public String toString() {
  165.     StringBuilder sb = new StringBuilder();
  166.     sb.append("class APIImplAutorizzazioneAbilitataNew {\n");
  167.    
  168.     sb.append("    tipo: ").append(APIImplAutorizzazioneAbilitataNew.toIndentedString(this.tipo)).append("\n");
  169.     sb.append("    richiedente: ").append(APIImplAutorizzazioneAbilitataNew.toIndentedString(this.richiedente)).append("\n");
  170.     sb.append("    soggetto: ").append(APIImplAutorizzazioneAbilitataNew.toIndentedString(this.soggetto)).append("\n");
  171.     sb.append("    ruoli: ").append(APIImplAutorizzazioneAbilitataNew.toIndentedString(this.ruoli)).append("\n");
  172.     sb.append("    ruoliFonte: ").append(APIImplAutorizzazioneAbilitataNew.toIndentedString(this.ruoliFonte)).append("\n");
  173.     sb.append("    ruoliRichiesti: ").append(APIImplAutorizzazioneAbilitataNew.toIndentedString(this.ruoliRichiesti)).append("\n");
  174.     sb.append("    ruolo: ").append(APIImplAutorizzazioneAbilitataNew.toIndentedString(this.ruolo)).append("\n");
  175.     sb.append("}");
  176.     return sb.toString();
  177.   }

  178.   /**
  179.    * Convert the given object to string with each line indented by 4 spaces
  180.    * (except the first line).
  181.    */
  182.   private static String toIndentedString(java.lang.Object o) {
  183.     if (o == null) {
  184.       return "null";
  185.     }
  186.     return o.toString().replace("\n", "\n    ");
  187.   }
  188. }