def messages(self):
        """

        :rtype: list of Message
        """
        result = []
        for proto in self.protocols:
            result.extend(proto.messages)
        return result
def messages ( self ) : result = [ ] for proto in self . protocols : result . extend ( proto . messages ) return result
:rtype: list of Message