<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for StopTimetableSubscriptionStructure StructType
 * Meta informations extracted from the WSDL
 * - documentation: Subscription Request for Stop Timetables.
 * @subpackage Structs
 */
class StopTimetableSubscriptionStructure extends AbstractSubscriptionStructure
{
    /**
     * The StopTimetableRequest
     * Meta informations extracted from the WSDL
     * - ref: StopTimetableRequest
     * @var \StructType\StopTimetableRequestStructure
     */
    public $StopTimetableRequest;
    /**
     * The IncrementalUpdates
     * @var bool
     */
    public $IncrementalUpdates;
    /**
     * The ChangeBeforeUpdates
     * Meta informations extracted from the WSDL
     * - documentation: Limited version of duration. Must be positive. | Limited version of duration that allows for precise time arithmetic. Only Month, Day, Hour, Minute Second terms should be used. Milliseconds should not be used. Year should not be
     * used. Negative values allowed. e.g. PT1004199059S", "PT130S", "PT2M10S", "P1DT2S", "-P1DT2S".
     * @var string
     */
    public $ChangeBeforeUpdates;
    /**
     * The Extensions
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - ref: Extensions
     * @var \StructType\ExtensionsStructure
     */
    public $Extensions;
    /**
     * Constructor method for StopTimetableSubscriptionStructure
     * @uses StopTimetableSubscriptionStructure::setStopTimetableRequest()
     * @uses StopTimetableSubscriptionStructure::setIncrementalUpdates()
     * @uses StopTimetableSubscriptionStructure::setChangeBeforeUpdates()
     * @uses StopTimetableSubscriptionStructure::setExtensions()
     * @param \StructType\StopTimetableRequestStructure $stopTimetableRequest
     * @param bool $incrementalUpdates
     * @param string $changeBeforeUpdates
     * @param \StructType\ExtensionsStructure $extensions
     */
    public function __construct(\StructType\StopTimetableRequestStructure $stopTimetableRequest = null, $incrementalUpdates = null, $changeBeforeUpdates = null, \StructType\ExtensionsStructure $extensions = null)
    {
        $this
            ->setStopTimetableRequest($stopTimetableRequest)
            ->setIncrementalUpdates($incrementalUpdates)
            ->setChangeBeforeUpdates($changeBeforeUpdates)
            ->setExtensions($extensions);
    }
    /**
     * Get StopTimetableRequest value
     * @return \StructType\StopTimetableRequestStructure|null
     */
    public function getStopTimetableRequest()
    {
        return $this->StopTimetableRequest;
    }
    /**
     * Set StopTimetableRequest value
     * @param \StructType\StopTimetableRequestStructure $stopTimetableRequest
     * @return \StructType\StopTimetableSubscriptionStructure
     */
    public function setStopTimetableRequest(\StructType\StopTimetableRequestStructure $stopTimetableRequest = null)
    {
        $this->StopTimetableRequest = $stopTimetableRequest;
        return $this;
    }
    /**
     * Get IncrementalUpdates value
     * @return bool|null
     */
    public function getIncrementalUpdates()
    {
        return $this->IncrementalUpdates;
    }
    /**
     * Set IncrementalUpdates value
     * @param bool $incrementalUpdates
     * @return \StructType\StopTimetableSubscriptionStructure
     */
    public function setIncrementalUpdates($incrementalUpdates = null)
    {
        // validation for constraint: boolean
        if (!is_null($incrementalUpdates) && !is_bool($incrementalUpdates)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($incrementalUpdates)), __LINE__);
        }
        $this->IncrementalUpdates = $incrementalUpdates;
        return $this;
    }
    /**
     * Get ChangeBeforeUpdates value
     * @return string|null
     */
    public function getChangeBeforeUpdates()
    {
        return $this->ChangeBeforeUpdates;
    }
    /**
     * Set ChangeBeforeUpdates value
     * @param string $changeBeforeUpdates
     * @return \StructType\StopTimetableSubscriptionStructure
     */
    public function setChangeBeforeUpdates($changeBeforeUpdates = null)
    {
        // validation for constraint: string
        if (!is_null($changeBeforeUpdates) && !is_string($changeBeforeUpdates)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($changeBeforeUpdates)), __LINE__);
        }
        $this->ChangeBeforeUpdates = $changeBeforeUpdates;
        return $this;
    }
    /**
     * Get Extensions value
     * @return \StructType\ExtensionsStructure|null
     */
    public function getExtensions()
    {
        return $this->Extensions;
    }
    /**
     * Set Extensions value
     * @param \StructType\ExtensionsStructure $extensions
     * @return \StructType\StopTimetableSubscriptionStructure
     */
    public function setExtensions(\StructType\ExtensionsStructure $extensions = null)
    {
        $this->Extensions = $extensions;
        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\StopTimetableSubscriptionStructure
     */
    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__;
    }
}
