<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for EstimatedTimetableCapabilityRequestPolicyStructure
 * StructType
 * Meta informations extracted from the WSDL
 * - documentation: Type for Estimated Timetable Capability Request Policy.
 * @subpackage Structs
 */
class EstimatedTimetableCapabilityRequestPolicyStructure extends CapabilityRequestPolicyStructure
{
    /**
     * The ForeignJourneysOnly
     * Meta informations extracted from the WSDL
     * - documentation: Whether results returns foreign journeys only.
     * - minOccurs: 0
     * @var bool
     */
    public $ForeignJourneysOnly;
    /**
     * Constructor method for EstimatedTimetableCapabilityRequestPolicyStructure
     * @uses EstimatedTimetableCapabilityRequestPolicyStructure::setForeignJourneysOnly()
     * @param bool $foreignJourneysOnly
     */
    public function __construct($foreignJourneysOnly = null)
    {
        $this
            ->setForeignJourneysOnly($foreignJourneysOnly);
    }
    /**
     * Get ForeignJourneysOnly value
     * @return bool|null
     */
    public function getForeignJourneysOnly()
    {
        return $this->ForeignJourneysOnly;
    }
    /**
     * Set ForeignJourneysOnly value
     * @param bool $foreignJourneysOnly
     * @return \StructType\EstimatedTimetableCapabilityRequestPolicyStructure
     */
    public function setForeignJourneysOnly($foreignJourneysOnly = null)
    {
        // validation for constraint: boolean
        if (!is_null($foreignJourneysOnly) && !is_bool($foreignJourneysOnly)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($foreignJourneysOnly)), __LINE__);
        }
        $this->ForeignJourneysOnly = $foreignJourneysOnly;
        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\EstimatedTimetableCapabilityRequestPolicyStructure
     */
    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__;
    }
}
