public function asCharacterString(): Primitive\CharacterString
    {
        if (!$this->_element instanceof Primitive\CharacterString) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_CHARACTER_STRING));
        }
        return $this->_element;
    }
public function asCharacterString(): Primitive\CharacterString
    {
        if (!$this->_element instanceof Primitive\CharacterString) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_CHARACTER_STRING));
        }
        return $this->_element;
    }
public function asCharacterString ( ) : Primitive \ CharacterString { if ( ! $ this -> _element instanceof Primitive \ CharacterString ) { throw new \ UnexpectedValueException ( $ this -> _generateExceptionMessage ( Element :: TYPE_CHARACTER_STRING ) ) ; } return $ this -> _element ; }
Get the wrapped element as a character string type.

@throws \UnexpectedValueException If the element is not a character
string
@return \ASN1\Type\Primitive\CharacterString
Get the wrapped element as a character string type .