@aws-sdk/client-application-insights 3.180.0 → 3.183.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +33 -27
  3. package/dist-es/ApplicationInsights.js +110 -117
  4. package/dist-es/ApplicationInsightsClient.js +22 -28
  5. package/dist-es/commands/CreateApplicationCommand.js +21 -28
  6. package/dist-es/commands/CreateComponentCommand.js +21 -28
  7. package/dist-es/commands/CreateLogPatternCommand.js +21 -28
  8. package/dist-es/commands/DeleteApplicationCommand.js +21 -28
  9. package/dist-es/commands/DeleteComponentCommand.js +21 -28
  10. package/dist-es/commands/DeleteLogPatternCommand.js +21 -28
  11. package/dist-es/commands/DescribeApplicationCommand.js +21 -28
  12. package/dist-es/commands/DescribeComponentCommand.js +21 -28
  13. package/dist-es/commands/DescribeComponentConfigurationCommand.js +21 -28
  14. package/dist-es/commands/DescribeComponentConfigurationRecommendationCommand.js +21 -28
  15. package/dist-es/commands/DescribeLogPatternCommand.js +21 -28
  16. package/dist-es/commands/DescribeObservationCommand.js +21 -28
  17. package/dist-es/commands/DescribeProblemCommand.js +21 -28
  18. package/dist-es/commands/DescribeProblemObservationsCommand.js +21 -28
  19. package/dist-es/commands/ListApplicationsCommand.js +21 -28
  20. package/dist-es/commands/ListComponentsCommand.js +21 -28
  21. package/dist-es/commands/ListConfigurationHistoryCommand.js +21 -28
  22. package/dist-es/commands/ListLogPatternSetsCommand.js +21 -28
  23. package/dist-es/commands/ListLogPatternsCommand.js +21 -28
  24. package/dist-es/commands/ListProblemsCommand.js +21 -28
  25. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  26. package/dist-es/commands/TagResourceCommand.js +21 -28
  27. package/dist-es/commands/UntagResourceCommand.js +21 -28
  28. package/dist-es/commands/UpdateApplicationCommand.js +21 -28
  29. package/dist-es/commands/UpdateComponentCommand.js +21 -28
  30. package/dist-es/commands/UpdateComponentConfigurationCommand.js +21 -28
  31. package/dist-es/commands/UpdateLogPatternCommand.js +21 -28
  32. package/dist-es/endpoints.js +8 -8
  33. package/dist-es/models/ApplicationInsightsServiceException.js +5 -10
  34. package/dist-es/models/models_0.js +283 -160
  35. package/dist-es/pagination/ListApplicationsPaginator.js +25 -68
  36. package/dist-es/pagination/ListComponentsPaginator.js +25 -68
  37. package/dist-es/pagination/ListConfigurationHistoryPaginator.js +25 -68
  38. package/dist-es/pagination/ListLogPatternSetsPaginator.js +25 -68
  39. package/dist-es/pagination/ListLogPatternsPaginator.js +25 -68
  40. package/dist-es/pagination/ListProblemsPaginator.js +25 -68
  41. package/dist-es/protocols/Aws_json1_1.js +1705 -2197
  42. package/dist-es/runtimeConfig.browser.js +26 -12
  43. package/dist-es/runtimeConfig.js +30 -12
  44. package/dist-es/runtimeConfig.native.js +8 -5
  45. package/dist-es/runtimeConfig.shared.js +8 -11
  46. package/package.json +33 -33
@@ -1,2105 +1,1620 @@
1
- import { __assign, __awaiter, __generator, __read } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
2
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { ApplicationInsightsServiceException as __BaseException } from "../models/ApplicationInsightsServiceException";
5
4
  import { AccessDeniedException, BadRequestException, InternalServerException, ResourceInUseException, ResourceNotFoundException, TagsAlreadyExistException, TooManyTagsException, ValidationException, } from "../models/models_0";
6
- export var serializeAws_json1_1CreateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var headers, body;
8
- return __generator(this, function (_a) {
9
- headers = {
10
- "content-type": "application/x-amz-json-1.1",
11
- "x-amz-target": "EC2WindowsBarleyService.CreateApplication",
12
- };
13
- body = JSON.stringify(serializeAws_json1_1CreateApplicationRequest(input, context));
14
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
- });
16
- }); };
17
- export var serializeAws_json1_1CreateComponentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
- var headers, body;
19
- return __generator(this, function (_a) {
20
- headers = {
21
- "content-type": "application/x-amz-json-1.1",
22
- "x-amz-target": "EC2WindowsBarleyService.CreateComponent",
23
- };
24
- body = JSON.stringify(serializeAws_json1_1CreateComponentRequest(input, context));
25
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
- });
27
- }); };
28
- export var serializeAws_json1_1CreateLogPatternCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
29
- var headers, body;
30
- return __generator(this, function (_a) {
31
- headers = {
32
- "content-type": "application/x-amz-json-1.1",
33
- "x-amz-target": "EC2WindowsBarleyService.CreateLogPattern",
34
- };
35
- body = JSON.stringify(serializeAws_json1_1CreateLogPatternRequest(input, context));
36
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
- });
38
- }); };
39
- export var serializeAws_json1_1DeleteApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
- var headers, body;
41
- return __generator(this, function (_a) {
42
- headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "EC2WindowsBarleyService.DeleteApplication",
45
- };
46
- body = JSON.stringify(serializeAws_json1_1DeleteApplicationRequest(input, context));
47
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
- });
49
- }); };
50
- export var serializeAws_json1_1DeleteComponentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
51
- var headers, body;
52
- return __generator(this, function (_a) {
53
- headers = {
54
- "content-type": "application/x-amz-json-1.1",
55
- "x-amz-target": "EC2WindowsBarleyService.DeleteComponent",
56
- };
57
- body = JSON.stringify(serializeAws_json1_1DeleteComponentRequest(input, context));
58
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
- });
60
- }); };
61
- export var serializeAws_json1_1DeleteLogPatternCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
- var headers, body;
63
- return __generator(this, function (_a) {
64
- headers = {
65
- "content-type": "application/x-amz-json-1.1",
66
- "x-amz-target": "EC2WindowsBarleyService.DeleteLogPattern",
67
- };
68
- body = JSON.stringify(serializeAws_json1_1DeleteLogPatternRequest(input, context));
69
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
- });
71
- }); };
72
- export var serializeAws_json1_1DescribeApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
73
- var headers, body;
74
- return __generator(this, function (_a) {
75
- headers = {
76
- "content-type": "application/x-amz-json-1.1",
77
- "x-amz-target": "EC2WindowsBarleyService.DescribeApplication",
78
- };
79
- body = JSON.stringify(serializeAws_json1_1DescribeApplicationRequest(input, context));
80
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
- });
82
- }); };
83
- export var serializeAws_json1_1DescribeComponentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
84
- var headers, body;
85
- return __generator(this, function (_a) {
86
- headers = {
87
- "content-type": "application/x-amz-json-1.1",
88
- "x-amz-target": "EC2WindowsBarleyService.DescribeComponent",
89
- };
90
- body = JSON.stringify(serializeAws_json1_1DescribeComponentRequest(input, context));
91
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
- });
93
- }); };
94
- export var serializeAws_json1_1DescribeComponentConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
95
- var headers, body;
96
- return __generator(this, function (_a) {
97
- headers = {
98
- "content-type": "application/x-amz-json-1.1",
99
- "x-amz-target": "EC2WindowsBarleyService.DescribeComponentConfiguration",
100
- };
101
- body = JSON.stringify(serializeAws_json1_1DescribeComponentConfigurationRequest(input, context));
102
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
- });
104
- }); };
105
- export var serializeAws_json1_1DescribeComponentConfigurationRecommendationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
106
- var headers, body;
107
- return __generator(this, function (_a) {
108
- headers = {
109
- "content-type": "application/x-amz-json-1.1",
110
- "x-amz-target": "EC2WindowsBarleyService.DescribeComponentConfigurationRecommendation",
111
- };
112
- body = JSON.stringify(serializeAws_json1_1DescribeComponentConfigurationRecommendationRequest(input, context));
113
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
- });
115
- }); };
116
- export var serializeAws_json1_1DescribeLogPatternCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
117
- var headers, body;
118
- return __generator(this, function (_a) {
119
- headers = {
120
- "content-type": "application/x-amz-json-1.1",
121
- "x-amz-target": "EC2WindowsBarleyService.DescribeLogPattern",
122
- };
123
- body = JSON.stringify(serializeAws_json1_1DescribeLogPatternRequest(input, context));
124
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
- });
126
- }); };
127
- export var serializeAws_json1_1DescribeObservationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
128
- var headers, body;
129
- return __generator(this, function (_a) {
130
- headers = {
131
- "content-type": "application/x-amz-json-1.1",
132
- "x-amz-target": "EC2WindowsBarleyService.DescribeObservation",
133
- };
134
- body = JSON.stringify(serializeAws_json1_1DescribeObservationRequest(input, context));
135
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
- });
137
- }); };
138
- export var serializeAws_json1_1DescribeProblemCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
139
- var headers, body;
140
- return __generator(this, function (_a) {
141
- headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "EC2WindowsBarleyService.DescribeProblem",
144
- };
145
- body = JSON.stringify(serializeAws_json1_1DescribeProblemRequest(input, context));
146
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
- });
148
- }); };
149
- export var serializeAws_json1_1DescribeProblemObservationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
150
- var headers, body;
151
- return __generator(this, function (_a) {
152
- headers = {
153
- "content-type": "application/x-amz-json-1.1",
154
- "x-amz-target": "EC2WindowsBarleyService.DescribeProblemObservations",
155
- };
156
- body = JSON.stringify(serializeAws_json1_1DescribeProblemObservationsRequest(input, context));
157
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
- });
159
- }); };
160
- export var serializeAws_json1_1ListApplicationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
161
- var headers, body;
162
- return __generator(this, function (_a) {
163
- headers = {
164
- "content-type": "application/x-amz-json-1.1",
165
- "x-amz-target": "EC2WindowsBarleyService.ListApplications",
166
- };
167
- body = JSON.stringify(serializeAws_json1_1ListApplicationsRequest(input, context));
168
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
- });
170
- }); };
171
- export var serializeAws_json1_1ListComponentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
172
- var headers, body;
173
- return __generator(this, function (_a) {
174
- headers = {
175
- "content-type": "application/x-amz-json-1.1",
176
- "x-amz-target": "EC2WindowsBarleyService.ListComponents",
177
- };
178
- body = JSON.stringify(serializeAws_json1_1ListComponentsRequest(input, context));
179
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
180
- });
181
- }); };
182
- export var serializeAws_json1_1ListConfigurationHistoryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
183
- var headers, body;
184
- return __generator(this, function (_a) {
185
- headers = {
186
- "content-type": "application/x-amz-json-1.1",
187
- "x-amz-target": "EC2WindowsBarleyService.ListConfigurationHistory",
188
- };
189
- body = JSON.stringify(serializeAws_json1_1ListConfigurationHistoryRequest(input, context));
190
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
191
- });
192
- }); };
193
- export var serializeAws_json1_1ListLogPatternsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
194
- var headers, body;
195
- return __generator(this, function (_a) {
196
- headers = {
197
- "content-type": "application/x-amz-json-1.1",
198
- "x-amz-target": "EC2WindowsBarleyService.ListLogPatterns",
199
- };
200
- body = JSON.stringify(serializeAws_json1_1ListLogPatternsRequest(input, context));
201
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
202
- });
203
- }); };
204
- export var serializeAws_json1_1ListLogPatternSetsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
205
- var headers, body;
206
- return __generator(this, function (_a) {
207
- headers = {
208
- "content-type": "application/x-amz-json-1.1",
209
- "x-amz-target": "EC2WindowsBarleyService.ListLogPatternSets",
210
- };
211
- body = JSON.stringify(serializeAws_json1_1ListLogPatternSetsRequest(input, context));
212
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
213
- });
214
- }); };
215
- export var serializeAws_json1_1ListProblemsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
216
- var headers, body;
217
- return __generator(this, function (_a) {
218
- headers = {
219
- "content-type": "application/x-amz-json-1.1",
220
- "x-amz-target": "EC2WindowsBarleyService.ListProblems",
221
- };
222
- body = JSON.stringify(serializeAws_json1_1ListProblemsRequest(input, context));
223
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
224
- });
225
- }); };
226
- export var serializeAws_json1_1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
227
- var headers, body;
228
- return __generator(this, function (_a) {
229
- headers = {
230
- "content-type": "application/x-amz-json-1.1",
231
- "x-amz-target": "EC2WindowsBarleyService.ListTagsForResource",
232
- };
233
- body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
234
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
235
- });
236
- }); };
237
- export var serializeAws_json1_1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
238
- var headers, body;
239
- return __generator(this, function (_a) {
240
- headers = {
241
- "content-type": "application/x-amz-json-1.1",
242
- "x-amz-target": "EC2WindowsBarleyService.TagResource",
243
- };
244
- body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
245
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
246
- });
247
- }); };
248
- export var serializeAws_json1_1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
249
- var headers, body;
250
- return __generator(this, function (_a) {
251
- headers = {
252
- "content-type": "application/x-amz-json-1.1",
253
- "x-amz-target": "EC2WindowsBarleyService.UntagResource",
254
- };
255
- body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
256
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
257
- });
258
- }); };
259
- export var serializeAws_json1_1UpdateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
260
- var headers, body;
261
- return __generator(this, function (_a) {
262
- headers = {
263
- "content-type": "application/x-amz-json-1.1",
264
- "x-amz-target": "EC2WindowsBarleyService.UpdateApplication",
265
- };
266
- body = JSON.stringify(serializeAws_json1_1UpdateApplicationRequest(input, context));
267
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
268
- });
269
- }); };
270
- export var serializeAws_json1_1UpdateComponentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
271
- var headers, body;
272
- return __generator(this, function (_a) {
273
- headers = {
274
- "content-type": "application/x-amz-json-1.1",
275
- "x-amz-target": "EC2WindowsBarleyService.UpdateComponent",
276
- };
277
- body = JSON.stringify(serializeAws_json1_1UpdateComponentRequest(input, context));
278
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
279
- });
280
- }); };
281
- export var serializeAws_json1_1UpdateComponentConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
282
- var headers, body;
283
- return __generator(this, function (_a) {
284
- headers = {
285
- "content-type": "application/x-amz-json-1.1",
286
- "x-amz-target": "EC2WindowsBarleyService.UpdateComponentConfiguration",
287
- };
288
- body = JSON.stringify(serializeAws_json1_1UpdateComponentConfigurationRequest(input, context));
289
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
290
- });
291
- }); };
292
- export var serializeAws_json1_1UpdateLogPatternCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
293
- var headers, body;
294
- return __generator(this, function (_a) {
295
- headers = {
296
- "content-type": "application/x-amz-json-1.1",
297
- "x-amz-target": "EC2WindowsBarleyService.UpdateLogPattern",
298
- };
299
- body = JSON.stringify(serializeAws_json1_1UpdateLogPatternRequest(input, context));
300
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
301
- });
302
- }); };
303
- export var deserializeAws_json1_1CreateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
304
- var data, contents, response;
305
- return __generator(this, function (_a) {
306
- switch (_a.label) {
307
- case 0:
308
- if (output.statusCode >= 300) {
309
- return [2, deserializeAws_json1_1CreateApplicationCommandError(output, context)];
310
- }
311
- return [4, parseBody(output.body, context)];
312
- case 1:
313
- data = _a.sent();
314
- contents = {};
315
- contents = deserializeAws_json1_1CreateApplicationResponse(data, context);
316
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
317
- return [2, Promise.resolve(response)];
318
- }
319
- });
320
- }); };
321
- var deserializeAws_json1_1CreateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
322
- var parsedOutput, _a, errorCode, _b, parsedBody;
323
- var _c;
324
- return __generator(this, function (_d) {
325
- switch (_d.label) {
326
- case 0:
327
- _a = [__assign({}, output)];
328
- _c = {};
329
- return [4, parseBody(output.body, context)];
330
- case 1:
331
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
332
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
333
- _b = errorCode;
334
- switch (_b) {
335
- case "AccessDeniedException": return [3, 2];
336
- case "com.amazonaws.applicationinsights#AccessDeniedException": return [3, 2];
337
- case "InternalServerException": return [3, 4];
338
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 4];
339
- case "ResourceInUseException": return [3, 6];
340
- case "com.amazonaws.applicationinsights#ResourceInUseException": return [3, 6];
341
- case "ResourceNotFoundException": return [3, 8];
342
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 8];
343
- case "TagsAlreadyExistException": return [3, 10];
344
- case "com.amazonaws.applicationinsights#TagsAlreadyExistException": return [3, 10];
345
- case "ValidationException": return [3, 12];
346
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 12];
347
- }
348
- return [3, 14];
349
- case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
350
- case 3: throw _d.sent();
351
- case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
352
- case 5: throw _d.sent();
353
- case 6: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
354
- case 7: throw _d.sent();
355
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
356
- case 9: throw _d.sent();
357
- case 10: return [4, deserializeAws_json1_1TagsAlreadyExistExceptionResponse(parsedOutput, context)];
358
- case 11: throw _d.sent();
359
- case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
360
- case 13: throw _d.sent();
361
- case 14:
362
- parsedBody = parsedOutput.body;
363
- throwDefaultError({
364
- output: output,
365
- parsedBody: parsedBody,
366
- exceptionCtor: __BaseException,
367
- errorCode: errorCode,
368
- });
369
- _d.label = 15;
370
- case 15: return [2];
371
- }
372
- });
373
- }); };
374
- export var deserializeAws_json1_1CreateComponentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
375
- var data, contents, response;
376
- return __generator(this, function (_a) {
377
- switch (_a.label) {
378
- case 0:
379
- if (output.statusCode >= 300) {
380
- return [2, deserializeAws_json1_1CreateComponentCommandError(output, context)];
381
- }
382
- return [4, parseBody(output.body, context)];
383
- case 1:
384
- data = _a.sent();
385
- contents = {};
386
- contents = deserializeAws_json1_1CreateComponentResponse(data, context);
387
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
388
- return [2, Promise.resolve(response)];
389
- }
390
- });
391
- }); };
392
- var deserializeAws_json1_1CreateComponentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
393
- var parsedOutput, _a, errorCode, _b, parsedBody;
394
- var _c;
395
- return __generator(this, function (_d) {
396
- switch (_d.label) {
397
- case 0:
398
- _a = [__assign({}, output)];
399
- _c = {};
400
- return [4, parseBody(output.body, context)];
401
- case 1:
402
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
403
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
404
- _b = errorCode;
405
- switch (_b) {
406
- case "InternalServerException": return [3, 2];
407
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
408
- case "ResourceInUseException": return [3, 4];
409
- case "com.amazonaws.applicationinsights#ResourceInUseException": return [3, 4];
410
- case "ResourceNotFoundException": return [3, 6];
411
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 6];
412
- case "ValidationException": return [3, 8];
413
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 8];
414
- }
415
- return [3, 10];
416
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
417
- case 3: throw _d.sent();
418
- case 4: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
419
- case 5: throw _d.sent();
420
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
421
- case 7: throw _d.sent();
422
- case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
423
- case 9: throw _d.sent();
424
- case 10:
425
- parsedBody = parsedOutput.body;
426
- throwDefaultError({
427
- output: output,
428
- parsedBody: parsedBody,
429
- exceptionCtor: __BaseException,
430
- errorCode: errorCode,
431
- });
432
- _d.label = 11;
433
- case 11: return [2];
434
- }
435
- });
436
- }); };
437
- export var deserializeAws_json1_1CreateLogPatternCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
438
- var data, contents, response;
439
- return __generator(this, function (_a) {
440
- switch (_a.label) {
441
- case 0:
442
- if (output.statusCode >= 300) {
443
- return [2, deserializeAws_json1_1CreateLogPatternCommandError(output, context)];
444
- }
445
- return [4, parseBody(output.body, context)];
446
- case 1:
447
- data = _a.sent();
448
- contents = {};
449
- contents = deserializeAws_json1_1CreateLogPatternResponse(data, context);
450
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
451
- return [2, Promise.resolve(response)];
452
- }
453
- });
454
- }); };
455
- var deserializeAws_json1_1CreateLogPatternCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
456
- var parsedOutput, _a, errorCode, _b, parsedBody;
457
- var _c;
458
- return __generator(this, function (_d) {
459
- switch (_d.label) {
460
- case 0:
461
- _a = [__assign({}, output)];
462
- _c = {};
463
- return [4, parseBody(output.body, context)];
464
- case 1:
465
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
466
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
467
- _b = errorCode;
468
- switch (_b) {
469
- case "InternalServerException": return [3, 2];
470
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
471
- case "ResourceInUseException": return [3, 4];
472
- case "com.amazonaws.applicationinsights#ResourceInUseException": return [3, 4];
473
- case "ResourceNotFoundException": return [3, 6];
474
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 6];
475
- case "ValidationException": return [3, 8];
476
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 8];
477
- }
478
- return [3, 10];
479
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
480
- case 3: throw _d.sent();
481
- case 4: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
482
- case 5: throw _d.sent();
483
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
484
- case 7: throw _d.sent();
485
- case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
486
- case 9: throw _d.sent();
487
- case 10:
488
- parsedBody = parsedOutput.body;
489
- throwDefaultError({
490
- output: output,
491
- parsedBody: parsedBody,
492
- exceptionCtor: __BaseException,
493
- errorCode: errorCode,
494
- });
495
- _d.label = 11;
496
- case 11: return [2];
497
- }
498
- });
499
- }); };
500
- export var deserializeAws_json1_1DeleteApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
501
- var data, contents, response;
502
- return __generator(this, function (_a) {
503
- switch (_a.label) {
504
- case 0:
505
- if (output.statusCode >= 300) {
506
- return [2, deserializeAws_json1_1DeleteApplicationCommandError(output, context)];
507
- }
508
- return [4, parseBody(output.body, context)];
509
- case 1:
510
- data = _a.sent();
511
- contents = {};
512
- contents = deserializeAws_json1_1DeleteApplicationResponse(data, context);
513
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
514
- return [2, Promise.resolve(response)];
515
- }
516
- });
517
- }); };
518
- var deserializeAws_json1_1DeleteApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
519
- var parsedOutput, _a, errorCode, _b, parsedBody;
520
- var _c;
521
- return __generator(this, function (_d) {
522
- switch (_d.label) {
523
- case 0:
524
- _a = [__assign({}, output)];
525
- _c = {};
526
- return [4, parseBody(output.body, context)];
527
- case 1:
528
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
529
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
530
- _b = errorCode;
531
- switch (_b) {
532
- case "BadRequestException": return [3, 2];
533
- case "com.amazonaws.applicationinsights#BadRequestException": return [3, 2];
534
- case "InternalServerException": return [3, 4];
535
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 4];
536
- case "ResourceNotFoundException": return [3, 6];
537
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 6];
538
- case "ValidationException": return [3, 8];
539
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 8];
540
- }
541
- return [3, 10];
542
- case 2: return [4, deserializeAws_json1_1BadRequestExceptionResponse(parsedOutput, context)];
543
- case 3: throw _d.sent();
544
- case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
545
- case 5: throw _d.sent();
546
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
547
- case 7: throw _d.sent();
548
- case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
549
- case 9: throw _d.sent();
550
- case 10:
551
- parsedBody = parsedOutput.body;
552
- throwDefaultError({
553
- output: output,
554
- parsedBody: parsedBody,
555
- exceptionCtor: __BaseException,
556
- errorCode: errorCode,
557
- });
558
- _d.label = 11;
559
- case 11: return [2];
560
- }
561
- });
562
- }); };
563
- export var deserializeAws_json1_1DeleteComponentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
564
- var data, contents, response;
565
- return __generator(this, function (_a) {
566
- switch (_a.label) {
567
- case 0:
568
- if (output.statusCode >= 300) {
569
- return [2, deserializeAws_json1_1DeleteComponentCommandError(output, context)];
570
- }
571
- return [4, parseBody(output.body, context)];
572
- case 1:
573
- data = _a.sent();
574
- contents = {};
575
- contents = deserializeAws_json1_1DeleteComponentResponse(data, context);
576
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
577
- return [2, Promise.resolve(response)];
578
- }
579
- });
580
- }); };
581
- var deserializeAws_json1_1DeleteComponentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
582
- var parsedOutput, _a, errorCode, _b, parsedBody;
583
- var _c;
584
- return __generator(this, function (_d) {
585
- switch (_d.label) {
586
- case 0:
587
- _a = [__assign({}, output)];
588
- _c = {};
589
- return [4, parseBody(output.body, context)];
590
- case 1:
591
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
592
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
593
- _b = errorCode;
594
- switch (_b) {
595
- case "InternalServerException": return [3, 2];
596
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
597
- case "ResourceNotFoundException": return [3, 4];
598
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
599
- case "ValidationException": return [3, 6];
600
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
601
- }
602
- return [3, 8];
603
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
604
- case 3: throw _d.sent();
605
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
606
- case 5: throw _d.sent();
607
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
608
- case 7: throw _d.sent();
609
- case 8:
610
- parsedBody = parsedOutput.body;
611
- throwDefaultError({
612
- output: output,
613
- parsedBody: parsedBody,
614
- exceptionCtor: __BaseException,
615
- errorCode: errorCode,
616
- });
617
- _d.label = 9;
618
- case 9: return [2];
619
- }
620
- });
621
- }); };
622
- export var deserializeAws_json1_1DeleteLogPatternCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
623
- var data, contents, response;
624
- return __generator(this, function (_a) {
625
- switch (_a.label) {
626
- case 0:
627
- if (output.statusCode >= 300) {
628
- return [2, deserializeAws_json1_1DeleteLogPatternCommandError(output, context)];
629
- }
630
- return [4, parseBody(output.body, context)];
631
- case 1:
632
- data = _a.sent();
633
- contents = {};
634
- contents = deserializeAws_json1_1DeleteLogPatternResponse(data, context);
635
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
636
- return [2, Promise.resolve(response)];
637
- }
638
- });
639
- }); };
640
- var deserializeAws_json1_1DeleteLogPatternCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
641
- var parsedOutput, _a, errorCode, _b, parsedBody;
642
- var _c;
643
- return __generator(this, function (_d) {
644
- switch (_d.label) {
645
- case 0:
646
- _a = [__assign({}, output)];
647
- _c = {};
648
- return [4, parseBody(output.body, context)];
649
- case 1:
650
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
651
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
652
- _b = errorCode;
653
- switch (_b) {
654
- case "BadRequestException": return [3, 2];
655
- case "com.amazonaws.applicationinsights#BadRequestException": return [3, 2];
656
- case "InternalServerException": return [3, 4];
657
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 4];
658
- case "ResourceNotFoundException": return [3, 6];
659
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 6];
660
- case "ValidationException": return [3, 8];
661
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 8];
662
- }
663
- return [3, 10];
664
- case 2: return [4, deserializeAws_json1_1BadRequestExceptionResponse(parsedOutput, context)];
665
- case 3: throw _d.sent();
666
- case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
667
- case 5: throw _d.sent();
668
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
669
- case 7: throw _d.sent();
670
- case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
671
- case 9: throw _d.sent();
672
- case 10:
673
- parsedBody = parsedOutput.body;
674
- throwDefaultError({
675
- output: output,
676
- parsedBody: parsedBody,
677
- exceptionCtor: __BaseException,
678
- errorCode: errorCode,
679
- });
680
- _d.label = 11;
681
- case 11: return [2];
682
- }
683
- });
684
- }); };
685
- export var deserializeAws_json1_1DescribeApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
686
- var data, contents, response;
687
- return __generator(this, function (_a) {
688
- switch (_a.label) {
689
- case 0:
690
- if (output.statusCode >= 300) {
691
- return [2, deserializeAws_json1_1DescribeApplicationCommandError(output, context)];
692
- }
693
- return [4, parseBody(output.body, context)];
694
- case 1:
695
- data = _a.sent();
696
- contents = {};
697
- contents = deserializeAws_json1_1DescribeApplicationResponse(data, context);
698
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
699
- return [2, Promise.resolve(response)];
700
- }
701
- });
702
- }); };
703
- var deserializeAws_json1_1DescribeApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
704
- var parsedOutput, _a, errorCode, _b, parsedBody;
705
- var _c;
706
- return __generator(this, function (_d) {
707
- switch (_d.label) {
708
- case 0:
709
- _a = [__assign({}, output)];
710
- _c = {};
711
- return [4, parseBody(output.body, context)];
712
- case 1:
713
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
714
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
715
- _b = errorCode;
716
- switch (_b) {
717
- case "InternalServerException": return [3, 2];
718
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
719
- case "ResourceNotFoundException": return [3, 4];
720
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
721
- case "ValidationException": return [3, 6];
722
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
723
- }
724
- return [3, 8];
725
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
726
- case 3: throw _d.sent();
727
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
728
- case 5: throw _d.sent();
729
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
730
- case 7: throw _d.sent();
731
- case 8:
732
- parsedBody = parsedOutput.body;
733
- throwDefaultError({
734
- output: output,
735
- parsedBody: parsedBody,
736
- exceptionCtor: __BaseException,
737
- errorCode: errorCode,
738
- });
739
- _d.label = 9;
740
- case 9: return [2];
741
- }
742
- });
743
- }); };
744
- export var deserializeAws_json1_1DescribeComponentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
745
- var data, contents, response;
746
- return __generator(this, function (_a) {
747
- switch (_a.label) {
748
- case 0:
749
- if (output.statusCode >= 300) {
750
- return [2, deserializeAws_json1_1DescribeComponentCommandError(output, context)];
751
- }
752
- return [4, parseBody(output.body, context)];
753
- case 1:
754
- data = _a.sent();
755
- contents = {};
756
- contents = deserializeAws_json1_1DescribeComponentResponse(data, context);
757
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
758
- return [2, Promise.resolve(response)];
759
- }
760
- });
761
- }); };
762
- var deserializeAws_json1_1DescribeComponentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
763
- var parsedOutput, _a, errorCode, _b, parsedBody;
764
- var _c;
765
- return __generator(this, function (_d) {
766
- switch (_d.label) {
767
- case 0:
768
- _a = [__assign({}, output)];
769
- _c = {};
770
- return [4, parseBody(output.body, context)];
771
- case 1:
772
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
773
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
774
- _b = errorCode;
775
- switch (_b) {
776
- case "InternalServerException": return [3, 2];
777
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
778
- case "ResourceNotFoundException": return [3, 4];
779
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
780
- case "ValidationException": return [3, 6];
781
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
782
- }
783
- return [3, 8];
784
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
785
- case 3: throw _d.sent();
786
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
787
- case 5: throw _d.sent();
788
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
789
- case 7: throw _d.sent();
790
- case 8:
791
- parsedBody = parsedOutput.body;
792
- throwDefaultError({
793
- output: output,
794
- parsedBody: parsedBody,
795
- exceptionCtor: __BaseException,
796
- errorCode: errorCode,
797
- });
798
- _d.label = 9;
799
- case 9: return [2];
800
- }
801
- });
802
- }); };
803
- export var deserializeAws_json1_1DescribeComponentConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
804
- var data, contents, response;
805
- return __generator(this, function (_a) {
806
- switch (_a.label) {
807
- case 0:
808
- if (output.statusCode >= 300) {
809
- return [2, deserializeAws_json1_1DescribeComponentConfigurationCommandError(output, context)];
810
- }
811
- return [4, parseBody(output.body, context)];
812
- case 1:
813
- data = _a.sent();
814
- contents = {};
815
- contents = deserializeAws_json1_1DescribeComponentConfigurationResponse(data, context);
816
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
817
- return [2, Promise.resolve(response)];
818
- }
819
- });
820
- }); };
821
- var deserializeAws_json1_1DescribeComponentConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
822
- var parsedOutput, _a, errorCode, _b, parsedBody;
823
- var _c;
824
- return __generator(this, function (_d) {
825
- switch (_d.label) {
826
- case 0:
827
- _a = [__assign({}, output)];
828
- _c = {};
829
- return [4, parseBody(output.body, context)];
830
- case 1:
831
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
832
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
833
- _b = errorCode;
834
- switch (_b) {
835
- case "InternalServerException": return [3, 2];
836
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
837
- case "ResourceNotFoundException": return [3, 4];
838
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
839
- case "ValidationException": return [3, 6];
840
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
841
- }
842
- return [3, 8];
843
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
844
- case 3: throw _d.sent();
845
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
846
- case 5: throw _d.sent();
847
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
848
- case 7: throw _d.sent();
849
- case 8:
850
- parsedBody = parsedOutput.body;
851
- throwDefaultError({
852
- output: output,
853
- parsedBody: parsedBody,
854
- exceptionCtor: __BaseException,
855
- errorCode: errorCode,
856
- });
857
- _d.label = 9;
858
- case 9: return [2];
859
- }
860
- });
861
- }); };
862
- export var deserializeAws_json1_1DescribeComponentConfigurationRecommendationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
863
- var data, contents, response;
864
- return __generator(this, function (_a) {
865
- switch (_a.label) {
866
- case 0:
867
- if (output.statusCode >= 300) {
868
- return [2, deserializeAws_json1_1DescribeComponentConfigurationRecommendationCommandError(output, context)];
869
- }
870
- return [4, parseBody(output.body, context)];
871
- case 1:
872
- data = _a.sent();
873
- contents = {};
874
- contents = deserializeAws_json1_1DescribeComponentConfigurationRecommendationResponse(data, context);
875
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
876
- return [2, Promise.resolve(response)];
877
- }
878
- });
879
- }); };
880
- var deserializeAws_json1_1DescribeComponentConfigurationRecommendationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
881
- var parsedOutput, _a, errorCode, _b, parsedBody;
882
- var _c;
883
- return __generator(this, function (_d) {
884
- switch (_d.label) {
885
- case 0:
886
- _a = [__assign({}, output)];
887
- _c = {};
888
- return [4, parseBody(output.body, context)];
889
- case 1:
890
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
891
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
892
- _b = errorCode;
893
- switch (_b) {
894
- case "InternalServerException": return [3, 2];
895
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
896
- case "ResourceNotFoundException": return [3, 4];
897
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
898
- case "ValidationException": return [3, 6];
899
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
900
- }
901
- return [3, 8];
902
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
903
- case 3: throw _d.sent();
904
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
905
- case 5: throw _d.sent();
906
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
907
- case 7: throw _d.sent();
908
- case 8:
909
- parsedBody = parsedOutput.body;
910
- throwDefaultError({
911
- output: output,
912
- parsedBody: parsedBody,
913
- exceptionCtor: __BaseException,
914
- errorCode: errorCode,
915
- });
916
- _d.label = 9;
917
- case 9: return [2];
918
- }
919
- });
920
- }); };
921
- export var deserializeAws_json1_1DescribeLogPatternCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
922
- var data, contents, response;
923
- return __generator(this, function (_a) {
924
- switch (_a.label) {
925
- case 0:
926
- if (output.statusCode >= 300) {
927
- return [2, deserializeAws_json1_1DescribeLogPatternCommandError(output, context)];
928
- }
929
- return [4, parseBody(output.body, context)];
930
- case 1:
931
- data = _a.sent();
932
- contents = {};
933
- contents = deserializeAws_json1_1DescribeLogPatternResponse(data, context);
934
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
935
- return [2, Promise.resolve(response)];
936
- }
937
- });
938
- }); };
939
- var deserializeAws_json1_1DescribeLogPatternCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
940
- var parsedOutput, _a, errorCode, _b, parsedBody;
941
- var _c;
942
- return __generator(this, function (_d) {
943
- switch (_d.label) {
944
- case 0:
945
- _a = [__assign({}, output)];
946
- _c = {};
947
- return [4, parseBody(output.body, context)];
948
- case 1:
949
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
950
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
951
- _b = errorCode;
952
- switch (_b) {
953
- case "InternalServerException": return [3, 2];
954
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
955
- case "ResourceNotFoundException": return [3, 4];
956
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
957
- case "ValidationException": return [3, 6];
958
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
959
- }
960
- return [3, 8];
961
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
962
- case 3: throw _d.sent();
963
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
964
- case 5: throw _d.sent();
965
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
966
- case 7: throw _d.sent();
967
- case 8:
968
- parsedBody = parsedOutput.body;
969
- throwDefaultError({
970
- output: output,
971
- parsedBody: parsedBody,
972
- exceptionCtor: __BaseException,
973
- errorCode: errorCode,
974
- });
975
- _d.label = 9;
976
- case 9: return [2];
977
- }
978
- });
979
- }); };
980
- export var deserializeAws_json1_1DescribeObservationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
981
- var data, contents, response;
982
- return __generator(this, function (_a) {
983
- switch (_a.label) {
984
- case 0:
985
- if (output.statusCode >= 300) {
986
- return [2, deserializeAws_json1_1DescribeObservationCommandError(output, context)];
987
- }
988
- return [4, parseBody(output.body, context)];
989
- case 1:
990
- data = _a.sent();
991
- contents = {};
992
- contents = deserializeAws_json1_1DescribeObservationResponse(data, context);
993
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
994
- return [2, Promise.resolve(response)];
995
- }
996
- });
997
- }); };
998
- var deserializeAws_json1_1DescribeObservationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
999
- var parsedOutput, _a, errorCode, _b, parsedBody;
1000
- var _c;
1001
- return __generator(this, function (_d) {
1002
- switch (_d.label) {
1003
- case 0:
1004
- _a = [__assign({}, output)];
1005
- _c = {};
1006
- return [4, parseBody(output.body, context)];
1007
- case 1:
1008
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1009
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1010
- _b = errorCode;
1011
- switch (_b) {
1012
- case "InternalServerException": return [3, 2];
1013
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1014
- case "ResourceNotFoundException": return [3, 4];
1015
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1016
- case "ValidationException": return [3, 6];
1017
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1018
- }
1019
- return [3, 8];
1020
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1021
- case 3: throw _d.sent();
1022
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1023
- case 5: throw _d.sent();
1024
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1025
- case 7: throw _d.sent();
1026
- case 8:
1027
- parsedBody = parsedOutput.body;
1028
- throwDefaultError({
1029
- output: output,
1030
- parsedBody: parsedBody,
1031
- exceptionCtor: __BaseException,
1032
- errorCode: errorCode,
1033
- });
1034
- _d.label = 9;
1035
- case 9: return [2];
1036
- }
1037
- });
1038
- }); };
1039
- export var deserializeAws_json1_1DescribeProblemCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1040
- var data, contents, response;
1041
- return __generator(this, function (_a) {
1042
- switch (_a.label) {
1043
- case 0:
1044
- if (output.statusCode >= 300) {
1045
- return [2, deserializeAws_json1_1DescribeProblemCommandError(output, context)];
1046
- }
1047
- return [4, parseBody(output.body, context)];
1048
- case 1:
1049
- data = _a.sent();
1050
- contents = {};
1051
- contents = deserializeAws_json1_1DescribeProblemResponse(data, context);
1052
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1053
- return [2, Promise.resolve(response)];
1054
- }
1055
- });
1056
- }); };
1057
- var deserializeAws_json1_1DescribeProblemCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1058
- var parsedOutput, _a, errorCode, _b, parsedBody;
1059
- var _c;
1060
- return __generator(this, function (_d) {
1061
- switch (_d.label) {
1062
- case 0:
1063
- _a = [__assign({}, output)];
1064
- _c = {};
1065
- return [4, parseBody(output.body, context)];
1066
- case 1:
1067
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1068
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1069
- _b = errorCode;
1070
- switch (_b) {
1071
- case "InternalServerException": return [3, 2];
1072
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1073
- case "ResourceNotFoundException": return [3, 4];
1074
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1075
- case "ValidationException": return [3, 6];
1076
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1077
- }
1078
- return [3, 8];
1079
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1080
- case 3: throw _d.sent();
1081
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1082
- case 5: throw _d.sent();
1083
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1084
- case 7: throw _d.sent();
1085
- case 8:
1086
- parsedBody = parsedOutput.body;
1087
- throwDefaultError({
1088
- output: output,
1089
- parsedBody: parsedBody,
1090
- exceptionCtor: __BaseException,
1091
- errorCode: errorCode,
1092
- });
1093
- _d.label = 9;
1094
- case 9: return [2];
1095
- }
1096
- });
1097
- }); };
1098
- export var deserializeAws_json1_1DescribeProblemObservationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1099
- var data, contents, response;
1100
- return __generator(this, function (_a) {
1101
- switch (_a.label) {
1102
- case 0:
1103
- if (output.statusCode >= 300) {
1104
- return [2, deserializeAws_json1_1DescribeProblemObservationsCommandError(output, context)];
1105
- }
1106
- return [4, parseBody(output.body, context)];
1107
- case 1:
1108
- data = _a.sent();
1109
- contents = {};
1110
- contents = deserializeAws_json1_1DescribeProblemObservationsResponse(data, context);
1111
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1112
- return [2, Promise.resolve(response)];
1113
- }
1114
- });
1115
- }); };
1116
- var deserializeAws_json1_1DescribeProblemObservationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1117
- var parsedOutput, _a, errorCode, _b, parsedBody;
1118
- var _c;
1119
- return __generator(this, function (_d) {
1120
- switch (_d.label) {
1121
- case 0:
1122
- _a = [__assign({}, output)];
1123
- _c = {};
1124
- return [4, parseBody(output.body, context)];
1125
- case 1:
1126
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1127
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1128
- _b = errorCode;
1129
- switch (_b) {
1130
- case "InternalServerException": return [3, 2];
1131
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1132
- case "ResourceNotFoundException": return [3, 4];
1133
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1134
- case "ValidationException": return [3, 6];
1135
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1136
- }
1137
- return [3, 8];
1138
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1139
- case 3: throw _d.sent();
1140
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1141
- case 5: throw _d.sent();
1142
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1143
- case 7: throw _d.sent();
1144
- case 8:
1145
- parsedBody = parsedOutput.body;
1146
- throwDefaultError({
1147
- output: output,
1148
- parsedBody: parsedBody,
1149
- exceptionCtor: __BaseException,
1150
- errorCode: errorCode,
1151
- });
1152
- _d.label = 9;
1153
- case 9: return [2];
1154
- }
1155
- });
1156
- }); };
1157
- export var deserializeAws_json1_1ListApplicationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1158
- var data, contents, response;
1159
- return __generator(this, function (_a) {
1160
- switch (_a.label) {
1161
- case 0:
1162
- if (output.statusCode >= 300) {
1163
- return [2, deserializeAws_json1_1ListApplicationsCommandError(output, context)];
1164
- }
1165
- return [4, parseBody(output.body, context)];
1166
- case 1:
1167
- data = _a.sent();
1168
- contents = {};
1169
- contents = deserializeAws_json1_1ListApplicationsResponse(data, context);
1170
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1171
- return [2, Promise.resolve(response)];
1172
- }
1173
- });
1174
- }); };
1175
- var deserializeAws_json1_1ListApplicationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1176
- var parsedOutput, _a, errorCode, _b, parsedBody;
1177
- var _c;
1178
- return __generator(this, function (_d) {
1179
- switch (_d.label) {
1180
- case 0:
1181
- _a = [__assign({}, output)];
1182
- _c = {};
1183
- return [4, parseBody(output.body, context)];
1184
- case 1:
1185
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1186
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1187
- _b = errorCode;
1188
- switch (_b) {
1189
- case "InternalServerException": return [3, 2];
1190
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1191
- case "ValidationException": return [3, 4];
1192
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 4];
1193
- }
1194
- return [3, 6];
1195
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1196
- case 3: throw _d.sent();
1197
- case 4: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1198
- case 5: throw _d.sent();
1199
- case 6:
1200
- parsedBody = parsedOutput.body;
1201
- throwDefaultError({
1202
- output: output,
1203
- parsedBody: parsedBody,
1204
- exceptionCtor: __BaseException,
1205
- errorCode: errorCode,
1206
- });
1207
- _d.label = 7;
1208
- case 7: return [2];
1209
- }
1210
- });
1211
- }); };
1212
- export var deserializeAws_json1_1ListComponentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1213
- var data, contents, response;
1214
- return __generator(this, function (_a) {
1215
- switch (_a.label) {
1216
- case 0:
1217
- if (output.statusCode >= 300) {
1218
- return [2, deserializeAws_json1_1ListComponentsCommandError(output, context)];
1219
- }
1220
- return [4, parseBody(output.body, context)];
1221
- case 1:
1222
- data = _a.sent();
1223
- contents = {};
1224
- contents = deserializeAws_json1_1ListComponentsResponse(data, context);
1225
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1226
- return [2, Promise.resolve(response)];
1227
- }
1228
- });
1229
- }); };
1230
- var deserializeAws_json1_1ListComponentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1231
- var parsedOutput, _a, errorCode, _b, parsedBody;
1232
- var _c;
1233
- return __generator(this, function (_d) {
1234
- switch (_d.label) {
1235
- case 0:
1236
- _a = [__assign({}, output)];
1237
- _c = {};
1238
- return [4, parseBody(output.body, context)];
1239
- case 1:
1240
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1241
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1242
- _b = errorCode;
1243
- switch (_b) {
1244
- case "InternalServerException": return [3, 2];
1245
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1246
- case "ResourceNotFoundException": return [3, 4];
1247
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1248
- case "ValidationException": return [3, 6];
1249
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1250
- }
1251
- return [3, 8];
1252
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1253
- case 3: throw _d.sent();
1254
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1255
- case 5: throw _d.sent();
1256
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1257
- case 7: throw _d.sent();
1258
- case 8:
1259
- parsedBody = parsedOutput.body;
1260
- throwDefaultError({
1261
- output: output,
1262
- parsedBody: parsedBody,
1263
- exceptionCtor: __BaseException,
1264
- errorCode: errorCode,
1265
- });
1266
- _d.label = 9;
1267
- case 9: return [2];
1268
- }
1269
- });
1270
- }); };
1271
- export var deserializeAws_json1_1ListConfigurationHistoryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1272
- var data, contents, response;
1273
- return __generator(this, function (_a) {
1274
- switch (_a.label) {
1275
- case 0:
1276
- if (output.statusCode >= 300) {
1277
- return [2, deserializeAws_json1_1ListConfigurationHistoryCommandError(output, context)];
1278
- }
1279
- return [4, parseBody(output.body, context)];
1280
- case 1:
1281
- data = _a.sent();
1282
- contents = {};
1283
- contents = deserializeAws_json1_1ListConfigurationHistoryResponse(data, context);
1284
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1285
- return [2, Promise.resolve(response)];
1286
- }
1287
- });
1288
- }); };
1289
- var deserializeAws_json1_1ListConfigurationHistoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1290
- var parsedOutput, _a, errorCode, _b, parsedBody;
1291
- var _c;
1292
- return __generator(this, function (_d) {
1293
- switch (_d.label) {
1294
- case 0:
1295
- _a = [__assign({}, output)];
1296
- _c = {};
1297
- return [4, parseBody(output.body, context)];
1298
- case 1:
1299
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1300
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1301
- _b = errorCode;
1302
- switch (_b) {
1303
- case "InternalServerException": return [3, 2];
1304
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1305
- case "ResourceNotFoundException": return [3, 4];
1306
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1307
- case "ValidationException": return [3, 6];
1308
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1309
- }
1310
- return [3, 8];
1311
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1312
- case 3: throw _d.sent();
1313
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1314
- case 5: throw _d.sent();
1315
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1316
- case 7: throw _d.sent();
1317
- case 8:
1318
- parsedBody = parsedOutput.body;
1319
- throwDefaultError({
1320
- output: output,
1321
- parsedBody: parsedBody,
1322
- exceptionCtor: __BaseException,
1323
- errorCode: errorCode,
1324
- });
1325
- _d.label = 9;
1326
- case 9: return [2];
1327
- }
1328
- });
1329
- }); };
1330
- export var deserializeAws_json1_1ListLogPatternsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1331
- var data, contents, response;
1332
- return __generator(this, function (_a) {
1333
- switch (_a.label) {
1334
- case 0:
1335
- if (output.statusCode >= 300) {
1336
- return [2, deserializeAws_json1_1ListLogPatternsCommandError(output, context)];
1337
- }
1338
- return [4, parseBody(output.body, context)];
1339
- case 1:
1340
- data = _a.sent();
1341
- contents = {};
1342
- contents = deserializeAws_json1_1ListLogPatternsResponse(data, context);
1343
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1344
- return [2, Promise.resolve(response)];
1345
- }
1346
- });
1347
- }); };
1348
- var deserializeAws_json1_1ListLogPatternsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1349
- var parsedOutput, _a, errorCode, _b, parsedBody;
1350
- var _c;
1351
- return __generator(this, function (_d) {
1352
- switch (_d.label) {
1353
- case 0:
1354
- _a = [__assign({}, output)];
1355
- _c = {};
1356
- return [4, parseBody(output.body, context)];
1357
- case 1:
1358
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1359
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1360
- _b = errorCode;
1361
- switch (_b) {
1362
- case "InternalServerException": return [3, 2];
1363
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1364
- case "ResourceNotFoundException": return [3, 4];
1365
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1366
- case "ValidationException": return [3, 6];
1367
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1368
- }
1369
- return [3, 8];
1370
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1371
- case 3: throw _d.sent();
1372
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1373
- case 5: throw _d.sent();
1374
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1375
- case 7: throw _d.sent();
1376
- case 8:
1377
- parsedBody = parsedOutput.body;
1378
- throwDefaultError({
1379
- output: output,
1380
- parsedBody: parsedBody,
1381
- exceptionCtor: __BaseException,
1382
- errorCode: errorCode,
1383
- });
1384
- _d.label = 9;
1385
- case 9: return [2];
1386
- }
1387
- });
1388
- }); };
1389
- export var deserializeAws_json1_1ListLogPatternSetsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1390
- var data, contents, response;
1391
- return __generator(this, function (_a) {
1392
- switch (_a.label) {
1393
- case 0:
1394
- if (output.statusCode >= 300) {
1395
- return [2, deserializeAws_json1_1ListLogPatternSetsCommandError(output, context)];
1396
- }
1397
- return [4, parseBody(output.body, context)];
1398
- case 1:
1399
- data = _a.sent();
1400
- contents = {};
1401
- contents = deserializeAws_json1_1ListLogPatternSetsResponse(data, context);
1402
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1403
- return [2, Promise.resolve(response)];
1404
- }
1405
- });
1406
- }); };
1407
- var deserializeAws_json1_1ListLogPatternSetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1408
- var parsedOutput, _a, errorCode, _b, parsedBody;
1409
- var _c;
1410
- return __generator(this, function (_d) {
1411
- switch (_d.label) {
1412
- case 0:
1413
- _a = [__assign({}, output)];
1414
- _c = {};
1415
- return [4, parseBody(output.body, context)];
1416
- case 1:
1417
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1418
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1419
- _b = errorCode;
1420
- switch (_b) {
1421
- case "InternalServerException": return [3, 2];
1422
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1423
- case "ResourceNotFoundException": return [3, 4];
1424
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1425
- case "ValidationException": return [3, 6];
1426
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1427
- }
1428
- return [3, 8];
1429
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1430
- case 3: throw _d.sent();
1431
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1432
- case 5: throw _d.sent();
1433
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1434
- case 7: throw _d.sent();
1435
- case 8:
1436
- parsedBody = parsedOutput.body;
1437
- throwDefaultError({
1438
- output: output,
1439
- parsedBody: parsedBody,
1440
- exceptionCtor: __BaseException,
1441
- errorCode: errorCode,
1442
- });
1443
- _d.label = 9;
1444
- case 9: return [2];
1445
- }
1446
- });
1447
- }); };
1448
- export var deserializeAws_json1_1ListProblemsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1449
- var data, contents, response;
1450
- return __generator(this, function (_a) {
1451
- switch (_a.label) {
1452
- case 0:
1453
- if (output.statusCode >= 300) {
1454
- return [2, deserializeAws_json1_1ListProblemsCommandError(output, context)];
1455
- }
1456
- return [4, parseBody(output.body, context)];
1457
- case 1:
1458
- data = _a.sent();
1459
- contents = {};
1460
- contents = deserializeAws_json1_1ListProblemsResponse(data, context);
1461
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1462
- return [2, Promise.resolve(response)];
1463
- }
1464
- });
1465
- }); };
1466
- var deserializeAws_json1_1ListProblemsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1467
- var parsedOutput, _a, errorCode, _b, parsedBody;
1468
- var _c;
1469
- return __generator(this, function (_d) {
1470
- switch (_d.label) {
1471
- case 0:
1472
- _a = [__assign({}, output)];
1473
- _c = {};
1474
- return [4, parseBody(output.body, context)];
1475
- case 1:
1476
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1477
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1478
- _b = errorCode;
1479
- switch (_b) {
1480
- case "InternalServerException": return [3, 2];
1481
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1482
- case "ResourceNotFoundException": return [3, 4];
1483
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1484
- case "ValidationException": return [3, 6];
1485
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1486
- }
1487
- return [3, 8];
1488
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1489
- case 3: throw _d.sent();
1490
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1491
- case 5: throw _d.sent();
1492
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1493
- case 7: throw _d.sent();
1494
- case 8:
1495
- parsedBody = parsedOutput.body;
1496
- throwDefaultError({
1497
- output: output,
1498
- parsedBody: parsedBody,
1499
- exceptionCtor: __BaseException,
1500
- errorCode: errorCode,
1501
- });
1502
- _d.label = 9;
1503
- case 9: return [2];
1504
- }
1505
- });
1506
- }); };
1507
- export var deserializeAws_json1_1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1508
- var data, contents, response;
1509
- return __generator(this, function (_a) {
1510
- switch (_a.label) {
1511
- case 0:
1512
- if (output.statusCode >= 300) {
1513
- return [2, deserializeAws_json1_1ListTagsForResourceCommandError(output, context)];
1514
- }
1515
- return [4, parseBody(output.body, context)];
1516
- case 1:
1517
- data = _a.sent();
1518
- contents = {};
1519
- contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
1520
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1521
- return [2, Promise.resolve(response)];
1522
- }
1523
- });
1524
- }); };
1525
- var deserializeAws_json1_1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1526
- var parsedOutput, _a, errorCode, _b, parsedBody;
1527
- var _c;
1528
- return __generator(this, function (_d) {
1529
- switch (_d.label) {
1530
- case 0:
1531
- _a = [__assign({}, output)];
1532
- _c = {};
1533
- return [4, parseBody(output.body, context)];
1534
- case 1:
1535
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1536
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1537
- _b = errorCode;
1538
- switch (_b) {
1539
- case "ResourceNotFoundException": return [3, 2];
1540
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 2];
1541
- case "ValidationException": return [3, 4];
1542
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 4];
1543
- }
1544
- return [3, 6];
1545
- case 2: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1546
- case 3: throw _d.sent();
1547
- case 4: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1548
- case 5: throw _d.sent();
1549
- case 6:
1550
- parsedBody = parsedOutput.body;
1551
- throwDefaultError({
1552
- output: output,
1553
- parsedBody: parsedBody,
1554
- exceptionCtor: __BaseException,
1555
- errorCode: errorCode,
1556
- });
1557
- _d.label = 7;
1558
- case 7: return [2];
1559
- }
1560
- });
1561
- }); };
1562
- export var deserializeAws_json1_1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1563
- var data, contents, response;
1564
- return __generator(this, function (_a) {
1565
- switch (_a.label) {
1566
- case 0:
1567
- if (output.statusCode >= 300) {
1568
- return [2, deserializeAws_json1_1TagResourceCommandError(output, context)];
1569
- }
1570
- return [4, parseBody(output.body, context)];
1571
- case 1:
1572
- data = _a.sent();
1573
- contents = {};
1574
- contents = deserializeAws_json1_1TagResourceResponse(data, context);
1575
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1576
- return [2, Promise.resolve(response)];
1577
- }
1578
- });
1579
- }); };
1580
- var deserializeAws_json1_1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1581
- var parsedOutput, _a, errorCode, _b, parsedBody;
1582
- var _c;
1583
- return __generator(this, function (_d) {
1584
- switch (_d.label) {
1585
- case 0:
1586
- _a = [__assign({}, output)];
1587
- _c = {};
1588
- return [4, parseBody(output.body, context)];
1589
- case 1:
1590
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1591
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1592
- _b = errorCode;
1593
- switch (_b) {
1594
- case "ResourceNotFoundException": return [3, 2];
1595
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 2];
1596
- case "TooManyTagsException": return [3, 4];
1597
- case "com.amazonaws.applicationinsights#TooManyTagsException": return [3, 4];
1598
- case "ValidationException": return [3, 6];
1599
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1600
- }
1601
- return [3, 8];
1602
- case 2: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1603
- case 3: throw _d.sent();
1604
- case 4: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
1605
- case 5: throw _d.sent();
1606
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1607
- case 7: throw _d.sent();
1608
- case 8:
1609
- parsedBody = parsedOutput.body;
1610
- throwDefaultError({
1611
- output: output,
1612
- parsedBody: parsedBody,
1613
- exceptionCtor: __BaseException,
1614
- errorCode: errorCode,
1615
- });
1616
- _d.label = 9;
1617
- case 9: return [2];
1618
- }
1619
- });
1620
- }); };
1621
- export var deserializeAws_json1_1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1622
- var data, contents, response;
1623
- return __generator(this, function (_a) {
1624
- switch (_a.label) {
1625
- case 0:
1626
- if (output.statusCode >= 300) {
1627
- return [2, deserializeAws_json1_1UntagResourceCommandError(output, context)];
1628
- }
1629
- return [4, parseBody(output.body, context)];
1630
- case 1:
1631
- data = _a.sent();
1632
- contents = {};
1633
- contents = deserializeAws_json1_1UntagResourceResponse(data, context);
1634
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1635
- return [2, Promise.resolve(response)];
1636
- }
1637
- });
1638
- }); };
1639
- var deserializeAws_json1_1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1640
- var parsedOutput, _a, errorCode, _b, parsedBody;
1641
- var _c;
1642
- return __generator(this, function (_d) {
1643
- switch (_d.label) {
1644
- case 0:
1645
- _a = [__assign({}, output)];
1646
- _c = {};
1647
- return [4, parseBody(output.body, context)];
1648
- case 1:
1649
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1650
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1651
- _b = errorCode;
1652
- switch (_b) {
1653
- case "ResourceNotFoundException": return [3, 2];
1654
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 2];
1655
- case "ValidationException": return [3, 4];
1656
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 4];
1657
- }
1658
- return [3, 6];
1659
- case 2: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1660
- case 3: throw _d.sent();
1661
- case 4: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1662
- case 5: throw _d.sent();
1663
- case 6:
1664
- parsedBody = parsedOutput.body;
1665
- throwDefaultError({
1666
- output: output,
1667
- parsedBody: parsedBody,
1668
- exceptionCtor: __BaseException,
1669
- errorCode: errorCode,
1670
- });
1671
- _d.label = 7;
1672
- case 7: return [2];
1673
- }
1674
- });
1675
- }); };
1676
- export var deserializeAws_json1_1UpdateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1677
- var data, contents, response;
1678
- return __generator(this, function (_a) {
1679
- switch (_a.label) {
1680
- case 0:
1681
- if (output.statusCode >= 300) {
1682
- return [2, deserializeAws_json1_1UpdateApplicationCommandError(output, context)];
1683
- }
1684
- return [4, parseBody(output.body, context)];
1685
- case 1:
1686
- data = _a.sent();
1687
- contents = {};
1688
- contents = deserializeAws_json1_1UpdateApplicationResponse(data, context);
1689
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1690
- return [2, Promise.resolve(response)];
1691
- }
1692
- });
1693
- }); };
1694
- var deserializeAws_json1_1UpdateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1695
- var parsedOutput, _a, errorCode, _b, parsedBody;
1696
- var _c;
1697
- return __generator(this, function (_d) {
1698
- switch (_d.label) {
1699
- case 0:
1700
- _a = [__assign({}, output)];
1701
- _c = {};
1702
- return [4, parseBody(output.body, context)];
1703
- case 1:
1704
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1705
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1706
- _b = errorCode;
1707
- switch (_b) {
1708
- case "InternalServerException": return [3, 2];
1709
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1710
- case "ResourceNotFoundException": return [3, 4];
1711
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1712
- case "ValidationException": return [3, 6];
1713
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1714
- }
1715
- return [3, 8];
1716
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1717
- case 3: throw _d.sent();
1718
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1719
- case 5: throw _d.sent();
1720
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1721
- case 7: throw _d.sent();
1722
- case 8:
1723
- parsedBody = parsedOutput.body;
1724
- throwDefaultError({
1725
- output: output,
1726
- parsedBody: parsedBody,
1727
- exceptionCtor: __BaseException,
1728
- errorCode: errorCode,
1729
- });
1730
- _d.label = 9;
1731
- case 9: return [2];
1732
- }
1733
- });
1734
- }); };
1735
- export var deserializeAws_json1_1UpdateComponentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1736
- var data, contents, response;
1737
- return __generator(this, function (_a) {
1738
- switch (_a.label) {
1739
- case 0:
1740
- if (output.statusCode >= 300) {
1741
- return [2, deserializeAws_json1_1UpdateComponentCommandError(output, context)];
1742
- }
1743
- return [4, parseBody(output.body, context)];
1744
- case 1:
1745
- data = _a.sent();
1746
- contents = {};
1747
- contents = deserializeAws_json1_1UpdateComponentResponse(data, context);
1748
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1749
- return [2, Promise.resolve(response)];
1750
- }
1751
- });
1752
- }); };
1753
- var deserializeAws_json1_1UpdateComponentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1754
- var parsedOutput, _a, errorCode, _b, parsedBody;
1755
- var _c;
1756
- return __generator(this, function (_d) {
1757
- switch (_d.label) {
1758
- case 0:
1759
- _a = [__assign({}, output)];
1760
- _c = {};
1761
- return [4, parseBody(output.body, context)];
1762
- case 1:
1763
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1764
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1765
- _b = errorCode;
1766
- switch (_b) {
1767
- case "InternalServerException": return [3, 2];
1768
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1769
- case "ResourceInUseException": return [3, 4];
1770
- case "com.amazonaws.applicationinsights#ResourceInUseException": return [3, 4];
1771
- case "ResourceNotFoundException": return [3, 6];
1772
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 6];
1773
- case "ValidationException": return [3, 8];
1774
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 8];
1775
- }
1776
- return [3, 10];
1777
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1778
- case 3: throw _d.sent();
1779
- case 4: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
1780
- case 5: throw _d.sent();
1781
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1782
- case 7: throw _d.sent();
1783
- case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1784
- case 9: throw _d.sent();
1785
- case 10:
1786
- parsedBody = parsedOutput.body;
1787
- throwDefaultError({
1788
- output: output,
1789
- parsedBody: parsedBody,
1790
- exceptionCtor: __BaseException,
1791
- errorCode: errorCode,
1792
- });
1793
- _d.label = 11;
1794
- case 11: return [2];
1795
- }
1796
- });
1797
- }); };
1798
- export var deserializeAws_json1_1UpdateComponentConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1799
- var data, contents, response;
1800
- return __generator(this, function (_a) {
1801
- switch (_a.label) {
1802
- case 0:
1803
- if (output.statusCode >= 300) {
1804
- return [2, deserializeAws_json1_1UpdateComponentConfigurationCommandError(output, context)];
1805
- }
1806
- return [4, parseBody(output.body, context)];
1807
- case 1:
1808
- data = _a.sent();
1809
- contents = {};
1810
- contents = deserializeAws_json1_1UpdateComponentConfigurationResponse(data, context);
1811
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1812
- return [2, Promise.resolve(response)];
1813
- }
1814
- });
1815
- }); };
1816
- var deserializeAws_json1_1UpdateComponentConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1817
- var parsedOutput, _a, errorCode, _b, parsedBody;
1818
- var _c;
1819
- return __generator(this, function (_d) {
1820
- switch (_d.label) {
1821
- case 0:
1822
- _a = [__assign({}, output)];
1823
- _c = {};
1824
- return [4, parseBody(output.body, context)];
1825
- case 1:
1826
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1827
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1828
- _b = errorCode;
1829
- switch (_b) {
1830
- case "InternalServerException": return [3, 2];
1831
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1832
- case "ResourceNotFoundException": return [3, 4];
1833
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 4];
1834
- case "ValidationException": return [3, 6];
1835
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 6];
1836
- }
1837
- return [3, 8];
1838
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1839
- case 3: throw _d.sent();
1840
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1841
- case 5: throw _d.sent();
1842
- case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1843
- case 7: throw _d.sent();
1844
- case 8:
1845
- parsedBody = parsedOutput.body;
1846
- throwDefaultError({
1847
- output: output,
1848
- parsedBody: parsedBody,
1849
- exceptionCtor: __BaseException,
1850
- errorCode: errorCode,
1851
- });
1852
- _d.label = 9;
1853
- case 9: return [2];
1854
- }
1855
- });
1856
- }); };
1857
- export var deserializeAws_json1_1UpdateLogPatternCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1858
- var data, contents, response;
1859
- return __generator(this, function (_a) {
1860
- switch (_a.label) {
1861
- case 0:
1862
- if (output.statusCode >= 300) {
1863
- return [2, deserializeAws_json1_1UpdateLogPatternCommandError(output, context)];
1864
- }
1865
- return [4, parseBody(output.body, context)];
1866
- case 1:
1867
- data = _a.sent();
1868
- contents = {};
1869
- contents = deserializeAws_json1_1UpdateLogPatternResponse(data, context);
1870
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1871
- return [2, Promise.resolve(response)];
1872
- }
1873
- });
1874
- }); };
1875
- var deserializeAws_json1_1UpdateLogPatternCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1876
- var parsedOutput, _a, errorCode, _b, parsedBody;
1877
- var _c;
1878
- return __generator(this, function (_d) {
1879
- switch (_d.label) {
1880
- case 0:
1881
- _a = [__assign({}, output)];
1882
- _c = {};
1883
- return [4, parseBody(output.body, context)];
1884
- case 1:
1885
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1886
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1887
- _b = errorCode;
1888
- switch (_b) {
1889
- case "InternalServerException": return [3, 2];
1890
- case "com.amazonaws.applicationinsights#InternalServerException": return [3, 2];
1891
- case "ResourceInUseException": return [3, 4];
1892
- case "com.amazonaws.applicationinsights#ResourceInUseException": return [3, 4];
1893
- case "ResourceNotFoundException": return [3, 6];
1894
- case "com.amazonaws.applicationinsights#ResourceNotFoundException": return [3, 6];
1895
- case "ValidationException": return [3, 8];
1896
- case "com.amazonaws.applicationinsights#ValidationException": return [3, 8];
1897
- }
1898
- return [3, 10];
1899
- case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1900
- case 3: throw _d.sent();
1901
- case 4: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
1902
- case 5: throw _d.sent();
1903
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1904
- case 7: throw _d.sent();
1905
- case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1906
- case 9: throw _d.sent();
1907
- case 10:
1908
- parsedBody = parsedOutput.body;
1909
- throwDefaultError({
1910
- output: output,
1911
- parsedBody: parsedBody,
1912
- exceptionCtor: __BaseException,
1913
- errorCode: errorCode,
1914
- });
1915
- _d.label = 11;
1916
- case 11: return [2];
1917
- }
1918
- });
1919
- }); };
1920
- var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1921
- var body, deserialized, exception;
1922
- return __generator(this, function (_a) {
1923
- body = parsedOutput.body;
1924
- deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1925
- exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1926
- return [2, __decorateServiceException(exception, body)];
1927
- });
1928
- }); };
1929
- var deserializeAws_json1_1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1930
- var body, deserialized, exception;
1931
- return __generator(this, function (_a) {
1932
- body = parsedOutput.body;
1933
- deserialized = deserializeAws_json1_1BadRequestException(body, context);
1934
- exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1935
- return [2, __decorateServiceException(exception, body)];
1936
- });
1937
- }); };
1938
- var deserializeAws_json1_1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1939
- var body, deserialized, exception;
1940
- return __generator(this, function (_a) {
1941
- body = parsedOutput.body;
1942
- deserialized = deserializeAws_json1_1InternalServerException(body, context);
1943
- exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1944
- return [2, __decorateServiceException(exception, body)];
1945
- });
1946
- }); };
1947
- var deserializeAws_json1_1ResourceInUseExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1948
- var body, deserialized, exception;
1949
- return __generator(this, function (_a) {
1950
- body = parsedOutput.body;
1951
- deserialized = deserializeAws_json1_1ResourceInUseException(body, context);
1952
- exception = new ResourceInUseException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1953
- return [2, __decorateServiceException(exception, body)];
1954
- });
1955
- }); };
1956
- var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1957
- var body, deserialized, exception;
1958
- return __generator(this, function (_a) {
1959
- body = parsedOutput.body;
1960
- deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1961
- exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1962
- return [2, __decorateServiceException(exception, body)];
1963
- });
1964
- }); };
1965
- var deserializeAws_json1_1TagsAlreadyExistExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1966
- var body, deserialized, exception;
1967
- return __generator(this, function (_a) {
1968
- body = parsedOutput.body;
1969
- deserialized = deserializeAws_json1_1TagsAlreadyExistException(body, context);
1970
- exception = new TagsAlreadyExistException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1971
- return [2, __decorateServiceException(exception, body)];
1972
- });
1973
- }); };
1974
- var deserializeAws_json1_1TooManyTagsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1975
- var body, deserialized, exception;
1976
- return __generator(this, function (_a) {
1977
- body = parsedOutput.body;
1978
- deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
1979
- exception = new TooManyTagsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1980
- return [2, __decorateServiceException(exception, body)];
1981
- });
1982
- }); };
1983
- var deserializeAws_json1_1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1984
- var body, deserialized, exception;
1985
- return __generator(this, function (_a) {
1986
- body = parsedOutput.body;
1987
- deserialized = deserializeAws_json1_1ValidationException(body, context);
1988
- exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1989
- return [2, __decorateServiceException(exception, body)];
1990
- });
1991
- }); };
1992
- var serializeAws_json1_1CreateApplicationRequest = function (input, context) {
1993
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AutoConfigEnabled != null && { AutoConfigEnabled: input.AutoConfigEnabled })), (input.AutoCreate != null && { AutoCreate: input.AutoCreate })), (input.CWEMonitorEnabled != null && { CWEMonitorEnabled: input.CWEMonitorEnabled })), (input.GroupingType != null && { GroupingType: input.GroupingType })), (input.OpsCenterEnabled != null && { OpsCenterEnabled: input.OpsCenterEnabled })), (input.OpsItemSNSTopicArn != null && { OpsItemSNSTopicArn: input.OpsItemSNSTopicArn })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
5
+ export const serializeAws_json1_1CreateApplicationCommand = async (input, context) => {
6
+ const headers = {
7
+ "content-type": "application/x-amz-json-1.1",
8
+ "x-amz-target": "EC2WindowsBarleyService.CreateApplication",
9
+ };
10
+ let body;
11
+ body = JSON.stringify(serializeAws_json1_1CreateApplicationRequest(input, context));
12
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
+ };
14
+ export const serializeAws_json1_1CreateComponentCommand = async (input, context) => {
15
+ const headers = {
16
+ "content-type": "application/x-amz-json-1.1",
17
+ "x-amz-target": "EC2WindowsBarleyService.CreateComponent",
18
+ };
19
+ let body;
20
+ body = JSON.stringify(serializeAws_json1_1CreateComponentRequest(input, context));
21
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
+ };
23
+ export const serializeAws_json1_1CreateLogPatternCommand = async (input, context) => {
24
+ const headers = {
25
+ "content-type": "application/x-amz-json-1.1",
26
+ "x-amz-target": "EC2WindowsBarleyService.CreateLogPattern",
27
+ };
28
+ let body;
29
+ body = JSON.stringify(serializeAws_json1_1CreateLogPatternRequest(input, context));
30
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
+ };
32
+ export const serializeAws_json1_1DeleteApplicationCommand = async (input, context) => {
33
+ const headers = {
34
+ "content-type": "application/x-amz-json-1.1",
35
+ "x-amz-target": "EC2WindowsBarleyService.DeleteApplication",
36
+ };
37
+ let body;
38
+ body = JSON.stringify(serializeAws_json1_1DeleteApplicationRequest(input, context));
39
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
+ };
41
+ export const serializeAws_json1_1DeleteComponentCommand = async (input, context) => {
42
+ const headers = {
43
+ "content-type": "application/x-amz-json-1.1",
44
+ "x-amz-target": "EC2WindowsBarleyService.DeleteComponent",
45
+ };
46
+ let body;
47
+ body = JSON.stringify(serializeAws_json1_1DeleteComponentRequest(input, context));
48
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
+ };
50
+ export const serializeAws_json1_1DeleteLogPatternCommand = async (input, context) => {
51
+ const headers = {
52
+ "content-type": "application/x-amz-json-1.1",
53
+ "x-amz-target": "EC2WindowsBarleyService.DeleteLogPattern",
54
+ };
55
+ let body;
56
+ body = JSON.stringify(serializeAws_json1_1DeleteLogPatternRequest(input, context));
57
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
+ };
59
+ export const serializeAws_json1_1DescribeApplicationCommand = async (input, context) => {
60
+ const headers = {
61
+ "content-type": "application/x-amz-json-1.1",
62
+ "x-amz-target": "EC2WindowsBarleyService.DescribeApplication",
63
+ };
64
+ let body;
65
+ body = JSON.stringify(serializeAws_json1_1DescribeApplicationRequest(input, context));
66
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
+ };
68
+ export const serializeAws_json1_1DescribeComponentCommand = async (input, context) => {
69
+ const headers = {
70
+ "content-type": "application/x-amz-json-1.1",
71
+ "x-amz-target": "EC2WindowsBarleyService.DescribeComponent",
72
+ };
73
+ let body;
74
+ body = JSON.stringify(serializeAws_json1_1DescribeComponentRequest(input, context));
75
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
+ };
77
+ export const serializeAws_json1_1DescribeComponentConfigurationCommand = async (input, context) => {
78
+ const headers = {
79
+ "content-type": "application/x-amz-json-1.1",
80
+ "x-amz-target": "EC2WindowsBarleyService.DescribeComponentConfiguration",
81
+ };
82
+ let body;
83
+ body = JSON.stringify(serializeAws_json1_1DescribeComponentConfigurationRequest(input, context));
84
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
+ };
86
+ export const serializeAws_json1_1DescribeComponentConfigurationRecommendationCommand = async (input, context) => {
87
+ const headers = {
88
+ "content-type": "application/x-amz-json-1.1",
89
+ "x-amz-target": "EC2WindowsBarleyService.DescribeComponentConfigurationRecommendation",
90
+ };
91
+ let body;
92
+ body = JSON.stringify(serializeAws_json1_1DescribeComponentConfigurationRecommendationRequest(input, context));
93
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
+ };
95
+ export const serializeAws_json1_1DescribeLogPatternCommand = async (input, context) => {
96
+ const headers = {
97
+ "content-type": "application/x-amz-json-1.1",
98
+ "x-amz-target": "EC2WindowsBarleyService.DescribeLogPattern",
99
+ };
100
+ let body;
101
+ body = JSON.stringify(serializeAws_json1_1DescribeLogPatternRequest(input, context));
102
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
+ };
104
+ export const serializeAws_json1_1DescribeObservationCommand = async (input, context) => {
105
+ const headers = {
106
+ "content-type": "application/x-amz-json-1.1",
107
+ "x-amz-target": "EC2WindowsBarleyService.DescribeObservation",
108
+ };
109
+ let body;
110
+ body = JSON.stringify(serializeAws_json1_1DescribeObservationRequest(input, context));
111
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
+ };
113
+ export const serializeAws_json1_1DescribeProblemCommand = async (input, context) => {
114
+ const headers = {
115
+ "content-type": "application/x-amz-json-1.1",
116
+ "x-amz-target": "EC2WindowsBarleyService.DescribeProblem",
117
+ };
118
+ let body;
119
+ body = JSON.stringify(serializeAws_json1_1DescribeProblemRequest(input, context));
120
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
+ };
122
+ export const serializeAws_json1_1DescribeProblemObservationsCommand = async (input, context) => {
123
+ const headers = {
124
+ "content-type": "application/x-amz-json-1.1",
125
+ "x-amz-target": "EC2WindowsBarleyService.DescribeProblemObservations",
126
+ };
127
+ let body;
128
+ body = JSON.stringify(serializeAws_json1_1DescribeProblemObservationsRequest(input, context));
129
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
+ };
131
+ export const serializeAws_json1_1ListApplicationsCommand = async (input, context) => {
132
+ const headers = {
133
+ "content-type": "application/x-amz-json-1.1",
134
+ "x-amz-target": "EC2WindowsBarleyService.ListApplications",
135
+ };
136
+ let body;
137
+ body = JSON.stringify(serializeAws_json1_1ListApplicationsRequest(input, context));
138
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
+ };
140
+ export const serializeAws_json1_1ListComponentsCommand = async (input, context) => {
141
+ const headers = {
142
+ "content-type": "application/x-amz-json-1.1",
143
+ "x-amz-target": "EC2WindowsBarleyService.ListComponents",
144
+ };
145
+ let body;
146
+ body = JSON.stringify(serializeAws_json1_1ListComponentsRequest(input, context));
147
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
+ };
149
+ export const serializeAws_json1_1ListConfigurationHistoryCommand = async (input, context) => {
150
+ const headers = {
151
+ "content-type": "application/x-amz-json-1.1",
152
+ "x-amz-target": "EC2WindowsBarleyService.ListConfigurationHistory",
153
+ };
154
+ let body;
155
+ body = JSON.stringify(serializeAws_json1_1ListConfigurationHistoryRequest(input, context));
156
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
+ };
158
+ export const serializeAws_json1_1ListLogPatternsCommand = async (input, context) => {
159
+ const headers = {
160
+ "content-type": "application/x-amz-json-1.1",
161
+ "x-amz-target": "EC2WindowsBarleyService.ListLogPatterns",
162
+ };
163
+ let body;
164
+ body = JSON.stringify(serializeAws_json1_1ListLogPatternsRequest(input, context));
165
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
+ };
167
+ export const serializeAws_json1_1ListLogPatternSetsCommand = async (input, context) => {
168
+ const headers = {
169
+ "content-type": "application/x-amz-json-1.1",
170
+ "x-amz-target": "EC2WindowsBarleyService.ListLogPatternSets",
171
+ };
172
+ let body;
173
+ body = JSON.stringify(serializeAws_json1_1ListLogPatternSetsRequest(input, context));
174
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
+ };
176
+ export const serializeAws_json1_1ListProblemsCommand = async (input, context) => {
177
+ const headers = {
178
+ "content-type": "application/x-amz-json-1.1",
179
+ "x-amz-target": "EC2WindowsBarleyService.ListProblems",
180
+ };
181
+ let body;
182
+ body = JSON.stringify(serializeAws_json1_1ListProblemsRequest(input, context));
183
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
+ };
185
+ export const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
186
+ const headers = {
187
+ "content-type": "application/x-amz-json-1.1",
188
+ "x-amz-target": "EC2WindowsBarleyService.ListTagsForResource",
189
+ };
190
+ let body;
191
+ body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
192
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
+ };
194
+ export const serializeAws_json1_1TagResourceCommand = async (input, context) => {
195
+ const headers = {
196
+ "content-type": "application/x-amz-json-1.1",
197
+ "x-amz-target": "EC2WindowsBarleyService.TagResource",
198
+ };
199
+ let body;
200
+ body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
201
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
+ };
203
+ export const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
204
+ const headers = {
205
+ "content-type": "application/x-amz-json-1.1",
206
+ "x-amz-target": "EC2WindowsBarleyService.UntagResource",
207
+ };
208
+ let body;
209
+ body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
210
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
+ };
212
+ export const serializeAws_json1_1UpdateApplicationCommand = async (input, context) => {
213
+ const headers = {
214
+ "content-type": "application/x-amz-json-1.1",
215
+ "x-amz-target": "EC2WindowsBarleyService.UpdateApplication",
216
+ };
217
+ let body;
218
+ body = JSON.stringify(serializeAws_json1_1UpdateApplicationRequest(input, context));
219
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
220
+ };
221
+ export const serializeAws_json1_1UpdateComponentCommand = async (input, context) => {
222
+ const headers = {
223
+ "content-type": "application/x-amz-json-1.1",
224
+ "x-amz-target": "EC2WindowsBarleyService.UpdateComponent",
225
+ };
226
+ let body;
227
+ body = JSON.stringify(serializeAws_json1_1UpdateComponentRequest(input, context));
228
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
229
+ };
230
+ export const serializeAws_json1_1UpdateComponentConfigurationCommand = async (input, context) => {
231
+ const headers = {
232
+ "content-type": "application/x-amz-json-1.1",
233
+ "x-amz-target": "EC2WindowsBarleyService.UpdateComponentConfiguration",
234
+ };
235
+ let body;
236
+ body = JSON.stringify(serializeAws_json1_1UpdateComponentConfigurationRequest(input, context));
237
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
+ };
239
+ export const serializeAws_json1_1UpdateLogPatternCommand = async (input, context) => {
240
+ const headers = {
241
+ "content-type": "application/x-amz-json-1.1",
242
+ "x-amz-target": "EC2WindowsBarleyService.UpdateLogPattern",
243
+ };
244
+ let body;
245
+ body = JSON.stringify(serializeAws_json1_1UpdateLogPatternRequest(input, context));
246
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
247
+ };
248
+ export const deserializeAws_json1_1CreateApplicationCommand = async (output, context) => {
249
+ if (output.statusCode >= 300) {
250
+ return deserializeAws_json1_1CreateApplicationCommandError(output, context);
251
+ }
252
+ const data = await parseBody(output.body, context);
253
+ let contents = {};
254
+ contents = deserializeAws_json1_1CreateApplicationResponse(data, context);
255
+ const response = {
256
+ $metadata: deserializeMetadata(output),
257
+ ...contents,
258
+ };
259
+ return Promise.resolve(response);
260
+ };
261
+ const deserializeAws_json1_1CreateApplicationCommandError = async (output, context) => {
262
+ const parsedOutput = {
263
+ ...output,
264
+ body: await parseErrorBody(output.body, context),
265
+ };
266
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
267
+ switch (errorCode) {
268
+ case "AccessDeniedException":
269
+ case "com.amazonaws.applicationinsights#AccessDeniedException":
270
+ throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
271
+ case "InternalServerException":
272
+ case "com.amazonaws.applicationinsights#InternalServerException":
273
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
274
+ case "ResourceInUseException":
275
+ case "com.amazonaws.applicationinsights#ResourceInUseException":
276
+ throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
277
+ case "ResourceNotFoundException":
278
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
279
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
280
+ case "TagsAlreadyExistException":
281
+ case "com.amazonaws.applicationinsights#TagsAlreadyExistException":
282
+ throw await deserializeAws_json1_1TagsAlreadyExistExceptionResponse(parsedOutput, context);
283
+ case "ValidationException":
284
+ case "com.amazonaws.applicationinsights#ValidationException":
285
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
286
+ default:
287
+ const parsedBody = parsedOutput.body;
288
+ throwDefaultError({
289
+ output,
290
+ parsedBody,
291
+ exceptionCtor: __BaseException,
292
+ errorCode,
293
+ });
294
+ }
295
+ };
296
+ export const deserializeAws_json1_1CreateComponentCommand = async (output, context) => {
297
+ if (output.statusCode >= 300) {
298
+ return deserializeAws_json1_1CreateComponentCommandError(output, context);
299
+ }
300
+ const data = await parseBody(output.body, context);
301
+ let contents = {};
302
+ contents = deserializeAws_json1_1CreateComponentResponse(data, context);
303
+ const response = {
304
+ $metadata: deserializeMetadata(output),
305
+ ...contents,
306
+ };
307
+ return Promise.resolve(response);
308
+ };
309
+ const deserializeAws_json1_1CreateComponentCommandError = async (output, context) => {
310
+ const parsedOutput = {
311
+ ...output,
312
+ body: await parseErrorBody(output.body, context),
313
+ };
314
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
315
+ switch (errorCode) {
316
+ case "InternalServerException":
317
+ case "com.amazonaws.applicationinsights#InternalServerException":
318
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
319
+ case "ResourceInUseException":
320
+ case "com.amazonaws.applicationinsights#ResourceInUseException":
321
+ throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
322
+ case "ResourceNotFoundException":
323
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
324
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
325
+ case "ValidationException":
326
+ case "com.amazonaws.applicationinsights#ValidationException":
327
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
328
+ default:
329
+ const parsedBody = parsedOutput.body;
330
+ throwDefaultError({
331
+ output,
332
+ parsedBody,
333
+ exceptionCtor: __BaseException,
334
+ errorCode,
335
+ });
336
+ }
337
+ };
338
+ export const deserializeAws_json1_1CreateLogPatternCommand = async (output, context) => {
339
+ if (output.statusCode >= 300) {
340
+ return deserializeAws_json1_1CreateLogPatternCommandError(output, context);
341
+ }
342
+ const data = await parseBody(output.body, context);
343
+ let contents = {};
344
+ contents = deserializeAws_json1_1CreateLogPatternResponse(data, context);
345
+ const response = {
346
+ $metadata: deserializeMetadata(output),
347
+ ...contents,
348
+ };
349
+ return Promise.resolve(response);
350
+ };
351
+ const deserializeAws_json1_1CreateLogPatternCommandError = async (output, context) => {
352
+ const parsedOutput = {
353
+ ...output,
354
+ body: await parseErrorBody(output.body, context),
355
+ };
356
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
357
+ switch (errorCode) {
358
+ case "InternalServerException":
359
+ case "com.amazonaws.applicationinsights#InternalServerException":
360
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
361
+ case "ResourceInUseException":
362
+ case "com.amazonaws.applicationinsights#ResourceInUseException":
363
+ throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
364
+ case "ResourceNotFoundException":
365
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
366
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
367
+ case "ValidationException":
368
+ case "com.amazonaws.applicationinsights#ValidationException":
369
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
370
+ default:
371
+ const parsedBody = parsedOutput.body;
372
+ throwDefaultError({
373
+ output,
374
+ parsedBody,
375
+ exceptionCtor: __BaseException,
376
+ errorCode,
377
+ });
378
+ }
1994
379
  };
1995
- var serializeAws_json1_1CreateComponentRequest = function (input, context) {
1996
- return __assign(__assign(__assign({}, (input.ComponentName != null && { ComponentName: input.ComponentName })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName })), (input.ResourceList != null && { ResourceList: serializeAws_json1_1ResourceList(input.ResourceList, context) }));
380
+ export const deserializeAws_json1_1DeleteApplicationCommand = async (output, context) => {
381
+ if (output.statusCode >= 300) {
382
+ return deserializeAws_json1_1DeleteApplicationCommandError(output, context);
383
+ }
384
+ const data = await parseBody(output.body, context);
385
+ let contents = {};
386
+ contents = deserializeAws_json1_1DeleteApplicationResponse(data, context);
387
+ const response = {
388
+ $metadata: deserializeMetadata(output),
389
+ ...contents,
390
+ };
391
+ return Promise.resolve(response);
392
+ };
393
+ const deserializeAws_json1_1DeleteApplicationCommandError = async (output, context) => {
394
+ const parsedOutput = {
395
+ ...output,
396
+ body: await parseErrorBody(output.body, context),
397
+ };
398
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
399
+ switch (errorCode) {
400
+ case "BadRequestException":
401
+ case "com.amazonaws.applicationinsights#BadRequestException":
402
+ throw await deserializeAws_json1_1BadRequestExceptionResponse(parsedOutput, context);
403
+ case "InternalServerException":
404
+ case "com.amazonaws.applicationinsights#InternalServerException":
405
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
406
+ case "ResourceNotFoundException":
407
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
408
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
409
+ case "ValidationException":
410
+ case "com.amazonaws.applicationinsights#ValidationException":
411
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
412
+ default:
413
+ const parsedBody = parsedOutput.body;
414
+ throwDefaultError({
415
+ output,
416
+ parsedBody,
417
+ exceptionCtor: __BaseException,
418
+ errorCode,
419
+ });
420
+ }
421
+ };
422
+ export const deserializeAws_json1_1DeleteComponentCommand = async (output, context) => {
423
+ if (output.statusCode >= 300) {
424
+ return deserializeAws_json1_1DeleteComponentCommandError(output, context);
425
+ }
426
+ const data = await parseBody(output.body, context);
427
+ let contents = {};
428
+ contents = deserializeAws_json1_1DeleteComponentResponse(data, context);
429
+ const response = {
430
+ $metadata: deserializeMetadata(output),
431
+ ...contents,
432
+ };
433
+ return Promise.resolve(response);
434
+ };
435
+ const deserializeAws_json1_1DeleteComponentCommandError = async (output, context) => {
436
+ const parsedOutput = {
437
+ ...output,
438
+ body: await parseErrorBody(output.body, context),
439
+ };
440
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
441
+ switch (errorCode) {
442
+ case "InternalServerException":
443
+ case "com.amazonaws.applicationinsights#InternalServerException":
444
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
445
+ case "ResourceNotFoundException":
446
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
447
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
448
+ case "ValidationException":
449
+ case "com.amazonaws.applicationinsights#ValidationException":
450
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
451
+ default:
452
+ const parsedBody = parsedOutput.body;
453
+ throwDefaultError({
454
+ output,
455
+ parsedBody,
456
+ exceptionCtor: __BaseException,
457
+ errorCode,
458
+ });
459
+ }
460
+ };
461
+ export const deserializeAws_json1_1DeleteLogPatternCommand = async (output, context) => {
462
+ if (output.statusCode >= 300) {
463
+ return deserializeAws_json1_1DeleteLogPatternCommandError(output, context);
464
+ }
465
+ const data = await parseBody(output.body, context);
466
+ let contents = {};
467
+ contents = deserializeAws_json1_1DeleteLogPatternResponse(data, context);
468
+ const response = {
469
+ $metadata: deserializeMetadata(output),
470
+ ...contents,
471
+ };
472
+ return Promise.resolve(response);
473
+ };
474
+ const deserializeAws_json1_1DeleteLogPatternCommandError = async (output, context) => {
475
+ const parsedOutput = {
476
+ ...output,
477
+ body: await parseErrorBody(output.body, context),
478
+ };
479
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
480
+ switch (errorCode) {
481
+ case "BadRequestException":
482
+ case "com.amazonaws.applicationinsights#BadRequestException":
483
+ throw await deserializeAws_json1_1BadRequestExceptionResponse(parsedOutput, context);
484
+ case "InternalServerException":
485
+ case "com.amazonaws.applicationinsights#InternalServerException":
486
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
487
+ case "ResourceNotFoundException":
488
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
489
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
490
+ case "ValidationException":
491
+ case "com.amazonaws.applicationinsights#ValidationException":
492
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
493
+ default:
494
+ const parsedBody = parsedOutput.body;
495
+ throwDefaultError({
496
+ output,
497
+ parsedBody,
498
+ exceptionCtor: __BaseException,
499
+ errorCode,
500
+ });
501
+ }
502
+ };
503
+ export const deserializeAws_json1_1DescribeApplicationCommand = async (output, context) => {
504
+ if (output.statusCode >= 300) {
505
+ return deserializeAws_json1_1DescribeApplicationCommandError(output, context);
506
+ }
507
+ const data = await parseBody(output.body, context);
508
+ let contents = {};
509
+ contents = deserializeAws_json1_1DescribeApplicationResponse(data, context);
510
+ const response = {
511
+ $metadata: deserializeMetadata(output),
512
+ ...contents,
513
+ };
514
+ return Promise.resolve(response);
515
+ };
516
+ const deserializeAws_json1_1DescribeApplicationCommandError = async (output, context) => {
517
+ const parsedOutput = {
518
+ ...output,
519
+ body: await parseErrorBody(output.body, context),
520
+ };
521
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
522
+ switch (errorCode) {
523
+ case "InternalServerException":
524
+ case "com.amazonaws.applicationinsights#InternalServerException":
525
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
526
+ case "ResourceNotFoundException":
527
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
528
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
529
+ case "ValidationException":
530
+ case "com.amazonaws.applicationinsights#ValidationException":
531
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
532
+ default:
533
+ const parsedBody = parsedOutput.body;
534
+ throwDefaultError({
535
+ output,
536
+ parsedBody,
537
+ exceptionCtor: __BaseException,
538
+ errorCode,
539
+ });
540
+ }
541
+ };
542
+ export const deserializeAws_json1_1DescribeComponentCommand = async (output, context) => {
543
+ if (output.statusCode >= 300) {
544
+ return deserializeAws_json1_1DescribeComponentCommandError(output, context);
545
+ }
546
+ const data = await parseBody(output.body, context);
547
+ let contents = {};
548
+ contents = deserializeAws_json1_1DescribeComponentResponse(data, context);
549
+ const response = {
550
+ $metadata: deserializeMetadata(output),
551
+ ...contents,
552
+ };
553
+ return Promise.resolve(response);
554
+ };
555
+ const deserializeAws_json1_1DescribeComponentCommandError = async (output, context) => {
556
+ const parsedOutput = {
557
+ ...output,
558
+ body: await parseErrorBody(output.body, context),
559
+ };
560
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
561
+ switch (errorCode) {
562
+ case "InternalServerException":
563
+ case "com.amazonaws.applicationinsights#InternalServerException":
564
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
565
+ case "ResourceNotFoundException":
566
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
567
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
568
+ case "ValidationException":
569
+ case "com.amazonaws.applicationinsights#ValidationException":
570
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
571
+ default:
572
+ const parsedBody = parsedOutput.body;
573
+ throwDefaultError({
574
+ output,
575
+ parsedBody,
576
+ exceptionCtor: __BaseException,
577
+ errorCode,
578
+ });
579
+ }
580
+ };
581
+ export const deserializeAws_json1_1DescribeComponentConfigurationCommand = async (output, context) => {
582
+ if (output.statusCode >= 300) {
583
+ return deserializeAws_json1_1DescribeComponentConfigurationCommandError(output, context);
584
+ }
585
+ const data = await parseBody(output.body, context);
586
+ let contents = {};
587
+ contents = deserializeAws_json1_1DescribeComponentConfigurationResponse(data, context);
588
+ const response = {
589
+ $metadata: deserializeMetadata(output),
590
+ ...contents,
591
+ };
592
+ return Promise.resolve(response);
593
+ };
594
+ const deserializeAws_json1_1DescribeComponentConfigurationCommandError = async (output, context) => {
595
+ const parsedOutput = {
596
+ ...output,
597
+ body: await parseErrorBody(output.body, context),
598
+ };
599
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
600
+ switch (errorCode) {
601
+ case "InternalServerException":
602
+ case "com.amazonaws.applicationinsights#InternalServerException":
603
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
604
+ case "ResourceNotFoundException":
605
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
606
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
607
+ case "ValidationException":
608
+ case "com.amazonaws.applicationinsights#ValidationException":
609
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
610
+ default:
611
+ const parsedBody = parsedOutput.body;
612
+ throwDefaultError({
613
+ output,
614
+ parsedBody,
615
+ exceptionCtor: __BaseException,
616
+ errorCode,
617
+ });
618
+ }
619
+ };
620
+ export const deserializeAws_json1_1DescribeComponentConfigurationRecommendationCommand = async (output, context) => {
621
+ if (output.statusCode >= 300) {
622
+ return deserializeAws_json1_1DescribeComponentConfigurationRecommendationCommandError(output, context);
623
+ }
624
+ const data = await parseBody(output.body, context);
625
+ let contents = {};
626
+ contents = deserializeAws_json1_1DescribeComponentConfigurationRecommendationResponse(data, context);
627
+ const response = {
628
+ $metadata: deserializeMetadata(output),
629
+ ...contents,
630
+ };
631
+ return Promise.resolve(response);
632
+ };
633
+ const deserializeAws_json1_1DescribeComponentConfigurationRecommendationCommandError = async (output, context) => {
634
+ const parsedOutput = {
635
+ ...output,
636
+ body: await parseErrorBody(output.body, context),
637
+ };
638
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
639
+ switch (errorCode) {
640
+ case "InternalServerException":
641
+ case "com.amazonaws.applicationinsights#InternalServerException":
642
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
643
+ case "ResourceNotFoundException":
644
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
645
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
646
+ case "ValidationException":
647
+ case "com.amazonaws.applicationinsights#ValidationException":
648
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
649
+ default:
650
+ const parsedBody = parsedOutput.body;
651
+ throwDefaultError({
652
+ output,
653
+ parsedBody,
654
+ exceptionCtor: __BaseException,
655
+ errorCode,
656
+ });
657
+ }
658
+ };
659
+ export const deserializeAws_json1_1DescribeLogPatternCommand = async (output, context) => {
660
+ if (output.statusCode >= 300) {
661
+ return deserializeAws_json1_1DescribeLogPatternCommandError(output, context);
662
+ }
663
+ const data = await parseBody(output.body, context);
664
+ let contents = {};
665
+ contents = deserializeAws_json1_1DescribeLogPatternResponse(data, context);
666
+ const response = {
667
+ $metadata: deserializeMetadata(output),
668
+ ...contents,
669
+ };
670
+ return Promise.resolve(response);
671
+ };
672
+ const deserializeAws_json1_1DescribeLogPatternCommandError = async (output, context) => {
673
+ const parsedOutput = {
674
+ ...output,
675
+ body: await parseErrorBody(output.body, context),
676
+ };
677
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
678
+ switch (errorCode) {
679
+ case "InternalServerException":
680
+ case "com.amazonaws.applicationinsights#InternalServerException":
681
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
682
+ case "ResourceNotFoundException":
683
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
684
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
685
+ case "ValidationException":
686
+ case "com.amazonaws.applicationinsights#ValidationException":
687
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
688
+ default:
689
+ const parsedBody = parsedOutput.body;
690
+ throwDefaultError({
691
+ output,
692
+ parsedBody,
693
+ exceptionCtor: __BaseException,
694
+ errorCode,
695
+ });
696
+ }
697
+ };
698
+ export const deserializeAws_json1_1DescribeObservationCommand = async (output, context) => {
699
+ if (output.statusCode >= 300) {
700
+ return deserializeAws_json1_1DescribeObservationCommandError(output, context);
701
+ }
702
+ const data = await parseBody(output.body, context);
703
+ let contents = {};
704
+ contents = deserializeAws_json1_1DescribeObservationResponse(data, context);
705
+ const response = {
706
+ $metadata: deserializeMetadata(output),
707
+ ...contents,
708
+ };
709
+ return Promise.resolve(response);
710
+ };
711
+ const deserializeAws_json1_1DescribeObservationCommandError = async (output, context) => {
712
+ const parsedOutput = {
713
+ ...output,
714
+ body: await parseErrorBody(output.body, context),
715
+ };
716
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
717
+ switch (errorCode) {
718
+ case "InternalServerException":
719
+ case "com.amazonaws.applicationinsights#InternalServerException":
720
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
721
+ case "ResourceNotFoundException":
722
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
723
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
724
+ case "ValidationException":
725
+ case "com.amazonaws.applicationinsights#ValidationException":
726
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
727
+ default:
728
+ const parsedBody = parsedOutput.body;
729
+ throwDefaultError({
730
+ output,
731
+ parsedBody,
732
+ exceptionCtor: __BaseException,
733
+ errorCode,
734
+ });
735
+ }
736
+ };
737
+ export const deserializeAws_json1_1DescribeProblemCommand = async (output, context) => {
738
+ if (output.statusCode >= 300) {
739
+ return deserializeAws_json1_1DescribeProblemCommandError(output, context);
740
+ }
741
+ const data = await parseBody(output.body, context);
742
+ let contents = {};
743
+ contents = deserializeAws_json1_1DescribeProblemResponse(data, context);
744
+ const response = {
745
+ $metadata: deserializeMetadata(output),
746
+ ...contents,
747
+ };
748
+ return Promise.resolve(response);
1997
749
  };
1998
- var serializeAws_json1_1CreateLogPatternRequest = function (input, context) {
1999
- return __assign(__assign(__assign(__assign(__assign({}, (input.Pattern != null && { Pattern: input.Pattern })), (input.PatternName != null && { PatternName: input.PatternName })), (input.PatternSetName != null && { PatternSetName: input.PatternSetName })), (input.Rank != null && { Rank: input.Rank })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
750
+ const deserializeAws_json1_1DescribeProblemCommandError = async (output, context) => {
751
+ const parsedOutput = {
752
+ ...output,
753
+ body: await parseErrorBody(output.body, context),
754
+ };
755
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
756
+ switch (errorCode) {
757
+ case "InternalServerException":
758
+ case "com.amazonaws.applicationinsights#InternalServerException":
759
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
760
+ case "ResourceNotFoundException":
761
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
762
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
763
+ case "ValidationException":
764
+ case "com.amazonaws.applicationinsights#ValidationException":
765
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
766
+ default:
767
+ const parsedBody = parsedOutput.body;
768
+ throwDefaultError({
769
+ output,
770
+ parsedBody,
771
+ exceptionCtor: __BaseException,
772
+ errorCode,
773
+ });
774
+ }
2000
775
  };
2001
- var serializeAws_json1_1DeleteApplicationRequest = function (input, context) {
2002
- return __assign({}, (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
776
+ export const deserializeAws_json1_1DescribeProblemObservationsCommand = async (output, context) => {
777
+ if (output.statusCode >= 300) {
778
+ return deserializeAws_json1_1DescribeProblemObservationsCommandError(output, context);
779
+ }
780
+ const data = await parseBody(output.body, context);
781
+ let contents = {};
782
+ contents = deserializeAws_json1_1DescribeProblemObservationsResponse(data, context);
783
+ const response = {
784
+ $metadata: deserializeMetadata(output),
785
+ ...contents,
786
+ };
787
+ return Promise.resolve(response);
2003
788
  };
2004
- var serializeAws_json1_1DeleteComponentRequest = function (input, context) {
2005
- return __assign(__assign({}, (input.ComponentName != null && { ComponentName: input.ComponentName })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
789
+ const deserializeAws_json1_1DescribeProblemObservationsCommandError = async (output, context) => {
790
+ const parsedOutput = {
791
+ ...output,
792
+ body: await parseErrorBody(output.body, context),
793
+ };
794
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
795
+ switch (errorCode) {
796
+ case "InternalServerException":
797
+ case "com.amazonaws.applicationinsights#InternalServerException":
798
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
799
+ case "ResourceNotFoundException":
800
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
801
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
802
+ case "ValidationException":
803
+ case "com.amazonaws.applicationinsights#ValidationException":
804
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
805
+ default:
806
+ const parsedBody = parsedOutput.body;
807
+ throwDefaultError({
808
+ output,
809
+ parsedBody,
810
+ exceptionCtor: __BaseException,
811
+ errorCode,
812
+ });
813
+ }
2006
814
  };
2007
- var serializeAws_json1_1DeleteLogPatternRequest = function (input, context) {
2008
- return __assign(__assign(__assign({}, (input.PatternName != null && { PatternName: input.PatternName })), (input.PatternSetName != null && { PatternSetName: input.PatternSetName })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
815
+ export const deserializeAws_json1_1ListApplicationsCommand = async (output, context) => {
816
+ if (output.statusCode >= 300) {
817
+ return deserializeAws_json1_1ListApplicationsCommandError(output, context);
818
+ }
819
+ const data = await parseBody(output.body, context);
820
+ let contents = {};
821
+ contents = deserializeAws_json1_1ListApplicationsResponse(data, context);
822
+ const response = {
823
+ $metadata: deserializeMetadata(output),
824
+ ...contents,
825
+ };
826
+ return Promise.resolve(response);
2009
827
  };
2010
- var serializeAws_json1_1DescribeApplicationRequest = function (input, context) {
2011
- return __assign({}, (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
828
+ const deserializeAws_json1_1ListApplicationsCommandError = async (output, context) => {
829
+ const parsedOutput = {
830
+ ...output,
831
+ body: await parseErrorBody(output.body, context),
832
+ };
833
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
834
+ switch (errorCode) {
835
+ case "InternalServerException":
836
+ case "com.amazonaws.applicationinsights#InternalServerException":
837
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
838
+ case "ValidationException":
839
+ case "com.amazonaws.applicationinsights#ValidationException":
840
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
841
+ default:
842
+ const parsedBody = parsedOutput.body;
843
+ throwDefaultError({
844
+ output,
845
+ parsedBody,
846
+ exceptionCtor: __BaseException,
847
+ errorCode,
848
+ });
849
+ }
2012
850
  };
2013
- var serializeAws_json1_1DescribeComponentConfigurationRecommendationRequest = function (input, context) {
2014
- return __assign(__assign(__assign({}, (input.ComponentName != null && { ComponentName: input.ComponentName })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName })), (input.Tier != null && { Tier: input.Tier }));
851
+ export const deserializeAws_json1_1ListComponentsCommand = async (output, context) => {
852
+ if (output.statusCode >= 300) {
853
+ return deserializeAws_json1_1ListComponentsCommandError(output, context);
854
+ }
855
+ const data = await parseBody(output.body, context);
856
+ let contents = {};
857
+ contents = deserializeAws_json1_1ListComponentsResponse(data, context);
858
+ const response = {
859
+ $metadata: deserializeMetadata(output),
860
+ ...contents,
861
+ };
862
+ return Promise.resolve(response);
2015
863
  };
2016
- var serializeAws_json1_1DescribeComponentConfigurationRequest = function (input, context) {
2017
- return __assign(__assign({}, (input.ComponentName != null && { ComponentName: input.ComponentName })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
864
+ const deserializeAws_json1_1ListComponentsCommandError = async (output, context) => {
865
+ const parsedOutput = {
866
+ ...output,
867
+ body: await parseErrorBody(output.body, context),
868
+ };
869
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
870
+ switch (errorCode) {
871
+ case "InternalServerException":
872
+ case "com.amazonaws.applicationinsights#InternalServerException":
873
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
874
+ case "ResourceNotFoundException":
875
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
876
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
877
+ case "ValidationException":
878
+ case "com.amazonaws.applicationinsights#ValidationException":
879
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
880
+ default:
881
+ const parsedBody = parsedOutput.body;
882
+ throwDefaultError({
883
+ output,
884
+ parsedBody,
885
+ exceptionCtor: __BaseException,
886
+ errorCode,
887
+ });
888
+ }
889
+ };
890
+ export const deserializeAws_json1_1ListConfigurationHistoryCommand = async (output, context) => {
891
+ if (output.statusCode >= 300) {
892
+ return deserializeAws_json1_1ListConfigurationHistoryCommandError(output, context);
893
+ }
894
+ const data = await parseBody(output.body, context);
895
+ let contents = {};
896
+ contents = deserializeAws_json1_1ListConfigurationHistoryResponse(data, context);
897
+ const response = {
898
+ $metadata: deserializeMetadata(output),
899
+ ...contents,
900
+ };
901
+ return Promise.resolve(response);
902
+ };
903
+ const deserializeAws_json1_1ListConfigurationHistoryCommandError = async (output, context) => {
904
+ const parsedOutput = {
905
+ ...output,
906
+ body: await parseErrorBody(output.body, context),
907
+ };
908
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
909
+ switch (errorCode) {
910
+ case "InternalServerException":
911
+ case "com.amazonaws.applicationinsights#InternalServerException":
912
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
913
+ case "ResourceNotFoundException":
914
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
915
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
916
+ case "ValidationException":
917
+ case "com.amazonaws.applicationinsights#ValidationException":
918
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
919
+ default:
920
+ const parsedBody = parsedOutput.body;
921
+ throwDefaultError({
922
+ output,
923
+ parsedBody,
924
+ exceptionCtor: __BaseException,
925
+ errorCode,
926
+ });
927
+ }
928
+ };
929
+ export const deserializeAws_json1_1ListLogPatternsCommand = async (output, context) => {
930
+ if (output.statusCode >= 300) {
931
+ return deserializeAws_json1_1ListLogPatternsCommandError(output, context);
932
+ }
933
+ const data = await parseBody(output.body, context);
934
+ let contents = {};
935
+ contents = deserializeAws_json1_1ListLogPatternsResponse(data, context);
936
+ const response = {
937
+ $metadata: deserializeMetadata(output),
938
+ ...contents,
939
+ };
940
+ return Promise.resolve(response);
941
+ };
942
+ const deserializeAws_json1_1ListLogPatternsCommandError = async (output, context) => {
943
+ const parsedOutput = {
944
+ ...output,
945
+ body: await parseErrorBody(output.body, context),
946
+ };
947
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
948
+ switch (errorCode) {
949
+ case "InternalServerException":
950
+ case "com.amazonaws.applicationinsights#InternalServerException":
951
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
952
+ case "ResourceNotFoundException":
953
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
954
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
955
+ case "ValidationException":
956
+ case "com.amazonaws.applicationinsights#ValidationException":
957
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
958
+ default:
959
+ const parsedBody = parsedOutput.body;
960
+ throwDefaultError({
961
+ output,
962
+ parsedBody,
963
+ exceptionCtor: __BaseException,
964
+ errorCode,
965
+ });
966
+ }
2018
967
  };
2019
- var serializeAws_json1_1DescribeComponentRequest = function (input, context) {
2020
- return __assign(__assign({}, (input.ComponentName != null && { ComponentName: input.ComponentName })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
968
+ export const deserializeAws_json1_1ListLogPatternSetsCommand = async (output, context) => {
969
+ if (output.statusCode >= 300) {
970
+ return deserializeAws_json1_1ListLogPatternSetsCommandError(output, context);
971
+ }
972
+ const data = await parseBody(output.body, context);
973
+ let contents = {};
974
+ contents = deserializeAws_json1_1ListLogPatternSetsResponse(data, context);
975
+ const response = {
976
+ $metadata: deserializeMetadata(output),
977
+ ...contents,
978
+ };
979
+ return Promise.resolve(response);
2021
980
  };
2022
- var serializeAws_json1_1DescribeLogPatternRequest = function (input, context) {
2023
- return __assign(__assign(__assign({}, (input.PatternName != null && { PatternName: input.PatternName })), (input.PatternSetName != null && { PatternSetName: input.PatternSetName })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
981
+ const deserializeAws_json1_1ListLogPatternSetsCommandError = async (output, context) => {
982
+ const parsedOutput = {
983
+ ...output,
984
+ body: await parseErrorBody(output.body, context),
985
+ };
986
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
987
+ switch (errorCode) {
988
+ case "InternalServerException":
989
+ case "com.amazonaws.applicationinsights#InternalServerException":
990
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
991
+ case "ResourceNotFoundException":
992
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
993
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
994
+ case "ValidationException":
995
+ case "com.amazonaws.applicationinsights#ValidationException":
996
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
997
+ default:
998
+ const parsedBody = parsedOutput.body;
999
+ throwDefaultError({
1000
+ output,
1001
+ parsedBody,
1002
+ exceptionCtor: __BaseException,
1003
+ errorCode,
1004
+ });
1005
+ }
2024
1006
  };
2025
- var serializeAws_json1_1DescribeObservationRequest = function (input, context) {
2026
- return __assign({}, (input.ObservationId != null && { ObservationId: input.ObservationId }));
1007
+ export const deserializeAws_json1_1ListProblemsCommand = async (output, context) => {
1008
+ if (output.statusCode >= 300) {
1009
+ return deserializeAws_json1_1ListProblemsCommandError(output, context);
1010
+ }
1011
+ const data = await parseBody(output.body, context);
1012
+ let contents = {};
1013
+ contents = deserializeAws_json1_1ListProblemsResponse(data, context);
1014
+ const response = {
1015
+ $metadata: deserializeMetadata(output),
1016
+ ...contents,
1017
+ };
1018
+ return Promise.resolve(response);
2027
1019
  };
2028
- var serializeAws_json1_1DescribeProblemObservationsRequest = function (input, context) {
2029
- return __assign({}, (input.ProblemId != null && { ProblemId: input.ProblemId }));
1020
+ const deserializeAws_json1_1ListProblemsCommandError = async (output, context) => {
1021
+ const parsedOutput = {
1022
+ ...output,
1023
+ body: await parseErrorBody(output.body, context),
1024
+ };
1025
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1026
+ switch (errorCode) {
1027
+ case "InternalServerException":
1028
+ case "com.amazonaws.applicationinsights#InternalServerException":
1029
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1030
+ case "ResourceNotFoundException":
1031
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
1032
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1033
+ case "ValidationException":
1034
+ case "com.amazonaws.applicationinsights#ValidationException":
1035
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1036
+ default:
1037
+ const parsedBody = parsedOutput.body;
1038
+ throwDefaultError({
1039
+ output,
1040
+ parsedBody,
1041
+ exceptionCtor: __BaseException,
1042
+ errorCode,
1043
+ });
1044
+ }
2030
1045
  };
2031
- var serializeAws_json1_1DescribeProblemRequest = function (input, context) {
2032
- return __assign({}, (input.ProblemId != null && { ProblemId: input.ProblemId }));
1046
+ export const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
1047
+ if (output.statusCode >= 300) {
1048
+ return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
1049
+ }
1050
+ const data = await parseBody(output.body, context);
1051
+ let contents = {};
1052
+ contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
1053
+ const response = {
1054
+ $metadata: deserializeMetadata(output),
1055
+ ...contents,
1056
+ };
1057
+ return Promise.resolve(response);
2033
1058
  };
2034
- var serializeAws_json1_1ListApplicationsRequest = function (input, context) {
2035
- return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1059
+ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
1060
+ const parsedOutput = {
1061
+ ...output,
1062
+ body: await parseErrorBody(output.body, context),
1063
+ };
1064
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1065
+ switch (errorCode) {
1066
+ case "ResourceNotFoundException":
1067
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
1068
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1069
+ case "ValidationException":
1070
+ case "com.amazonaws.applicationinsights#ValidationException":
1071
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1072
+ default:
1073
+ const parsedBody = parsedOutput.body;
1074
+ throwDefaultError({
1075
+ output,
1076
+ parsedBody,
1077
+ exceptionCtor: __BaseException,
1078
+ errorCode,
1079
+ });
1080
+ }
2036
1081
  };
2037
- var serializeAws_json1_1ListComponentsRequest = function (input, context) {
2038
- return __assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
1082
+ export const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
1083
+ if (output.statusCode >= 300) {
1084
+ return deserializeAws_json1_1TagResourceCommandError(output, context);
1085
+ }
1086
+ const data = await parseBody(output.body, context);
1087
+ let contents = {};
1088
+ contents = deserializeAws_json1_1TagResourceResponse(data, context);
1089
+ const response = {
1090
+ $metadata: deserializeMetadata(output),
1091
+ ...contents,
1092
+ };
1093
+ return Promise.resolve(response);
2039
1094
  };
2040
- var serializeAws_json1_1ListConfigurationHistoryRequest = function (input, context) {
2041
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) })), (input.EventStatus != null && { EventStatus: input.EventStatus })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName })), (input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }));
1095
+ const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
1096
+ const parsedOutput = {
1097
+ ...output,
1098
+ body: await parseErrorBody(output.body, context),
1099
+ };
1100
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1101
+ switch (errorCode) {
1102
+ case "ResourceNotFoundException":
1103
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
1104
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1105
+ case "TooManyTagsException":
1106
+ case "com.amazonaws.applicationinsights#TooManyTagsException":
1107
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
1108
+ case "ValidationException":
1109
+ case "com.amazonaws.applicationinsights#ValidationException":
1110
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1111
+ default:
1112
+ const parsedBody = parsedOutput.body;
1113
+ throwDefaultError({
1114
+ output,
1115
+ parsedBody,
1116
+ exceptionCtor: __BaseException,
1117
+ errorCode,
1118
+ });
1119
+ }
2042
1120
  };
2043
- var serializeAws_json1_1ListLogPatternSetsRequest = function (input, context) {
2044
- return __assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
1121
+ export const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
1122
+ if (output.statusCode >= 300) {
1123
+ return deserializeAws_json1_1UntagResourceCommandError(output, context);
1124
+ }
1125
+ const data = await parseBody(output.body, context);
1126
+ let contents = {};
1127
+ contents = deserializeAws_json1_1UntagResourceResponse(data, context);
1128
+ const response = {
1129
+ $metadata: deserializeMetadata(output),
1130
+ ...contents,
1131
+ };
1132
+ return Promise.resolve(response);
2045
1133
  };
2046
- var serializeAws_json1_1ListLogPatternsRequest = function (input, context) {
2047
- return __assign(__assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.PatternSetName != null && { PatternSetName: input.PatternSetName })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
1134
+ const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
1135
+ const parsedOutput = {
1136
+ ...output,
1137
+ body: await parseErrorBody(output.body, context),
1138
+ };
1139
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1140
+ switch (errorCode) {
1141
+ case "ResourceNotFoundException":
1142
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
1143
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1144
+ case "ValidationException":
1145
+ case "com.amazonaws.applicationinsights#ValidationException":
1146
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1147
+ default:
1148
+ const parsedBody = parsedOutput.body;
1149
+ throwDefaultError({
1150
+ output,
1151
+ parsedBody,
1152
+ exceptionCtor: __BaseException,
1153
+ errorCode,
1154
+ });
1155
+ }
2048
1156
  };
2049
- var serializeAws_json1_1ListProblemsRequest = function (input, context) {
2050
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.ComponentName != null && { ComponentName: input.ComponentName })), (input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName })), (input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }));
1157
+ export const deserializeAws_json1_1UpdateApplicationCommand = async (output, context) => {
1158
+ if (output.statusCode >= 300) {
1159
+ return deserializeAws_json1_1UpdateApplicationCommandError(output, context);
1160
+ }
1161
+ const data = await parseBody(output.body, context);
1162
+ let contents = {};
1163
+ contents = deserializeAws_json1_1UpdateApplicationResponse(data, context);
1164
+ const response = {
1165
+ $metadata: deserializeMetadata(output),
1166
+ ...contents,
1167
+ };
1168
+ return Promise.resolve(response);
2051
1169
  };
2052
- var serializeAws_json1_1ListTagsForResourceRequest = function (input, context) {
2053
- return __assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN }));
1170
+ const deserializeAws_json1_1UpdateApplicationCommandError = async (output, context) => {
1171
+ const parsedOutput = {
1172
+ ...output,
1173
+ body: await parseErrorBody(output.body, context),
1174
+ };
1175
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1176
+ switch (errorCode) {
1177
+ case "InternalServerException":
1178
+ case "com.amazonaws.applicationinsights#InternalServerException":
1179
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1180
+ case "ResourceNotFoundException":
1181
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
1182
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1183
+ case "ValidationException":
1184
+ case "com.amazonaws.applicationinsights#ValidationException":
1185
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1186
+ default:
1187
+ const parsedBody = parsedOutput.body;
1188
+ throwDefaultError({
1189
+ output,
1190
+ parsedBody,
1191
+ exceptionCtor: __BaseException,
1192
+ errorCode,
1193
+ });
1194
+ }
2054
1195
  };
2055
- var serializeAws_json1_1ResourceList = function (input, context) {
1196
+ export const deserializeAws_json1_1UpdateComponentCommand = async (output, context) => {
1197
+ if (output.statusCode >= 300) {
1198
+ return deserializeAws_json1_1UpdateComponentCommandError(output, context);
1199
+ }
1200
+ const data = await parseBody(output.body, context);
1201
+ let contents = {};
1202
+ contents = deserializeAws_json1_1UpdateComponentResponse(data, context);
1203
+ const response = {
1204
+ $metadata: deserializeMetadata(output),
1205
+ ...contents,
1206
+ };
1207
+ return Promise.resolve(response);
1208
+ };
1209
+ const deserializeAws_json1_1UpdateComponentCommandError = async (output, context) => {
1210
+ const parsedOutput = {
1211
+ ...output,
1212
+ body: await parseErrorBody(output.body, context),
1213
+ };
1214
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1215
+ switch (errorCode) {
1216
+ case "InternalServerException":
1217
+ case "com.amazonaws.applicationinsights#InternalServerException":
1218
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1219
+ case "ResourceInUseException":
1220
+ case "com.amazonaws.applicationinsights#ResourceInUseException":
1221
+ throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
1222
+ case "ResourceNotFoundException":
1223
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
1224
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1225
+ case "ValidationException":
1226
+ case "com.amazonaws.applicationinsights#ValidationException":
1227
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1228
+ default:
1229
+ const parsedBody = parsedOutput.body;
1230
+ throwDefaultError({
1231
+ output,
1232
+ parsedBody,
1233
+ exceptionCtor: __BaseException,
1234
+ errorCode,
1235
+ });
1236
+ }
1237
+ };
1238
+ export const deserializeAws_json1_1UpdateComponentConfigurationCommand = async (output, context) => {
1239
+ if (output.statusCode >= 300) {
1240
+ return deserializeAws_json1_1UpdateComponentConfigurationCommandError(output, context);
1241
+ }
1242
+ const data = await parseBody(output.body, context);
1243
+ let contents = {};
1244
+ contents = deserializeAws_json1_1UpdateComponentConfigurationResponse(data, context);
1245
+ const response = {
1246
+ $metadata: deserializeMetadata(output),
1247
+ ...contents,
1248
+ };
1249
+ return Promise.resolve(response);
1250
+ };
1251
+ const deserializeAws_json1_1UpdateComponentConfigurationCommandError = async (output, context) => {
1252
+ const parsedOutput = {
1253
+ ...output,
1254
+ body: await parseErrorBody(output.body, context),
1255
+ };
1256
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1257
+ switch (errorCode) {
1258
+ case "InternalServerException":
1259
+ case "com.amazonaws.applicationinsights#InternalServerException":
1260
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1261
+ case "ResourceNotFoundException":
1262
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
1263
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1264
+ case "ValidationException":
1265
+ case "com.amazonaws.applicationinsights#ValidationException":
1266
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1267
+ default:
1268
+ const parsedBody = parsedOutput.body;
1269
+ throwDefaultError({
1270
+ output,
1271
+ parsedBody,
1272
+ exceptionCtor: __BaseException,
1273
+ errorCode,
1274
+ });
1275
+ }
1276
+ };
1277
+ export const deserializeAws_json1_1UpdateLogPatternCommand = async (output, context) => {
1278
+ if (output.statusCode >= 300) {
1279
+ return deserializeAws_json1_1UpdateLogPatternCommandError(output, context);
1280
+ }
1281
+ const data = await parseBody(output.body, context);
1282
+ let contents = {};
1283
+ contents = deserializeAws_json1_1UpdateLogPatternResponse(data, context);
1284
+ const response = {
1285
+ $metadata: deserializeMetadata(output),
1286
+ ...contents,
1287
+ };
1288
+ return Promise.resolve(response);
1289
+ };
1290
+ const deserializeAws_json1_1UpdateLogPatternCommandError = async (output, context) => {
1291
+ const parsedOutput = {
1292
+ ...output,
1293
+ body: await parseErrorBody(output.body, context),
1294
+ };
1295
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1296
+ switch (errorCode) {
1297
+ case "InternalServerException":
1298
+ case "com.amazonaws.applicationinsights#InternalServerException":
1299
+ throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1300
+ case "ResourceInUseException":
1301
+ case "com.amazonaws.applicationinsights#ResourceInUseException":
1302
+ throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
1303
+ case "ResourceNotFoundException":
1304
+ case "com.amazonaws.applicationinsights#ResourceNotFoundException":
1305
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1306
+ case "ValidationException":
1307
+ case "com.amazonaws.applicationinsights#ValidationException":
1308
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1309
+ default:
1310
+ const parsedBody = parsedOutput.body;
1311
+ throwDefaultError({
1312
+ output,
1313
+ parsedBody,
1314
+ exceptionCtor: __BaseException,
1315
+ errorCode,
1316
+ });
1317
+ }
1318
+ };
1319
+ const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1320
+ const body = parsedOutput.body;
1321
+ const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1322
+ const exception = new AccessDeniedException({
1323
+ $metadata: deserializeMetadata(parsedOutput),
1324
+ ...deserialized,
1325
+ });
1326
+ return __decorateServiceException(exception, body);
1327
+ };
1328
+ const deserializeAws_json1_1BadRequestExceptionResponse = async (parsedOutput, context) => {
1329
+ const body = parsedOutput.body;
1330
+ const deserialized = deserializeAws_json1_1BadRequestException(body, context);
1331
+ const exception = new BadRequestException({
1332
+ $metadata: deserializeMetadata(parsedOutput),
1333
+ ...deserialized,
1334
+ });
1335
+ return __decorateServiceException(exception, body);
1336
+ };
1337
+ const deserializeAws_json1_1InternalServerExceptionResponse = async (parsedOutput, context) => {
1338
+ const body = parsedOutput.body;
1339
+ const deserialized = deserializeAws_json1_1InternalServerException(body, context);
1340
+ const exception = new InternalServerException({
1341
+ $metadata: deserializeMetadata(parsedOutput),
1342
+ ...deserialized,
1343
+ });
1344
+ return __decorateServiceException(exception, body);
1345
+ };
1346
+ const deserializeAws_json1_1ResourceInUseExceptionResponse = async (parsedOutput, context) => {
1347
+ const body = parsedOutput.body;
1348
+ const deserialized = deserializeAws_json1_1ResourceInUseException(body, context);
1349
+ const exception = new ResourceInUseException({
1350
+ $metadata: deserializeMetadata(parsedOutput),
1351
+ ...deserialized,
1352
+ });
1353
+ return __decorateServiceException(exception, body);
1354
+ };
1355
+ const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1356
+ const body = parsedOutput.body;
1357
+ const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1358
+ const exception = new ResourceNotFoundException({
1359
+ $metadata: deserializeMetadata(parsedOutput),
1360
+ ...deserialized,
1361
+ });
1362
+ return __decorateServiceException(exception, body);
1363
+ };
1364
+ const deserializeAws_json1_1TagsAlreadyExistExceptionResponse = async (parsedOutput, context) => {
1365
+ const body = parsedOutput.body;
1366
+ const deserialized = deserializeAws_json1_1TagsAlreadyExistException(body, context);
1367
+ const exception = new TagsAlreadyExistException({
1368
+ $metadata: deserializeMetadata(parsedOutput),
1369
+ ...deserialized,
1370
+ });
1371
+ return __decorateServiceException(exception, body);
1372
+ };
1373
+ const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
1374
+ const body = parsedOutput.body;
1375
+ const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
1376
+ const exception = new TooManyTagsException({
1377
+ $metadata: deserializeMetadata(parsedOutput),
1378
+ ...deserialized,
1379
+ });
1380
+ return __decorateServiceException(exception, body);
1381
+ };
1382
+ const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
1383
+ const body = parsedOutput.body;
1384
+ const deserialized = deserializeAws_json1_1ValidationException(body, context);
1385
+ const exception = new ValidationException({
1386
+ $metadata: deserializeMetadata(parsedOutput),
1387
+ ...deserialized,
1388
+ });
1389
+ return __decorateServiceException(exception, body);
1390
+ };
1391
+ const serializeAws_json1_1CreateApplicationRequest = (input, context) => {
1392
+ return {
1393
+ ...(input.AutoConfigEnabled != null && { AutoConfigEnabled: input.AutoConfigEnabled }),
1394
+ ...(input.AutoCreate != null && { AutoCreate: input.AutoCreate }),
1395
+ ...(input.CWEMonitorEnabled != null && { CWEMonitorEnabled: input.CWEMonitorEnabled }),
1396
+ ...(input.GroupingType != null && { GroupingType: input.GroupingType }),
1397
+ ...(input.OpsCenterEnabled != null && { OpsCenterEnabled: input.OpsCenterEnabled }),
1398
+ ...(input.OpsItemSNSTopicArn != null && { OpsItemSNSTopicArn: input.OpsItemSNSTopicArn }),
1399
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1400
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
1401
+ };
1402
+ };
1403
+ const serializeAws_json1_1CreateComponentRequest = (input, context) => {
1404
+ return {
1405
+ ...(input.ComponentName != null && { ComponentName: input.ComponentName }),
1406
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1407
+ ...(input.ResourceList != null && { ResourceList: serializeAws_json1_1ResourceList(input.ResourceList, context) }),
1408
+ };
1409
+ };
1410
+ const serializeAws_json1_1CreateLogPatternRequest = (input, context) => {
1411
+ return {
1412
+ ...(input.Pattern != null && { Pattern: input.Pattern }),
1413
+ ...(input.PatternName != null && { PatternName: input.PatternName }),
1414
+ ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }),
1415
+ ...(input.Rank != null && { Rank: input.Rank }),
1416
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1417
+ };
1418
+ };
1419
+ const serializeAws_json1_1DeleteApplicationRequest = (input, context) => {
1420
+ return {
1421
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1422
+ };
1423
+ };
1424
+ const serializeAws_json1_1DeleteComponentRequest = (input, context) => {
1425
+ return {
1426
+ ...(input.ComponentName != null && { ComponentName: input.ComponentName }),
1427
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1428
+ };
1429
+ };
1430
+ const serializeAws_json1_1DeleteLogPatternRequest = (input, context) => {
1431
+ return {
1432
+ ...(input.PatternName != null && { PatternName: input.PatternName }),
1433
+ ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }),
1434
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1435
+ };
1436
+ };
1437
+ const serializeAws_json1_1DescribeApplicationRequest = (input, context) => {
1438
+ return {
1439
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1440
+ };
1441
+ };
1442
+ const serializeAws_json1_1DescribeComponentConfigurationRecommendationRequest = (input, context) => {
1443
+ return {
1444
+ ...(input.ComponentName != null && { ComponentName: input.ComponentName }),
1445
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1446
+ ...(input.Tier != null && { Tier: input.Tier }),
1447
+ };
1448
+ };
1449
+ const serializeAws_json1_1DescribeComponentConfigurationRequest = (input, context) => {
1450
+ return {
1451
+ ...(input.ComponentName != null && { ComponentName: input.ComponentName }),
1452
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1453
+ };
1454
+ };
1455
+ const serializeAws_json1_1DescribeComponentRequest = (input, context) => {
1456
+ return {
1457
+ ...(input.ComponentName != null && { ComponentName: input.ComponentName }),
1458
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1459
+ };
1460
+ };
1461
+ const serializeAws_json1_1DescribeLogPatternRequest = (input, context) => {
1462
+ return {
1463
+ ...(input.PatternName != null && { PatternName: input.PatternName }),
1464
+ ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }),
1465
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1466
+ };
1467
+ };
1468
+ const serializeAws_json1_1DescribeObservationRequest = (input, context) => {
1469
+ return {
1470
+ ...(input.ObservationId != null && { ObservationId: input.ObservationId }),
1471
+ };
1472
+ };
1473
+ const serializeAws_json1_1DescribeProblemObservationsRequest = (input, context) => {
1474
+ return {
1475
+ ...(input.ProblemId != null && { ProblemId: input.ProblemId }),
1476
+ };
1477
+ };
1478
+ const serializeAws_json1_1DescribeProblemRequest = (input, context) => {
1479
+ return {
1480
+ ...(input.ProblemId != null && { ProblemId: input.ProblemId }),
1481
+ };
1482
+ };
1483
+ const serializeAws_json1_1ListApplicationsRequest = (input, context) => {
1484
+ return {
1485
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1486
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1487
+ };
1488
+ };
1489
+ const serializeAws_json1_1ListComponentsRequest = (input, context) => {
1490
+ return {
1491
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1492
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1493
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1494
+ };
1495
+ };
1496
+ const serializeAws_json1_1ListConfigurationHistoryRequest = (input, context) => {
1497
+ return {
1498
+ ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
1499
+ ...(input.EventStatus != null && { EventStatus: input.EventStatus }),
1500
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1501
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1502
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1503
+ ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
1504
+ };
1505
+ };
1506
+ const serializeAws_json1_1ListLogPatternSetsRequest = (input, context) => {
1507
+ return {
1508
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1509
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1510
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1511
+ };
1512
+ };
1513
+ const serializeAws_json1_1ListLogPatternsRequest = (input, context) => {
1514
+ return {
1515
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1516
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1517
+ ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }),
1518
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1519
+ };
1520
+ };
1521
+ const serializeAws_json1_1ListProblemsRequest = (input, context) => {
1522
+ return {
1523
+ ...(input.ComponentName != null && { ComponentName: input.ComponentName }),
1524
+ ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
1525
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1526
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1527
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1528
+ ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
1529
+ };
1530
+ };
1531
+ const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
1532
+ return {
1533
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1534
+ };
1535
+ };
1536
+ const serializeAws_json1_1ResourceList = (input, context) => {
2056
1537
  return input
2057
- .filter(function (e) { return e != null; })
2058
- .map(function (entry) {
1538
+ .filter((e) => e != null)
1539
+ .map((entry) => {
2059
1540
  return entry;
2060
1541
  });
2061
1542
  };
2062
- var serializeAws_json1_1Tag = function (input, context) {
2063
- return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
1543
+ const serializeAws_json1_1Tag = (input, context) => {
1544
+ return {
1545
+ ...(input.Key != null && { Key: input.Key }),
1546
+ ...(input.Value != null && { Value: input.Value }),
1547
+ };
2064
1548
  };
2065
- var serializeAws_json1_1TagKeyList = function (input, context) {
1549
+ const serializeAws_json1_1TagKeyList = (input, context) => {
2066
1550
  return input
2067
- .filter(function (e) { return e != null; })
2068
- .map(function (entry) {
1551
+ .filter((e) => e != null)
1552
+ .map((entry) => {
2069
1553
  return entry;
2070
1554
  });
2071
1555
  };
2072
- var serializeAws_json1_1TagList = function (input, context) {
1556
+ const serializeAws_json1_1TagList = (input, context) => {
2073
1557
  return input
2074
- .filter(function (e) { return e != null; })
2075
- .map(function (entry) {
1558
+ .filter((e) => e != null)
1559
+ .map((entry) => {
2076
1560
  return serializeAws_json1_1Tag(entry, context);
2077
1561
  });
2078
1562
  };
2079
- var serializeAws_json1_1TagResourceRequest = function (input, context) {
2080
- return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
1563
+ const serializeAws_json1_1TagResourceRequest = (input, context) => {
1564
+ return {
1565
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1566
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
1567
+ };
2081
1568
  };
2082
- var serializeAws_json1_1UntagResourceRequest = function (input, context) {
2083
- return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }));
1569
+ const serializeAws_json1_1UntagResourceRequest = (input, context) => {
1570
+ return {
1571
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1572
+ ...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
1573
+ };
2084
1574
  };
2085
- var serializeAws_json1_1UpdateApplicationRequest = function (input, context) {
2086
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.AutoConfigEnabled != null && { AutoConfigEnabled: input.AutoConfigEnabled })), (input.CWEMonitorEnabled != null && { CWEMonitorEnabled: input.CWEMonitorEnabled })), (input.OpsCenterEnabled != null && { OpsCenterEnabled: input.OpsCenterEnabled })), (input.OpsItemSNSTopicArn != null && { OpsItemSNSTopicArn: input.OpsItemSNSTopicArn })), (input.RemoveSNSTopic != null && { RemoveSNSTopic: input.RemoveSNSTopic })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
1575
+ const serializeAws_json1_1UpdateApplicationRequest = (input, context) => {
1576
+ return {
1577
+ ...(input.AutoConfigEnabled != null && { AutoConfigEnabled: input.AutoConfigEnabled }),
1578
+ ...(input.CWEMonitorEnabled != null && { CWEMonitorEnabled: input.CWEMonitorEnabled }),
1579
+ ...(input.OpsCenterEnabled != null && { OpsCenterEnabled: input.OpsCenterEnabled }),
1580
+ ...(input.OpsItemSNSTopicArn != null && { OpsItemSNSTopicArn: input.OpsItemSNSTopicArn }),
1581
+ ...(input.RemoveSNSTopic != null && { RemoveSNSTopic: input.RemoveSNSTopic }),
1582
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1583
+ };
2087
1584
  };
2088
- var serializeAws_json1_1UpdateComponentConfigurationRequest = function (input, context) {
2089
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.AutoConfigEnabled != null && { AutoConfigEnabled: input.AutoConfigEnabled })), (input.ComponentConfiguration != null && { ComponentConfiguration: input.ComponentConfiguration })), (input.ComponentName != null && { ComponentName: input.ComponentName })), (input.Monitor != null && { Monitor: input.Monitor })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName })), (input.Tier != null && { Tier: input.Tier }));
1585
+ const serializeAws_json1_1UpdateComponentConfigurationRequest = (input, context) => {
1586
+ return {
1587
+ ...(input.AutoConfigEnabled != null && { AutoConfigEnabled: input.AutoConfigEnabled }),
1588
+ ...(input.ComponentConfiguration != null && { ComponentConfiguration: input.ComponentConfiguration }),
1589
+ ...(input.ComponentName != null && { ComponentName: input.ComponentName }),
1590
+ ...(input.Monitor != null && { Monitor: input.Monitor }),
1591
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1592
+ ...(input.Tier != null && { Tier: input.Tier }),
1593
+ };
2090
1594
  };
2091
- var serializeAws_json1_1UpdateComponentRequest = function (input, context) {
2092
- return __assign(__assign(__assign(__assign({}, (input.ComponentName != null && { ComponentName: input.ComponentName })), (input.NewComponentName != null && { NewComponentName: input.NewComponentName })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName })), (input.ResourceList != null && { ResourceList: serializeAws_json1_1ResourceList(input.ResourceList, context) }));
1595
+ const serializeAws_json1_1UpdateComponentRequest = (input, context) => {
1596
+ return {
1597
+ ...(input.ComponentName != null && { ComponentName: input.ComponentName }),
1598
+ ...(input.NewComponentName != null && { NewComponentName: input.NewComponentName }),
1599
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1600
+ ...(input.ResourceList != null && { ResourceList: serializeAws_json1_1ResourceList(input.ResourceList, context) }),
1601
+ };
2093
1602
  };
2094
- var serializeAws_json1_1UpdateLogPatternRequest = function (input, context) {
2095
- return __assign(__assign(__assign(__assign(__assign({}, (input.Pattern != null && { Pattern: input.Pattern })), (input.PatternName != null && { PatternName: input.PatternName })), (input.PatternSetName != null && { PatternSetName: input.PatternSetName })), (input.Rank != null && { Rank: input.Rank })), (input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }));
1603
+ const serializeAws_json1_1UpdateLogPatternRequest = (input, context) => {
1604
+ return {
1605
+ ...(input.Pattern != null && { Pattern: input.Pattern }),
1606
+ ...(input.PatternName != null && { PatternName: input.PatternName }),
1607
+ ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }),
1608
+ ...(input.Rank != null && { Rank: input.Rank }),
1609
+ ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }),
1610
+ };
2096
1611
  };
2097
- var deserializeAws_json1_1AccessDeniedException = function (output, context) {
1612
+ const deserializeAws_json1_1AccessDeniedException = (output, context) => {
2098
1613
  return {
2099
1614
  Message: __expectString(output.Message),
2100
1615
  };
2101
1616
  };
2102
- var deserializeAws_json1_1ApplicationComponent = function (output, context) {
1617
+ const deserializeAws_json1_1ApplicationComponent = (output, context) => {
2103
1618
  return {
2104
1619
  ComponentName: __expectString(output.ComponentName),
2105
1620
  ComponentRemarks: __expectString(output.ComponentRemarks),
@@ -2112,10 +1627,10 @@ var deserializeAws_json1_1ApplicationComponent = function (output, context) {
2112
1627
  Tier: __expectString(output.Tier),
2113
1628
  };
2114
1629
  };
2115
- var deserializeAws_json1_1ApplicationComponentList = function (output, context) {
2116
- var retVal = (output || [])
2117
- .filter(function (e) { return e != null; })
2118
- .map(function (entry) {
1630
+ const deserializeAws_json1_1ApplicationComponentList = (output, context) => {
1631
+ const retVal = (output || [])
1632
+ .filter((e) => e != null)
1633
+ .map((entry) => {
2119
1634
  if (entry === null) {
2120
1635
  return null;
2121
1636
  }
@@ -2123,7 +1638,7 @@ var deserializeAws_json1_1ApplicationComponentList = function (output, context)
2123
1638
  });
2124
1639
  return retVal;
2125
1640
  };
2126
- var deserializeAws_json1_1ApplicationInfo = function (output, context) {
1641
+ const deserializeAws_json1_1ApplicationInfo = (output, context) => {
2127
1642
  return {
2128
1643
  AutoConfigEnabled: __expectBoolean(output.AutoConfigEnabled),
2129
1644
  CWEMonitorEnabled: __expectBoolean(output.CWEMonitorEnabled),
@@ -2135,10 +1650,10 @@ var deserializeAws_json1_1ApplicationInfo = function (output, context) {
2135
1650
  ResourceGroupName: __expectString(output.ResourceGroupName),
2136
1651
  };
2137
1652
  };
2138
- var deserializeAws_json1_1ApplicationInfoList = function (output, context) {
2139
- var retVal = (output || [])
2140
- .filter(function (e) { return e != null; })
2141
- .map(function (entry) {
1653
+ const deserializeAws_json1_1ApplicationInfoList = (output, context) => {
1654
+ const retVal = (output || [])
1655
+ .filter((e) => e != null)
1656
+ .map((entry) => {
2142
1657
  if (entry === null) {
2143
1658
  return null;
2144
1659
  }
@@ -2146,12 +1661,12 @@ var deserializeAws_json1_1ApplicationInfoList = function (output, context) {
2146
1661
  });
2147
1662
  return retVal;
2148
1663
  };
2149
- var deserializeAws_json1_1BadRequestException = function (output, context) {
1664
+ const deserializeAws_json1_1BadRequestException = (output, context) => {
2150
1665
  return {
2151
1666
  Message: __expectString(output.Message),
2152
1667
  };
2153
1668
  };
2154
- var deserializeAws_json1_1ConfigurationEvent = function (output, context) {
1669
+ const deserializeAws_json1_1ConfigurationEvent = (output, context) => {
2155
1670
  return {
2156
1671
  EventDetail: __expectString(output.EventDetail),
2157
1672
  EventResourceName: __expectString(output.EventResourceName),
@@ -2161,10 +1676,10 @@ var deserializeAws_json1_1ConfigurationEvent = function (output, context) {
2161
1676
  MonitoredResourceARN: __expectString(output.MonitoredResourceARN),
2162
1677
  };
2163
1678
  };
2164
- var deserializeAws_json1_1ConfigurationEventList = function (output, context) {
2165
- var retVal = (output || [])
2166
- .filter(function (e) { return e != null; })
2167
- .map(function (entry) {
1679
+ const deserializeAws_json1_1ConfigurationEventList = (output, context) => {
1680
+ const retVal = (output || [])
1681
+ .filter((e) => e != null)
1682
+ .map((entry) => {
2168
1683
  if (entry === null) {
2169
1684
  return null;
2170
1685
  }
@@ -2172,51 +1687,51 @@ var deserializeAws_json1_1ConfigurationEventList = function (output, context) {
2172
1687
  });
2173
1688
  return retVal;
2174
1689
  };
2175
- var deserializeAws_json1_1CreateApplicationResponse = function (output, context) {
1690
+ const deserializeAws_json1_1CreateApplicationResponse = (output, context) => {
2176
1691
  return {
2177
1692
  ApplicationInfo: output.ApplicationInfo != null
2178
1693
  ? deserializeAws_json1_1ApplicationInfo(output.ApplicationInfo, context)
2179
1694
  : undefined,
2180
1695
  };
2181
1696
  };
2182
- var deserializeAws_json1_1CreateComponentResponse = function (output, context) {
1697
+ const deserializeAws_json1_1CreateComponentResponse = (output, context) => {
2183
1698
  return {};
2184
1699
  };
2185
- var deserializeAws_json1_1CreateLogPatternResponse = function (output, context) {
1700
+ const deserializeAws_json1_1CreateLogPatternResponse = (output, context) => {
2186
1701
  return {
2187
1702
  LogPattern: output.LogPattern != null ? deserializeAws_json1_1LogPattern(output.LogPattern, context) : undefined,
2188
1703
  ResourceGroupName: __expectString(output.ResourceGroupName),
2189
1704
  };
2190
1705
  };
2191
- var deserializeAws_json1_1DeleteApplicationResponse = function (output, context) {
1706
+ const deserializeAws_json1_1DeleteApplicationResponse = (output, context) => {
2192
1707
  return {};
2193
1708
  };
2194
- var deserializeAws_json1_1DeleteComponentResponse = function (output, context) {
1709
+ const deserializeAws_json1_1DeleteComponentResponse = (output, context) => {
2195
1710
  return {};
2196
1711
  };
2197
- var deserializeAws_json1_1DeleteLogPatternResponse = function (output, context) {
1712
+ const deserializeAws_json1_1DeleteLogPatternResponse = (output, context) => {
2198
1713
  return {};
2199
1714
  };
2200
- var deserializeAws_json1_1DescribeApplicationResponse = function (output, context) {
1715
+ const deserializeAws_json1_1DescribeApplicationResponse = (output, context) => {
2201
1716
  return {
2202
1717
  ApplicationInfo: output.ApplicationInfo != null
2203
1718
  ? deserializeAws_json1_1ApplicationInfo(output.ApplicationInfo, context)
2204
1719
  : undefined,
2205
1720
  };
2206
1721
  };
2207
- var deserializeAws_json1_1DescribeComponentConfigurationRecommendationResponse = function (output, context) {
1722
+ const deserializeAws_json1_1DescribeComponentConfigurationRecommendationResponse = (output, context) => {
2208
1723
  return {
2209
1724
  ComponentConfiguration: __expectString(output.ComponentConfiguration),
2210
1725
  };
2211
1726
  };
2212
- var deserializeAws_json1_1DescribeComponentConfigurationResponse = function (output, context) {
1727
+ const deserializeAws_json1_1DescribeComponentConfigurationResponse = (output, context) => {
2213
1728
  return {
2214
1729
  ComponentConfiguration: __expectString(output.ComponentConfiguration),
2215
1730
  Monitor: __expectBoolean(output.Monitor),
2216
1731
  Tier: __expectString(output.Tier),
2217
1732
  };
2218
1733
  };
2219
- var deserializeAws_json1_1DescribeComponentResponse = function (output, context) {
1734
+ const deserializeAws_json1_1DescribeComponentResponse = (output, context) => {
2220
1735
  return {
2221
1736
  ApplicationComponent: output.ApplicationComponent != null
2222
1737
  ? deserializeAws_json1_1ApplicationComponent(output.ApplicationComponent, context)
@@ -2224,55 +1739,57 @@ var deserializeAws_json1_1DescribeComponentResponse = function (output, context)
2224
1739
  ResourceList: output.ResourceList != null ? deserializeAws_json1_1ResourceList(output.ResourceList, context) : undefined,
2225
1740
  };
2226
1741
  };
2227
- var deserializeAws_json1_1DescribeLogPatternResponse = function (output, context) {
1742
+ const deserializeAws_json1_1DescribeLogPatternResponse = (output, context) => {
2228
1743
  return {
2229
1744
  LogPattern: output.LogPattern != null ? deserializeAws_json1_1LogPattern(output.LogPattern, context) : undefined,
2230
1745
  ResourceGroupName: __expectString(output.ResourceGroupName),
2231
1746
  };
2232
1747
  };
2233
- var deserializeAws_json1_1DescribeObservationResponse = function (output, context) {
1748
+ const deserializeAws_json1_1DescribeObservationResponse = (output, context) => {
2234
1749
  return {
2235
1750
  Observation: output.Observation != null ? deserializeAws_json1_1Observation(output.Observation, context) : undefined,
2236
1751
  };
2237
1752
  };
2238
- var deserializeAws_json1_1DescribeProblemObservationsResponse = function (output, context) {
1753
+ const deserializeAws_json1_1DescribeProblemObservationsResponse = (output, context) => {
2239
1754
  return {
2240
1755
  RelatedObservations: output.RelatedObservations != null
2241
1756
  ? deserializeAws_json1_1RelatedObservations(output.RelatedObservations, context)
2242
1757
  : undefined,
2243
1758
  };
2244
1759
  };
2245
- var deserializeAws_json1_1DescribeProblemResponse = function (output, context) {
1760
+ const deserializeAws_json1_1DescribeProblemResponse = (output, context) => {
2246
1761
  return {
2247
1762
  Problem: output.Problem != null ? deserializeAws_json1_1Problem(output.Problem, context) : undefined,
2248
1763
  };
2249
1764
  };
2250
- var deserializeAws_json1_1DetectedWorkload = function (output, context) {
2251
- return Object.entries(output).reduce(function (acc, _a) {
2252
- var _b;
2253
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
1765
+ const deserializeAws_json1_1DetectedWorkload = (output, context) => {
1766
+ return Object.entries(output).reduce((acc, [key, value]) => {
2254
1767
  if (value === null) {
2255
1768
  return acc;
2256
1769
  }
2257
- return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1WorkloadMetaData(value, context), _b));
1770
+ return {
1771
+ ...acc,
1772
+ [key]: deserializeAws_json1_1WorkloadMetaData(value, context),
1773
+ };
2258
1774
  }, {});
2259
1775
  };
2260
- var deserializeAws_json1_1Feedback = function (output, context) {
2261
- return Object.entries(output).reduce(function (acc, _a) {
2262
- var _b;
2263
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
1776
+ const deserializeAws_json1_1Feedback = (output, context) => {
1777
+ return Object.entries(output).reduce((acc, [key, value]) => {
2264
1778
  if (value === null) {
2265
1779
  return acc;
2266
1780
  }
2267
- return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1781
+ return {
1782
+ ...acc,
1783
+ [key]: __expectString(value),
1784
+ };
2268
1785
  }, {});
2269
1786
  };
2270
- var deserializeAws_json1_1InternalServerException = function (output, context) {
1787
+ const deserializeAws_json1_1InternalServerException = (output, context) => {
2271
1788
  return {
2272
1789
  Message: __expectString(output.Message),
2273
1790
  };
2274
1791
  };
2275
- var deserializeAws_json1_1ListApplicationsResponse = function (output, context) {
1792
+ const deserializeAws_json1_1ListApplicationsResponse = (output, context) => {
2276
1793
  return {
2277
1794
  ApplicationInfoList: output.ApplicationInfoList != null
2278
1795
  ? deserializeAws_json1_1ApplicationInfoList(output.ApplicationInfoList, context)
@@ -2280,7 +1797,7 @@ var deserializeAws_json1_1ListApplicationsResponse = function (output, context)
2280
1797
  NextToken: __expectString(output.NextToken),
2281
1798
  };
2282
1799
  };
2283
- var deserializeAws_json1_1ListComponentsResponse = function (output, context) {
1800
+ const deserializeAws_json1_1ListComponentsResponse = (output, context) => {
2284
1801
  return {
2285
1802
  ApplicationComponentList: output.ApplicationComponentList != null
2286
1803
  ? deserializeAws_json1_1ApplicationComponentList(output.ApplicationComponentList, context)
@@ -2288,13 +1805,13 @@ var deserializeAws_json1_1ListComponentsResponse = function (output, context) {
2288
1805
  NextToken: __expectString(output.NextToken),
2289
1806
  };
2290
1807
  };
2291
- var deserializeAws_json1_1ListConfigurationHistoryResponse = function (output, context) {
1808
+ const deserializeAws_json1_1ListConfigurationHistoryResponse = (output, context) => {
2292
1809
  return {
2293
1810
  EventList: output.EventList != null ? deserializeAws_json1_1ConfigurationEventList(output.EventList, context) : undefined,
2294
1811
  NextToken: __expectString(output.NextToken),
2295
1812
  };
2296
1813
  };
2297
- var deserializeAws_json1_1ListLogPatternSetsResponse = function (output, context) {
1814
+ const deserializeAws_json1_1ListLogPatternSetsResponse = (output, context) => {
2298
1815
  return {
2299
1816
  LogPatternSets: output.LogPatternSets != null
2300
1817
  ? deserializeAws_json1_1LogPatternSetList(output.LogPatternSets, context)
@@ -2303,26 +1820,26 @@ var deserializeAws_json1_1ListLogPatternSetsResponse = function (output, context
2303
1820
  ResourceGroupName: __expectString(output.ResourceGroupName),
2304
1821
  };
2305
1822
  };
2306
- var deserializeAws_json1_1ListLogPatternsResponse = function (output, context) {
1823
+ const deserializeAws_json1_1ListLogPatternsResponse = (output, context) => {
2307
1824
  return {
2308
1825
  LogPatterns: output.LogPatterns != null ? deserializeAws_json1_1LogPatternList(output.LogPatterns, context) : undefined,
2309
1826
  NextToken: __expectString(output.NextToken),
2310
1827
  ResourceGroupName: __expectString(output.ResourceGroupName),
2311
1828
  };
2312
1829
  };
2313
- var deserializeAws_json1_1ListProblemsResponse = function (output, context) {
1830
+ const deserializeAws_json1_1ListProblemsResponse = (output, context) => {
2314
1831
  return {
2315
1832
  NextToken: __expectString(output.NextToken),
2316
1833
  ProblemList: output.ProblemList != null ? deserializeAws_json1_1ProblemList(output.ProblemList, context) : undefined,
2317
1834
  ResourceGroupName: __expectString(output.ResourceGroupName),
2318
1835
  };
2319
1836
  };
2320
- var deserializeAws_json1_1ListTagsForResourceResponse = function (output, context) {
1837
+ const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
2321
1838
  return {
2322
1839
  Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
2323
1840
  };
2324
1841
  };
2325
- var deserializeAws_json1_1LogPattern = function (output, context) {
1842
+ const deserializeAws_json1_1LogPattern = (output, context) => {
2326
1843
  return {
2327
1844
  Pattern: __expectString(output.Pattern),
2328
1845
  PatternName: __expectString(output.PatternName),
@@ -2330,10 +1847,10 @@ var deserializeAws_json1_1LogPattern = function (output, context) {
2330
1847
  Rank: __expectInt32(output.Rank),
2331
1848
  };
2332
1849
  };
2333
- var deserializeAws_json1_1LogPatternList = function (output, context) {
2334
- var retVal = (output || [])
2335
- .filter(function (e) { return e != null; })
2336
- .map(function (entry) {
1850
+ const deserializeAws_json1_1LogPatternList = (output, context) => {
1851
+ const retVal = (output || [])
1852
+ .filter((e) => e != null)
1853
+ .map((entry) => {
2337
1854
  if (entry === null) {
2338
1855
  return null;
2339
1856
  }
@@ -2341,10 +1858,10 @@ var deserializeAws_json1_1LogPatternList = function (output, context) {
2341
1858
  });
2342
1859
  return retVal;
2343
1860
  };
2344
- var deserializeAws_json1_1LogPatternSetList = function (output, context) {
2345
- var retVal = (output || [])
2346
- .filter(function (e) { return e != null; })
2347
- .map(function (entry) {
1861
+ const deserializeAws_json1_1LogPatternSetList = (output, context) => {
1862
+ const retVal = (output || [])
1863
+ .filter((e) => e != null)
1864
+ .map((entry) => {
2348
1865
  if (entry === null) {
2349
1866
  return null;
2350
1867
  }
@@ -2352,7 +1869,7 @@ var deserializeAws_json1_1LogPatternSetList = function (output, context) {
2352
1869
  });
2353
1870
  return retVal;
2354
1871
  };
2355
- var deserializeAws_json1_1Observation = function (output, context) {
1872
+ const deserializeAws_json1_1Observation = (output, context) => {
2356
1873
  return {
2357
1874
  CloudWatchEventDetailType: __expectString(output.CloudWatchEventDetailType),
2358
1875
  CloudWatchEventId: __expectString(output.CloudWatchEventId),
@@ -2401,10 +1918,10 @@ var deserializeAws_json1_1Observation = function (output, context) {
2401
1918
  XRayThrottlePercent: __expectInt32(output.XRayThrottlePercent),
2402
1919
  };
2403
1920
  };
2404
- var deserializeAws_json1_1ObservationList = function (output, context) {
2405
- var retVal = (output || [])
2406
- .filter(function (e) { return e != null; })
2407
- .map(function (entry) {
1921
+ const deserializeAws_json1_1ObservationList = (output, context) => {
1922
+ const retVal = (output || [])
1923
+ .filter((e) => e != null)
1924
+ .map((entry) => {
2408
1925
  if (entry === null) {
2409
1926
  return null;
2410
1927
  }
@@ -2412,7 +1929,7 @@ var deserializeAws_json1_1ObservationList = function (output, context) {
2412
1929
  });
2413
1930
  return retVal;
2414
1931
  };
2415
- var deserializeAws_json1_1Problem = function (output, context) {
1932
+ const deserializeAws_json1_1Problem = (output, context) => {
2416
1933
  return {
2417
1934
  AffectedResource: __expectString(output.AffectedResource),
2418
1935
  EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
@@ -2430,10 +1947,10 @@ var deserializeAws_json1_1Problem = function (output, context) {
2430
1947
  Title: __expectString(output.Title),
2431
1948
  };
2432
1949
  };
2433
- var deserializeAws_json1_1ProblemList = function (output, context) {
2434
- var retVal = (output || [])
2435
- .filter(function (e) { return e != null; })
2436
- .map(function (entry) {
1950
+ const deserializeAws_json1_1ProblemList = (output, context) => {
1951
+ const retVal = (output || [])
1952
+ .filter((e) => e != null)
1953
+ .map((entry) => {
2437
1954
  if (entry === null) {
2438
1955
  return null;
2439
1956
  }
@@ -2441,22 +1958,22 @@ var deserializeAws_json1_1ProblemList = function (output, context) {
2441
1958
  });
2442
1959
  return retVal;
2443
1960
  };
2444
- var deserializeAws_json1_1RelatedObservations = function (output, context) {
1961
+ const deserializeAws_json1_1RelatedObservations = (output, context) => {
2445
1962
  return {
2446
1963
  ObservationList: output.ObservationList != null
2447
1964
  ? deserializeAws_json1_1ObservationList(output.ObservationList, context)
2448
1965
  : undefined,
2449
1966
  };
2450
1967
  };
2451
- var deserializeAws_json1_1ResourceInUseException = function (output, context) {
1968
+ const deserializeAws_json1_1ResourceInUseException = (output, context) => {
2452
1969
  return {
2453
1970
  Message: __expectString(output.Message),
2454
1971
  };
2455
1972
  };
2456
- var deserializeAws_json1_1ResourceList = function (output, context) {
2457
- var retVal = (output || [])
2458
- .filter(function (e) { return e != null; })
2459
- .map(function (entry) {
1973
+ const deserializeAws_json1_1ResourceList = (output, context) => {
1974
+ const retVal = (output || [])
1975
+ .filter((e) => e != null)
1976
+ .map((entry) => {
2460
1977
  if (entry === null) {
2461
1978
  return null;
2462
1979
  }
@@ -2464,21 +1981,21 @@ var deserializeAws_json1_1ResourceList = function (output, context) {
2464
1981
  });
2465
1982
  return retVal;
2466
1983
  };
2467
- var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
1984
+ const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
2468
1985
  return {
2469
1986
  Message: __expectString(output.Message),
2470
1987
  };
2471
1988
  };
2472
- var deserializeAws_json1_1Tag = function (output, context) {
1989
+ const deserializeAws_json1_1Tag = (output, context) => {
2473
1990
  return {
2474
1991
  Key: __expectString(output.Key),
2475
1992
  Value: __expectString(output.Value),
2476
1993
  };
2477
1994
  };
2478
- var deserializeAws_json1_1TagList = function (output, context) {
2479
- var retVal = (output || [])
2480
- .filter(function (e) { return e != null; })
2481
- .map(function (entry) {
1995
+ const deserializeAws_json1_1TagList = (output, context) => {
1996
+ const retVal = (output || [])
1997
+ .filter((e) => e != null)
1998
+ .map((entry) => {
2482
1999
  if (entry === null) {
2483
2000
  return null;
2484
2001
  }
@@ -2486,113 +2003,104 @@ var deserializeAws_json1_1TagList = function (output, context) {
2486
2003
  });
2487
2004
  return retVal;
2488
2005
  };
2489
- var deserializeAws_json1_1TagResourceResponse = function (output, context) {
2006
+ const deserializeAws_json1_1TagResourceResponse = (output, context) => {
2490
2007
  return {};
2491
2008
  };
2492
- var deserializeAws_json1_1TagsAlreadyExistException = function (output, context) {
2009
+ const deserializeAws_json1_1TagsAlreadyExistException = (output, context) => {
2493
2010
  return {
2494
2011
  Message: __expectString(output.Message),
2495
2012
  };
2496
2013
  };
2497
- var deserializeAws_json1_1TooManyTagsException = function (output, context) {
2014
+ const deserializeAws_json1_1TooManyTagsException = (output, context) => {
2498
2015
  return {
2499
2016
  Message: __expectString(output.Message),
2500
2017
  ResourceName: __expectString(output.ResourceName),
2501
2018
  };
2502
2019
  };
2503
- var deserializeAws_json1_1UntagResourceResponse = function (output, context) {
2020
+ const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
2504
2021
  return {};
2505
2022
  };
2506
- var deserializeAws_json1_1UpdateApplicationResponse = function (output, context) {
2023
+ const deserializeAws_json1_1UpdateApplicationResponse = (output, context) => {
2507
2024
  return {
2508
2025
  ApplicationInfo: output.ApplicationInfo != null
2509
2026
  ? deserializeAws_json1_1ApplicationInfo(output.ApplicationInfo, context)
2510
2027
  : undefined,
2511
2028
  };
2512
2029
  };
2513
- var deserializeAws_json1_1UpdateComponentConfigurationResponse = function (output, context) {
2030
+ const deserializeAws_json1_1UpdateComponentConfigurationResponse = (output, context) => {
2514
2031
  return {};
2515
2032
  };
2516
- var deserializeAws_json1_1UpdateComponentResponse = function (output, context) {
2033
+ const deserializeAws_json1_1UpdateComponentResponse = (output, context) => {
2517
2034
  return {};
2518
2035
  };
2519
- var deserializeAws_json1_1UpdateLogPatternResponse = function (output, context) {
2036
+ const deserializeAws_json1_1UpdateLogPatternResponse = (output, context) => {
2520
2037
  return {
2521
2038
  LogPattern: output.LogPattern != null ? deserializeAws_json1_1LogPattern(output.LogPattern, context) : undefined,
2522
2039
  ResourceGroupName: __expectString(output.ResourceGroupName),
2523
2040
  };
2524
2041
  };
2525
- var deserializeAws_json1_1ValidationException = function (output, context) {
2042
+ const deserializeAws_json1_1ValidationException = (output, context) => {
2526
2043
  return {
2527
2044
  Message: __expectString(output.Message),
2528
2045
  };
2529
2046
  };
2530
- var deserializeAws_json1_1WorkloadMetaData = function (output, context) {
2531
- return Object.entries(output).reduce(function (acc, _a) {
2532
- var _b;
2533
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
2047
+ const deserializeAws_json1_1WorkloadMetaData = (output, context) => {
2048
+ return Object.entries(output).reduce((acc, [key, value]) => {
2534
2049
  if (value === null) {
2535
2050
  return acc;
2536
2051
  }
2537
- return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
2052
+ return {
2053
+ ...acc,
2054
+ [key]: __expectString(value),
2055
+ };
2538
2056
  }, {});
2539
2057
  };
2540
- var deserializeMetadata = function (output) {
2541
- var _a;
2542
- return ({
2543
- httpStatusCode: output.statusCode,
2544
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
2545
- extendedRequestId: output.headers["x-amz-id-2"],
2546
- cfId: output.headers["x-amz-cf-id"],
2547
- });
2548
- };
2549
- var collectBody = function (streamBody, context) {
2550
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
2058
+ const deserializeMetadata = (output) => ({
2059
+ httpStatusCode: output.statusCode,
2060
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2061
+ extendedRequestId: output.headers["x-amz-id-2"],
2062
+ cfId: output.headers["x-amz-cf-id"],
2063
+ });
2064
+ const collectBody = (streamBody = new Uint8Array(), context) => {
2551
2065
  if (streamBody instanceof Uint8Array) {
2552
2066
  return Promise.resolve(streamBody);
2553
2067
  }
2554
2068
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2555
2069
  };
2556
- var collectBodyString = function (streamBody, context) {
2557
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2558
- };
2559
- var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2560
- var _a, hostname, _b, protocol, port, basePath, contents;
2561
- return __generator(this, function (_c) {
2562
- switch (_c.label) {
2563
- case 0: return [4, context.endpoint()];
2564
- case 1:
2565
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2566
- contents = {
2567
- protocol: protocol,
2568
- hostname: hostname,
2569
- port: port,
2570
- method: "POST",
2571
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2572
- headers: headers,
2573
- };
2574
- if (resolvedHostname !== undefined) {
2575
- contents.hostname = resolvedHostname;
2576
- }
2577
- if (body !== undefined) {
2578
- contents.body = body;
2579
- }
2580
- return [2, new __HttpRequest(contents)];
2581
- }
2582
- });
2583
- }); };
2584
- var parseBody = function (streamBody, context) {
2585
- return collectBodyString(streamBody, context).then(function (encoded) {
2586
- if (encoded.length) {
2587
- return JSON.parse(encoded);
2588
- }
2589
- return {};
2590
- });
2070
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2071
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2072
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2073
+ const contents = {
2074
+ protocol,
2075
+ hostname,
2076
+ port,
2077
+ method: "POST",
2078
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2079
+ headers,
2080
+ };
2081
+ if (resolvedHostname !== undefined) {
2082
+ contents.hostname = resolvedHostname;
2083
+ }
2084
+ if (body !== undefined) {
2085
+ contents.body = body;
2086
+ }
2087
+ return new __HttpRequest(contents);
2591
2088
  };
2592
- var loadRestJsonErrorCode = function (output, data) {
2593
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2594
- var sanitizeErrorCode = function (rawValue) {
2595
- var cleanValue = rawValue;
2089
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2090
+ if (encoded.length) {
2091
+ return JSON.parse(encoded);
2092
+ }
2093
+ return {};
2094
+ });
2095
+ const parseErrorBody = async (errorBody, context) => {
2096
+ const value = await parseBody(errorBody, context);
2097
+ value.message = value.message ?? value.Message;
2098
+ return value;
2099
+ };
2100
+ const loadRestJsonErrorCode = (output, data) => {
2101
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2102
+ const sanitizeErrorCode = (rawValue) => {
2103
+ let cleanValue = rawValue;
2596
2104
  if (typeof cleanValue === "number") {
2597
2105
  cleanValue = cleanValue.toString();
2598
2106
  }
@@ -2607,7 +2115,7 @@ var loadRestJsonErrorCode = function (output, data) {
2607
2115
  }
2608
2116
  return cleanValue;
2609
2117
  };
2610
- var headerKey = findKey(output.headers, "x-amzn-errortype");
2118
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2611
2119
  if (headerKey !== undefined) {
2612
2120
  return sanitizeErrorCode(output.headers[headerKey]);
2613
2121
  }