@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] == Welcome.MESSAGE_TYPE))
    if (len(wmsg) != 3):
        raise ProtocolError('invalid message length {0} for WELCOME'.format(len(wmsg)))
    session = check_or_raise_id(wmsg[1], "'session' in WELCOME")
    details = check_or_raise_extra(wmsg[2], "'details' in WELCOME")
    authid = details.get(u'authid', None)
    authrole = details.get(u'authrole', None)
    authmethod = details.get(u'authmethod', None)
    authprovider = details.get(u'authprovider', None)
    roles = []
    if (not (u'roles' in details)):
        raise ProtocolError('missing mandatory roles attribute in options in WELCOME')
    details_roles = check_or_raise_extra(details['roles'], "'roles' in 'details' in WELCOME")
    if (len(details_roles) == 0):
        raise ProtocolError("empty 'roles' in 'details' in WELCOME")
    for role in details_roles:
        if (role not in ROLE_NAME_TO_CLASS):
            raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in WELCOME".format(role))
        role_cls = ROLE_NAME_TO_CLASS[role]
        if (u'features' in details_roles[role]):
            check_or_raise_extra(details_roles[role][u'features'], "'features' in role '{0}' in 'roles' in 'details' in WELCOME".format(role))
            role_features = role_cls(**details_roles[role][u'features'])
        else:
            role_features = role_cls()
        roles.append(role_features)
    obj = Welcome(session, roles, authid, authrole, authmethod, authprovider)
    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] == Welcome.MESSAGE_TYPE))
    if (len(wmsg) != 3):
        raise ProtocolError('invalid message length {0} for WELCOME'.format(len(wmsg)))
    session = check_or_raise_id(wmsg[1], "'session' in WELCOME")
    details = check_or_raise_extra(wmsg[2], "'details' in WELCOME")
    authid = details.get(u'authid', None)
    authrole = details.get(u'authrole', None)
    authmethod = details.get(u'authmethod', None)
    authprovider = details.get(u'authprovider', None)
    roles = []
    if (not (u'roles' in details)):
        raise ProtocolError('missing mandatory roles attribute in options in WELCOME')
    details_roles = check_or_raise_extra(details['roles'], "'roles' in 'details' in WELCOME")
    if (len(details_roles) == 0):
        raise ProtocolError("empty 'roles' in 'details' in WELCOME")
    for role in details_roles:
        if (role not in ROLE_NAME_TO_CLASS):
            raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in WELCOME".format(role))
        role_cls = ROLE_NAME_TO_CLASS[role]
        if (u'features' in details_roles[role]):
            check_or_raise_extra(details_roles[role][u'features'], "'features' in role '{0}' in 'roles' in 'details' in WELCOME".format(role))
            role_features = role_cls(**details_roles[role][u'features'])
        else:
            role_features = role_cls()
        roles.append(role_features)
    obj = Welcome(session, roles, authid, authrole, authmethod, authprovider)
    return obj