def __from_protobuf_message__(cls, pb_message):
        """
        Creates a Message containing native types from a Protobuf Message containing Generic fields.
        Preserves original timestamp and id.

        :param pb_message: The Protobuf Message
        :return: a native message
        """

        headers = MessageHeaders()

        for key, value in pb_message.headers.items():
            '''Preserve timestamp and id here'''
            headers.__dict__[key] = __convert_from_generic__(value)

        return Message(__convert_from_generic__(pb_message.payload),headers)
def __from_protobuf_message__ ( cls , pb_message ) : headers = MessageHeaders ( ) for key , value in pb_message . headers . items ( ) : headers . __dict__ [ key ] = __convert_from_generic__ ( value ) return Message ( __convert_from_generic__ ( pb_message . payload ) , headers )
Creates a Message containing native types from a Protobuf Message containing Generic fields.
        Preserves original timestamp and id.

        :param pb_message: The Protobuf Message
        :return: a native message