@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] == Hello.MESSAGE_TYPE))
    if (len(wmsg) != 3):
        raise ProtocolError('invalid message length {0} for HELLO'.format(len(wmsg)))
    realm = check_or_raise_uri(wmsg[1], "'realm' in HELLO")
    details = check_or_raise_extra(wmsg[2], "'details' in HELLO")
    roles = []
    if (not (u'roles' in details)):
        raise ProtocolError('missing mandatory roles attribute in options in HELLO')
    details_roles = check_or_raise_extra(details[u'roles'], "'roles' in 'details' in HELLO")
    if (len(details_roles) == 0):
        raise ProtocolError("empty 'roles' in 'details' in HELLO")
    for role in details_roles:
        if (role not in ROLE_NAME_TO_CLASS):
            raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in HELLO".format(role))
        role_cls = ROLE_NAME_TO_CLASS[role]
        details_role = check_or_raise_extra(details_roles[role], "role '{0}' in 'roles' in 'details' in HELLO".format(role))
        if (u'features' in details_role):
            check_or_raise_extra(details_role[u'features'], "'features' in role '{0}' in 'roles' in 'details' in HELLO".format(role))
            role_features = role_cls(**details_role[u'features'])
        else:
            role_features = role_cls()
        roles.append(role_features)
    authmethods = None
    if (u'authmethods' in details):
        details_authmethods = details[u'authmethods']
        if (type(details_authmethods) != list):
            raise ProtocolError("invalid type {0} for 'authmethods' detail in HELLO".format(type(details_authmethods)))
        for auth_method in details_authmethods:
            if (type(auth_method) != six.text_type):
                raise ProtocolError("invalid type {0} for item in 'authmethods' detail in HELLO".format(type(auth_method)))
        authmethods = details_authmethods
    authid = None
    if (u'authid' in details):
        details_authid = details[u'authid']
        if (type(details_authid) != six.text_type):
            raise ProtocolError("invalid type {0} for 'authid' detail in HELLO".format(type(details_authid)))
        authid = details_authid
    obj = Hello(realm, roles, authmethods, authid)
    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] == Hello.MESSAGE_TYPE))
    if (len(wmsg) != 3):
        raise ProtocolError('invalid message length {0} for HELLO'.format(len(wmsg)))
    realm = check_or_raise_uri(wmsg[1], "'realm' in HELLO")
    details = check_or_raise_extra(wmsg[2], "'details' in HELLO")
    roles = []
    if (not (u'roles' in details)):
        raise ProtocolError('missing mandatory roles attribute in options in HELLO')
    details_roles = check_or_raise_extra(details[u'roles'], "'roles' in 'details' in HELLO")
    if (len(details_roles) == 0):
        raise ProtocolError("empty 'roles' in 'details' in HELLO")
    for role in details_roles:
        if (role not in ROLE_NAME_TO_CLASS):
            raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in HELLO".format(role))
        role_cls = ROLE_NAME_TO_CLASS[role]
        details_role = check_or_raise_extra(details_roles[role], "role '{0}' in 'roles' in 'details' in HELLO".format(role))
        if (u'features' in details_role):
            check_or_raise_extra(details_role[u'features'], "'features' in role '{0}' in 'roles' in 'details' in HELLO".format(role))
            role_features = role_cls(**details_role[u'features'])
        else:
            role_features = role_cls()
        roles.append(role_features)
    authmethods = None
    if (u'authmethods' in details):
        details_authmethods = details[u'authmethods']
        if (type(details_authmethods) != list):
            raise ProtocolError("invalid type {0} for 'authmethods' detail in HELLO".format(type(details_authmethods)))
        for auth_method in details_authmethods:
            if (type(auth_method) != six.text_type):
                raise ProtocolError("invalid type {0} for item in 'authmethods' detail in HELLO".format(type(auth_method)))
        authmethods = details_authmethods
    authid = None
    if (u'authid' in details):
        details_authid = details[u'authid']
        if (type(details_authid) != six.text_type):
            raise ProtocolError("invalid type {0} for 'authid' detail in HELLO".format(type(details_authid)))
        authid = details_authid
    obj = Hello(realm, roles, authmethods, authid)
    return obj