TransazioneEsito.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.utils.service.beans;

  21. import javax.validation.constraints.*;

  22. import io.swagger.v3.oas.annotations.media.Schema;
  23. import javax.xml.bind.annotation.XmlElement;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlAccessType;
  26. import javax.xml.bind.annotation.XmlAccessorType;
  27. import javax.xml.bind.annotation.XmlType;
  28. import com.fasterxml.jackson.annotation.JsonProperty;
  29. import javax.validation.Valid;

  30. @XmlAccessorType(XmlAccessType.FIELD)
  31.  @XmlType(name = "TransazioneEsito", propOrder =
  32.     { "codice", "descrizione"
  33. })

  34. @XmlRootElement(name="TransazioneEsito")
  35. public class TransazioneEsito  {
  36.   @XmlElement(name="codice", required = true)
  37.  
  38.   @Schema(required = true, description = "Codice che rappresenta l'esito dell'invocazione. Può essere un http status per i protocolli basati su HTTP, o un altra codifica (es. OK/KO)")
  39.  /**
  40.    * Codice che rappresenta l'esito dell'invocazione. Può essere un http status per i protocolli basati su HTTP, o un altra codifica (es. OK/KO)  
  41.   **/
  42.   private String codice = null;
  43.   @XmlElement(name="descrizione", required = true)
  44.  
  45.   @Schema(required = true, description = "")
  46.   private String descrizione = null;
  47.  /**
  48.    * Codice che rappresenta l&#x27;esito dell&#x27;invocazione. Può essere un http status per i protocolli basati su HTTP, o un altra codifica (es. OK/KO)
  49.    * @return codice
  50.   **/
  51.   @JsonProperty("codice")
  52.   @NotNull
  53.   @Valid
  54.   public String getCodice() {
  55.     return this.codice;
  56.   }

  57.   public void setCodice(String codice) {
  58.     this.codice = codice;
  59.   }

  60.   public TransazioneEsito codice(String codice) {
  61.     this.codice = codice;
  62.     return this;
  63.   }

  64.  /**
  65.    * Get descrizione
  66.    * @return descrizione
  67.   **/
  68.   @JsonProperty("descrizione")
  69.   @NotNull
  70.   @Valid
  71.   public String getDescrizione() {
  72.     return this.descrizione;
  73.   }

  74.   public void setDescrizione(String descrizione) {
  75.     this.descrizione = descrizione;
  76.   }

  77.   public TransazioneEsito descrizione(String descrizione) {
  78.     this.descrizione = descrizione;
  79.     return this;
  80.   }


  81.   @Override
  82.   public String toString() {
  83.     StringBuilder sb = new StringBuilder();
  84.     sb.append("class TransazioneEsito {\n");
  85.    
  86.     sb.append("    codice: ").append(TransazioneEsito.toIndentedString(this.codice)).append("\n");
  87.     sb.append("    descrizione: ").append(TransazioneEsito.toIndentedString(this.descrizione)).append("\n");
  88.     sb.append("}");
  89.     return sb.toString();
  90.   }

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