Converts instance to a map.
Map<String, dynamic> toMap() { return { "description": description, "type": type.toNativeValue(), }; }