factory ResourceRequirement.fromJson(Map<String, dynamic> json) { return ResourceRequirement( type: (json['type'] as String).toResourceType(), value: json['value'] as String, ); }