'Register resource.'

@classmethod
def register(cls, resource_body_cls):

    resource_type = resource_body_cls.resource_type
    assert (resource_type not in cls._REGISTERED_TYPES)
    cls._REGISTERED_TYPES[resource_type] = resource_body_cls
    return resource_body_cls
