Allarme.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.allarmi;

  21. import javax.xml.bind.annotation.XmlAccessType;
  22. import javax.xml.bind.annotation.XmlAccessorType;
  23. import javax.xml.bind.annotation.XmlElement;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlType;
  26. import org.openspcoop2.core.allarmi.constants.TipoAllarme;
  27. import java.io.Serializable;
  28. import java.util.ArrayList;
  29. import java.util.List;


  30. /** <p>Java class for allarme complex type.
  31.  *
  32.  * <p>The following schema fragment specifies the expected content contained within this class.
  33.  *
  34.  * <pre>
  35.  * &lt;complexType name="allarme"&gt;
  36.  *      &lt;sequence&gt;
  37.  *          &lt;element name="nome" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="1" maxOccurs="1"/&gt;
  38.  *          &lt;element name="alias" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="1" maxOccurs="1"/&gt;
  39.  *          &lt;element name="descrizione" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0" maxOccurs="1"/&gt;
  40.  *          &lt;element name="tipo" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="1" maxOccurs="1"/&gt;
  41.  *          &lt;element name="tipo-allarme" type="{http://www.openspcoop2.org/core/allarmi}tipo-allarme" minOccurs="1" maxOccurs="1" default="ATTIVO"/&gt;
  42.  *          &lt;element name="mail" type="{http://www.openspcoop2.org/core/allarmi}allarme-mail" minOccurs="1" maxOccurs="1"/&gt;
  43.  *          &lt;element name="script" type="{http://www.openspcoop2.org/core/allarmi}allarme-script" minOccurs="1" maxOccurs="1"/&gt;
  44.  *          &lt;element name="stato-precedente" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="1" maxOccurs="1"/&gt;
  45.  *          &lt;element name="stato" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="1" maxOccurs="1"/&gt;
  46.  *          &lt;element name="dettaglio-stato" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0" maxOccurs="1"/&gt;
  47.  *          &lt;element name="lasttimestamp-create" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="1" maxOccurs="1"/&gt;
  48.  *          &lt;element name="lasttimestamp-update" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0" maxOccurs="1"/&gt;
  49.  *          &lt;element name="enabled" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="1" maxOccurs="1"/&gt;
  50.  *          &lt;element name="acknowledged" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="1" maxOccurs="1"/&gt;
  51.  *          &lt;element name="dettaglio-acknowledged" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0" maxOccurs="1"/&gt;
  52.  *          &lt;element name="tipo-periodo" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0" maxOccurs="1"/&gt;
  53.  *          &lt;element name="periodo" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0" maxOccurs="1"/&gt;
  54.  *          &lt;element name="filtro" type="{http://www.openspcoop2.org/core/allarmi}allarme-filtro" minOccurs="1" maxOccurs="1"/&gt;
  55.  *          &lt;element name="group-by" type="{http://www.openspcoop2.org/core/allarmi}allarme-raggruppamento" minOccurs="1" maxOccurs="1"/&gt;
  56.  *          &lt;element name="allarme-parametro" type="{http://www.openspcoop2.org/core/allarmi}allarme-parametro" minOccurs="0" maxOccurs="unbounded"/&gt;
  57.  *      &lt;/sequence&gt;
  58.  * &lt;/complexType&gt;
  59.  * </pre>
  60.  *
  61.  * @version $Rev$, $Date$
  62.  *
  63.  * @author Poli Andrea (poli@link.it)
  64.  * @author $Author$
  65.  * */

  66. @XmlAccessorType(XmlAccessType.FIELD)
  67. @XmlType(name = "allarme",
  68.   propOrder = {
  69.     "nome",
  70.     "alias",
  71.     "descrizione",
  72.     "tipo",
  73.     "tipoAllarme",
  74.     "mail",
  75.     "script",
  76.     "statoPrecedente",
  77.     "stato",
  78.     "dettaglioStato",
  79.     "lasttimestampCreate",
  80.     "lasttimestampUpdate",
  81.     "enabled",
  82.     "acknowledged",
  83.     "dettaglioAcknowledged",
  84.     "tipoPeriodo",
  85.     "periodo",
  86.     "filtro",
  87.     "groupBy",
  88.     "allarmeParametro"
  89.   }
  90. )

  91. @XmlRootElement(name = "allarme")

  92. public class Allarme extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  93.   public Allarme() {
  94.     super();
  95.   }

  96.   public java.lang.String getNome() {
  97.     return this.nome;
  98.   }

  99.   public void setNome(java.lang.String nome) {
  100.     this.nome = nome;
  101.   }

  102.   public java.lang.String getAlias() {
  103.     return this.alias;
  104.   }

  105.   public void setAlias(java.lang.String alias) {
  106.     this.alias = alias;
  107.   }

  108.   public java.lang.String getDescrizione() {
  109.     return this.descrizione;
  110.   }

  111.   public void setDescrizione(java.lang.String descrizione) {
  112.     this.descrizione = descrizione;
  113.   }

  114.   public java.lang.String getTipo() {
  115.     return this.tipo;
  116.   }

  117.   public void setTipo(java.lang.String tipo) {
  118.     this.tipo = tipo;
  119.   }

  120.   public void setTipoAllarmeRawEnumValue(String value) {
  121.     this.tipoAllarme = (TipoAllarme) TipoAllarme.toEnumConstantFromString(value);
  122.   }

  123.   public String getTipoAllarmeRawEnumValue() {
  124.     if(this.tipoAllarme == null){
  125.         return null;
  126.     }else{
  127.         return this.tipoAllarme.toString();
  128.     }
  129.   }

  130.   public org.openspcoop2.core.allarmi.constants.TipoAllarme getTipoAllarme() {
  131.     return this.tipoAllarme;
  132.   }

  133.   public void setTipoAllarme(org.openspcoop2.core.allarmi.constants.TipoAllarme tipoAllarme) {
  134.     this.tipoAllarme = tipoAllarme;
  135.   }

  136.   public AllarmeMail getMail() {
  137.     return this.mail;
  138.   }

  139.   public void setMail(AllarmeMail mail) {
  140.     this.mail = mail;
  141.   }

  142.   public AllarmeScript getScript() {
  143.     return this.script;
  144.   }

  145.   public void setScript(AllarmeScript script) {
  146.     this.script = script;
  147.   }

  148.   public java.lang.Integer getStatoPrecedente() {
  149.     return this.statoPrecedente;
  150.   }

  151.   public void setStatoPrecedente(java.lang.Integer statoPrecedente) {
  152.     this.statoPrecedente = statoPrecedente;
  153.   }

  154.   public java.lang.Integer getStato() {
  155.     return this.stato;
  156.   }

  157.   public void setStato(java.lang.Integer stato) {
  158.     this.stato = stato;
  159.   }

  160.   public java.lang.String getDettaglioStato() {
  161.     return this.dettaglioStato;
  162.   }

  163.   public void setDettaglioStato(java.lang.String dettaglioStato) {
  164.     this.dettaglioStato = dettaglioStato;
  165.   }

  166.   public java.util.Date getLasttimestampCreate() {
  167.     return this.lasttimestampCreate;
  168.   }

  169.   public void setLasttimestampCreate(java.util.Date lasttimestampCreate) {
  170.     this.lasttimestampCreate = lasttimestampCreate;
  171.   }

  172.   public java.util.Date getLasttimestampUpdate() {
  173.     return this.lasttimestampUpdate;
  174.   }

  175.   public void setLasttimestampUpdate(java.util.Date lasttimestampUpdate) {
  176.     this.lasttimestampUpdate = lasttimestampUpdate;
  177.   }

  178.   public java.lang.Integer getEnabled() {
  179.     return this.enabled;
  180.   }

  181.   public void setEnabled(java.lang.Integer enabled) {
  182.     this.enabled = enabled;
  183.   }

  184.   public java.lang.Integer getAcknowledged() {
  185.     return this.acknowledged;
  186.   }

  187.   public void setAcknowledged(java.lang.Integer acknowledged) {
  188.     this.acknowledged = acknowledged;
  189.   }

  190.   public java.lang.String getDettaglioAcknowledged() {
  191.     return this.dettaglioAcknowledged;
  192.   }

  193.   public void setDettaglioAcknowledged(java.lang.String dettaglioAcknowledged) {
  194.     this.dettaglioAcknowledged = dettaglioAcknowledged;
  195.   }

  196.   public java.lang.String getTipoPeriodo() {
  197.     return this.tipoPeriodo;
  198.   }

  199.   public void setTipoPeriodo(java.lang.String tipoPeriodo) {
  200.     this.tipoPeriodo = tipoPeriodo;
  201.   }

  202.   public java.lang.Integer getPeriodo() {
  203.     return this.periodo;
  204.   }

  205.   public void setPeriodo(java.lang.Integer periodo) {
  206.     this.periodo = periodo;
  207.   }

  208.   public AllarmeFiltro getFiltro() {
  209.     return this.filtro;
  210.   }

  211.   public void setFiltro(AllarmeFiltro filtro) {
  212.     this.filtro = filtro;
  213.   }

  214.   public AllarmeRaggruppamento getGroupBy() {
  215.     return this.groupBy;
  216.   }

  217.   public void setGroupBy(AllarmeRaggruppamento groupBy) {
  218.     this.groupBy = groupBy;
  219.   }

  220.   public void addAllarmeParametro(AllarmeParametro allarmeParametro) {
  221.     this.allarmeParametro.add(allarmeParametro);
  222.   }

  223.   public AllarmeParametro getAllarmeParametro(int index) {
  224.     return this.allarmeParametro.get( index );
  225.   }

  226.   public AllarmeParametro removeAllarmeParametro(int index) {
  227.     return this.allarmeParametro.remove( index );
  228.   }

  229.   public List<AllarmeParametro> getAllarmeParametroList() {
  230.     return this.allarmeParametro;
  231.   }

  232.   public void setAllarmeParametroList(List<AllarmeParametro> allarmeParametro) {
  233.     this.allarmeParametro=allarmeParametro;
  234.   }

  235.   public int sizeAllarmeParametroList() {
  236.     return this.allarmeParametro.size();
  237.   }

  238.   private static final long serialVersionUID = 1L;

  239.   private static org.openspcoop2.core.allarmi.model.AllarmeModel modelStaticInstance = null;
  240.   private static synchronized void initModelStaticInstance(){
  241.       if(org.openspcoop2.core.allarmi.Allarme.modelStaticInstance==null){
  242.             org.openspcoop2.core.allarmi.Allarme.modelStaticInstance = new org.openspcoop2.core.allarmi.model.AllarmeModel();
  243.       }
  244.   }
  245.   public static org.openspcoop2.core.allarmi.model.AllarmeModel model(){
  246.       if(org.openspcoop2.core.allarmi.Allarme.modelStaticInstance==null){
  247.             initModelStaticInstance();
  248.       }
  249.       return org.openspcoop2.core.allarmi.Allarme.modelStaticInstance;
  250.   }


  251.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  252.   @XmlElement(name="nome",required=true,nillable=false)
  253.   protected java.lang.String nome;

  254.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  255.   @XmlElement(name="alias",required=true,nillable=false)
  256.   protected java.lang.String alias;

  257.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  258.   @XmlElement(name="descrizione",required=false,nillable=false)
  259.   protected java.lang.String descrizione;

  260.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  261.   @XmlElement(name="tipo",required=true,nillable=false)
  262.   protected java.lang.String tipo;

  263.   @javax.xml.bind.annotation.XmlTransient
  264.   protected java.lang.String tipoAllarmeRawEnumValue;

  265.   @XmlElement(name="tipo-allarme",required=true,nillable=false,defaultValue="ATTIVO")
  266.   protected TipoAllarme tipoAllarme = (TipoAllarme) TipoAllarme.toEnumConstantFromString("ATTIVO");

  267.   @XmlElement(name="mail",required=true,nillable=false)
  268.   protected AllarmeMail mail;

  269.   @XmlElement(name="script",required=true,nillable=false)
  270.   protected AllarmeScript script;

  271.   @javax.xml.bind.annotation.XmlSchemaType(name="integer")
  272.   @XmlElement(name="stato-precedente",required=true,nillable=false)
  273.   protected java.lang.Integer statoPrecedente;

  274.   @javax.xml.bind.annotation.XmlSchemaType(name="integer")
  275.   @XmlElement(name="stato",required=true,nillable=false)
  276.   protected java.lang.Integer stato;

  277.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  278.   @XmlElement(name="dettaglio-stato",required=false,nillable=false)
  279.   protected java.lang.String dettaglioStato;

  280.   @javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(org.openspcoop2.utils.jaxb.DateTime2String.class)
  281.   @javax.xml.bind.annotation.XmlSchemaType(name="dateTime")
  282.   @XmlElement(name="lasttimestamp-create",required=true,nillable=false,type=java.lang.String.class)
  283.   protected java.util.Date lasttimestampCreate;

  284.   @javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(org.openspcoop2.utils.jaxb.DateTime2String.class)
  285.   @javax.xml.bind.annotation.XmlSchemaType(name="dateTime")
  286.   @XmlElement(name="lasttimestamp-update",required=false,nillable=false,type=java.lang.String.class)
  287.   protected java.util.Date lasttimestampUpdate;

  288.   @javax.xml.bind.annotation.XmlSchemaType(name="integer")
  289.   @XmlElement(name="enabled",required=true,nillable=false)
  290.   protected java.lang.Integer enabled;

  291.   @javax.xml.bind.annotation.XmlSchemaType(name="integer")
  292.   @XmlElement(name="acknowledged",required=true,nillable=false)
  293.   protected java.lang.Integer acknowledged;

  294.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  295.   @XmlElement(name="dettaglio-acknowledged",required=false,nillable=false)
  296.   protected java.lang.String dettaglioAcknowledged;

  297.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  298.   @XmlElement(name="tipo-periodo",required=false,nillable=false)
  299.   protected java.lang.String tipoPeriodo;

  300.   @javax.xml.bind.annotation.XmlSchemaType(name="integer")
  301.   @XmlElement(name="periodo",required=false,nillable=false)
  302.   protected java.lang.Integer periodo;

  303.   @XmlElement(name="filtro",required=true,nillable=false)
  304.   protected AllarmeFiltro filtro;

  305.   @XmlElement(name="group-by",required=true,nillable=false)
  306.   protected AllarmeRaggruppamento groupBy;

  307.   @XmlElement(name="allarme-parametro",required=true,nillable=false)
  308.   private List<AllarmeParametro> allarmeParametro = new ArrayList<>();

  309.   /**
  310.    * Use method getAllarmeParametroList
  311.    * @return List&lt;AllarmeParametro&gt;
  312.   */
  313.   public List<AllarmeParametro> getAllarmeParametro() {
  314.     return this.getAllarmeParametroList();
  315.   }

  316.   /**
  317.    * Use method setAllarmeParametroList
  318.    * @param allarmeParametro List&lt;AllarmeParametro&gt;
  319.   */
  320.   public void setAllarmeParametro(List<AllarmeParametro> allarmeParametro) {
  321.     this.setAllarmeParametroList(allarmeParametro);
  322.   }

  323.   /**
  324.    * Use method sizeAllarmeParametroList
  325.    * @return lunghezza della lista
  326.   */
  327.   public int sizeAllarmeParametro() {
  328.     return this.sizeAllarmeParametroList();
  329.   }

  330. }