Convert current instance to Map.
@override Map<String, Object> toJson() { return <String, Object>{'format': format.index, 'quality': quality}; }