Map<String, dynamic> toJson() { return { 'id': id, 'from': fromTo.from, 'to': fromTo.to, 'fromPort': fromTo.fromPort, 'toPort': fromTo.toPort, }; }