Map<String, Object?> toJson() { var value = this.value; final json = <String, Object?>{}; if (value != null) { json[r'value'] = value; } return json; }