<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetVouchersTracking_By_TimePeriod2 EasyStruct
 * @package Easy
 * @subpackage Structs
 */
class EasyGetVouchersTracking_By_TimePeriod2 extends AbstractStructBase
{
    /**
     * The FromDateTime
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $FromDateTime;
    /**
     * The ToDateTime
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ToDateTime;
    /**
     * The Language
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $Language;
    /**
     * The myClsCredential
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Easy\EasyStruct\EasyClsCredential
     */
    public $myClsCredential;
    /**
     * Constructor method for GetVouchersTracking_By_TimePeriod2
     * @uses EasyGetVouchersTracking_By_TimePeriod2::setFromDateTime()
     * @uses EasyGetVouchersTracking_By_TimePeriod2::setToDateTime()
     * @uses EasyGetVouchersTracking_By_TimePeriod2::setLanguage()
     * @uses EasyGetVouchersTracking_By_TimePeriod2::setMyClsCredential()
     * @param string $fromDateTime
     * @param string $toDateTime
     * @param string $language
     * @param \Easy\EasyStruct\EasyClsCredential $myClsCredential
     */
    public function __construct($fromDateTime = null, $toDateTime = null, $language = null, \Easy\EasyStruct\EasyClsCredential $myClsCredential = null)
    {
        $this
            ->setFromDateTime($fromDateTime)
            ->setToDateTime($toDateTime)
            ->setLanguage($language)
            ->setMyClsCredential($myClsCredential);
    }
    /**
     * Get FromDateTime 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 getFromDateTime()
    {
        return isset($this->FromDateTime) ? $this->FromDateTime : null;
    }
    /**
     * Set FromDateTime 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 $fromDateTime
     * @return \Easy\EasyStruct\EasyGetVouchersTracking_By_TimePeriod2
     */
    public function setFromDateTime($fromDateTime = null)
    {
        // validation for constraint: string
        if (!is_null($fromDateTime) && !is_string($fromDateTime)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fromDateTime, true), gettype($fromDateTime)), __LINE__);
        }
        if (is_null($fromDateTime) || (is_array($fromDateTime) && empty($fromDateTime))) {
            unset($this->FromDateTime);
        } else {
            $this->FromDateTime = $fromDateTime;
        }
        return $this;
    }
    /**
     * Get ToDateTime 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 getToDateTime()
    {
        return isset($this->ToDateTime) ? $this->ToDateTime : null;
    }
    /**
     * Set ToDateTime 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 $toDateTime
     * @return \Easy\EasyStruct\EasyGetVouchersTracking_By_TimePeriod2
     */
    public function setToDateTime($toDateTime = null)
    {
        // validation for constraint: string
        if (!is_null($toDateTime) && !is_string($toDateTime)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($toDateTime, true), gettype($toDateTime)), __LINE__);
        }
        if (is_null($toDateTime) || (is_array($toDateTime) && empty($toDateTime))) {
            unset($this->ToDateTime);
        } else {
            $this->ToDateTime = $toDateTime;
        }
        return $this;
    }
    /**
     * Get Language value
     * @return string|null
     */
    public function getLanguage()
    {
        return $this->Language;
    }
    /**
     * Set Language value
     * @param string $language
     * @return \Easy\EasyStruct\EasyGetVouchersTracking_By_TimePeriod2
     */
    public function setLanguage($language = null)
    {
        // validation for constraint: string
        if (!is_null($language) && !is_string($language)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($language, true), gettype($language)), __LINE__);
        }
        $this->Language = $language;
        return $this;
    }
    /**
     * Get myClsCredential 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 \Easy\EasyStruct\EasyClsCredential|null
     */
    public function getMyClsCredential()
    {
        return isset($this->myClsCredential) ? $this->myClsCredential : null;
    }
    /**
     * Set myClsCredential 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 \Easy\EasyStruct\EasyClsCredential $myClsCredential
     * @return \Easy\EasyStruct\EasyGetVouchersTracking_By_TimePeriod2
     */
    public function setMyClsCredential(\Easy\EasyStruct\EasyClsCredential $myClsCredential = null)
    {
        if (is_null($myClsCredential) || (is_array($myClsCredential) && empty($myClsCredential))) {
            unset($this->myClsCredential);
        } else {
            $this->myClsCredential = $myClsCredential;
        }
        return $this;
    }
}
