Refactor #4125: Apply all rest engine getter/setter in samples