Map<String, dynamic> toJson() { return { 'type': type.value, 'item': item, 'invocationId': invocationId, }; }