<?php

namespace CustomerManagement\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetLastCsEventDateOutput StructType
 * @subpackage Structs
 */
class GetLastCsEventDateOutput extends AbstractStructBase
{
    /**
     * The Success
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $Success;
    /**
     * The LastCsEventDate
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var string
     */
    public $LastCsEventDate;
    /**
     * The ErrorMessage
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $ErrorMessage;
    /**
     * The NullDateDescription
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $NullDateDescription;
    /**
     * Constructor method for GetLastCsEventDateOutput
     * @uses GetLastCsEventDateOutput::setSuccess()
     * @uses GetLastCsEventDateOutput::setLastCsEventDate()
     * @uses GetLastCsEventDateOutput::setErrorMessage()
     * @uses GetLastCsEventDateOutput::setNullDateDescription()
     * @param bool $success
     * @param string $lastCsEventDate
     * @param string $errorMessage
     * @param string $nullDateDescription
     */
    public function __construct($success = null, $lastCsEventDate = null, $errorMessage = null, $nullDateDescription = null)
    {
        $this
            ->setSuccess($success)
            ->setLastCsEventDate($lastCsEventDate)
            ->setErrorMessage($errorMessage)
            ->setNullDateDescription($nullDateDescription);
    }
    /**
     * Get Success value
     * @return bool
     */
    public function getSuccess()
    {
        return $this->Success;
    }
    /**
     * Set Success value
     * @param bool $success
     * @return \CustomerManagement\StructType\GetLastCsEventDateOutput
     */
    public function setSuccess($success = null)
    {
        // validation for constraint: boolean
        if (!is_null($success) && !is_bool($success)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($success, true), gettype($success)), __LINE__);
        }
        $this->Success = $success;
        return $this;
    }
    /**
     * Get LastCsEventDate value
     * @return string
     */
    public function getLastCsEventDate()
    {
        return $this->LastCsEventDate;
    }
    /**
     * Set LastCsEventDate value
     * @param string $lastCsEventDate
     * @return \CustomerManagement\StructType\GetLastCsEventDateOutput
     */
    public function setLastCsEventDate($lastCsEventDate = null)
    {
        // validation for constraint: string
        if (!is_null($lastCsEventDate) && !is_string($lastCsEventDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($lastCsEventDate, true), gettype($lastCsEventDate)), __LINE__);
        }
        $this->LastCsEventDate = $lastCsEventDate;
        return $this;
    }
    /**
     * Get ErrorMessage value
     * @return string|null
     */
    public function getErrorMessage()
    {
        return $this->ErrorMessage;
    }
    /**
     * Set ErrorMessage value
     * @param string $errorMessage
     * @return \CustomerManagement\StructType\GetLastCsEventDateOutput
     */
    public function setErrorMessage($errorMessage = null)
    {
        // validation for constraint: string
        if (!is_null($errorMessage) && !is_string($errorMessage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorMessage, true), gettype($errorMessage)), __LINE__);
        }
        $this->ErrorMessage = $errorMessage;
        return $this;
    }
    /**
     * Get NullDateDescription value
     * @return string|null
     */
    public function getNullDateDescription()
    {
        return $this->NullDateDescription;
    }
    /**
     * Set NullDateDescription value
     * @param string $nullDateDescription
     * @return \CustomerManagement\StructType\GetLastCsEventDateOutput
     */
    public function setNullDateDescription($nullDateDescription = null)
    {
        // validation for constraint: string
        if (!is_null($nullDateDescription) && !is_string($nullDateDescription)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($nullDateDescription, true), gettype($nullDateDescription)), __LINE__);
        }
        $this->NullDateDescription = $nullDateDescription;
        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 \CustomerManagement\StructType\GetLastCsEventDateOutput
     */
    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__;
    }
}
