<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for VerificaPagamentosDisponiveisReferenciaMB StructType
 * @subpackage Structs
 */
class VerificaPagamentosDisponiveisReferenciaMB extends AbstractStructBase
{
    /**
     * The codParceiro
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $codParceiro;
    /**
     * The dataInicio
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $dataInicio;
    /**
     * The dataFim
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $dataFim;
    /**
     * The referenciaMB
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $referenciaMB;
    /**
     * Constructor method for VerificaPagamentosDisponiveisReferenciaMB
     * @uses VerificaPagamentosDisponiveisReferenciaMB::setCodParceiro()
     * @uses VerificaPagamentosDisponiveisReferenciaMB::setDataInicio()
     * @uses VerificaPagamentosDisponiveisReferenciaMB::setDataFim()
     * @uses VerificaPagamentosDisponiveisReferenciaMB::setReferenciaMB()
     * @param string $codParceiro
     * @param string $dataInicio
     * @param string $dataFim
     * @param string $referenciaMB
     */
    public function __construct($codParceiro = null, $dataInicio = null, $dataFim = null, $referenciaMB = null)
    {
        $this
            ->setCodParceiro($codParceiro)
            ->setDataInicio($dataInicio)
            ->setDataFim($dataFim)
            ->setReferenciaMB($referenciaMB);
    }
    /**
     * Get codParceiro 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 getCodParceiro()
    {
        return isset($this->codParceiro) ? $this->codParceiro : null;
    }
    /**
     * Set codParceiro 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 $codParceiro
     * @return \StructType\VerificaPagamentosDisponiveisReferenciaMB
     */
    public function setCodParceiro($codParceiro = null)
    {
        // validation for constraint: string
        if (!is_null($codParceiro) && !is_string($codParceiro)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($codParceiro)), __LINE__);
        }
        if (is_null($codParceiro) || (is_array($codParceiro) && empty($codParceiro))) {
            unset($this->codParceiro);
        } else {
            $this->codParceiro = $codParceiro;
        }
        return $this;
    }
    /**
     * Get dataInicio value
     * @return string|null
     */
    public function getDataInicio()
    {
        return $this->dataInicio;
    }
    /**
     * Set dataInicio value
     * @param string $dataInicio
     * @return \StructType\VerificaPagamentosDisponiveisReferenciaMB
     */
    public function setDataInicio($dataInicio = null)
    {
        // validation for constraint: string
        if (!is_null($dataInicio) && !is_string($dataInicio)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($dataInicio)), __LINE__);
        }
        $this->dataInicio = $dataInicio;
        return $this;
    }
    /**
     * Get dataFim value
     * @return string|null
     */
    public function getDataFim()
    {
        return $this->dataFim;
    }
    /**
     * Set dataFim value
     * @param string $dataFim
     * @return \StructType\VerificaPagamentosDisponiveisReferenciaMB
     */
    public function setDataFim($dataFim = null)
    {
        // validation for constraint: string
        if (!is_null($dataFim) && !is_string($dataFim)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($dataFim)), __LINE__);
        }
        $this->dataFim = $dataFim;
        return $this;
    }
    /**
     * Get referenciaMB 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 getReferenciaMB()
    {
        return isset($this->referenciaMB) ? $this->referenciaMB : null;
    }
    /**
     * Set referenciaMB 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 $referenciaMB
     * @return \StructType\VerificaPagamentosDisponiveisReferenciaMB
     */
    public function setReferenciaMB($referenciaMB = null)
    {
        // validation for constraint: string
        if (!is_null($referenciaMB) && !is_string($referenciaMB)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($referenciaMB)), __LINE__);
        }
        if (is_null($referenciaMB) || (is_array($referenciaMB) && empty($referenciaMB))) {
            unset($this->referenciaMB);
        } else {
            $this->referenciaMB = $referenciaMB;
        }
        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\VerificaPagamentosDisponiveisReferenciaMB
     */
    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__;
    }
}
