Implement repr of resource.