<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for RichestaCartellino_DatiBollatura StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:RichestaCartellino_DatiBollatura
 * @subpackage Structs
 */
class RichestaCartellino_DatiBollatura extends AbstractStructBase
{
    /**
     * The Attivita
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var AttivitaModel
     */
    public $Attivita;
    /**
     * The Causale
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Causale;
    /**
     * The Identificativo
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var RichestaCartellino_DatiBollatura_Identificativo
     */
    public $Identificativo;
    /**
     * The Sezione
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var Sezione_Model
     */
    public $Sezione;
    /**
     * Constructor method for RichestaCartellino_DatiBollatura
     * @uses RichestaCartellino_DatiBollatura::setAttivita()
     * @uses RichestaCartellino_DatiBollatura::setCausale()
     * @uses RichestaCartellino_DatiBollatura::setIdentificativo()
     * @uses RichestaCartellino_DatiBollatura::setSezione()
     * @param AttivitaModel $attivita
     * @param string $causale
     * @param RichestaCartellino_DatiBollatura_Identificativo $identificativo
     * @param Sezione_Model $sezione
     */
    public function __construct(AttivitaModel $attivita = null, $causale = null, RichestaCartellino_DatiBollatura_Identificativo $identificativo = null, Sezione_Model $sezione = null)
    {
        $this
            ->setAttivita($attivita)
            ->setCausale($causale)
            ->setIdentificativo($identificativo)
            ->setSezione($sezione);
    }
    /**
     * Get Attivita 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 AttivitaModel|null
     */
    public function getAttivita()
    {
        return isset($this->Attivita) ? $this->Attivita : null;
    }
    /**
     * Set Attivita 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 AttivitaModel $attivita
     * @return RichestaCartellino_DatiBollatura
     */
    public function setAttivita(AttivitaModel $attivita = null)
    {
        if (is_null($attivita) || (is_array($attivita) && empty($attivita))) {
            unset($this->Attivita);
        } else {
            $this->Attivita = $attivita;
        }
        return $this;
    }
    /**
     * Get Causale 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 getCausale()
    {
        return isset($this->Causale) ? $this->Causale : null;
    }
    /**
     * Set Causale 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 $causale
     * @return RichestaCartellino_DatiBollatura
     */
    public function setCausale($causale = null)
    {
        // validation for constraint: string
        if (!is_null($causale) && !is_string($causale)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($causale, true), gettype($causale)), __LINE__);
        }
        if (is_null($causale) || (is_array($causale) && empty($causale))) {
            unset($this->Causale);
        } else {
            $this->Causale = $causale;
        }
        return $this;
    }
    /**
     * Get Identificativo 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 RichestaCartellino_DatiBollatura_Identificativo|null
     */
    public function getIdentificativo()
    {
        return isset($this->Identificativo) ? $this->Identificativo : null;
    }
    /**
     * Set Identificativo 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 RichestaCartellino_DatiBollatura_Identificativo $identificativo
     * @return RichestaCartellino_DatiBollatura
     */
    public function setIdentificativo(RichestaCartellino_DatiBollatura_Identificativo $identificativo = null)
    {
        if (is_null($identificativo) || (is_array($identificativo) && empty($identificativo))) {
            unset($this->Identificativo);
        } else {
            $this->Identificativo = $identificativo;
        }
        return $this;
    }
    /**
     * Get Sezione 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 Sezione_Model|null
     */
    public function getSezione()
    {
        return isset($this->Sezione) ? $this->Sezione : null;
    }
    /**
     * Set Sezione 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 Sezione_Model $sezione
     * @return RichestaCartellino_DatiBollatura
     */
    public function setSezione(Sezione_Model $sezione = null)
    {
        if (is_null($sezione) || (is_array($sezione) && empty($sezione))) {
            unset($this->Sezione);
        } else {
            $this->Sezione = $sezione;
        }
        return $this;
    }
}
