generated getter and setter for resource