rest classes structure