public function deserialize(string $response, string $expectedMessageClass)
    {
        try {
            /** @var Message $expectedMessage */
            $expectedMessage = new $expectedMessageClass();
            $expectedMessage->mergeFromString($response);
            return $expectedMessage;
        } catch (\Exception $e) {
            throw new SerializationException(
                'Could not deserialize message from nghttpx response body due to protobuf error'
            );
        }
    }
public function deserialize(string $response, string $expectedMessageClass)
    {
        try {
            /** @var Message $expectedMessage */
            $expectedMessage = new $expectedMessageClass();
            $expectedMessage->mergeFromString($response);
            return $expectedMessage;
        } catch (\Exception $e) {
            throw new SerializationException(
                'Could not deserialize message from nghttpx response body due to protobuf error'
            );
        }
    }
public function deserialize ( string $ response , string $ expectedMessageClass ) { try { /** @var Message $expectedMessage */ $ expectedMessage = new $ expectedMessageClass ( ) ; $ expectedMessage -> mergeFromString ( $ response ) ; return $ expectedMessage ; } catch ( \ Exception $ e ) { throw new SerializationException ( 'Could not deserialize message from nghttpx response body due to protobuf error' ) ; } }
Deserialize an incoming response into a protobuf message

@param string $response
@param string $expectedMessageClass
@return Message
@throws SerializationException
@throws \Google\Protobuf\Internal\Exception
Deserialize an incoming response into a protobuf message