Make resource_class a class method to avoid multiple declarations of Gen...

...eratedResourceSchema