<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for DateTimeSpanType StructType
 * @package Dg
 * @subpackage Structs
 */
class DgDateTimeSpanType extends AbstractStructBase
{
    /**
     * The DateWindowRange
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgTimeInstantType
     */
    public $DateWindowRange;
    /**
     * The EndDateWindow
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgEndDateWindow
     */
    public $EndDateWindow;
    /**
     * The StartDateWindow
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgStartDateWindow
     */
    public $StartDateWindow;
    /**
     * The Start
     * @var string
     */
    public $Start;
    /**
     * The StartDate
     * @var string
     */
    public $StartDate;
    /**
     * The Duration
     * @var string
     */
    public $Duration;
    /**
     * The End
     * @var string
     */
    public $End;
    /**
     * The EndDate
     * @var string
     */
    public $EndDate;
    /**
     * Constructor method for DateTimeSpanType
     * @uses DgDateTimeSpanType::setDateWindowRange()
     * @uses DgDateTimeSpanType::setEndDateWindow()
     * @uses DgDateTimeSpanType::setStartDateWindow()
     * @uses DgDateTimeSpanType::setStart()
     * @uses DgDateTimeSpanType::setStartDate()
     * @uses DgDateTimeSpanType::setDuration()
     * @uses DgDateTimeSpanType::setEnd()
     * @uses DgDateTimeSpanType::setEndDate()
     * @param \dgsoft\StructType\DgTimeInstantType $dateWindowRange
     * @param \dgsoft\StructType\DgEndDateWindow $endDateWindow
     * @param \dgsoft\StructType\DgStartDateWindow $startDateWindow
     * @param string $start
     * @param string $startDate
     * @param string $duration
     * @param string $end
     * @param string $endDate
     */
    public function __construct(\dgsoft\StructType\DgTimeInstantType $dateWindowRange = null, \dgsoft\StructType\DgEndDateWindow $endDateWindow = null, \dgsoft\StructType\DgStartDateWindow $startDateWindow = null, $start = null, $startDate = null, $duration = null, $end = null, $endDate = null)
    {
        $this
            ->setDateWindowRange($dateWindowRange)
            ->setEndDateWindow($endDateWindow)
            ->setStartDateWindow($startDateWindow)
            ->setStart($start)
            ->setStartDate($startDate)
            ->setDuration($duration)
            ->setEnd($end)
            ->setEndDate($endDate);
    }
    /**
     * Get DateWindowRange value
     * @return \dgsoft\StructType\DgTimeInstantType|null
     */
    public function getDateWindowRange()
    {
        return $this->DateWindowRange;
    }
    /**
     * Set DateWindowRange value
     * @param \dgsoft\StructType\DgTimeInstantType $dateWindowRange
     * @return \dgsoft\StructType\DgDateTimeSpanType
     */
    public function setDateWindowRange(\dgsoft\StructType\DgTimeInstantType $dateWindowRange = null)
    {
        $this->DateWindowRange = $dateWindowRange;
        return $this;
    }
    /**
     * Get EndDateWindow value
     * @return \dgsoft\StructType\DgEndDateWindow|null
     */
    public function getEndDateWindow()
    {
        return $this->EndDateWindow;
    }
    /**
     * Set EndDateWindow value
     * @param \dgsoft\StructType\DgEndDateWindow $endDateWindow
     * @return \dgsoft\StructType\DgDateTimeSpanType
     */
    public function setEndDateWindow(\dgsoft\StructType\DgEndDateWindow $endDateWindow = null)
    {
        $this->EndDateWindow = $endDateWindow;
        return $this;
    }
    /**
     * Get StartDateWindow value
     * @return \dgsoft\StructType\DgStartDateWindow|null
     */
    public function getStartDateWindow()
    {
        return $this->StartDateWindow;
    }
    /**
     * Set StartDateWindow value
     * @param \dgsoft\StructType\DgStartDateWindow $startDateWindow
     * @return \dgsoft\StructType\DgDateTimeSpanType
     */
    public function setStartDateWindow(\dgsoft\StructType\DgStartDateWindow $startDateWindow = null)
    {
        $this->StartDateWindow = $startDateWindow;
        return $this;
    }
    /**
     * Get Start value
     * @return string|null
     */
    public function getStart()
    {
        return $this->Start;
    }
    /**
     * Set Start value
     * @param string $start
     * @return \dgsoft\StructType\DgDateTimeSpanType
     */
    public function setStart($start = null)
    {
        // validation for constraint: string
        if (!is_null($start) && !is_string($start)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($start)), __LINE__);
        }
        $this->Start = $start;
        return $this;
    }
    /**
     * Get StartDate value
     * @return string|null
     */
    public function getStartDate()
    {
        return $this->StartDate;
    }
    /**
     * Set StartDate value
     * @param string $startDate
     * @return \dgsoft\StructType\DgDateTimeSpanType
     */
    public function setStartDate($startDate = null)
    {
        // validation for constraint: string
        if (!is_null($startDate) && !is_string($startDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($startDate)), __LINE__);
        }
        $this->StartDate = $startDate;
        return $this;
    }
    /**
     * Get Duration value
     * @return string|null
     */
    public function getDuration()
    {
        return $this->Duration;
    }
    /**
     * Set Duration value
     * @param string $duration
     * @return \dgsoft\StructType\DgDateTimeSpanType
     */
    public function setDuration($duration = null)
    {
        // validation for constraint: string
        if (!is_null($duration) && !is_string($duration)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($duration)), __LINE__);
        }
        $this->Duration = $duration;
        return $this;
    }
    /**
     * Get End value
     * @return string|null
     */
    public function getEnd()
    {
        return $this->End;
    }
    /**
     * Set End value
     * @param string $end
     * @return \dgsoft\StructType\DgDateTimeSpanType
     */
    public function setEnd($end = null)
    {
        // validation for constraint: string
        if (!is_null($end) && !is_string($end)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($end)), __LINE__);
        }
        $this->End = $end;
        return $this;
    }
    /**
     * Get EndDate value
     * @return string|null
     */
    public function getEndDate()
    {
        return $this->EndDate;
    }
    /**
     * Set EndDate value
     * @param string $endDate
     * @return \dgsoft\StructType\DgDateTimeSpanType
     */
    public function setEndDate($endDate = null)
    {
        // validation for constraint: string
        if (!is_null($endDate) && !is_string($endDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($endDate)), __LINE__);
        }
        $this->EndDate = $endDate;
        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 \dgsoft\StructType\DgDateTimeSpanType
     */
    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__;
    }
}
