<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Notifica StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:Notifica
 * @subpackage Structs
 */
class Notifica extends AbstractStructBase
{
    /**
     * The Abstract
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Abstract;
    /**
     * The ID
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var int
     */
    public $ID;
    /**
     * The IDTipo
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $IDTipo;
    /**
     * The Testo
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Testo;
    /**
     * The Titolo
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Titolo;
    /**
     * The URL
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $URL;
    /**
     * Constructor method for Notifica
     * @uses Notifica::setAbstract()
     * @uses Notifica::setID()
     * @uses Notifica::setIDTipo()
     * @uses Notifica::setTesto()
     * @uses Notifica::setTitolo()
     * @uses Notifica::setURL()
     * @param string $abstract
     * @param int $iD
     * @param string $iDTipo
     * @param string $testo
     * @param string $titolo
     * @param string $uRL
     */
    public function __construct($abstract = null, $iD = null, $iDTipo = null, $testo = null, $titolo = null, $uRL = null)
    {
        $this
            ->setAbstract($abstract)
            ->setID($iD)
            ->setIDTipo($iDTipo)
            ->setTesto($testo)
            ->setTitolo($titolo)
            ->setURL($uRL);
    }
    /**
     * Get Abstract value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getAbstract()
    {
        return isset($this->Abstract) ? $this->Abstract : null;
    }
    /**
     * Set Abstract value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $abstract
     * @return Notifica
     */
    public function setAbstract($abstract = null)
    {
        // validation for constraint: string
        if (!is_null($abstract) && !is_string($abstract)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($abstract, true), gettype($abstract)), __LINE__);
        }
        if (is_null($abstract) || (is_array($abstract) && empty($abstract))) {
            unset($this->Abstract);
        } else {
            $this->Abstract = $abstract;
        }
        return $this;
    }
    /**
     * Get ID value
     * @return int|null
     */
    public function getID()
    {
        return $this->ID;
    }
    /**
     * Set ID value
     * @param int $iD
     * @return Notifica
     */
    public function setID($iD = null)
    {
        // validation for constraint: int
        if (!is_null($iD) && !(is_int($iD) || ctype_digit($iD))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($iD, true), gettype($iD)), __LINE__);
        }
        $this->ID = $iD;
        return $this;
    }
    /**
     * Get IDTipo value
     * @return string|null
     */
    public function getIDTipo()
    {
        return $this->IDTipo;
    }
    /**
     * Set IDTipo value
     * @uses TipoNotifica::valueIsValid()
     * @uses TipoNotifica::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $iDTipo
     * @return Notifica
     */
    public function setIDTipo($iDTipo = null)
    {
        // validation for constraint: enumeration
        if (!TipoNotifica::valueIsValid($iDTipo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class TipoNotifica', is_array($iDTipo) ? implode(', ', $iDTipo) : var_export($iDTipo, true), implode(', ', TipoNotifica::getValidValues())), __LINE__);
        }
        $this->IDTipo = $iDTipo;
        return $this;
    }
    /**
     * Get Testo value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getTesto()
    {
        return isset($this->Testo) ? $this->Testo : null;
    }
    /**
     * Set Testo value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $testo
     * @return Notifica
     */
    public function setTesto($testo = null)
    {
        // validation for constraint: string
        if (!is_null($testo) && !is_string($testo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($testo, true), gettype($testo)), __LINE__);
        }
        if (is_null($testo) || (is_array($testo) && empty($testo))) {
            unset($this->Testo);
        } else {
            $this->Testo = $testo;
        }
        return $this;
    }
    /**
     * Get Titolo value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getTitolo()
    {
        return isset($this->Titolo) ? $this->Titolo : null;
    }
    /**
     * Set Titolo value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $titolo
     * @return Notifica
     */
    public function setTitolo($titolo = null)
    {
        // validation for constraint: string
        if (!is_null($titolo) && !is_string($titolo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($titolo, true), gettype($titolo)), __LINE__);
        }
        if (is_null($titolo) || (is_array($titolo) && empty($titolo))) {
            unset($this->Titolo);
        } else {
            $this->Titolo = $titolo;
        }
        return $this;
    }
    /**
     * Get URL value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getURL()
    {
        return isset($this->URL) ? $this->URL : null;
    }
    /**
     * Set URL value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $uRL
     * @return Notifica
     */
    public function setURL($uRL = null)
    {
        // validation for constraint: string
        if (!is_null($uRL) && !is_string($uRL)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($uRL, true), gettype($uRL)), __LINE__);
        }
        if (is_null($uRL) || (is_array($uRL) && empty($uRL))) {
            unset($this->URL);
        } else {
            $this->URL = $uRL;
        }
        return $this;
    }
}
