@override Object toJson() => { if (endpoints.isNotDefault) 'endpoints': [for (final i in endpoints) i.toJson()], };