| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
| 6 // To regenerate the file, use the script | 6 // To regenerate the file, use the script |
| 7 // "pkg/analysis_server/spec/generate_files". | 7 // "pkg/analysis_server/spec/generate_files". |
| 8 | 8 |
| 9 part of protocol; | 9 part of protocol; |
| 10 /** | 10 /** |
| (...skipping 5646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5657 factory ElementKind.fromEngine(engine.ElementKind kind) => | 5657 factory ElementKind.fromEngine(engine.ElementKind kind) => |
| 5658 _elementKindFromEngine(kind); | 5658 _elementKindFromEngine(kind); |
| 5659 | 5659 |
| 5660 @override | 5660 @override |
| 5661 String toString() => "ElementKind.$name"; | 5661 String toString() => "ElementKind.$name"; |
| 5662 | 5662 |
| 5663 String toJson() => name; | 5663 String toJson() => name; |
| 5664 } | 5664 } |
| 5665 | 5665 |
| 5666 /** | 5666 /** |
| 5667 * Error | |
| 5668 * | |
| 5669 * { | |
| 5670 * "code": RequestErrorCode | |
| 5671 * "message": String | |
| 5672 * "data": optional object | |
| 5673 * } | |
| 5674 */ | |
| 5675 class Error implements HasToJson { | |
| 5676 /** | |
| 5677 * A code that uniquely identifies the error that occurred. | |
| 5678 */ | |
| 5679 RequestErrorCode code; | |
| 5680 | |
| 5681 /** | |
| 5682 * A short description of the error. | |
| 5683 */ | |
| 5684 String message; | |
| 5685 | |
| 5686 /** | |
| 5687 * Additional data related to the error. This field is omitted if there is no | |
| 5688 * additional data available. | |
| 5689 */ | |
| 5690 Map data; | |
| 5691 | |
| 5692 Error(this.code, this.message, {this.data}); | |
| 5693 | |
| 5694 factory Error.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json)
{ | |
| 5695 if (json == null) { | |
| 5696 json = {}; | |
| 5697 } | |
| 5698 if (json is Map) { | |
| 5699 RequestErrorCode code; | |
| 5700 if (json.containsKey("code")) { | |
| 5701 code = new RequestErrorCode.fromJson(jsonDecoder, jsonPath + ".code", js
on["code"]); | |
| 5702 } else { | |
| 5703 throw jsonDecoder.missingKey(jsonPath, "code"); | |
| 5704 } | |
| 5705 String message; | |
| 5706 if (json.containsKey("message")) { | |
| 5707 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); | |
| 5708 } else { | |
| 5709 throw jsonDecoder.missingKey(jsonPath, "message"); | |
| 5710 } | |
| 5711 Map data; | |
| 5712 if (json.containsKey("data")) { | |
| 5713 data = json["data"]; | |
| 5714 } | |
| 5715 return new Error(code, message, data: data); | |
| 5716 } else { | |
| 5717 throw jsonDecoder.mismatch(jsonPath, "Error"); | |
| 5718 } | |
| 5719 } | |
| 5720 | |
| 5721 Map<String, dynamic> toJson() { | |
| 5722 Map<String, dynamic> result = {}; | |
| 5723 result["code"] = code.toJson(); | |
| 5724 result["message"] = message; | |
| 5725 if (data != null) { | |
| 5726 result["data"] = data; | |
| 5727 } | |
| 5728 return result; | |
| 5729 } | |
| 5730 | |
| 5731 @override | |
| 5732 String toString() => JSON.encode(toJson()); | |
| 5733 | |
| 5734 @override | |
| 5735 bool operator==(other) { | |
| 5736 if (other is Error) { | |
| 5737 return code == other.code && | |
| 5738 message == other.message && | |
| 5739 data == other.data; | |
| 5740 } | |
| 5741 return false; | |
| 5742 } | |
| 5743 | |
| 5744 @override | |
| 5745 int get hashCode { | |
| 5746 int hash = 0; | |
| 5747 hash = _JenkinsSmiHash.combine(hash, code.hashCode); | |
| 5748 hash = _JenkinsSmiHash.combine(hash, message.hashCode); | |
| 5749 hash = _JenkinsSmiHash.combine(hash, data.hashCode); | |
| 5750 return _JenkinsSmiHash.finish(hash); | |
| 5751 } | |
| 5752 } | |
| 5753 | |
| 5754 /** | |
| 5755 * ErrorFixes | 5667 * ErrorFixes |
| 5756 * | 5668 * |
| 5757 * { | 5669 * { |
| 5758 * "error": AnalysisError | 5670 * "error": AnalysisError |
| 5759 * "fixes": List<SourceChange> | 5671 * "fixes": List<SourceChange> |
| 5760 * } | 5672 * } |
| 5761 */ | 5673 */ |
| 5762 class ErrorFixes implements HasToJson { | 5674 class ErrorFixes implements HasToJson { |
| 5763 /** | 5675 /** |
| 5764 * The error with which the fixes are associated. | 5676 * The error with which the fixes are associated. |
| (...skipping 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8075 | 7987 |
| 8076 @override | 7988 @override |
| 8077 int get hashCode { | 7989 int get hashCode { |
| 8078 int hash = 0; | 7990 int hash = 0; |
| 8079 hash = _JenkinsSmiHash.combine(hash, 114870849); | 7991 hash = _JenkinsSmiHash.combine(hash, 114870849); |
| 8080 return _JenkinsSmiHash.finish(hash); | 7992 return _JenkinsSmiHash.finish(hash); |
| 8081 } | 7993 } |
| 8082 } | 7994 } |
| 8083 | 7995 |
| 8084 /** | 7996 /** |
| 7997 * RequestError |
| 7998 * |
| 7999 * { |
| 8000 * "code": RequestErrorCode |
| 8001 * "message": String |
| 8002 * "data": optional object |
| 8003 * } |
| 8004 */ |
| 8005 class RequestError implements HasToJson { |
| 8006 /** |
| 8007 * A code that uniquely identifies the error that occurred. |
| 8008 */ |
| 8009 RequestErrorCode code; |
| 8010 |
| 8011 /** |
| 8012 * A short description of the error. |
| 8013 */ |
| 8014 String message; |
| 8015 |
| 8016 /** |
| 8017 * Additional data related to the error. This field is omitted if there is no |
| 8018 * additional data available. |
| 8019 */ |
| 8020 Map data; |
| 8021 |
| 8022 RequestError(this.code, this.message, {this.data}); |
| 8023 |
| 8024 factory RequestError.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { |
| 8025 if (json == null) { |
| 8026 json = {}; |
| 8027 } |
| 8028 if (json is Map) { |
| 8029 RequestErrorCode code; |
| 8030 if (json.containsKey("code")) { |
| 8031 code = new RequestErrorCode.fromJson(jsonDecoder, jsonPath + ".code", js
on["code"]); |
| 8032 } else { |
| 8033 throw jsonDecoder.missingKey(jsonPath, "code"); |
| 8034 } |
| 8035 String message; |
| 8036 if (json.containsKey("message")) { |
| 8037 message = jsonDecoder._decodeString(jsonPath + ".message", json["message
"]); |
| 8038 } else { |
| 8039 throw jsonDecoder.missingKey(jsonPath, "message"); |
| 8040 } |
| 8041 Map data; |
| 8042 if (json.containsKey("data")) { |
| 8043 data = json["data"]; |
| 8044 } |
| 8045 return new RequestError(code, message, data: data); |
| 8046 } else { |
| 8047 throw jsonDecoder.mismatch(jsonPath, "RequestError"); |
| 8048 } |
| 8049 } |
| 8050 |
| 8051 Map<String, dynamic> toJson() { |
| 8052 Map<String, dynamic> result = {}; |
| 8053 result["code"] = code.toJson(); |
| 8054 result["message"] = message; |
| 8055 if (data != null) { |
| 8056 result["data"] = data; |
| 8057 } |
| 8058 return result; |
| 8059 } |
| 8060 |
| 8061 @override |
| 8062 String toString() => JSON.encode(toJson()); |
| 8063 |
| 8064 @override |
| 8065 bool operator==(other) { |
| 8066 if (other is RequestError) { |
| 8067 return code == other.code && |
| 8068 message == other.message && |
| 8069 data == other.data; |
| 8070 } |
| 8071 return false; |
| 8072 } |
| 8073 |
| 8074 @override |
| 8075 int get hashCode { |
| 8076 int hash = 0; |
| 8077 hash = _JenkinsSmiHash.combine(hash, code.hashCode); |
| 8078 hash = _JenkinsSmiHash.combine(hash, message.hashCode); |
| 8079 hash = _JenkinsSmiHash.combine(hash, data.hashCode); |
| 8080 return _JenkinsSmiHash.finish(hash); |
| 8081 } |
| 8082 } |
| 8083 |
| 8084 /** |
| 8085 * RequestErrorCode | 8085 * RequestErrorCode |
| 8086 * | 8086 * |
| 8087 * enum { | 8087 * enum { |
| 8088 * GET_ERRORS_ERROR | 8088 * GET_ERRORS_ERROR |
| 8089 * INVALID_PARAMETER | 8089 * INVALID_PARAMETER |
| 8090 * INVALID_REQUEST | 8090 * INVALID_REQUEST |
| 8091 * SERVER_ALREADY_STARTED | 8091 * SERVER_ALREADY_STARTED |
| 8092 * UNANALYZED_PRIORITY_FILES | 8092 * UNANALYZED_PRIORITY_FILES |
| 8093 * UNKNOWN_REQUEST | 8093 * UNKNOWN_REQUEST |
| 8094 * UNSUPPORTED_FEATURE | 8094 * UNSUPPORTED_FEATURE |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9760 return false; | 9760 return false; |
| 9761 } | 9761 } |
| 9762 | 9762 |
| 9763 @override | 9763 @override |
| 9764 int get hashCode { | 9764 int get hashCode { |
| 9765 int hash = 0; | 9765 int hash = 0; |
| 9766 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 9766 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
| 9767 return _JenkinsSmiHash.finish(hash); | 9767 return _JenkinsSmiHash.finish(hash); |
| 9768 } | 9768 } |
| 9769 } | 9769 } |
| OLD | NEW |