factory ResourceQuery.fromJson(Map<String, dynamic> json) { return ResourceQuery( query: json['Query'] as String, type: (json['Type'] as String).toQueryType(), ); }