@staticmethod
def parse(wmsg):
    '\n      Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n      :param wmsg: The unserialized raw message.\n      :type wmsg: list\n\n      :returns: An instance of this class.\n      '
    assert ((len(wmsg) > 0) and (wmsg[0] == Publish.MESSAGE_TYPE))
    if (len(wmsg) not in (4, 5, 6)):
        raise ProtocolError('invalid message length {0} for PUBLISH'.format(len(wmsg)))
    request = check_or_raise_id(wmsg[1], "'request' in PUBLISH")
    options = check_or_raise_extra(wmsg[2], "'options' in PUBLISH")
    topic = check_or_raise_uri(wmsg[3], "'topic' in PUBLISH")
    args = None
    if (len(wmsg) > 4):
        args = wmsg[4]
        if (type(args) != list):
            raise ProtocolError("invalid type {0} for 'args' in PUBLISH".format(type(args)))
    kwargs = None
    if (len(wmsg) > 5):
        kwargs = wmsg[5]
        if (type(kwargs) != dict):
            raise ProtocolError("invalid type {0} for 'kwargs' in PUBLISH".format(type(kwargs)))
    acknowledge = None
    excludeMe = None
    exclude = None
    eligible = None
    discloseMe = None
    if (u'acknowledge' in options):
        option_acknowledge = options[u'acknowledge']
        if (type(option_acknowledge) != bool):
            raise ProtocolError("invalid type {0} for 'acknowledge' option in PUBLISH".format(type(option_acknowledge)))
        acknowledge = option_acknowledge
    if (u'exclude_me' in options):
        option_excludeMe = options[u'exclude_me']
        if (type(option_excludeMe) != bool):
            raise ProtocolError("invalid type {0} for 'exclude_me' option in PUBLISH".format(type(option_excludeMe)))
        excludeMe = option_excludeMe
    if (u'exclude' in options):
        option_exclude = options[u'exclude']
        if (type(option_exclude) != list):
            raise ProtocolError("invalid type {0} for 'exclude' option in PUBLISH".format(type(option_exclude)))
        for sessionId in option_exclude:
            if (type(sessionId) not in six.integer_types):
                raise ProtocolError("invalid type {0} for value in 'exclude' option in PUBLISH".format(type(sessionId)))
        exclude = option_exclude
    if (u'eligible' in options):
        option_eligible = options[u'eligible']
        if (type(option_eligible) != list):
            raise ProtocolError("invalid type {0} for 'eligible' option in PUBLISH".format(type(option_eligible)))
        for sessionId in option_eligible:
            if (type(sessionId) not in six.integer_types):
                raise ProtocolError("invalid type {0} for value in 'eligible' option in PUBLISH".format(type(sessionId)))
        eligible = option_eligible
    if (u'disclose_me' in options):
        option_discloseMe = options[u'disclose_me']
        if (type(option_discloseMe) != bool):
            raise ProtocolError("invalid type {0} for 'disclose_me' option in PUBLISH".format(type(option_discloseMe)))
        discloseMe = option_discloseMe
    obj = Publish(request, topic, args=args, kwargs=kwargs, acknowledge=acknowledge, excludeMe=excludeMe, exclude=exclude, eligible=eligible, discloseMe=discloseMe)
    return obj
Verifies and parses an unserialized raw message into an actual WAMP message instance.

:param wmsg: The unserialized raw message.
:type wmsg: list

:returns: An instance of this class.
@staticmethod
def parse(wmsg):
    '\n      Verifies and parses an unserialized raw message into an actual WAMP message instance.\n\n      :param wmsg: The unserialized raw message.\n      :type wmsg: list\n\n      :returns: An instance of this class.\n      '
    assert ((len(wmsg) > 0) and (wmsg[0] == Publish.MESSAGE_TYPE))
    if (len(wmsg) not in (4, 5, 6)):
        raise ProtocolError('invalid message length {0} for PUBLISH'.format(len(wmsg)))
    request = check_or_raise_id(wmsg[1], "'request' in PUBLISH")
    options = check_or_raise_extra(wmsg[2], "'options' in PUBLISH")
    topic = check_or_raise_uri(wmsg[3], "'topic' in PUBLISH")
    args = None
    if (len(wmsg) > 4):
        args = wmsg[4]
        if (type(args) != list):
            raise ProtocolError("invalid type {0} for 'args' in PUBLISH".format(type(args)))
    kwargs = None
    if (len(wmsg) > 5):
        kwargs = wmsg[5]
        if (type(kwargs) != dict):
            raise ProtocolError("invalid type {0} for 'kwargs' in PUBLISH".format(type(kwargs)))
    acknowledge = None
    excludeMe = None
    exclude = None
    eligible = None
    discloseMe = None
    if (u'acknowledge' in options):
        option_acknowledge = options[u'acknowledge']
        if (type(option_acknowledge) != bool):
            raise ProtocolError("invalid type {0} for 'acknowledge' option in PUBLISH".format(type(option_acknowledge)))
        acknowledge = option_acknowledge
    if (u'exclude_me' in options):
        option_excludeMe = options[u'exclude_me']
        if (type(option_excludeMe) != bool):
            raise ProtocolError("invalid type {0} for 'exclude_me' option in PUBLISH".format(type(option_excludeMe)))
        excludeMe = option_excludeMe
    if (u'exclude' in options):
        option_exclude = options[u'exclude']
        if (type(option_exclude) != list):
            raise ProtocolError("invalid type {0} for 'exclude' option in PUBLISH".format(type(option_exclude)))
        for sessionId in option_exclude:
            if (type(sessionId) not in six.integer_types):
                raise ProtocolError("invalid type {0} for value in 'exclude' option in PUBLISH".format(type(sessionId)))
        exclude = option_exclude
    if (u'eligible' in options):
        option_eligible = options[u'eligible']
        if (type(option_eligible) != list):
            raise ProtocolError("invalid type {0} for 'eligible' option in PUBLISH".format(type(option_eligible)))
        for sessionId in option_eligible:
            if (type(sessionId) not in six.integer_types):
                raise ProtocolError("invalid type {0} for value in 'eligible' option in PUBLISH".format(type(sessionId)))
        eligible = option_eligible
    if (u'disclose_me' in options):
        option_discloseMe = options[u'disclose_me']
        if (type(option_discloseMe) != bool):
            raise ProtocolError("invalid type {0} for 'disclose_me' option in PUBLISH".format(type(option_discloseMe)))
        discloseMe = option_discloseMe
    obj = Publish(request, topic, args=args, kwargs=kwargs, acknowledge=acknowledge, excludeMe=excludeMe, exclude=exclude, eligible=eligible, discloseMe=discloseMe)
    return obj