@override Map<String, dynamic> toJson() => <String, dynamic>{ 'endpoint': endpoint, 'type': type.toJson(), '@type': constructor, };