Creates Map from Class Object
Map
Map<String, dynamic> toJson() => { 'name': name, 'type': type == null ? None : Option.some(type), };