public function asEnumerated(): Primitive\Enumerated
    {
        if (!$this->_element instanceof Primitive\Enumerated) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_ENUMERATED));
        }
        return $this->_element;
    }
public function asEnumerated(): Primitive\Enumerated
    {
        if (!$this->_element instanceof Primitive\Enumerated) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_ENUMERATED));
        }
        return $this->_element;
    }
public function asEnumerated ( ) : Primitive \ Enumerated { if ( ! $ this -> _element instanceof Primitive \ Enumerated ) { throw new \ UnexpectedValueException ( $ this -> _generateExceptionMessage ( Element :: TYPE_ENUMERATED ) ) ; } return $ this -> _element ; }
Get the wrapped element as an enumerated type.

@throws \UnexpectedValueException If the element is not an enumerated
@return \ASN1\Type\Primitive\Enumerated
Get the wrapped element as an enumerated type .