<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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