<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for StopTimetableCapabilityRequestPolicyStructure StructType
 * Meta informations extracted from the WSDL
 * - documentation: Type for Monitoring Service Capability Request Policy.
 * @subpackage Structs
 */
class StopTimetableCapabilityRequestPolicyStructure extends CapabilityRequestPolicyStructure
{
    /**
     * The UseReferences
     * Meta informations extracted from the WSDL
     * - default: true
     * - documentation: Whether results can return references for stops. Default is 'true'.
     * - minOccurs: 0
     * @var bool
     */
    public $UseReferences;
    /**
     * The UseNames
     * Meta informations extracted from the WSDL
     * - default: false
     * - documentation: Whether results can return names for stop.
     * - minOccurs: 0
     * @var bool
     */
    public $UseNames;
    /**
     * Constructor method for StopTimetableCapabilityRequestPolicyStructure
     * @uses StopTimetableCapabilityRequestPolicyStructure::setUseReferences()
     * @uses StopTimetableCapabilityRequestPolicyStructure::setUseNames()
     * @param bool $useReferences
     * @param bool $useNames
     */
    public function __construct($useReferences = true, $useNames = false)
    {
        $this
            ->setUseReferences($useReferences)
            ->setUseNames($useNames);
    }
    /**
     * Get UseReferences value
     * @return bool|null
     */
    public function getUseReferences()
    {
        return $this->UseReferences;
    }
    /**
     * Set UseReferences value
     * @param bool $useReferences
     * @return \StructType\StopTimetableCapabilityRequestPolicyStructure
     */
    public function setUseReferences($useReferences = true)
    {
        // validation for constraint: boolean
        if (!is_null($useReferences) && !is_bool($useReferences)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($useReferences)), __LINE__);
        }
        $this->UseReferences = $useReferences;
        return $this;
    }
    /**
     * Get UseNames value
     * @return bool|null
     */
    public function getUseNames()
    {
        return $this->UseNames;
    }
    /**
     * Set UseNames value
     * @param bool $useNames
     * @return \StructType\StopTimetableCapabilityRequestPolicyStructure
     */
    public function setUseNames($useNames = false)
    {
        // validation for constraint: boolean
        if (!is_null($useNames) && !is_bool($useNames)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($useNames)), __LINE__);
        }
        $this->UseNames = $useNames;
        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\StopTimetableCapabilityRequestPolicyStructure
     */
    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__;
    }
}
