CachingRispostaRegola.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 io.swagger.v3.oas.annotations.media.Schema;
  22. import com.fasterxml.jackson.annotation.JsonProperty;
  23. import javax.validation.Valid;

  24. public class CachingRispostaRegola  {
  25.  
  26.   @Schema(description = "")
  27.   private Integer returnCodeMin = null;
  28.  
  29.   @Schema(description = "")
  30.   private Integer returnCodeMax = null;
  31.  
  32.   @Schema(description = "")
  33.   private Boolean fault = false;
  34.  
  35.   @Schema(description = "")
  36.   private Integer cacheTimeoutSeconds = null;
  37.  /**
  38.    * Get returnCodeMin
  39.    * @return returnCodeMin
  40.   **/
  41.   @JsonProperty("return-code-min")
  42.   @Valid
  43.   public Integer getReturnCodeMin() {
  44.     return this.returnCodeMin;
  45.   }

  46.   public void setReturnCodeMin(Integer returnCodeMin) {
  47.     this.returnCodeMin = returnCodeMin;
  48.   }

  49.   public CachingRispostaRegola returnCodeMin(Integer returnCodeMin) {
  50.     this.returnCodeMin = returnCodeMin;
  51.     return this;
  52.   }

  53.  /**
  54.    * Get returnCodeMax
  55.    * @return returnCodeMax
  56.   **/
  57.   @JsonProperty("return-code-max")
  58.   @Valid
  59.   public Integer getReturnCodeMax() {
  60.     return this.returnCodeMax;
  61.   }

  62.   public void setReturnCodeMax(Integer returnCodeMax) {
  63.     this.returnCodeMax = returnCodeMax;
  64.   }

  65.   public CachingRispostaRegola returnCodeMax(Integer returnCodeMax) {
  66.     this.returnCodeMax = returnCodeMax;
  67.     return this;
  68.   }

  69.  /**
  70.    * Get fault
  71.    * @return fault
  72.   **/
  73.   @JsonProperty("fault")
  74.   @Valid
  75.   public Boolean isFault() {
  76.     return this.fault;
  77.   }

  78.   public void setFault(Boolean fault) {
  79.     this.fault = fault;
  80.   }

  81.   public CachingRispostaRegola fault(Boolean fault) {
  82.     this.fault = fault;
  83.     return this;
  84.   }

  85.  /**
  86.    * Get cacheTimeoutSeconds
  87.    * @return cacheTimeoutSeconds
  88.   **/
  89.   @JsonProperty("cache_timeout_seconds")
  90.   @Valid
  91.   public Integer getCacheTimeoutSeconds() {
  92.     return this.cacheTimeoutSeconds;
  93.   }

  94.   public void setCacheTimeoutSeconds(Integer cacheTimeoutSeconds) {
  95.     this.cacheTimeoutSeconds = cacheTimeoutSeconds;
  96.   }

  97.   public CachingRispostaRegola cacheTimeoutSeconds(Integer cacheTimeoutSeconds) {
  98.     this.cacheTimeoutSeconds = cacheTimeoutSeconds;
  99.     return this;
  100.   }


  101.   @Override
  102.   public String toString() {
  103.     StringBuilder sb = new StringBuilder();
  104.     sb.append("class CachingRispostaRegola {\n");
  105.    
  106.     sb.append("    returnCodeMin: ").append(CachingRispostaRegola.toIndentedString(this.returnCodeMin)).append("\n");
  107.     sb.append("    returnCodeMax: ").append(CachingRispostaRegola.toIndentedString(this.returnCodeMax)).append("\n");
  108.     sb.append("    fault: ").append(CachingRispostaRegola.toIndentedString(this.fault)).append("\n");
  109.     sb.append("    cacheTimeoutSeconds: ").append(CachingRispostaRegola.toIndentedString(this.cacheTimeoutSeconds)).append("\n");
  110.     sb.append("}");
  111.     return sb.toString();
  112.   }

  113.   /**
  114.    * Convert the given object to string with each line indented by 4 spaces
  115.    * (except the first line).
  116.    */
  117.   private static String toIndentedString(java.lang.Object o) {
  118.     if (o == null) {
  119.       return "null";
  120.     }
  121.     return o.toString().replace("\n", "\n    ");
  122.   }
  123. }