Diagnostico.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 org.joda.time.DateTime;
  22. import javax.validation.constraints.*;

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

  31. @XmlAccessorType(XmlAccessType.FIELD)
  32.  @XmlType(name = "Diagnostico", propOrder =
  33.     { "data", "severitaCodice", "severita", "funzione", "codice", "messaggio"
  34. })

  35. @XmlRootElement(name="Diagnostico")
  36. public class Diagnostico  {
  37.   @XmlElement(name="data", required = true)
  38.  
  39.   @Schema(required = true, description = "")
  40.   private DateTime data = null;
  41.   @XmlElement(name="severita_codice", required = true)
  42.  
  43.   @Schema(required = true, description = "")
  44.   private String severitaCodice = null;
  45.   @XmlElement(name="severita", required = true)
  46.  
  47.   @Schema(required = true, description = "")
  48.   private DiagnosticoSeveritaEnum severita = null;
  49.   @XmlElement(name="funzione", required = true)
  50.  
  51.   @Schema(required = true, description = "")
  52.   private String funzione = null;
  53.   @XmlElement(name="codice", required = true)
  54.  
  55.   @Schema(required = true, description = "")
  56.   private String codice = null;
  57.   @XmlElement(name="messaggio", required = true)
  58.  
  59.   @Schema(example = "Generato messaggio di cooperazione di Errore con identificativo [0998f497-e05d-420a-a6b0-ff3bb718d2c4]", required = true, description = "")
  60.   private String messaggio = null;
  61.  /**
  62.    * Get data
  63.    * @return data
  64.   **/
  65.   @JsonProperty("data")
  66.   @NotNull
  67.   @Valid
  68.   public DateTime getData() {
  69.     return this.data;
  70.   }

  71.   public void setData(DateTime data) {
  72.     this.data = data;
  73.   }

  74.   public Diagnostico data(DateTime data) {
  75.     this.data = data;
  76.     return this;
  77.   }

  78.  /**
  79.    * Get severitaCodice
  80.    * @return severitaCodice
  81.   **/
  82.   @JsonProperty("severita_codice")
  83.   @NotNull
  84.   @Valid
  85.   public String getSeveritaCodice() {
  86.     return this.severitaCodice;
  87.   }

  88.   public void setSeveritaCodice(String severitaCodice) {
  89.     this.severitaCodice = severitaCodice;
  90.   }

  91.   public Diagnostico severitaCodice(String severitaCodice) {
  92.     this.severitaCodice = severitaCodice;
  93.     return this;
  94.   }

  95.  /**
  96.    * Get severita
  97.    * @return severita
  98.   **/
  99.   @JsonProperty("severita")
  100.   @NotNull
  101.   @Valid
  102.   public DiagnosticoSeveritaEnum getSeverita() {
  103.     return this.severita;
  104.   }

  105.   public void setSeverita(DiagnosticoSeveritaEnum severita) {
  106.     this.severita = severita;
  107.   }

  108.   public Diagnostico severita(DiagnosticoSeveritaEnum severita) {
  109.     this.severita = severita;
  110.     return this;
  111.   }

  112.  /**
  113.    * Get funzione
  114.    * @return funzione
  115.   **/
  116.   @JsonProperty("funzione")
  117.   @NotNull
  118.   @Valid
  119.   public String getFunzione() {
  120.     return this.funzione;
  121.   }

  122.   public void setFunzione(String funzione) {
  123.     this.funzione = funzione;
  124.   }

  125.   public Diagnostico funzione(String funzione) {
  126.     this.funzione = funzione;
  127.     return this;
  128.   }

  129.  /**
  130.    * Get codice
  131.    * @return codice
  132.   **/
  133.   @JsonProperty("codice")
  134.   @NotNull
  135.   @Valid
  136.   public String getCodice() {
  137.     return this.codice;
  138.   }

  139.   public void setCodice(String codice) {
  140.     this.codice = codice;
  141.   }

  142.   public Diagnostico codice(String codice) {
  143.     this.codice = codice;
  144.     return this;
  145.   }

  146.  /**
  147.    * Get messaggio
  148.    * @return messaggio
  149.   **/
  150.   @JsonProperty("messaggio")
  151.   @NotNull
  152.   @Valid
  153.   public String getMessaggio() {
  154.     return this.messaggio;
  155.   }

  156.   public void setMessaggio(String messaggio) {
  157.     this.messaggio = messaggio;
  158.   }

  159.   public Diagnostico messaggio(String messaggio) {
  160.     this.messaggio = messaggio;
  161.     return this;
  162.   }


  163.   @Override
  164.   public String toString() {
  165.     StringBuilder sb = new StringBuilder();
  166.     sb.append("class Diagnostico {\n");
  167.    
  168.     sb.append("    data: ").append(Diagnostico.toIndentedString(this.data)).append("\n");
  169.     sb.append("    severitaCodice: ").append(Diagnostico.toIndentedString(this.severitaCodice)).append("\n");
  170.     sb.append("    severita: ").append(Diagnostico.toIndentedString(this.severita)).append("\n");
  171.     sb.append("    funzione: ").append(Diagnostico.toIndentedString(this.funzione)).append("\n");
  172.     sb.append("    codice: ").append(Diagnostico.toIndentedString(this.codice)).append("\n");
  173.     sb.append("    messaggio: ").append(Diagnostico.toIndentedString(this.messaggio)).append("\n");
  174.     sb.append("}");
  175.     return sb.toString();
  176.   }

  177.   /**
  178.    * Convert the given object to string with each line indented by 4 spaces
  179.    * (except the first line).
  180.    */
  181.   private static String toIndentedString(java.lang.Object o) {
  182.     if (o == null) {
  183.       return "null";
  184.     }
  185.     return o.toString().replace("\n", "\n    ");
  186.   }
  187. }