Make Resource serializable