<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Presenza_CheckListRichiestaModel StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:Presenza_CheckListRichiestaModel
 * @subpackage Structs
 */
class Presenza_CheckListRichiestaModel extends AbstractStructBase
{
    /**
     * The DataFine
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $DataFine;
    /**
     * The DataInizio
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $DataInizio;
    /**
     * The ID
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var int
     */
    public $ID;
    /**
     * The Obbligatoria
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $Obbligatoria;
    /**
     * The Ordine
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var int
     */
    public $Ordine;
    /**
     * The Ripetibile
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $Ripetibile;
    /**
     * The Stato
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $Stato;
    /**
     * The Testo
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Testo;
    /**
     * Constructor method for Presenza_CheckListRichiestaModel
     * @uses Presenza_CheckListRichiestaModel::setDataFine()
     * @uses Presenza_CheckListRichiestaModel::setDataInizio()
     * @uses Presenza_CheckListRichiestaModel::setID()
     * @uses Presenza_CheckListRichiestaModel::setObbligatoria()
     * @uses Presenza_CheckListRichiestaModel::setOrdine()
     * @uses Presenza_CheckListRichiestaModel::setRipetibile()
     * @uses Presenza_CheckListRichiestaModel::setStato()
     * @uses Presenza_CheckListRichiestaModel::setTesto()
     * @param string $dataFine
     * @param string $dataInizio
     * @param int $iD
     * @param bool $obbligatoria
     * @param int $ordine
     * @param bool $ripetibile
     * @param string $stato
     * @param string $testo
     */
    public function __construct($dataFine = null, $dataInizio = null, $iD = null, $obbligatoria = null, $ordine = null, $ripetibile = null, $stato = null, $testo = null)
    {
        $this
            ->setDataFine($dataFine)
            ->setDataInizio($dataInizio)
            ->setID($iD)
            ->setObbligatoria($obbligatoria)
            ->setOrdine($ordine)
            ->setRipetibile($ripetibile)
            ->setStato($stato)
            ->setTesto($testo);
    }
    /**
     * Get DataFine 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 getDataFine()
    {
        return isset($this->DataFine) ? $this->DataFine : null;
    }
    /**
     * Set DataFine 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 $dataFine
     * @return Presenza_CheckListRichiestaModel
     */
    public function setDataFine($dataFine = null)
    {
        // validation for constraint: string
        if (!is_null($dataFine) && !is_string($dataFine)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dataFine, true), gettype($dataFine)), __LINE__);
        }
        if (is_null($dataFine) || (is_array($dataFine) && empty($dataFine))) {
            unset($this->DataFine);
        } else {
            $this->DataFine = $dataFine;
        }
        return $this;
    }
    /**
     * Get DataInizio 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 getDataInizio()
    {
        return isset($this->DataInizio) ? $this->DataInizio : null;
    }
    /**
     * Set DataInizio 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 $dataInizio
     * @return Presenza_CheckListRichiestaModel
     */
    public function setDataInizio($dataInizio = null)
    {
        // validation for constraint: string
        if (!is_null($dataInizio) && !is_string($dataInizio)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dataInizio, true), gettype($dataInizio)), __LINE__);
        }
        if (is_null($dataInizio) || (is_array($dataInizio) && empty($dataInizio))) {
            unset($this->DataInizio);
        } else {
            $this->DataInizio = $dataInizio;
        }
        return $this;
    }
    /**
     * Get ID value
     * @return int|null
     */
    public function getID()
    {
        return $this->ID;
    }
    /**
     * Set ID value
     * @param int $iD
     * @return Presenza_CheckListRichiestaModel
     */
    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 Obbligatoria value
     * @return bool|null
     */
    public function getObbligatoria()
    {
        return $this->Obbligatoria;
    }
    /**
     * Set Obbligatoria value
     * @param bool $obbligatoria
     * @return Presenza_CheckListRichiestaModel
     */
    public function setObbligatoria($obbligatoria = null)
    {
        // validation for constraint: boolean
        if (!is_null($obbligatoria) && !is_bool($obbligatoria)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($obbligatoria, true), gettype($obbligatoria)), __LINE__);
        }
        $this->Obbligatoria = $obbligatoria;
        return $this;
    }
    /**
     * Get Ordine value
     * @return int|null
     */
    public function getOrdine()
    {
        return $this->Ordine;
    }
    /**
     * Set Ordine value
     * @param int $ordine
     * @return Presenza_CheckListRichiestaModel
     */
    public function setOrdine($ordine = null)
    {
        // validation for constraint: int
        if (!is_null($ordine) && !(is_int($ordine) || ctype_digit($ordine))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($ordine, true), gettype($ordine)), __LINE__);
        }
        $this->Ordine = $ordine;
        return $this;
    }
    /**
     * Get Ripetibile value
     * @return bool|null
     */
    public function getRipetibile()
    {
        return $this->Ripetibile;
    }
    /**
     * Set Ripetibile value
     * @param bool $ripetibile
     * @return Presenza_CheckListRichiestaModel
     */
    public function setRipetibile($ripetibile = null)
    {
        // validation for constraint: boolean
        if (!is_null($ripetibile) && !is_bool($ripetibile)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($ripetibile, true), gettype($ripetibile)), __LINE__);
        }
        $this->Ripetibile = $ripetibile;
        return $this;
    }
    /**
     * Get Stato value
     * @return string|null
     */
    public function getStato()
    {
        return $this->Stato;
    }
    /**
     * Set Stato value
     * @uses StatiRichiestaCheckList::valueIsValid()
     * @uses StatiRichiestaCheckList::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $stato
     * @return Presenza_CheckListRichiestaModel
     */
    public function setStato($stato = null)
    {
        // validation for constraint: enumeration
        if (!StatiRichiestaCheckList::valueIsValid($stato)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class StatiRichiestaCheckList', is_array($stato) ? implode(', ', $stato) : var_export($stato, true), implode(', ', StatiRichiestaCheckList::getValidValues())), __LINE__);
        }
        $this->Stato = $stato;
        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 Presenza_CheckListRichiestaModel
     */
    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;
    }
}
