Map<String, dynamic> toMap() { Map<String, dynamic> map = {}; if (_handle != null) { map['handle'] = _handle; } map['type'] = _type; return map; }