<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for IvaERP StructType
 * Meta informations extracted from the WSDL
 * - nillable: true
 * - type: tns:IvaERP
 * @subpackage Structs
 */
class IvaERP extends AbstractStructBase
{
    /**
     * The CodIvaEspecial
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $CodIvaEspecial;
    /**
     * The CodigoMotivoIsencao
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $CodigoMotivoIsencao;
    /**
     * The DataUltimaActualizacao
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $DataUltimaActualizacao;
    /**
     * The Descricao
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Descricao;
    /**
     * The IncluirValorDocs
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $IncluirValorDocs;
    /**
     * The Iva
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Iva;
    /**
     * The MotivoIsencao
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $MotivoIsencao;
    /**
     * The Protegida
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $Protegida;
    /**
     * The RegimeIncidencia
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $RegimeIncidencia;
    /**
     * The Taxa
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var float
     */
    public $Taxa;
    /**
     * The TaxaRecargo
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var float
     */
    public $TaxaRecargo;
    /**
     * The TipoTaxa
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $TipoTaxa;
    /**
     * The VersaoUltAct
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $VersaoUltAct;
    /**
     * Constructor method for IvaERP
     * @uses IvaERP::setCodIvaEspecial()
     * @uses IvaERP::setCodigoMotivoIsencao()
     * @uses IvaERP::setDataUltimaActualizacao()
     * @uses IvaERP::setDescricao()
     * @uses IvaERP::setIncluirValorDocs()
     * @uses IvaERP::setIva()
     * @uses IvaERP::setMotivoIsencao()
     * @uses IvaERP::setProtegida()
     * @uses IvaERP::setRegimeIncidencia()
     * @uses IvaERP::setTaxa()
     * @uses IvaERP::setTaxaRecargo()
     * @uses IvaERP::setTipoTaxa()
     * @uses IvaERP::setVersaoUltAct()
     * @param string $codIvaEspecial
     * @param string $codigoMotivoIsencao
     * @param string $dataUltimaActualizacao
     * @param string $descricao
     * @param bool $incluirValorDocs
     * @param string $iva
     * @param string $motivoIsencao
     * @param bool $protegida
     * @param string $regimeIncidencia
     * @param float $taxa
     * @param float $taxaRecargo
     * @param string $tipoTaxa
     * @param string $versaoUltAct
     */
    public function __construct($codIvaEspecial = null, $codigoMotivoIsencao = null, $dataUltimaActualizacao = null, $descricao = null, $incluirValorDocs = null, $iva = null, $motivoIsencao = null, $protegida = null, $regimeIncidencia = null, $taxa = null, $taxaRecargo = null, $tipoTaxa = null, $versaoUltAct = null)
    {
        $this
            ->setCodIvaEspecial($codIvaEspecial)
            ->setCodigoMotivoIsencao($codigoMotivoIsencao)
            ->setDataUltimaActualizacao($dataUltimaActualizacao)
            ->setDescricao($descricao)
            ->setIncluirValorDocs($incluirValorDocs)
            ->setIva($iva)
            ->setMotivoIsencao($motivoIsencao)
            ->setProtegida($protegida)
            ->setRegimeIncidencia($regimeIncidencia)
            ->setTaxa($taxa)
            ->setTaxaRecargo($taxaRecargo)
            ->setTipoTaxa($tipoTaxa)
            ->setVersaoUltAct($versaoUltAct);
    }
    /**
     * Get CodIvaEspecial 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 getCodIvaEspecial()
    {
        return isset($this->CodIvaEspecial) ? $this->CodIvaEspecial : null;
    }
    /**
     * Set CodIvaEspecial 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 $codIvaEspecial
     * @return \StructType\IvaERP
     */
    public function setCodIvaEspecial($codIvaEspecial = null)
    {
        // validation for constraint: string
        if (!is_null($codIvaEspecial) && !is_string($codIvaEspecial)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($codIvaEspecial)), __LINE__);
        }
        if (is_null($codIvaEspecial) || (is_array($codIvaEspecial) && empty($codIvaEspecial))) {
            unset($this->CodIvaEspecial);
        } else {
            $this->CodIvaEspecial = $codIvaEspecial;
        }
        return $this;
    }
    /**
     * Get CodigoMotivoIsencao 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 getCodigoMotivoIsencao()
    {
        return isset($this->CodigoMotivoIsencao) ? $this->CodigoMotivoIsencao : null;
    }
    /**
     * Set CodigoMotivoIsencao 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 $codigoMotivoIsencao
     * @return \StructType\IvaERP
     */
    public function setCodigoMotivoIsencao($codigoMotivoIsencao = null)
    {
        // validation for constraint: string
        if (!is_null($codigoMotivoIsencao) && !is_string($codigoMotivoIsencao)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($codigoMotivoIsencao)), __LINE__);
        }
        if (is_null($codigoMotivoIsencao) || (is_array($codigoMotivoIsencao) && empty($codigoMotivoIsencao))) {
            unset($this->CodigoMotivoIsencao);
        } else {
            $this->CodigoMotivoIsencao = $codigoMotivoIsencao;
        }
        return $this;
    }
    /**
     * Get DataUltimaActualizacao 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 getDataUltimaActualizacao()
    {
        return isset($this->DataUltimaActualizacao) ? $this->DataUltimaActualizacao : null;
    }
    /**
     * Set DataUltimaActualizacao 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 $dataUltimaActualizacao
     * @return \StructType\IvaERP
     */
    public function setDataUltimaActualizacao($dataUltimaActualizacao = null)
    {
        // validation for constraint: string
        if (!is_null($dataUltimaActualizacao) && !is_string($dataUltimaActualizacao)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($dataUltimaActualizacao)), __LINE__);
        }
        if (is_null($dataUltimaActualizacao) || (is_array($dataUltimaActualizacao) && empty($dataUltimaActualizacao))) {
            unset($this->DataUltimaActualizacao);
        } else {
            $this->DataUltimaActualizacao = $dataUltimaActualizacao;
        }
        return $this;
    }
    /**
     * Get Descricao 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 getDescricao()
    {
        return isset($this->Descricao) ? $this->Descricao : null;
    }
    /**
     * Set Descricao 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 $descricao
     * @return \StructType\IvaERP
     */
    public function setDescricao($descricao = null)
    {
        // validation for constraint: string
        if (!is_null($descricao) && !is_string($descricao)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($descricao)), __LINE__);
        }
        if (is_null($descricao) || (is_array($descricao) && empty($descricao))) {
            unset($this->Descricao);
        } else {
            $this->Descricao = $descricao;
        }
        return $this;
    }
    /**
     * Get IncluirValorDocs value
     * @return bool|null
     */
    public function getIncluirValorDocs()
    {
        return $this->IncluirValorDocs;
    }
    /**
     * Set IncluirValorDocs value
     * @param bool $incluirValorDocs
     * @return \StructType\IvaERP
     */
    public function setIncluirValorDocs($incluirValorDocs = null)
    {
        // validation for constraint: boolean
        if (!is_null($incluirValorDocs) && !is_bool($incluirValorDocs)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($incluirValorDocs)), __LINE__);
        }
        $this->IncluirValorDocs = $incluirValorDocs;
        return $this;
    }
    /**
     * Get Iva 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 getIva()
    {
        return isset($this->Iva) ? $this->Iva : null;
    }
    /**
     * Set Iva 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 $iva
     * @return \StructType\IvaERP
     */
    public function setIva($iva = null)
    {
        // validation for constraint: string
        if (!is_null($iva) && !is_string($iva)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($iva)), __LINE__);
        }
        if (is_null($iva) || (is_array($iva) && empty($iva))) {
            unset($this->Iva);
        } else {
            $this->Iva = $iva;
        }
        return $this;
    }
    /**
     * Get MotivoIsencao 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 getMotivoIsencao()
    {
        return isset($this->MotivoIsencao) ? $this->MotivoIsencao : null;
    }
    /**
     * Set MotivoIsencao 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 $motivoIsencao
     * @return \StructType\IvaERP
     */
    public function setMotivoIsencao($motivoIsencao = null)
    {
        // validation for constraint: string
        if (!is_null($motivoIsencao) && !is_string($motivoIsencao)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($motivoIsencao)), __LINE__);
        }
        if (is_null($motivoIsencao) || (is_array($motivoIsencao) && empty($motivoIsencao))) {
            unset($this->MotivoIsencao);
        } else {
            $this->MotivoIsencao = $motivoIsencao;
        }
        return $this;
    }
    /**
     * Get Protegida value
     * @return bool|null
     */
    public function getProtegida()
    {
        return $this->Protegida;
    }
    /**
     * Set Protegida value
     * @param bool $protegida
     * @return \StructType\IvaERP
     */
    public function setProtegida($protegida = null)
    {
        // validation for constraint: boolean
        if (!is_null($protegida) && !is_bool($protegida)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($protegida)), __LINE__);
        }
        $this->Protegida = $protegida;
        return $this;
    }
    /**
     * Get RegimeIncidencia value
     * @return string|null
     */
    public function getRegimeIncidencia()
    {
        return $this->RegimeIncidencia;
    }
    /**
     * Set RegimeIncidencia value
     * @param string $regimeIncidencia
     * @return \StructType\IvaERP
     */
    public function setRegimeIncidencia($regimeIncidencia = null)
    {
        // validation for constraint: string
        if (!is_null($regimeIncidencia) && !is_string($regimeIncidencia)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($regimeIncidencia)), __LINE__);
        }
        $this->RegimeIncidencia = $regimeIncidencia;
        return $this;
    }
    /**
     * Get Taxa 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 float|null
     */
    public function getTaxa()
    {
        return isset($this->Taxa) ? $this->Taxa : null;
    }
    /**
     * Set Taxa 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 float $taxa
     * @return \StructType\IvaERP
     */
    public function setTaxa($taxa = null)
    {
        if (is_null($taxa) || (is_array($taxa) && empty($taxa))) {
            unset($this->Taxa);
        } else {
            $this->Taxa = $taxa;
        }
        return $this;
    }
    /**
     * Get TaxaRecargo 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 float|null
     */
    public function getTaxaRecargo()
    {
        return isset($this->TaxaRecargo) ? $this->TaxaRecargo : null;
    }
    /**
     * Set TaxaRecargo 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 float $taxaRecargo
     * @return \StructType\IvaERP
     */
    public function setTaxaRecargo($taxaRecargo = null)
    {
        if (is_null($taxaRecargo) || (is_array($taxaRecargo) && empty($taxaRecargo))) {
            unset($this->TaxaRecargo);
        } else {
            $this->TaxaRecargo = $taxaRecargo;
        }
        return $this;
    }
    /**
     * Get TipoTaxa 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 getTipoTaxa()
    {
        return isset($this->TipoTaxa) ? $this->TipoTaxa : null;
    }
    /**
     * Set TipoTaxa 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 $tipoTaxa
     * @return \StructType\IvaERP
     */
    public function setTipoTaxa($tipoTaxa = null)
    {
        // validation for constraint: string
        if (!is_null($tipoTaxa) && !is_string($tipoTaxa)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($tipoTaxa)), __LINE__);
        }
        if (is_null($tipoTaxa) || (is_array($tipoTaxa) && empty($tipoTaxa))) {
            unset($this->TipoTaxa);
        } else {
            $this->TipoTaxa = $tipoTaxa;
        }
        return $this;
    }
    /**
     * Get VersaoUltAct value
     * @return string|null
     */
    public function getVersaoUltAct()
    {
        return $this->VersaoUltAct;
    }
    /**
     * Set VersaoUltAct value
     * @param string $versaoUltAct
     * @return \StructType\IvaERP
     */
    public function setVersaoUltAct($versaoUltAct = null)
    {
        // validation for constraint: string
        if (!is_null($versaoUltAct) && !is_string($versaoUltAct)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($versaoUltAct)), __LINE__);
        }
        $this->VersaoUltAct = $versaoUltAct;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \StructType\IvaERP
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
