This is a quick method for compilation errors to be raised should the types not satisfy the expected framework interfaces.
Most of the content is inspired by existing content in https://github.com/hashicorp/terraform-provider-scaffolding.