APIImplAutorizzazioneAbilitata.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 APIImplAutorizzazioneAbilitata  implements OneOfControlloAccessiAutorizzazioneAutorizzazione, OneOfControlloAccessiAutorizzazioneViewAutorizzazione {
  27.  
  28.   @Schema(required = true, description = "")
  29.   private TipoAutorizzazioneEnum tipo = null;
  30.  
  31.   @Schema(example = "false", required = true, description = "")
  32.   private Boolean richiedente = true;
  33.  
  34.   @Schema(example = "false", required = true, description = "")
  35.   private Boolean ruoli = false;
  36.  
  37.   @Schema(description = "")
  38.   private FonteEnum ruoliFonte = null;
  39.  
  40.   @Schema(description = "")
  41.   private AllAnyEnum ruoliRichiesti = null;
  42.  
  43.   @Schema(example = "false", description = "")
  44.   private Boolean tokenRichiedente = true;
  45.  
  46.   @Schema(example = "false", description = "")
  47.   private Boolean tokenRuoli = false;
  48.  
  49.   @Schema(description = "")
  50.   private FonteEnum tokenRuoliFonte = null;
  51.  
  52.   @Schema(description = "")
  53.   private AllAnyEnum tokenRuoliRichiesti = null;
  54.  
  55.   @Schema(example = "false", required = true, description = "")
  56.   private Boolean scope = false;
  57.  
  58.   @Schema(description = "")
  59.   private AllAnyEnum scopeRichiesti = null;
  60.  
  61.   @Schema(example = "false", required = true, description = "")
  62.   private Boolean token = false;
  63.  
  64.   @Schema(description = "Indicare i claims richiesti (nome=valore); è possibile elencare differenti valori ammissibili separandoli con la virgola")
  65.  /**
  66.    * Indicare i claims richiesti (nome=valore); è possibile elencare differenti valori ammissibili separandoli con la virgola  
  67.   **/
  68.   private List<String> tokenClaims = null;
  69.  /**
  70.    * Get tipo
  71.    * @return tipo
  72.   **/
  73.   @Override
  74. @JsonProperty("tipo")
  75.   @NotNull
  76.   @Valid
  77.   public TipoAutorizzazioneEnum getTipo() {
  78.     return this.tipo;
  79.   }

  80.   public void setTipo(TipoAutorizzazioneEnum tipo) {
  81.     this.tipo = tipo;
  82.   }

  83.   public APIImplAutorizzazioneAbilitata tipo(TipoAutorizzazioneEnum tipo) {
  84.     this.tipo = tipo;
  85.     return this;
  86.   }

  87.  /**
  88.    * Get richiedente
  89.    * @return richiedente
  90.   **/
  91.   @JsonProperty("richiedente")
  92.   @NotNull
  93.   @Valid
  94.   public Boolean isRichiedente() {
  95.     return this.richiedente;
  96.   }

  97.   public void setRichiedente(Boolean richiedente) {
  98.     this.richiedente = richiedente;
  99.   }

  100.   public APIImplAutorizzazioneAbilitata richiedente(Boolean richiedente) {
  101.     this.richiedente = richiedente;
  102.     return this;
  103.   }

  104.  /**
  105.    * Get ruoli
  106.    * @return ruoli
  107.   **/
  108.   @JsonProperty("ruoli")
  109.   @NotNull
  110.   @Valid
  111.   public Boolean isRuoli() {
  112.     return this.ruoli;
  113.   }

  114.   public void setRuoli(Boolean ruoli) {
  115.     this.ruoli = ruoli;
  116.   }

  117.   public APIImplAutorizzazioneAbilitata ruoli(Boolean ruoli) {
  118.     this.ruoli = ruoli;
  119.     return this;
  120.   }

  121.  /**
  122.    * Get ruoliFonte
  123.    * @return ruoliFonte
  124.   **/
  125.   @JsonProperty("ruoli_fonte")
  126.   @Valid
  127.   public FonteEnum getRuoliFonte() {
  128.     return this.ruoliFonte;
  129.   }

  130.   public void setRuoliFonte(FonteEnum ruoliFonte) {
  131.     this.ruoliFonte = ruoliFonte;
  132.   }

  133.   public APIImplAutorizzazioneAbilitata ruoliFonte(FonteEnum ruoliFonte) {
  134.     this.ruoliFonte = ruoliFonte;
  135.     return this;
  136.   }

  137.  /**
  138.    * Get ruoliRichiesti
  139.    * @return ruoliRichiesti
  140.   **/
  141.   @JsonProperty("ruoli_richiesti")
  142.   @Valid
  143.   public AllAnyEnum getRuoliRichiesti() {
  144.     return this.ruoliRichiesti;
  145.   }

  146.   public void setRuoliRichiesti(AllAnyEnum ruoliRichiesti) {
  147.     this.ruoliRichiesti = ruoliRichiesti;
  148.   }

  149.   public APIImplAutorizzazioneAbilitata ruoliRichiesti(AllAnyEnum ruoliRichiesti) {
  150.     this.ruoliRichiesti = ruoliRichiesti;
  151.     return this;
  152.   }

  153.  /**
  154.    * Get tokenRichiedente
  155.    * @return tokenRichiedente
  156.   **/
  157.   @JsonProperty("token_richiedente")
  158.   @Valid
  159.   public Boolean isTokenRichiedente() {
  160.     return this.tokenRichiedente;
  161.   }

  162.   public void setTokenRichiedente(Boolean tokenRichiedente) {
  163.     this.tokenRichiedente = tokenRichiedente;
  164.   }

  165.   public APIImplAutorizzazioneAbilitata tokenRichiedente(Boolean tokenRichiedente) {
  166.     this.tokenRichiedente = tokenRichiedente;
  167.     return this;
  168.   }

  169.  /**
  170.    * Get tokenRuoli
  171.    * @return tokenRuoli
  172.   **/
  173.   @JsonProperty("token_ruoli")
  174.   @Valid
  175.   public Boolean isTokenRuoli() {
  176.     return this.tokenRuoli;
  177.   }

  178.   public void setTokenRuoli(Boolean tokenRuoli) {
  179.     this.tokenRuoli = tokenRuoli;
  180.   }

  181.   public APIImplAutorizzazioneAbilitata tokenRuoli(Boolean tokenRuoli) {
  182.     this.tokenRuoli = tokenRuoli;
  183.     return this;
  184.   }

  185.  /**
  186.    * Get tokenRuoliFonte
  187.    * @return tokenRuoliFonte
  188.   **/
  189.   @JsonProperty("token_ruoli_fonte")
  190.   @Valid
  191.   public FonteEnum getTokenRuoliFonte() {
  192.     return this.tokenRuoliFonte;
  193.   }

  194.   public void setTokenRuoliFonte(FonteEnum tokenRuoliFonte) {
  195.     this.tokenRuoliFonte = tokenRuoliFonte;
  196.   }

  197.   public APIImplAutorizzazioneAbilitata tokenRuoliFonte(FonteEnum tokenRuoliFonte) {
  198.     this.tokenRuoliFonte = tokenRuoliFonte;
  199.     return this;
  200.   }

  201.  /**
  202.    * Get tokenRuoliRichiesti
  203.    * @return tokenRuoliRichiesti
  204.   **/
  205.   @JsonProperty("token_ruoli_richiesti")
  206.   @Valid
  207.   public AllAnyEnum getTokenRuoliRichiesti() {
  208.     return this.tokenRuoliRichiesti;
  209.   }

  210.   public void setTokenRuoliRichiesti(AllAnyEnum tokenRuoliRichiesti) {
  211.     this.tokenRuoliRichiesti = tokenRuoliRichiesti;
  212.   }

  213.   public APIImplAutorizzazioneAbilitata tokenRuoliRichiesti(AllAnyEnum tokenRuoliRichiesti) {
  214.     this.tokenRuoliRichiesti = tokenRuoliRichiesti;
  215.     return this;
  216.   }

  217.  /**
  218.    * Get scope
  219.    * @return scope
  220.   **/
  221.   @JsonProperty("scope")
  222.   @NotNull
  223.   @Valid
  224.   public Boolean isScope() {
  225.     return this.scope;
  226.   }

  227.   public void setScope(Boolean scope) {
  228.     this.scope = scope;
  229.   }

  230.   public APIImplAutorizzazioneAbilitata scope(Boolean scope) {
  231.     this.scope = scope;
  232.     return this;
  233.   }

  234.  /**
  235.    * Get scopeRichiesti
  236.    * @return scopeRichiesti
  237.   **/
  238.   @JsonProperty("scope_richiesti")
  239.   @Valid
  240.   public AllAnyEnum getScopeRichiesti() {
  241.     return this.scopeRichiesti;
  242.   }

  243.   public void setScopeRichiesti(AllAnyEnum scopeRichiesti) {
  244.     this.scopeRichiesti = scopeRichiesti;
  245.   }

  246.   public APIImplAutorizzazioneAbilitata scopeRichiesti(AllAnyEnum scopeRichiesti) {
  247.     this.scopeRichiesti = scopeRichiesti;
  248.     return this;
  249.   }

  250.  /**
  251.    * Get token
  252.    * @return token
  253.   **/
  254.   @JsonProperty("token")
  255.   @NotNull
  256.   @Valid
  257.   public Boolean isToken() {
  258.     return this.token;
  259.   }

  260.   public void setToken(Boolean token) {
  261.     this.token = token;
  262.   }

  263.   public APIImplAutorizzazioneAbilitata token(Boolean token) {
  264.     this.token = token;
  265.     return this;
  266.   }

  267.  /**
  268.    * Indicare i claims richiesti (nome=valore); è possibile elencare differenti valori ammissibili separandoli con la virgola
  269.    * @return tokenClaims
  270.   **/
  271.   @JsonProperty("token_claims")
  272.   @Valid
  273.   public List<String> getTokenClaims() {
  274.     return this.tokenClaims;
  275.   }

  276.   public void setTokenClaims(List<String> tokenClaims) {
  277.     this.tokenClaims = tokenClaims;
  278.   }

  279.   public APIImplAutorizzazioneAbilitata tokenClaims(List<String> tokenClaims) {
  280.     this.tokenClaims = tokenClaims;
  281.     return this;
  282.   }

  283.   public APIImplAutorizzazioneAbilitata addTokenClaimsItem(String tokenClaimsItem) {
  284.     this.tokenClaims.add(tokenClaimsItem);
  285.     return this;
  286.   }


  287.   @Override
  288.   public String toString() {
  289.     StringBuilder sb = new StringBuilder();
  290.     sb.append("class APIImplAutorizzazioneAbilitata {\n");
  291.    
  292.     sb.append("    tipo: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.tipo)).append("\n");
  293.     sb.append("    richiedente: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.richiedente)).append("\n");
  294.     sb.append("    ruoli: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.ruoli)).append("\n");
  295.     sb.append("    ruoliFonte: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.ruoliFonte)).append("\n");
  296.     sb.append("    ruoliRichiesti: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.ruoliRichiesti)).append("\n");
  297.     sb.append("    tokenRichiedente: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.tokenRichiedente)).append("\n");
  298.     sb.append("    tokenRuoli: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.tokenRuoli)).append("\n");
  299.     sb.append("    tokenRuoliFonte: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.tokenRuoliFonte)).append("\n");
  300.     sb.append("    tokenRuoliRichiesti: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.tokenRuoliRichiesti)).append("\n");
  301.     sb.append("    scope: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.scope)).append("\n");
  302.     sb.append("    scopeRichiesti: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.scopeRichiesti)).append("\n");
  303.     sb.append("    token: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.token)).append("\n");
  304.     sb.append("    tokenClaims: ").append(APIImplAutorizzazioneAbilitata.toIndentedString(this.tokenClaims)).append("\n");
  305.     sb.append("}");
  306.     return sb.toString();
  307.   }

  308.   /**
  309.    * Convert the given object to string with each line indented by 4 spaces
  310.    * (except the first line).
  311.    */
  312.   private static String toIndentedString(java.lang.Object o) {
  313.     if (o == null) {
  314.       return "null";
  315.     }
  316.     return o.toString().replace("\n", "\n    ");
  317.   }
  318. }