Validazione.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 Validazione extends ApiImplConfigurazioneStato {
  26.  
  27.   @Schema(required = true, description = "")
  28.   private StatoFunzionalitaConWarningEnum stato = null;
  29.  
  30.   @Schema(required = true, description = "")
  31.   private TipoValidazioneEnum tipo = null;
  32.  
  33.   @Schema(example = "false", description = "")
  34.   private Boolean mtom = false;
  35.  /**
  36.    * Get stato
  37.    * @return stato
  38.   **/
  39.   @JsonProperty("stato")
  40.   @NotNull
  41.   @Valid
  42.   public StatoFunzionalitaConWarningEnum getStato() {
  43.     return this.stato;
  44.   }

  45.   public void setStato(StatoFunzionalitaConWarningEnum stato) {
  46.     this.stato = stato;
  47.   }

  48.   public Validazione stato(StatoFunzionalitaConWarningEnum stato) {
  49.     this.stato = stato;
  50.     return this;
  51.   }

  52.  /**
  53.    * Get tipo
  54.    * @return tipo
  55.   **/
  56.   @JsonProperty("tipo")
  57.   @NotNull
  58.   @Valid
  59.   public TipoValidazioneEnum getTipo() {
  60.     return this.tipo;
  61.   }

  62.   public void setTipo(TipoValidazioneEnum tipo) {
  63.     this.tipo = tipo;
  64.   }

  65.   public Validazione tipo(TipoValidazioneEnum tipo) {
  66.     this.tipo = tipo;
  67.     return this;
  68.   }

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

  78.   public void setMtom(Boolean mtom) {
  79.     this.mtom = mtom;
  80.   }

  81.   public Validazione mtom(Boolean mtom) {
  82.     this.mtom = mtom;
  83.     return this;
  84.   }


  85.   @Override
  86.   public String toString() {
  87.     StringBuilder sb = new StringBuilder();
  88.     sb.append("class Validazione {\n");
  89.     sb.append("    ").append(Validazione.toIndentedString(super.toString())).append("\n");
  90.     sb.append("    stato: ").append(Validazione.toIndentedString(this.stato)).append("\n");
  91.     sb.append("    tipo: ").append(Validazione.toIndentedString(this.tipo)).append("\n");
  92.     sb.append("    mtom: ").append(Validazione.toIndentedString(this.mtom)).append("\n");
  93.     sb.append("}");
  94.     return sb.toString();
  95.   }

  96.   /**
  97.    * Convert the given object to string with each line indented by 4 spaces
  98.    * (except the first line).
  99.    */
  100.   private static String toIndentedString(java.lang.Object o) {
  101.     if (o == null) {
  102.       return "null";
  103.     }
  104.     return o.toString().replace("\n", "\n    ");
  105.   }
  106. }