factory ResourceCount.fromJson(Map<String, dynamic> json) { return ResourceCount( count: json['count'] as int?, resourceType: (json['resourceType'] as String?)?.toResourceType(), ); }