Map<String, dynamic> toJson() { var json = {'\$regex': regexp}; if (this.options != null) { json['\$options'] = options!; } return json; }