OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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/tool/spec/generate_files". | 7 // "pkg/analysis_server/tool/spec/generate_files". |
8 | 8 |
9 import 'dart:convert' hide JsonDecoder; | 9 import 'dart:convert' hide JsonDecoder; |
10 | 10 |
(...skipping 4007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4018 return false; | 4018 return false; |
4019 } | 4019 } |
4020 | 4020 |
4021 @override | 4021 @override |
4022 int get hashCode { | 4022 int get hashCode { |
4023 return 179689467; | 4023 return 179689467; |
4024 } | 4024 } |
4025 } | 4025 } |
4026 | 4026 |
4027 /** | 4027 /** |
| 4028 * analytics.enable params |
| 4029 * |
| 4030 * { |
| 4031 * "value": bool |
| 4032 * } |
| 4033 * |
| 4034 * Clients may not extend, implement or mix-in this class. |
| 4035 */ |
| 4036 class AnalyticsEnableParams implements RequestParams { |
| 4037 bool _value; |
| 4038 |
| 4039 /** |
| 4040 * Enable or disable analytics. |
| 4041 */ |
| 4042 bool get value => _value; |
| 4043 |
| 4044 /** |
| 4045 * Enable or disable analytics. |
| 4046 */ |
| 4047 void set value(bool value) { |
| 4048 assert(value != null); |
| 4049 this._value = value; |
| 4050 } |
| 4051 |
| 4052 AnalyticsEnableParams(bool value) { |
| 4053 this.value = value; |
| 4054 } |
| 4055 |
| 4056 factory AnalyticsEnableParams.fromJson( |
| 4057 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 4058 if (json == null) { |
| 4059 json = {}; |
| 4060 } |
| 4061 if (json is Map) { |
| 4062 bool value; |
| 4063 if (json.containsKey("value")) { |
| 4064 value = jsonDecoder.decodeBool(jsonPath + ".value", json["value"]); |
| 4065 } else { |
| 4066 throw jsonDecoder.mismatch(jsonPath, "value"); |
| 4067 } |
| 4068 return new AnalyticsEnableParams(value); |
| 4069 } else { |
| 4070 throw jsonDecoder.mismatch(jsonPath, "analytics.enable params", json); |
| 4071 } |
| 4072 } |
| 4073 |
| 4074 factory AnalyticsEnableParams.fromRequest(Request request) { |
| 4075 return new AnalyticsEnableParams.fromJson( |
| 4076 new RequestDecoder(request), "params", request.params); |
| 4077 } |
| 4078 |
| 4079 @override |
| 4080 Map<String, dynamic> toJson() { |
| 4081 Map<String, dynamic> result = {}; |
| 4082 result["value"] = value; |
| 4083 return result; |
| 4084 } |
| 4085 |
| 4086 @override |
| 4087 Request toRequest(String id) { |
| 4088 return new Request(id, "analytics.enable", toJson()); |
| 4089 } |
| 4090 |
| 4091 @override |
| 4092 String toString() => JSON.encode(toJson()); |
| 4093 |
| 4094 @override |
| 4095 bool operator ==(other) { |
| 4096 if (other is AnalyticsEnableParams) { |
| 4097 return value == other.value; |
| 4098 } |
| 4099 return false; |
| 4100 } |
| 4101 |
| 4102 @override |
| 4103 int get hashCode { |
| 4104 int hash = 0; |
| 4105 hash = JenkinsSmiHash.combine(hash, value.hashCode); |
| 4106 return JenkinsSmiHash.finish(hash); |
| 4107 } |
| 4108 } |
| 4109 |
| 4110 /** |
| 4111 * analytics.enable result |
| 4112 * |
| 4113 * Clients may not extend, implement or mix-in this class. |
| 4114 */ |
| 4115 class AnalyticsEnableResult implements ResponseResult { |
| 4116 @override |
| 4117 Map<String, dynamic> toJson() => <String, dynamic>{}; |
| 4118 |
| 4119 @override |
| 4120 Response toResponse(String id) { |
| 4121 return new Response(id, result: null); |
| 4122 } |
| 4123 |
| 4124 @override |
| 4125 bool operator ==(other) { |
| 4126 if (other is AnalyticsEnableResult) { |
| 4127 return true; |
| 4128 } |
| 4129 return false; |
| 4130 } |
| 4131 |
| 4132 @override |
| 4133 int get hashCode { |
| 4134 return 237990792; |
| 4135 } |
| 4136 } |
| 4137 |
| 4138 /** |
| 4139 * analytics.isEnabled params |
| 4140 * |
| 4141 * Clients may not extend, implement or mix-in this class. |
| 4142 */ |
| 4143 class AnalyticsIsEnabledParams implements RequestParams { |
| 4144 @override |
| 4145 Map<String, dynamic> toJson() => <String, dynamic>{}; |
| 4146 |
| 4147 @override |
| 4148 Request toRequest(String id) { |
| 4149 return new Request(id, "analytics.isEnabled", null); |
| 4150 } |
| 4151 |
| 4152 @override |
| 4153 bool operator ==(other) { |
| 4154 if (other is AnalyticsIsEnabledParams) { |
| 4155 return true; |
| 4156 } |
| 4157 return false; |
| 4158 } |
| 4159 |
| 4160 @override |
| 4161 int get hashCode { |
| 4162 return 57215544; |
| 4163 } |
| 4164 } |
| 4165 |
| 4166 /** |
| 4167 * analytics.isEnabled result |
| 4168 * |
| 4169 * { |
| 4170 * "enabled": bool |
| 4171 * } |
| 4172 * |
| 4173 * Clients may not extend, implement or mix-in this class. |
| 4174 */ |
| 4175 class AnalyticsIsEnabledResult implements ResponseResult { |
| 4176 bool _enabled; |
| 4177 |
| 4178 /** |
| 4179 * Whether sending analytics is enabled or not. |
| 4180 */ |
| 4181 bool get enabled => _enabled; |
| 4182 |
| 4183 /** |
| 4184 * Whether sending analytics is enabled or not. |
| 4185 */ |
| 4186 void set enabled(bool value) { |
| 4187 assert(value != null); |
| 4188 this._enabled = value; |
| 4189 } |
| 4190 |
| 4191 AnalyticsIsEnabledResult(bool enabled) { |
| 4192 this.enabled = enabled; |
| 4193 } |
| 4194 |
| 4195 factory AnalyticsIsEnabledResult.fromJson( |
| 4196 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 4197 if (json == null) { |
| 4198 json = {}; |
| 4199 } |
| 4200 if (json is Map) { |
| 4201 bool enabled; |
| 4202 if (json.containsKey("enabled")) { |
| 4203 enabled = |
| 4204 jsonDecoder.decodeBool(jsonPath + ".enabled", json["enabled"]); |
| 4205 } else { |
| 4206 throw jsonDecoder.mismatch(jsonPath, "enabled"); |
| 4207 } |
| 4208 return new AnalyticsIsEnabledResult(enabled); |
| 4209 } else { |
| 4210 throw jsonDecoder.mismatch(jsonPath, "analytics.isEnabled result", json); |
| 4211 } |
| 4212 } |
| 4213 |
| 4214 factory AnalyticsIsEnabledResult.fromResponse(Response response) { |
| 4215 return new AnalyticsIsEnabledResult.fromJson( |
| 4216 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), |
| 4217 "result", |
| 4218 response.result); |
| 4219 } |
| 4220 |
| 4221 @override |
| 4222 Map<String, dynamic> toJson() { |
| 4223 Map<String, dynamic> result = {}; |
| 4224 result["enabled"] = enabled; |
| 4225 return result; |
| 4226 } |
| 4227 |
| 4228 @override |
| 4229 Response toResponse(String id) { |
| 4230 return new Response(id, result: toJson()); |
| 4231 } |
| 4232 |
| 4233 @override |
| 4234 String toString() => JSON.encode(toJson()); |
| 4235 |
| 4236 @override |
| 4237 bool operator ==(other) { |
| 4238 if (other is AnalyticsIsEnabledResult) { |
| 4239 return enabled == other.enabled; |
| 4240 } |
| 4241 return false; |
| 4242 } |
| 4243 |
| 4244 @override |
| 4245 int get hashCode { |
| 4246 int hash = 0; |
| 4247 hash = JenkinsSmiHash.combine(hash, enabled.hashCode); |
| 4248 return JenkinsSmiHash.finish(hash); |
| 4249 } |
| 4250 } |
| 4251 |
| 4252 /** |
| 4253 * analytics.sendEvent params |
| 4254 * |
| 4255 * { |
| 4256 * "action": String |
| 4257 * } |
| 4258 * |
| 4259 * Clients may not extend, implement or mix-in this class. |
| 4260 */ |
| 4261 class AnalyticsSendEventParams implements RequestParams { |
| 4262 String _action; |
| 4263 |
| 4264 /** |
| 4265 * The client action name. |
| 4266 */ |
| 4267 String get action => _action; |
| 4268 |
| 4269 /** |
| 4270 * The client action name. |
| 4271 */ |
| 4272 void set action(String value) { |
| 4273 assert(value != null); |
| 4274 this._action = value; |
| 4275 } |
| 4276 |
| 4277 AnalyticsSendEventParams(String action) { |
| 4278 this.action = action; |
| 4279 } |
| 4280 |
| 4281 factory AnalyticsSendEventParams.fromJson( |
| 4282 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 4283 if (json == null) { |
| 4284 json = {}; |
| 4285 } |
| 4286 if (json is Map) { |
| 4287 String action; |
| 4288 if (json.containsKey("action")) { |
| 4289 action = jsonDecoder.decodeString(jsonPath + ".action", json["action"]); |
| 4290 } else { |
| 4291 throw jsonDecoder.mismatch(jsonPath, "action"); |
| 4292 } |
| 4293 return new AnalyticsSendEventParams(action); |
| 4294 } else { |
| 4295 throw jsonDecoder.mismatch(jsonPath, "analytics.sendEvent params", json); |
| 4296 } |
| 4297 } |
| 4298 |
| 4299 factory AnalyticsSendEventParams.fromRequest(Request request) { |
| 4300 return new AnalyticsSendEventParams.fromJson( |
| 4301 new RequestDecoder(request), "params", request.params); |
| 4302 } |
| 4303 |
| 4304 @override |
| 4305 Map<String, dynamic> toJson() { |
| 4306 Map<String, dynamic> result = {}; |
| 4307 result["action"] = action; |
| 4308 return result; |
| 4309 } |
| 4310 |
| 4311 @override |
| 4312 Request toRequest(String id) { |
| 4313 return new Request(id, "analytics.sendEvent", toJson()); |
| 4314 } |
| 4315 |
| 4316 @override |
| 4317 String toString() => JSON.encode(toJson()); |
| 4318 |
| 4319 @override |
| 4320 bool operator ==(other) { |
| 4321 if (other is AnalyticsSendEventParams) { |
| 4322 return action == other.action; |
| 4323 } |
| 4324 return false; |
| 4325 } |
| 4326 |
| 4327 @override |
| 4328 int get hashCode { |
| 4329 int hash = 0; |
| 4330 hash = JenkinsSmiHash.combine(hash, action.hashCode); |
| 4331 return JenkinsSmiHash.finish(hash); |
| 4332 } |
| 4333 } |
| 4334 |
| 4335 /** |
| 4336 * analytics.sendEvent result |
| 4337 * |
| 4338 * Clients may not extend, implement or mix-in this class. |
| 4339 */ |
| 4340 class AnalyticsSendEventResult implements ResponseResult { |
| 4341 @override |
| 4342 Map<String, dynamic> toJson() => <String, dynamic>{}; |
| 4343 |
| 4344 @override |
| 4345 Response toResponse(String id) { |
| 4346 return new Response(id, result: null); |
| 4347 } |
| 4348 |
| 4349 @override |
| 4350 bool operator ==(other) { |
| 4351 if (other is AnalyticsSendEventResult) { |
| 4352 return true; |
| 4353 } |
| 4354 return false; |
| 4355 } |
| 4356 |
| 4357 @override |
| 4358 int get hashCode { |
| 4359 return 227063188; |
| 4360 } |
| 4361 } |
| 4362 |
| 4363 /** |
| 4364 * analytics.sendTiming params |
| 4365 * |
| 4366 * { |
| 4367 * "variable": String |
| 4368 * "millis": int |
| 4369 * } |
| 4370 * |
| 4371 * Clients may not extend, implement or mix-in this class. |
| 4372 */ |
| 4373 class AnalyticsSendTimingParams implements RequestParams { |
| 4374 String _variable; |
| 4375 |
| 4376 int _millis; |
| 4377 |
| 4378 /** |
| 4379 * The variable name for the event. |
| 4380 */ |
| 4381 String get variable => _variable; |
| 4382 |
| 4383 /** |
| 4384 * The variable name for the event. |
| 4385 */ |
| 4386 void set variable(String value) { |
| 4387 assert(value != null); |
| 4388 this._variable = value; |
| 4389 } |
| 4390 |
| 4391 /** |
| 4392 * The duration of the event in milliseconds. |
| 4393 */ |
| 4394 int get millis => _millis; |
| 4395 |
| 4396 /** |
| 4397 * The duration of the event in milliseconds. |
| 4398 */ |
| 4399 void set millis(int value) { |
| 4400 assert(value != null); |
| 4401 this._millis = value; |
| 4402 } |
| 4403 |
| 4404 AnalyticsSendTimingParams(String variable, int millis) { |
| 4405 this.variable = variable; |
| 4406 this.millis = millis; |
| 4407 } |
| 4408 |
| 4409 factory AnalyticsSendTimingParams.fromJson( |
| 4410 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 4411 if (json == null) { |
| 4412 json = {}; |
| 4413 } |
| 4414 if (json is Map) { |
| 4415 String variable; |
| 4416 if (json.containsKey("variable")) { |
| 4417 variable = |
| 4418 jsonDecoder.decodeString(jsonPath + ".variable", json["variable"]); |
| 4419 } else { |
| 4420 throw jsonDecoder.mismatch(jsonPath, "variable"); |
| 4421 } |
| 4422 int millis; |
| 4423 if (json.containsKey("millis")) { |
| 4424 millis = jsonDecoder.decodeInt(jsonPath + ".millis", json["millis"]); |
| 4425 } else { |
| 4426 throw jsonDecoder.mismatch(jsonPath, "millis"); |
| 4427 } |
| 4428 return new AnalyticsSendTimingParams(variable, millis); |
| 4429 } else { |
| 4430 throw jsonDecoder.mismatch(jsonPath, "analytics.sendTiming params", json); |
| 4431 } |
| 4432 } |
| 4433 |
| 4434 factory AnalyticsSendTimingParams.fromRequest(Request request) { |
| 4435 return new AnalyticsSendTimingParams.fromJson( |
| 4436 new RequestDecoder(request), "params", request.params); |
| 4437 } |
| 4438 |
| 4439 @override |
| 4440 Map<String, dynamic> toJson() { |
| 4441 Map<String, dynamic> result = {}; |
| 4442 result["variable"] = variable; |
| 4443 result["millis"] = millis; |
| 4444 return result; |
| 4445 } |
| 4446 |
| 4447 @override |
| 4448 Request toRequest(String id) { |
| 4449 return new Request(id, "analytics.sendTiming", toJson()); |
| 4450 } |
| 4451 |
| 4452 @override |
| 4453 String toString() => JSON.encode(toJson()); |
| 4454 |
| 4455 @override |
| 4456 bool operator ==(other) { |
| 4457 if (other is AnalyticsSendTimingParams) { |
| 4458 return variable == other.variable && millis == other.millis; |
| 4459 } |
| 4460 return false; |
| 4461 } |
| 4462 |
| 4463 @override |
| 4464 int get hashCode { |
| 4465 int hash = 0; |
| 4466 hash = JenkinsSmiHash.combine(hash, variable.hashCode); |
| 4467 hash = JenkinsSmiHash.combine(hash, millis.hashCode); |
| 4468 return JenkinsSmiHash.finish(hash); |
| 4469 } |
| 4470 } |
| 4471 |
| 4472 /** |
| 4473 * analytics.sendTiming result |
| 4474 * |
| 4475 * Clients may not extend, implement or mix-in this class. |
| 4476 */ |
| 4477 class AnalyticsSendTimingResult implements ResponseResult { |
| 4478 @override |
| 4479 Map<String, dynamic> toJson() => <String, dynamic>{}; |
| 4480 |
| 4481 @override |
| 4482 Response toResponse(String id) { |
| 4483 return new Response(id, result: null); |
| 4484 } |
| 4485 |
| 4486 @override |
| 4487 bool operator ==(other) { |
| 4488 if (other is AnalyticsSendTimingResult) { |
| 4489 return true; |
| 4490 } |
| 4491 return false; |
| 4492 } |
| 4493 |
| 4494 @override |
| 4495 int get hashCode { |
| 4496 return 875010924; |
| 4497 } |
| 4498 } |
| 4499 |
| 4500 /** |
4028 * completion.getSuggestions params | 4501 * completion.getSuggestions params |
4029 * | 4502 * |
4030 * { | 4503 * { |
4031 * "file": FilePath | 4504 * "file": FilePath |
4032 * "offset": int | 4505 * "offset": int |
4033 * } | 4506 * } |
4034 * | 4507 * |
4035 * Clients may not extend, implement or mix-in this class. | 4508 * Clients may not extend, implement or mix-in this class. |
4036 */ | 4509 */ |
4037 class CompletionGetSuggestionsParams implements RequestParams { | 4510 class CompletionGetSuggestionsParams implements RequestParams { |
(...skipping 9516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13554 hash = JenkinsSmiHash.combine(hash, classElement.hashCode); | 14027 hash = JenkinsSmiHash.combine(hash, classElement.hashCode); |
13555 hash = JenkinsSmiHash.combine(hash, displayName.hashCode); | 14028 hash = JenkinsSmiHash.combine(hash, displayName.hashCode); |
13556 hash = JenkinsSmiHash.combine(hash, memberElement.hashCode); | 14029 hash = JenkinsSmiHash.combine(hash, memberElement.hashCode); |
13557 hash = JenkinsSmiHash.combine(hash, superclass.hashCode); | 14030 hash = JenkinsSmiHash.combine(hash, superclass.hashCode); |
13558 hash = JenkinsSmiHash.combine(hash, interfaces.hashCode); | 14031 hash = JenkinsSmiHash.combine(hash, interfaces.hashCode); |
13559 hash = JenkinsSmiHash.combine(hash, mixins.hashCode); | 14032 hash = JenkinsSmiHash.combine(hash, mixins.hashCode); |
13560 hash = JenkinsSmiHash.combine(hash, subclasses.hashCode); | 14033 hash = JenkinsSmiHash.combine(hash, subclasses.hashCode); |
13561 return JenkinsSmiHash.finish(hash); | 14034 return JenkinsSmiHash.finish(hash); |
13562 } | 14035 } |
13563 } | 14036 } |
OLD | NEW |