factory PortMapping.fromJson(Map<String, dynamic> json) { return PortMapping( port: json['port'] as int, protocol: (json['protocol'] as String).toPortProtocol(), ); }