<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TDU_TipoParceiroERP StructType
 * Meta informations extracted from the WSDL
 * - nillable: true
 * - type: tns:TDU_TipoParceiroERP
 * @subpackage Structs
 */
class TDU_TipoParceiroERP extends AbstractStructBase
{
    /**
     * The CDU_Cobranca
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $CDU_Cobranca;
    /**
     * The CDU_Codigo
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $CDU_Codigo;
    /**
     * The CDU_Descricao
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $CDU_Descricao;
    /**
     * The CDU_MedicoDomicilio
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $CDU_MedicoDomicilio;
    /**
     * The CDU_NaoProcessarAvencas
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $CDU_NaoProcessarAvencas;
    /**
     * The CDU_Web
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $CDU_Web;
    /**
     * The Protegida
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $Protegida;
    /**
     * Constructor method for TDU_TipoParceiroERP
     * @uses TDU_TipoParceiroERP::setCDU_Cobranca()
     * @uses TDU_TipoParceiroERP::setCDU_Codigo()
     * @uses TDU_TipoParceiroERP::setCDU_Descricao()
     * @uses TDU_TipoParceiroERP::setCDU_MedicoDomicilio()
     * @uses TDU_TipoParceiroERP::setCDU_NaoProcessarAvencas()
     * @uses TDU_TipoParceiroERP::setCDU_Web()
     * @uses TDU_TipoParceiroERP::setProtegida()
     * @param bool $cDU_Cobranca
     * @param string $cDU_Codigo
     * @param string $cDU_Descricao
     * @param bool $cDU_MedicoDomicilio
     * @param bool $cDU_NaoProcessarAvencas
     * @param bool $cDU_Web
     * @param bool $protegida
     */
    public function __construct($cDU_Cobranca = null, $cDU_Codigo = null, $cDU_Descricao = null, $cDU_MedicoDomicilio = null, $cDU_NaoProcessarAvencas = null, $cDU_Web = null, $protegida = null)
    {
        $this
            ->setCDU_Cobranca($cDU_Cobranca)
            ->setCDU_Codigo($cDU_Codigo)
            ->setCDU_Descricao($cDU_Descricao)
            ->setCDU_MedicoDomicilio($cDU_MedicoDomicilio)
            ->setCDU_NaoProcessarAvencas($cDU_NaoProcessarAvencas)
            ->setCDU_Web($cDU_Web)
            ->setProtegida($protegida);
    }
    /**
     * Get CDU_Cobranca 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 bool|null
     */
    public function getCDU_Cobranca()
    {
        return isset($this->CDU_Cobranca) ? $this->CDU_Cobranca : null;
    }
    /**
     * Set CDU_Cobranca 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 bool $cDU_Cobranca
     * @return \StructType\TDU_TipoParceiroERP
     */
    public function setCDU_Cobranca($cDU_Cobranca = null)
    {
        // validation for constraint: boolean
        if (!is_null($cDU_Cobranca) && !is_bool($cDU_Cobranca)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($cDU_Cobranca)), __LINE__);
        }
        if (is_null($cDU_Cobranca) || (is_array($cDU_Cobranca) && empty($cDU_Cobranca))) {
            unset($this->CDU_Cobranca);
        } else {
            $this->CDU_Cobranca = $cDU_Cobranca;
        }
        return $this;
    }
    /**
     * Get CDU_Codigo 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 getCDU_Codigo()
    {
        return isset($this->CDU_Codigo) ? $this->CDU_Codigo : null;
    }
    /**
     * Set CDU_Codigo 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 $cDU_Codigo
     * @return \StructType\TDU_TipoParceiroERP
     */
    public function setCDU_Codigo($cDU_Codigo = null)
    {
        // validation for constraint: string
        if (!is_null($cDU_Codigo) && !is_string($cDU_Codigo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cDU_Codigo)), __LINE__);
        }
        if (is_null($cDU_Codigo) || (is_array($cDU_Codigo) && empty($cDU_Codigo))) {
            unset($this->CDU_Codigo);
        } else {
            $this->CDU_Codigo = $cDU_Codigo;
        }
        return $this;
    }
    /**
     * Get CDU_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 getCDU_Descricao()
    {
        return isset($this->CDU_Descricao) ? $this->CDU_Descricao : null;
    }
    /**
     * Set CDU_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 $cDU_Descricao
     * @return \StructType\TDU_TipoParceiroERP
     */
    public function setCDU_Descricao($cDU_Descricao = null)
    {
        // validation for constraint: string
        if (!is_null($cDU_Descricao) && !is_string($cDU_Descricao)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cDU_Descricao)), __LINE__);
        }
        if (is_null($cDU_Descricao) || (is_array($cDU_Descricao) && empty($cDU_Descricao))) {
            unset($this->CDU_Descricao);
        } else {
            $this->CDU_Descricao = $cDU_Descricao;
        }
        return $this;
    }
    /**
     * Get CDU_MedicoDomicilio 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 bool|null
     */
    public function getCDU_MedicoDomicilio()
    {
        return isset($this->CDU_MedicoDomicilio) ? $this->CDU_MedicoDomicilio : null;
    }
    /**
     * Set CDU_MedicoDomicilio 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 bool $cDU_MedicoDomicilio
     * @return \StructType\TDU_TipoParceiroERP
     */
    public function setCDU_MedicoDomicilio($cDU_MedicoDomicilio = null)
    {
        // validation for constraint: boolean
        if (!is_null($cDU_MedicoDomicilio) && !is_bool($cDU_MedicoDomicilio)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($cDU_MedicoDomicilio)), __LINE__);
        }
        if (is_null($cDU_MedicoDomicilio) || (is_array($cDU_MedicoDomicilio) && empty($cDU_MedicoDomicilio))) {
            unset($this->CDU_MedicoDomicilio);
        } else {
            $this->CDU_MedicoDomicilio = $cDU_MedicoDomicilio;
        }
        return $this;
    }
    /**
     * Get CDU_NaoProcessarAvencas 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 bool|null
     */
    public function getCDU_NaoProcessarAvencas()
    {
        return isset($this->CDU_NaoProcessarAvencas) ? $this->CDU_NaoProcessarAvencas : null;
    }
    /**
     * Set CDU_NaoProcessarAvencas 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 bool $cDU_NaoProcessarAvencas
     * @return \StructType\TDU_TipoParceiroERP
     */
    public function setCDU_NaoProcessarAvencas($cDU_NaoProcessarAvencas = null)
    {
        // validation for constraint: boolean
        if (!is_null($cDU_NaoProcessarAvencas) && !is_bool($cDU_NaoProcessarAvencas)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($cDU_NaoProcessarAvencas)), __LINE__);
        }
        if (is_null($cDU_NaoProcessarAvencas) || (is_array($cDU_NaoProcessarAvencas) && empty($cDU_NaoProcessarAvencas))) {
            unset($this->CDU_NaoProcessarAvencas);
        } else {
            $this->CDU_NaoProcessarAvencas = $cDU_NaoProcessarAvencas;
        }
        return $this;
    }
    /**
     * Get CDU_Web 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 bool|null
     */
    public function getCDU_Web()
    {
        return isset($this->CDU_Web) ? $this->CDU_Web : null;
    }
    /**
     * Set CDU_Web 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 bool $cDU_Web
     * @return \StructType\TDU_TipoParceiroERP
     */
    public function setCDU_Web($cDU_Web = null)
    {
        // validation for constraint: boolean
        if (!is_null($cDU_Web) && !is_bool($cDU_Web)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($cDU_Web)), __LINE__);
        }
        if (is_null($cDU_Web) || (is_array($cDU_Web) && empty($cDU_Web))) {
            unset($this->CDU_Web);
        } else {
            $this->CDU_Web = $cDU_Web;
        }
        return $this;
    }
    /**
     * Get Protegida value
     * @return bool|null
     */
    public function getProtegida()
    {
        return $this->Protegida;
    }
    /**
     * Set Protegida value
     * @param bool $protegida
     * @return \StructType\TDU_TipoParceiroERP
     */
    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;
    }
    /**
     * 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\TDU_TipoParceiroERP
     */
    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__;
    }
}
