<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GeneralInstructionToRoadUsers StructType
 * @subpackage Structs
 */
class GeneralInstructionToRoadUsers extends NetworkManagement
{
    /**
     * The generalInstructionToRoadUsersType
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $generalInstructionToRoadUsersType;
    /**
     * The generalInstructionToRoadUsersExtension
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ExtensionType
     */
    public $generalInstructionToRoadUsersExtension;
    /**
     * Constructor method for GeneralInstructionToRoadUsers
     * @uses GeneralInstructionToRoadUsers::setGeneralInstructionToRoadUsersType()
     * @uses GeneralInstructionToRoadUsers::setGeneralInstructionToRoadUsersExtension()
     * @param string $generalInstructionToRoadUsersType
     * @param \StructType\ExtensionType $generalInstructionToRoadUsersExtension
     */
    public function __construct($generalInstructionToRoadUsersType = null, \StructType\ExtensionType $generalInstructionToRoadUsersExtension = null)
    {
        $this
            ->setGeneralInstructionToRoadUsersType($generalInstructionToRoadUsersType)
            ->setGeneralInstructionToRoadUsersExtension($generalInstructionToRoadUsersExtension);
    }
    /**
     * Get generalInstructionToRoadUsersType value
     * @return string
     */
    public function getGeneralInstructionToRoadUsersType()
    {
        return $this->generalInstructionToRoadUsersType;
    }
    /**
     * Set generalInstructionToRoadUsersType value
     * @uses \EnumType\GeneralInstructionToRoadUsersTypeEnum::valueIsValid()
     * @uses \EnumType\GeneralInstructionToRoadUsersTypeEnum::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $generalInstructionToRoadUsersType
     * @return \StructType\GeneralInstructionToRoadUsers
     */
    public function setGeneralInstructionToRoadUsersType($generalInstructionToRoadUsersType = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\GeneralInstructionToRoadUsersTypeEnum::valueIsValid($generalInstructionToRoadUsersType)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $generalInstructionToRoadUsersType, implode(', ', \EnumType\GeneralInstructionToRoadUsersTypeEnum::getValidValues())), __LINE__);
        }
        $this->generalInstructionToRoadUsersType = $generalInstructionToRoadUsersType;
        return $this;
    }
    /**
     * Get generalInstructionToRoadUsersExtension value
     * @return \StructType\ExtensionType|null
     */
    public function getGeneralInstructionToRoadUsersExtension()
    {
        return $this->generalInstructionToRoadUsersExtension;
    }
    /**
     * Set generalInstructionToRoadUsersExtension value
     * @param \StructType\ExtensionType $generalInstructionToRoadUsersExtension
     * @return \StructType\GeneralInstructionToRoadUsers
     */
    public function setGeneralInstructionToRoadUsersExtension(\StructType\ExtensionType $generalInstructionToRoadUsersExtension = null)
    {
        $this->generalInstructionToRoadUsersExtension = $generalInstructionToRoadUsersExtension;
        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\GeneralInstructionToRoadUsers
     */
    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__;
    }
}
