Evento.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.monitor.rs.server.model;

  21. import org.joda.time.DateTime;
  22. import org.openspcoop2.utils.service.beans.DiagnosticoSeveritaEnum;
  23. import io.swagger.v3.oas.annotations.media.Schema;
  24. import com.fasterxml.jackson.annotation.JsonProperty;
  25. import javax.validation.Valid;

  26. public class Evento  {
  27.  
  28.   @Schema(description = "")
  29.   private Long id = null;
  30.  
  31.   @Schema(description = "")
  32.   private DateTime oraRegistrazione = null;
  33.  
  34.   @Schema(description = "")
  35.   private DiagnosticoSeveritaEnum severita = null;
  36.  
  37.   @Schema(description = "")
  38.   private String tipo = null;
  39.  
  40.   @Schema(description = "")
  41.   private String codice = null;
  42.  
  43.   @Schema(description = "")
  44.   private String origine = null;
  45.  
  46.   @Schema(description = "")
  47.   private String descrizione = null;
  48.  /**
  49.    * Get id
  50.    * @return id
  51.   **/
  52.   @JsonProperty("id")
  53.   @Valid
  54.   public Long getId() {
  55.     return this.id;
  56.   }

  57.   public void setId(Long id) {
  58.     this.id = id;
  59.   }

  60.   public Evento id(Long id) {
  61.     this.id = id;
  62.     return this;
  63.   }

  64.  /**
  65.    * Get oraRegistrazione
  66.    * @return oraRegistrazione
  67.   **/
  68.   @JsonProperty("ora_registrazione")
  69.   @Valid
  70.   public DateTime getOraRegistrazione() {
  71.     return this.oraRegistrazione;
  72.   }

  73.   public void setOraRegistrazione(DateTime oraRegistrazione) {
  74.     this.oraRegistrazione = oraRegistrazione;
  75.   }

  76.   public Evento oraRegistrazione(DateTime oraRegistrazione) {
  77.     this.oraRegistrazione = oraRegistrazione;
  78.     return this;
  79.   }

  80.  /**
  81.    * Get severita
  82.    * @return severita
  83.   **/
  84.   @JsonProperty("severita")
  85.   @Valid
  86.   public DiagnosticoSeveritaEnum getSeverita() {
  87.     return this.severita;
  88.   }

  89.   public void setSeverita(DiagnosticoSeveritaEnum severita) {
  90.     this.severita = severita;
  91.   }

  92.   public Evento severita(DiagnosticoSeveritaEnum severita) {
  93.     this.severita = severita;
  94.     return this;
  95.   }

  96.  /**
  97.    * Get tipo
  98.    * @return tipo
  99.   **/
  100.   @JsonProperty("tipo")
  101.   @Valid
  102.   public String getTipo() {
  103.     return this.tipo;
  104.   }

  105.   public void setTipo(String tipo) {
  106.     this.tipo = tipo;
  107.   }

  108.   public Evento tipo(String tipo) {
  109.     this.tipo = tipo;
  110.     return this;
  111.   }

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

  121.   public void setCodice(String codice) {
  122.     this.codice = codice;
  123.   }

  124.   public Evento codice(String codice) {
  125.     this.codice = codice;
  126.     return this;
  127.   }

  128.  /**
  129.    * Get origine
  130.    * @return origine
  131.   **/
  132.   @JsonProperty("origine")
  133.   @Valid
  134.   public String getOrigine() {
  135.     return this.origine;
  136.   }

  137.   public void setOrigine(String origine) {
  138.     this.origine = origine;
  139.   }

  140.   public Evento origine(String origine) {
  141.     this.origine = origine;
  142.     return this;
  143.   }

  144.  /**
  145.    * Get descrizione
  146.    * @return descrizione
  147.   **/
  148.   @JsonProperty("descrizione")
  149.   @Valid
  150.   public String getDescrizione() {
  151.     return this.descrizione;
  152.   }

  153.   public void setDescrizione(String descrizione) {
  154.     this.descrizione = descrizione;
  155.   }

  156.   public Evento descrizione(String descrizione) {
  157.     this.descrizione = descrizione;
  158.     return this;
  159.   }


  160.   @Override
  161.   public String toString() {
  162.     StringBuilder sb = new StringBuilder();
  163.     sb.append("class Evento {\n");
  164.    
  165.     sb.append("    id: ").append(Evento.toIndentedString(this.id)).append("\n");
  166.     sb.append("    oraRegistrazione: ").append(Evento.toIndentedString(this.oraRegistrazione)).append("\n");
  167.     sb.append("    severita: ").append(Evento.toIndentedString(this.severita)).append("\n");
  168.     sb.append("    tipo: ").append(Evento.toIndentedString(this.tipo)).append("\n");
  169.     sb.append("    codice: ").append(Evento.toIndentedString(this.codice)).append("\n");
  170.     sb.append("    origine: ").append(Evento.toIndentedString(this.origine)).append("\n");
  171.     sb.append("    descrizione: ").append(Evento.toIndentedString(this.descrizione)).append("\n");
  172.     sb.append("}");
  173.     return sb.toString();
  174.   }

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