<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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