@@ -7115,6 +7115,180 @@ class DiagnosticGetServerPortResult implements ResponseResult {
71157115 }
71167116}
71177117
7118+ /// edit.bulkFixes params
7119+ ///
7120+ /// {
7121+ /// "included": List<FilePath>
7122+ /// }
7123+ ///
7124+ /// Clients may not extend, implement or mix-in this class.
7125+ class EditBulkFixesParams implements RequestParams {
7126+ List<String> _included;
7127+
7128+ /// A list of the files and directories for which edits should be suggested.
7129+ ///
7130+ /// If a request is made with a path that is invalid, e.g. is not absolute
7131+ /// and normalized, an error of type INVALID_FILE_PATH_FORMAT will be
7132+ /// generated. If a request is made for a file which does not exist, or which
7133+ /// is not currently subject to analysis (e.g. because it is not associated
7134+ /// with any analysis root specified to analysis.setAnalysisRoots), an error
7135+ /// of type FILE_NOT_ANALYZED will be generated.
7136+ List<String> get included => _included;
7137+
7138+ /// A list of the files and directories for which edits should be suggested.
7139+ ///
7140+ /// If a request is made with a path that is invalid, e.g. is not absolute
7141+ /// and normalized, an error of type INVALID_FILE_PATH_FORMAT will be
7142+ /// generated. If a request is made for a file which does not exist, or which
7143+ /// is not currently subject to analysis (e.g. because it is not associated
7144+ /// with any analysis root specified to analysis.setAnalysisRoots), an error
7145+ /// of type FILE_NOT_ANALYZED will be generated.
7146+ set included(List<String> value) {
7147+ assert(value != null);
7148+ _included = value;
7149+ }
7150+
7151+ EditBulkFixesParams(List<String> included) {
7152+ this.included = included;
7153+ }
7154+
7155+ factory EditBulkFixesParams.fromJson(
7156+ JsonDecoder jsonDecoder, String jsonPath, Object json) {
7157+ json ??= {};
7158+ if (json is Map) {
7159+ List<String> included;
7160+ if (json.containsKey('included')) {
7161+ included = jsonDecoder.decodeList(
7162+ jsonPath + '.included', json['included'], jsonDecoder.decodeString);
7163+ } else {
7164+ throw jsonDecoder.mismatch(jsonPath, 'included');
7165+ }
7166+ return EditBulkFixesParams(included);
7167+ } else {
7168+ throw jsonDecoder.mismatch(jsonPath, 'edit.bulkFixes params', json);
7169+ }
7170+ }
7171+
7172+ factory EditBulkFixesParams.fromRequest(Request request) {
7173+ return EditBulkFixesParams.fromJson(
7174+ RequestDecoder(request), 'params', request.params);
7175+ }
7176+
7177+ @override
7178+ Map<String, dynamic> toJson() {
7179+ var result = <String, dynamic>{};
7180+ result['included'] = included;
7181+ return result;
7182+ }
7183+
7184+ @override
7185+ Request toRequest(String id) {
7186+ return Request(id, 'edit.bulkFixes', toJson());
7187+ }
7188+
7189+ @override
7190+ String toString() => json.encode(toJson());
7191+
7192+ @override
7193+ bool operator ==(other) {
7194+ if (other is EditBulkFixesParams) {
7195+ return listEqual(
7196+ included, other.included, (String a, String b) => a == b);
7197+ }
7198+ return false;
7199+ }
7200+
7201+ @override
7202+ int get hashCode {
7203+ var hash = 0;
7204+ hash = JenkinsSmiHash.combine(hash, included.hashCode);
7205+ return JenkinsSmiHash.finish(hash);
7206+ }
7207+ }
7208+
7209+ /// edit.bulkFixes result
7210+ ///
7211+ /// {
7212+ /// "edits": List<SourceFileEdit>
7213+ /// }
7214+ ///
7215+ /// Clients may not extend, implement or mix-in this class.
7216+ class EditBulkFixesResult implements ResponseResult {
7217+ List<SourceFileEdit> _edits;
7218+
7219+ /// A list of source edits to apply the recommended changes.
7220+ List<SourceFileEdit> get edits => _edits;
7221+
7222+ /// A list of source edits to apply the recommended changes.
7223+ set edits(List<SourceFileEdit> value) {
7224+ assert(value != null);
7225+ _edits = value;
7226+ }
7227+
7228+ EditBulkFixesResult(List<SourceFileEdit> edits) {
7229+ this.edits = edits;
7230+ }
7231+
7232+ factory EditBulkFixesResult.fromJson(
7233+ JsonDecoder jsonDecoder, String jsonPath, Object json) {
7234+ json ??= {};
7235+ if (json is Map) {
7236+ List<SourceFileEdit> edits;
7237+ if (json.containsKey('edits')) {
7238+ edits = jsonDecoder.decodeList(
7239+ jsonPath + '.edits',
7240+ json['edits'],
7241+ (String jsonPath, Object json) =>
7242+ SourceFileEdit.fromJson(jsonDecoder, jsonPath, json));
7243+ } else {
7244+ throw jsonDecoder.mismatch(jsonPath, 'edits');
7245+ }
7246+ return EditBulkFixesResult(edits);
7247+ } else {
7248+ throw jsonDecoder.mismatch(jsonPath, 'edit.bulkFixes result', json);
7249+ }
7250+ }
7251+
7252+ factory EditBulkFixesResult.fromResponse(Response response) {
7253+ return EditBulkFixesResult.fromJson(
7254+ ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
7255+ 'result',
7256+ response.result);
7257+ }
7258+
7259+ @override
7260+ Map<String, dynamic> toJson() {
7261+ var result = <String, dynamic>{};
7262+ result['edits'] =
7263+ edits.map((SourceFileEdit value) => value.toJson()).toList();
7264+ return result;
7265+ }
7266+
7267+ @override
7268+ Response toResponse(String id) {
7269+ return Response(id, result: toJson());
7270+ }
7271+
7272+ @override
7273+ String toString() => json.encode(toJson());
7274+
7275+ @override
7276+ bool operator ==(other) {
7277+ if (other is EditBulkFixesResult) {
7278+ return listEqual(
7279+ edits, other.edits, (SourceFileEdit a, SourceFileEdit b) => a == b);
7280+ }
7281+ return false;
7282+ }
7283+
7284+ @override
7285+ int get hashCode {
7286+ var hash = 0;
7287+ hash = JenkinsSmiHash.combine(hash, edits.hashCode);
7288+ return JenkinsSmiHash.finish(hash);
7289+ }
7290+ }
7291+
71187292/// edit.dartfix params
71197293///
71207294/// {
0 commit comments