RateLimitingPolicyFiltro.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 RateLimitingPolicyFiltro  {
  27.  
  28.   @Schema(description = "")
  29.   private List<String> azione = null;
  30.  
  31.   @Schema(description = "")
  32.   private String ruoloRichiedente = null;
  33.  
  34.   @Schema(description = "")
  35.   private String applicativoFruitore = null;
  36.  
  37.   @Schema(description = "Indicare i claims richiesti (nome=valore); è possibile elencare differenti valori ammissibili separandoli con la virgola")
  38.  /**
  39.    * Indicare i claims richiesti (nome=valore); è possibile elencare differenti valori ammissibili separandoli con la virgola  
  40.   **/
  41.   private List<String> tokenClaims = null;
  42.  
  43.   @Schema(description = "")
  44.   private RateLimitingChiaveEnum chiaveTipo = null;
  45.  
  46.   @Schema(description = "La semantica cambia in funzione del tipo:   * header-based: nome dell'header   * url-based: espressione regolare da applicare alla url di invocazione   * form-based: nome del parametro della url   * soap-action-based: in questa modalità questo parametro non viene utilizzato   * content-based: xpath o json path da applicare sul contenuto   * indirizzo-ip: indirizzo ip del socket   * indirizzo-ip-forwarded: indirizzo ip inoltrato via header http   * plugin-based: tipo del plugin")
  47.  /**
  48.    * La semantica cambia in funzione del tipo:   * header-based: nome dell'header   * url-based: espressione regolare da applicare alla url di invocazione   * form-based: nome del parametro della url   * soap-action-based: in questa modalità questo parametro non viene utilizzato   * content-based: xpath o json path da applicare sul contenuto   * indirizzo-ip: indirizzo ip del socket   * indirizzo-ip-forwarded: indirizzo ip inoltrato via header http   * plugin-based: tipo del plugin  
  49.   **/
  50.   private String chiaveNome = null;
  51.  
  52.   @Schema(description = "indica il valore che deve assumere la chiave")
  53.  /**
  54.    * indica il valore che deve assumere la chiave  
  55.   **/
  56.   private String filtroChiaveValore = null;
  57.  /**
  58.    * Get azione
  59.    * @return azione
  60.   **/
  61.   @JsonProperty("azione")
  62.   @Valid
  63.   public List<String> getAzione() {
  64.     return this.azione;
  65.   }

  66.   public void setAzione(List<String> azione) {
  67.     this.azione = azione;
  68.   }

  69.   public RateLimitingPolicyFiltro azione(List<String> azione) {
  70.     this.azione = azione;
  71.     return this;
  72.   }

  73.   public RateLimitingPolicyFiltro addAzioneItem(String azioneItem) {
  74.     this.azione.add(azioneItem);
  75.     return this;
  76.   }

  77.  /**
  78.    * Get ruoloRichiedente
  79.    * @return ruoloRichiedente
  80.   **/
  81.   @JsonProperty("ruolo_richiedente")
  82.   @Valid
  83.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getRuoloRichiedente() {
  84.     return this.ruoloRichiedente;
  85.   }

  86.   public void setRuoloRichiedente(String ruoloRichiedente) {
  87.     this.ruoloRichiedente = ruoloRichiedente;
  88.   }

  89.   public RateLimitingPolicyFiltro ruoloRichiedente(String ruoloRichiedente) {
  90.     this.ruoloRichiedente = ruoloRichiedente;
  91.     return this;
  92.   }

  93.  /**
  94.    * Get applicativoFruitore
  95.    * @return applicativoFruitore
  96.   **/
  97.   @JsonProperty("applicativo_fruitore")
  98.   @Valid
  99.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getApplicativoFruitore() {
  100.     return this.applicativoFruitore;
  101.   }

  102.   public void setApplicativoFruitore(String applicativoFruitore) {
  103.     this.applicativoFruitore = applicativoFruitore;
  104.   }

  105.   public RateLimitingPolicyFiltro applicativoFruitore(String applicativoFruitore) {
  106.     this.applicativoFruitore = applicativoFruitore;
  107.     return this;
  108.   }

  109.  /**
  110.    * Indicare i claims richiesti (nome=valore); è possibile elencare differenti valori ammissibili separandoli con la virgola
  111.    * @return tokenClaims
  112.   **/
  113.   @JsonProperty("token_claims")
  114.   @Valid
  115.   public List<String> getTokenClaims() {
  116.     return this.tokenClaims;
  117.   }

  118.   public void setTokenClaims(List<String> tokenClaims) {
  119.     this.tokenClaims = tokenClaims;
  120.   }

  121.   public RateLimitingPolicyFiltro tokenClaims(List<String> tokenClaims) {
  122.     this.tokenClaims = tokenClaims;
  123.     return this;
  124.   }

  125.   public RateLimitingPolicyFiltro addTokenClaimsItem(String tokenClaimsItem) {
  126.     this.tokenClaims.add(tokenClaimsItem);
  127.     return this;
  128.   }

  129.  /**
  130.    * Get chiaveTipo
  131.    * @return chiaveTipo
  132.   **/
  133.   @JsonProperty("chiave_tipo")
  134.   @Valid
  135.   public RateLimitingChiaveEnum getChiaveTipo() {
  136.     return this.chiaveTipo;
  137.   }

  138.   public void setChiaveTipo(RateLimitingChiaveEnum chiaveTipo) {
  139.     this.chiaveTipo = chiaveTipo;
  140.   }

  141.   public RateLimitingPolicyFiltro chiaveTipo(RateLimitingChiaveEnum chiaveTipo) {
  142.     this.chiaveTipo = chiaveTipo;
  143.     return this;
  144.   }

  145.  /**
  146.    * La semantica cambia in funzione del tipo:   * header-based: nome dell'header   * url-based: espressione regolare da applicare alla url di invocazione   * form-based: nome del parametro della url   * soap-action-based: in questa modalità questo parametro non viene utilizzato   * content-based: xpath o json path da applicare sul contenuto   * indirizzo-ip: indirizzo ip del socket   * indirizzo-ip-forwarded: indirizzo ip inoltrato via header http   * plugin-based: tipo del plugin
  147.    * @return chiaveNome
  148.   **/
  149.   @JsonProperty("chiave_nome")
  150.   @Valid
  151.  @Size(max=255)  public String getChiaveNome() {
  152.     return this.chiaveNome;
  153.   }

  154.   public void setChiaveNome(String chiaveNome) {
  155.     this.chiaveNome = chiaveNome;
  156.   }

  157.   public RateLimitingPolicyFiltro chiaveNome(String chiaveNome) {
  158.     this.chiaveNome = chiaveNome;
  159.     return this;
  160.   }

  161.  /**
  162.    * indica il valore che deve assumere la chiave
  163.    * @return filtroChiaveValore
  164.   **/
  165.   @JsonProperty("filtro_chiave_valore")
  166.   @Valid
  167.  @Size(max=255)  public String getFiltroChiaveValore() {
  168.     return this.filtroChiaveValore;
  169.   }

  170.   public void setFiltroChiaveValore(String filtroChiaveValore) {
  171.     this.filtroChiaveValore = filtroChiaveValore;
  172.   }

  173.   public RateLimitingPolicyFiltro filtroChiaveValore(String filtroChiaveValore) {
  174.     this.filtroChiaveValore = filtroChiaveValore;
  175.     return this;
  176.   }


  177.   @Override
  178.   public String toString() {
  179.     StringBuilder sb = new StringBuilder();
  180.     sb.append("class RateLimitingPolicyFiltro {\n");
  181.    
  182.     sb.append("    azione: ").append(RateLimitingPolicyFiltro.toIndentedString(this.azione)).append("\n");
  183.     sb.append("    ruoloRichiedente: ").append(RateLimitingPolicyFiltro.toIndentedString(this.ruoloRichiedente)).append("\n");
  184.     sb.append("    applicativoFruitore: ").append(RateLimitingPolicyFiltro.toIndentedString(this.applicativoFruitore)).append("\n");
  185.     sb.append("    tokenClaims: ").append(RateLimitingPolicyFiltro.toIndentedString(this.tokenClaims)).append("\n");
  186.     sb.append("    chiaveTipo: ").append(RateLimitingPolicyFiltro.toIndentedString(this.chiaveTipo)).append("\n");
  187.     sb.append("    chiaveNome: ").append(RateLimitingPolicyFiltro.toIndentedString(this.chiaveNome)).append("\n");
  188.     sb.append("    filtroChiaveValore: ").append(RateLimitingPolicyFiltro.toIndentedString(this.filtroChiaveValore)).append("\n");
  189.     sb.append("}");
  190.     return sb.toString();
  191.   }

  192.   /**
  193.    * Convert the given object to string with each line indented by 4 spaces
  194.    * (except the first line).
  195.    */
  196.   private static String toIndentedString(java.lang.Object o) {
  197.     if (o == null) {
  198.       return "null";
  199.     }
  200.     return o.toString().replace("\n", "\n    ");
  201.   }
  202. }