RateLimitingPolicyGroupBy.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 RateLimitingPolicyGroupBy  {
  27.  
  28.   @Schema(description = "")
  29.   private Boolean azione = false;
  30.  
  31.   @Schema(description = "")
  32.   private Boolean richiedente = false;
  33.  
  34.   @Schema(example = "[\"subject\",\"issuer\"]", description = "")
  35.   private List<TokenClaimEnum> token = null;
  36.  
  37.   @Schema(description = "")
  38.   private RateLimitingChiaveEnum chiaveTipo = null;
  39.  
  40.   @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")
  41.  /**
  42.    * 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  
  43.   **/
  44.   private String chiaveNome = null;
  45.  /**
  46.    * Get azione
  47.    * @return azione
  48.   **/
  49.   @JsonProperty("azione")
  50.   @Valid
  51.   public Boolean isAzione() {
  52.     return this.azione;
  53.   }

  54.   public void setAzione(Boolean azione) {
  55.     this.azione = azione;
  56.   }

  57.   public RateLimitingPolicyGroupBy azione(Boolean azione) {
  58.     this.azione = azione;
  59.     return this;
  60.   }

  61.  /**
  62.    * Get richiedente
  63.    * @return richiedente
  64.   **/
  65.   @JsonProperty("richiedente")
  66.   @Valid
  67.   public Boolean isRichiedente() {
  68.     return this.richiedente;
  69.   }

  70.   public void setRichiedente(Boolean richiedente) {
  71.     this.richiedente = richiedente;
  72.   }

  73.   public RateLimitingPolicyGroupBy richiedente(Boolean richiedente) {
  74.     this.richiedente = richiedente;
  75.     return this;
  76.   }

  77.  /**
  78.    * Get token
  79.    * @return token
  80.   **/
  81.   @JsonProperty("token")
  82.   @Valid
  83.   public List<TokenClaimEnum> getToken() {
  84.     return this.token;
  85.   }

  86.   public void setToken(List<TokenClaimEnum> token) {
  87.     this.token = token;
  88.   }

  89.   public RateLimitingPolicyGroupBy token(List<TokenClaimEnum> token) {
  90.     this.token = token;
  91.     return this;
  92.   }

  93.   public RateLimitingPolicyGroupBy addTokenItem(TokenClaimEnum tokenItem) {
  94.     this.token.add(tokenItem);
  95.     return this;
  96.   }

  97.  /**
  98.    * Get chiaveTipo
  99.    * @return chiaveTipo
  100.   **/
  101.   @JsonProperty("chiave_tipo")
  102.   @Valid
  103.   public RateLimitingChiaveEnum getChiaveTipo() {
  104.     return this.chiaveTipo;
  105.   }

  106.   public void setChiaveTipo(RateLimitingChiaveEnum chiaveTipo) {
  107.     this.chiaveTipo = chiaveTipo;
  108.   }

  109.   public RateLimitingPolicyGroupBy chiaveTipo(RateLimitingChiaveEnum chiaveTipo) {
  110.     this.chiaveTipo = chiaveTipo;
  111.     return this;
  112.   }

  113.  /**
  114.    * 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
  115.    * @return chiaveNome
  116.   **/
  117.   @JsonProperty("chiave_nome")
  118.   @Valid
  119.  @Size(max=255)  public String getChiaveNome() {
  120.     return this.chiaveNome;
  121.   }

  122.   public void setChiaveNome(String chiaveNome) {
  123.     this.chiaveNome = chiaveNome;
  124.   }

  125.   public RateLimitingPolicyGroupBy chiaveNome(String chiaveNome) {
  126.     this.chiaveNome = chiaveNome;
  127.     return this;
  128.   }


  129.   @Override
  130.   public String toString() {
  131.     StringBuilder sb = new StringBuilder();
  132.     sb.append("class RateLimitingPolicyGroupBy {\n");
  133.    
  134.     sb.append("    azione: ").append(RateLimitingPolicyGroupBy.toIndentedString(this.azione)).append("\n");
  135.     sb.append("    richiedente: ").append(RateLimitingPolicyGroupBy.toIndentedString(this.richiedente)).append("\n");
  136.     sb.append("    token: ").append(RateLimitingPolicyGroupBy.toIndentedString(this.token)).append("\n");
  137.     sb.append("    chiaveTipo: ").append(RateLimitingPolicyGroupBy.toIndentedString(this.chiaveTipo)).append("\n");
  138.     sb.append("    chiaveNome: ").append(RateLimitingPolicyGroupBy.toIndentedString(this.chiaveNome)).append("\n");
  139.     sb.append("}");
  140.     return sb.toString();
  141.   }

  142.   /**
  143.    * Convert the given object to string with each line indented by 4 spaces
  144.    * (except the first line).
  145.    */
  146.   private static String toIndentedString(java.lang.Object o) {
  147.     if (o == null) {
  148.       return "null";
  149.     }
  150.     return o.toString().replace("\n", "\n    ");
  151.   }
  152. }