Add getter/setter on resource