ControlloAccessiGestioneToken.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 ControlloAccessiGestioneToken extends ApiImplConfigurazioneStato {
  26.  
  27.   @Schema(description = "indica se la gestione del token è abilitata o meno")
  28.  /**
  29.    * indica se la gestione del token è abilitata o meno  
  30.   **/
  31.   private Boolean abilitato = null;
  32.  
  33.   @Schema(description = "identificativo della Policy da utilizzare per la gestione del token")
  34.  /**
  35.    * identificativo della Policy da utilizzare per la gestione del token  
  36.   **/
  37.   private String policy = null;
  38.  
  39.   @Schema(description = "indica se la presenza del token è obbligatoria o opzionale")
  40.  /**
  41.    * indica se la presenza del token è obbligatoria o opzionale  
  42.   **/
  43.   private Boolean tokenOpzionale = false;
  44.  
  45.   @Schema(description = "")
  46.   private StatoFunzionalitaConWarningEnum validazioneJwt = null;
  47.  
  48.   @Schema(description = "")
  49.   private StatoFunzionalitaConWarningEnum introspection = null;
  50.  
  51.   @Schema(description = "")
  52.   private StatoFunzionalitaConWarningEnum userInfo = null;
  53.  
  54.   @Schema(description = "indica se il forward del token, nelle modalità descritte nella policy, è attivo o meno")
  55.  /**
  56.    * indica se il forward del token, nelle modalità descritte nella policy, è attivo o meno  
  57.   **/
  58.   private Boolean tokenForward = true;
  59.  /**
  60.    * indica se la gestione del token è abilitata o meno
  61.    * @return abilitato
  62.   **/
  63.   @JsonProperty("abilitato")
  64.   @Valid
  65.   public Boolean isAbilitato() {
  66.     return this.abilitato;
  67.   }

  68.   public void setAbilitato(Boolean abilitato) {
  69.     this.abilitato = abilitato;
  70.   }

  71.   public ControlloAccessiGestioneToken abilitato(Boolean abilitato) {
  72.     this.abilitato = abilitato;
  73.     return this;
  74.   }

  75.  /**
  76.    * identificativo della Policy da utilizzare per la gestione del token
  77.    * @return policy
  78.   **/
  79.   @JsonProperty("policy")
  80.   @Valid
  81.  @Size(max=255)  public String getPolicy() {
  82.     return this.policy;
  83.   }

  84.   public void setPolicy(String policy) {
  85.     this.policy = policy;
  86.   }

  87.   public ControlloAccessiGestioneToken policy(String policy) {
  88.     this.policy = policy;
  89.     return this;
  90.   }

  91.  /**
  92.    * indica se la presenza del token è obbligatoria o opzionale
  93.    * @return tokenOpzionale
  94.   **/
  95.   @JsonProperty("token_opzionale")
  96.   @Valid
  97.   public Boolean isTokenOpzionale() {
  98.     return this.tokenOpzionale;
  99.   }

  100.   public void setTokenOpzionale(Boolean tokenOpzionale) {
  101.     this.tokenOpzionale = tokenOpzionale;
  102.   }

  103.   public ControlloAccessiGestioneToken tokenOpzionale(Boolean tokenOpzionale) {
  104.     this.tokenOpzionale = tokenOpzionale;
  105.     return this;
  106.   }

  107.  /**
  108.    * Get validazioneJwt
  109.    * @return validazioneJwt
  110.   **/
  111.   @JsonProperty("validazione_jwt")
  112.   @Valid
  113.   public StatoFunzionalitaConWarningEnum getValidazioneJwt() {
  114.     return this.validazioneJwt;
  115.   }

  116.   public void setValidazioneJwt(StatoFunzionalitaConWarningEnum validazioneJwt) {
  117.     this.validazioneJwt = validazioneJwt;
  118.   }

  119.   public ControlloAccessiGestioneToken validazioneJwt(StatoFunzionalitaConWarningEnum validazioneJwt) {
  120.     this.validazioneJwt = validazioneJwt;
  121.     return this;
  122.   }

  123.  /**
  124.    * Get introspection
  125.    * @return introspection
  126.   **/
  127.   @JsonProperty("introspection")
  128.   @Valid
  129.   public StatoFunzionalitaConWarningEnum getIntrospection() {
  130.     return this.introspection;
  131.   }

  132.   public void setIntrospection(StatoFunzionalitaConWarningEnum introspection) {
  133.     this.introspection = introspection;
  134.   }

  135.   public ControlloAccessiGestioneToken introspection(StatoFunzionalitaConWarningEnum introspection) {
  136.     this.introspection = introspection;
  137.     return this;
  138.   }

  139.  /**
  140.    * Get userInfo
  141.    * @return userInfo
  142.   **/
  143.   @JsonProperty("user_info")
  144.   @Valid
  145.   public StatoFunzionalitaConWarningEnum getUserInfo() {
  146.     return this.userInfo;
  147.   }

  148.   public void setUserInfo(StatoFunzionalitaConWarningEnum userInfo) {
  149.     this.userInfo = userInfo;
  150.   }

  151.   public ControlloAccessiGestioneToken userInfo(StatoFunzionalitaConWarningEnum userInfo) {
  152.     this.userInfo = userInfo;
  153.     return this;
  154.   }

  155.  /**
  156.    * indica se il forward del token, nelle modalità descritte nella policy, è attivo o meno
  157.    * @return tokenForward
  158.   **/
  159.   @JsonProperty("token_forward")
  160.   @Valid
  161.   public Boolean isTokenForward() {
  162.     return this.tokenForward;
  163.   }

  164.   public void setTokenForward(Boolean tokenForward) {
  165.     this.tokenForward = tokenForward;
  166.   }

  167.   public ControlloAccessiGestioneToken tokenForward(Boolean tokenForward) {
  168.     this.tokenForward = tokenForward;
  169.     return this;
  170.   }


  171.   @Override
  172.   public String toString() {
  173.     StringBuilder sb = new StringBuilder();
  174.     sb.append("class ControlloAccessiGestioneToken {\n");
  175.     sb.append("    ").append(ControlloAccessiGestioneToken.toIndentedString(super.toString())).append("\n");
  176.     sb.append("    abilitato: ").append(ControlloAccessiGestioneToken.toIndentedString(this.abilitato)).append("\n");
  177.     sb.append("    policy: ").append(ControlloAccessiGestioneToken.toIndentedString(this.policy)).append("\n");
  178.     sb.append("    tokenOpzionale: ").append(ControlloAccessiGestioneToken.toIndentedString(this.tokenOpzionale)).append("\n");
  179.     sb.append("    validazioneJwt: ").append(ControlloAccessiGestioneToken.toIndentedString(this.validazioneJwt)).append("\n");
  180.     sb.append("    introspection: ").append(ControlloAccessiGestioneToken.toIndentedString(this.introspection)).append("\n");
  181.     sb.append("    userInfo: ").append(ControlloAccessiGestioneToken.toIndentedString(this.userInfo)).append("\n");
  182.     sb.append("    tokenForward: ").append(ControlloAccessiGestioneToken.toIndentedString(this.tokenForward)).append("\n");
  183.     sb.append("}");
  184.     return sb.toString();
  185.   }

  186.   /**
  187.    * Convert the given object to string with each line indented by 4 spaces
  188.    * (except the first line).
  189.    */
  190.   private static String toIndentedString(java.lang.Object o) {
  191.     if (o == null) {
  192.       return "null";
  193.     }
  194.     return o.toString().replace("\n", "\n    ");
  195.   }
  196. }