<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TrafficHeadway StructType
 * @subpackage Structs
 */
class TrafficHeadway extends TrafficValue
{
    /**
     * The averageDistanceHeadway
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var float
     */
    public $averageDistanceHeadway;
    /**
     * The averageTimeHeadway
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var float
     */
    public $averageTimeHeadway;
    /**
     * The trafficHeadwayExtension
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ExtensionType
     */
    public $trafficHeadwayExtension;
    /**
     * Constructor method for TrafficHeadway
     * @uses TrafficHeadway::setAverageDistanceHeadway()
     * @uses TrafficHeadway::setAverageTimeHeadway()
     * @uses TrafficHeadway::setTrafficHeadwayExtension()
     * @param float $averageDistanceHeadway
     * @param float $averageTimeHeadway
     * @param \StructType\ExtensionType $trafficHeadwayExtension
     */
    public function __construct($averageDistanceHeadway = null, $averageTimeHeadway = null, \StructType\ExtensionType $trafficHeadwayExtension = null)
    {
        $this
            ->setAverageDistanceHeadway($averageDistanceHeadway)
            ->setAverageTimeHeadway($averageTimeHeadway)
            ->setTrafficHeadwayExtension($trafficHeadwayExtension);
    }
    /**
     * Get averageDistanceHeadway value
     * @return float|null
     */
    public function getAverageDistanceHeadway()
    {
        return $this->averageDistanceHeadway;
    }
    /**
     * Set averageDistanceHeadway value
     * @param float $averageDistanceHeadway
     * @return \StructType\TrafficHeadway
     */
    public function setAverageDistanceHeadway($averageDistanceHeadway = null)
    {
        $this->averageDistanceHeadway = $averageDistanceHeadway;
        return $this;
    }
    /**
     * Get averageTimeHeadway value
     * @return float|null
     */
    public function getAverageTimeHeadway()
    {
        return $this->averageTimeHeadway;
    }
    /**
     * Set averageTimeHeadway value
     * @param float $averageTimeHeadway
     * @return \StructType\TrafficHeadway
     */
    public function setAverageTimeHeadway($averageTimeHeadway = null)
    {
        $this->averageTimeHeadway = $averageTimeHeadway;
        return $this;
    }
    /**
     * Get trafficHeadwayExtension value
     * @return \StructType\ExtensionType|null
     */
    public function getTrafficHeadwayExtension()
    {
        return $this->trafficHeadwayExtension;
    }
    /**
     * Set trafficHeadwayExtension value
     * @param \StructType\ExtensionType $trafficHeadwayExtension
     * @return \StructType\TrafficHeadway
     */
    public function setTrafficHeadwayExtension(\StructType\ExtensionType $trafficHeadwayExtension = null)
    {
        $this->trafficHeadwayExtension = $trafficHeadwayExtension;
        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\TrafficHeadway
     */
    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__;
    }
}
