@aws-sdk/client-application-discovery-service 3.183.0 → 3.186.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 (40) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +2 -2
  3. package/dist-es/ApplicationDiscoveryService.js +109 -102
  4. package/dist-es/ApplicationDiscoveryServiceClient.js +28 -22
  5. package/dist-es/commands/AssociateConfigurationItemsToApplicationCommand.js +28 -21
  6. package/dist-es/commands/BatchDeleteImportDataCommand.js +28 -21
  7. package/dist-es/commands/CreateApplicationCommand.js +28 -21
  8. package/dist-es/commands/CreateTagsCommand.js +28 -21
  9. package/dist-es/commands/DeleteApplicationsCommand.js +28 -21
  10. package/dist-es/commands/DeleteTagsCommand.js +28 -21
  11. package/dist-es/commands/DescribeAgentsCommand.js +28 -21
  12. package/dist-es/commands/DescribeConfigurationsCommand.js +28 -21
  13. package/dist-es/commands/DescribeContinuousExportsCommand.js +28 -21
  14. package/dist-es/commands/DescribeExportConfigurationsCommand.js +28 -21
  15. package/dist-es/commands/DescribeExportTasksCommand.js +28 -21
  16. package/dist-es/commands/DescribeImportTasksCommand.js +28 -21
  17. package/dist-es/commands/DescribeTagsCommand.js +28 -21
  18. package/dist-es/commands/DisassociateConfigurationItemsFromApplicationCommand.js +28 -21
  19. package/dist-es/commands/ExportConfigurationsCommand.js +29 -22
  20. package/dist-es/commands/GetDiscoverySummaryCommand.js +28 -21
  21. package/dist-es/commands/ListConfigurationsCommand.js +28 -21
  22. package/dist-es/commands/ListServerNeighborsCommand.js +28 -21
  23. package/dist-es/commands/StartContinuousExportCommand.js +28 -21
  24. package/dist-es/commands/StartDataCollectionByAgentIdsCommand.js +28 -21
  25. package/dist-es/commands/StartExportTaskCommand.js +28 -21
  26. package/dist-es/commands/StartImportTaskCommand.js +28 -21
  27. package/dist-es/commands/StopContinuousExportCommand.js +28 -21
  28. package/dist-es/commands/StopDataCollectionByAgentIdsCommand.js +28 -21
  29. package/dist-es/commands/UpdateApplicationCommand.js +28 -21
  30. package/dist-es/endpoints.js +8 -8
  31. package/dist-es/models/ApplicationDiscoveryServiceServiceException.js +10 -5
  32. package/dist-es/models/models_0.js +168 -303
  33. package/dist-es/pagination/DescribeContinuousExportsPaginator.js +68 -25
  34. package/dist-es/pagination/DescribeImportTasksPaginator.js +68 -25
  35. package/dist-es/protocols/Aws_json1_1.js +2390 -1849
  36. package/dist-es/runtimeConfig.browser.js +12 -26
  37. package/dist-es/runtimeConfig.js +12 -30
  38. package/dist-es/runtimeConfig.native.js +5 -8
  39. package/dist-es/runtimeConfig.shared.js +11 -8
  40. package/package.json +33 -33
@@ -1,1810 +1,2331 @@
1
+ import { __assign, __awaiter, __generator, __read } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
3
4
  import { v4 as generateIdempotencyToken } from "uuid";
4
5
  import { ApplicationDiscoveryServiceServiceException as __BaseException } from "../models/ApplicationDiscoveryServiceServiceException";
5
6
  import { AuthorizationErrorException, ConflictErrorException, HomeRegionNotSetException, InvalidParameterException, InvalidParameterValueException, OperationNotPermittedException, ResourceInUseException, ResourceNotFoundException, ServerInternalErrorException, } from "../models/models_0";
6
- export const serializeAws_json1_1AssociateConfigurationItemsToApplicationCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.1",
9
- "x-amz-target": "AWSPoseidonService_V2015_11_01.AssociateConfigurationItemsToApplication",
10
- };
11
- let body;
12
- body = JSON.stringify(serializeAws_json1_1AssociateConfigurationItemsToApplicationRequest(input, context));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- export const serializeAws_json1_1BatchDeleteImportDataCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.1",
18
- "x-amz-target": "AWSPoseidonService_V2015_11_01.BatchDeleteImportData",
19
- };
20
- let body;
21
- body = JSON.stringify(serializeAws_json1_1BatchDeleteImportDataRequest(input, context));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const serializeAws_json1_1CreateApplicationCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.1",
27
- "x-amz-target": "AWSPoseidonService_V2015_11_01.CreateApplication",
28
- };
29
- let body;
30
- body = JSON.stringify(serializeAws_json1_1CreateApplicationRequest(input, context));
31
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
- };
33
- export const serializeAws_json1_1CreateTagsCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.1",
36
- "x-amz-target": "AWSPoseidonService_V2015_11_01.CreateTags",
37
- };
38
- let body;
39
- body = JSON.stringify(serializeAws_json1_1CreateTagsRequest(input, context));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const serializeAws_json1_1DeleteApplicationsCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.1",
45
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DeleteApplications",
46
- };
47
- let body;
48
- body = JSON.stringify(serializeAws_json1_1DeleteApplicationsRequest(input, context));
49
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
- };
51
- export const serializeAws_json1_1DeleteTagsCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.1",
54
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DeleteTags",
55
- };
56
- let body;
57
- body = JSON.stringify(serializeAws_json1_1DeleteTagsRequest(input, context));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const serializeAws_json1_1DescribeAgentsCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeAgents",
64
- };
65
- let body;
66
- body = JSON.stringify(serializeAws_json1_1DescribeAgentsRequest(input, context));
67
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
- };
69
- export const serializeAws_json1_1DescribeConfigurationsCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeConfigurations",
73
- };
74
- let body;
75
- body = JSON.stringify(serializeAws_json1_1DescribeConfigurationsRequest(input, context));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const serializeAws_json1_1DescribeContinuousExportsCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.1",
81
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeContinuousExports",
82
- };
83
- let body;
84
- body = JSON.stringify(serializeAws_json1_1DescribeContinuousExportsRequest(input, context));
85
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
- };
87
- export const serializeAws_json1_1DescribeExportConfigurationsCommand = async (input, context) => {
88
- const headers = {
89
- "content-type": "application/x-amz-json-1.1",
90
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeExportConfigurations",
91
- };
92
- let body;
93
- body = JSON.stringify(serializeAws_json1_1DescribeExportConfigurationsRequest(input, context));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const serializeAws_json1_1DescribeExportTasksCommand = async (input, context) => {
97
- const headers = {
98
- "content-type": "application/x-amz-json-1.1",
99
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeExportTasks",
100
- };
101
- let body;
102
- body = JSON.stringify(serializeAws_json1_1DescribeExportTasksRequest(input, context));
103
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
- };
105
- export const serializeAws_json1_1DescribeImportTasksCommand = async (input, context) => {
106
- const headers = {
107
- "content-type": "application/x-amz-json-1.1",
108
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeImportTasks",
109
- };
110
- let body;
111
- body = JSON.stringify(serializeAws_json1_1DescribeImportTasksRequest(input, context));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const serializeAws_json1_1DescribeTagsCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-amz-json-1.1",
117
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeTags",
118
- };
119
- let body;
120
- body = JSON.stringify(serializeAws_json1_1DescribeTagsRequest(input, context));
121
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
122
- };
123
- export const serializeAws_json1_1DisassociateConfigurationItemsFromApplicationCommand = async (input, context) => {
124
- const headers = {
125
- "content-type": "application/x-amz-json-1.1",
126
- "x-amz-target": "AWSPoseidonService_V2015_11_01.DisassociateConfigurationItemsFromApplication",
127
- };
128
- let body;
129
- body = JSON.stringify(serializeAws_json1_1DisassociateConfigurationItemsFromApplicationRequest(input, context));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const serializeAws_json1_1ExportConfigurationsCommand = async (input, context) => {
133
- const headers = {
134
- "content-type": "application/x-amz-json-1.1",
135
- "x-amz-target": "AWSPoseidonService_V2015_11_01.ExportConfigurations",
136
- };
137
- const body = "{}";
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
- export const serializeAws_json1_1GetDiscoverySummaryCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "AWSPoseidonService_V2015_11_01.GetDiscoverySummary",
144
- };
145
- let body;
146
- body = JSON.stringify(serializeAws_json1_1GetDiscoverySummaryRequest(input, context));
147
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
- };
149
- export const serializeAws_json1_1ListConfigurationsCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "AWSPoseidonService_V2015_11_01.ListConfigurations",
153
- };
154
- let body;
155
- body = JSON.stringify(serializeAws_json1_1ListConfigurationsRequest(input, context));
156
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
- };
158
- export const serializeAws_json1_1ListServerNeighborsCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "AWSPoseidonService_V2015_11_01.ListServerNeighbors",
162
- };
163
- let body;
164
- body = JSON.stringify(serializeAws_json1_1ListServerNeighborsRequest(input, context));
165
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
- };
167
- export const serializeAws_json1_1StartContinuousExportCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "AWSPoseidonService_V2015_11_01.StartContinuousExport",
171
- };
172
- let body;
173
- body = JSON.stringify(serializeAws_json1_1StartContinuousExportRequest(input, context));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- export const serializeAws_json1_1StartDataCollectionByAgentIdsCommand = async (input, context) => {
177
- const headers = {
178
- "content-type": "application/x-amz-json-1.1",
179
- "x-amz-target": "AWSPoseidonService_V2015_11_01.StartDataCollectionByAgentIds",
180
- };
181
- let body;
182
- body = JSON.stringify(serializeAws_json1_1StartDataCollectionByAgentIdsRequest(input, context));
183
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
- };
185
- export const serializeAws_json1_1StartExportTaskCommand = async (input, context) => {
186
- const headers = {
187
- "content-type": "application/x-amz-json-1.1",
188
- "x-amz-target": "AWSPoseidonService_V2015_11_01.StartExportTask",
189
- };
190
- let body;
191
- body = JSON.stringify(serializeAws_json1_1StartExportTaskRequest(input, context));
192
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
- };
194
- export const serializeAws_json1_1StartImportTaskCommand = async (input, context) => {
195
- const headers = {
196
- "content-type": "application/x-amz-json-1.1",
197
- "x-amz-target": "AWSPoseidonService_V2015_11_01.StartImportTask",
198
- };
199
- let body;
200
- body = JSON.stringify(serializeAws_json1_1StartImportTaskRequest(input, context));
201
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
- };
203
- export const serializeAws_json1_1StopContinuousExportCommand = async (input, context) => {
204
- const headers = {
205
- "content-type": "application/x-amz-json-1.1",
206
- "x-amz-target": "AWSPoseidonService_V2015_11_01.StopContinuousExport",
207
- };
208
- let body;
209
- body = JSON.stringify(serializeAws_json1_1StopContinuousExportRequest(input, context));
210
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
- };
212
- export const serializeAws_json1_1StopDataCollectionByAgentIdsCommand = async (input, context) => {
213
- const headers = {
214
- "content-type": "application/x-amz-json-1.1",
215
- "x-amz-target": "AWSPoseidonService_V2015_11_01.StopDataCollectionByAgentIds",
216
- };
217
- let body;
218
- body = JSON.stringify(serializeAws_json1_1StopDataCollectionByAgentIdsRequest(input, context));
219
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
220
- };
221
- export const serializeAws_json1_1UpdateApplicationCommand = async (input, context) => {
222
- const headers = {
223
- "content-type": "application/x-amz-json-1.1",
224
- "x-amz-target": "AWSPoseidonService_V2015_11_01.UpdateApplication",
225
- };
226
- let body;
227
- body = JSON.stringify(serializeAws_json1_1UpdateApplicationRequest(input, context));
228
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
229
- };
230
- export const deserializeAws_json1_1AssociateConfigurationItemsToApplicationCommand = async (output, context) => {
231
- if (output.statusCode >= 300) {
232
- return deserializeAws_json1_1AssociateConfigurationItemsToApplicationCommandError(output, context);
233
- }
234
- const data = await parseBody(output.body, context);
235
- let contents = {};
236
- contents = deserializeAws_json1_1AssociateConfigurationItemsToApplicationResponse(data, context);
237
- const response = {
238
- $metadata: deserializeMetadata(output),
239
- ...contents,
240
- };
241
- return Promise.resolve(response);
242
- };
243
- const deserializeAws_json1_1AssociateConfigurationItemsToApplicationCommandError = async (output, context) => {
244
- const parsedOutput = {
245
- ...output,
246
- body: await parseErrorBody(output.body, context),
247
- };
248
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
249
- switch (errorCode) {
250
- case "AuthorizationErrorException":
251
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
252
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
253
- case "HomeRegionNotSetException":
254
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
255
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
256
- case "InvalidParameterException":
257
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
258
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
259
- case "InvalidParameterValueException":
260
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
261
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
262
- case "ServerInternalErrorException":
263
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
264
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
265
- default:
266
- const parsedBody = parsedOutput.body;
267
- throwDefaultError({
268
- output,
269
- parsedBody,
270
- exceptionCtor: __BaseException,
271
- errorCode,
272
- });
273
- }
274
- };
275
- export const deserializeAws_json1_1BatchDeleteImportDataCommand = async (output, context) => {
276
- if (output.statusCode >= 300) {
277
- return deserializeAws_json1_1BatchDeleteImportDataCommandError(output, context);
278
- }
279
- const data = await parseBody(output.body, context);
280
- let contents = {};
281
- contents = deserializeAws_json1_1BatchDeleteImportDataResponse(data, context);
282
- const response = {
283
- $metadata: deserializeMetadata(output),
284
- ...contents,
285
- };
286
- return Promise.resolve(response);
287
- };
288
- const deserializeAws_json1_1BatchDeleteImportDataCommandError = async (output, context) => {
289
- const parsedOutput = {
290
- ...output,
291
- body: await parseErrorBody(output.body, context),
292
- };
293
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
294
- switch (errorCode) {
295
- case "AuthorizationErrorException":
296
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
297
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
298
- case "HomeRegionNotSetException":
299
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
300
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
301
- case "InvalidParameterException":
302
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
303
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
304
- case "InvalidParameterValueException":
305
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
306
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
307
- case "ServerInternalErrorException":
308
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
309
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
310
- default:
311
- const parsedBody = parsedOutput.body;
312
- throwDefaultError({
313
- output,
314
- parsedBody,
315
- exceptionCtor: __BaseException,
316
- errorCode,
317
- });
318
- }
319
- };
320
- export const deserializeAws_json1_1CreateApplicationCommand = async (output, context) => {
321
- if (output.statusCode >= 300) {
322
- return deserializeAws_json1_1CreateApplicationCommandError(output, context);
323
- }
324
- const data = await parseBody(output.body, context);
325
- let contents = {};
326
- contents = deserializeAws_json1_1CreateApplicationResponse(data, context);
327
- const response = {
328
- $metadata: deserializeMetadata(output),
329
- ...contents,
330
- };
331
- return Promise.resolve(response);
332
- };
333
- const deserializeAws_json1_1CreateApplicationCommandError = async (output, context) => {
334
- const parsedOutput = {
335
- ...output,
336
- body: await parseErrorBody(output.body, context),
337
- };
338
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
339
- switch (errorCode) {
340
- case "AuthorizationErrorException":
341
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
342
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
343
- case "HomeRegionNotSetException":
344
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
345
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
346
- case "InvalidParameterException":
347
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
348
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
349
- case "InvalidParameterValueException":
350
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
351
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
352
- case "ServerInternalErrorException":
353
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
354
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
355
- default:
356
- const parsedBody = parsedOutput.body;
357
- throwDefaultError({
358
- output,
359
- parsedBody,
360
- exceptionCtor: __BaseException,
361
- errorCode,
362
- });
363
- }
364
- };
365
- export const deserializeAws_json1_1CreateTagsCommand = async (output, context) => {
366
- if (output.statusCode >= 300) {
367
- return deserializeAws_json1_1CreateTagsCommandError(output, context);
368
- }
369
- const data = await parseBody(output.body, context);
370
- let contents = {};
371
- contents = deserializeAws_json1_1CreateTagsResponse(data, context);
372
- const response = {
373
- $metadata: deserializeMetadata(output),
374
- ...contents,
375
- };
376
- return Promise.resolve(response);
377
- };
378
- const deserializeAws_json1_1CreateTagsCommandError = async (output, context) => {
379
- const parsedOutput = {
380
- ...output,
381
- body: await parseErrorBody(output.body, context),
382
- };
383
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
384
- switch (errorCode) {
385
- case "AuthorizationErrorException":
386
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
387
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
388
- case "HomeRegionNotSetException":
389
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
390
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
391
- case "InvalidParameterException":
392
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
393
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
394
- case "InvalidParameterValueException":
395
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
396
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
397
- case "ResourceNotFoundException":
398
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
399
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
400
- case "ServerInternalErrorException":
401
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
402
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
403
- default:
404
- const parsedBody = parsedOutput.body;
405
- throwDefaultError({
406
- output,
407
- parsedBody,
408
- exceptionCtor: __BaseException,
409
- errorCode,
410
- });
411
- }
412
- };
413
- export const deserializeAws_json1_1DeleteApplicationsCommand = async (output, context) => {
414
- if (output.statusCode >= 300) {
415
- return deserializeAws_json1_1DeleteApplicationsCommandError(output, context);
416
- }
417
- const data = await parseBody(output.body, context);
418
- let contents = {};
419
- contents = deserializeAws_json1_1DeleteApplicationsResponse(data, context);
420
- const response = {
421
- $metadata: deserializeMetadata(output),
422
- ...contents,
423
- };
424
- return Promise.resolve(response);
425
- };
426
- const deserializeAws_json1_1DeleteApplicationsCommandError = async (output, context) => {
427
- const parsedOutput = {
428
- ...output,
429
- body: await parseErrorBody(output.body, context),
430
- };
431
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
432
- switch (errorCode) {
433
- case "AuthorizationErrorException":
434
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
435
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
436
- case "HomeRegionNotSetException":
437
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
438
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
439
- case "InvalidParameterException":
440
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
441
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
442
- case "InvalidParameterValueException":
443
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
444
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
445
- case "ServerInternalErrorException":
446
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
447
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
448
- default:
449
- const parsedBody = parsedOutput.body;
450
- throwDefaultError({
451
- output,
452
- parsedBody,
453
- exceptionCtor: __BaseException,
454
- errorCode,
455
- });
456
- }
457
- };
458
- export const deserializeAws_json1_1DeleteTagsCommand = async (output, context) => {
459
- if (output.statusCode >= 300) {
460
- return deserializeAws_json1_1DeleteTagsCommandError(output, context);
461
- }
462
- const data = await parseBody(output.body, context);
463
- let contents = {};
464
- contents = deserializeAws_json1_1DeleteTagsResponse(data, context);
465
- const response = {
466
- $metadata: deserializeMetadata(output),
467
- ...contents,
468
- };
469
- return Promise.resolve(response);
470
- };
471
- const deserializeAws_json1_1DeleteTagsCommandError = async (output, context) => {
472
- const parsedOutput = {
473
- ...output,
474
- body: await parseErrorBody(output.body, context),
475
- };
476
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
477
- switch (errorCode) {
478
- case "AuthorizationErrorException":
479
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
480
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
481
- case "HomeRegionNotSetException":
482
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
483
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
484
- case "InvalidParameterException":
485
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
486
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
487
- case "InvalidParameterValueException":
488
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
489
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
490
- case "ResourceNotFoundException":
491
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
492
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
493
- case "ServerInternalErrorException":
494
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
495
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
496
- default:
497
- const parsedBody = parsedOutput.body;
498
- throwDefaultError({
499
- output,
500
- parsedBody,
501
- exceptionCtor: __BaseException,
502
- errorCode,
503
- });
504
- }
505
- };
506
- export const deserializeAws_json1_1DescribeAgentsCommand = async (output, context) => {
507
- if (output.statusCode >= 300) {
508
- return deserializeAws_json1_1DescribeAgentsCommandError(output, context);
509
- }
510
- const data = await parseBody(output.body, context);
511
- let contents = {};
512
- contents = deserializeAws_json1_1DescribeAgentsResponse(data, context);
513
- const response = {
514
- $metadata: deserializeMetadata(output),
515
- ...contents,
516
- };
517
- return Promise.resolve(response);
518
- };
519
- const deserializeAws_json1_1DescribeAgentsCommandError = async (output, context) => {
520
- const parsedOutput = {
521
- ...output,
522
- body: await parseErrorBody(output.body, context),
523
- };
524
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
525
- switch (errorCode) {
526
- case "AuthorizationErrorException":
527
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
528
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
529
- case "HomeRegionNotSetException":
530
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
531
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
532
- case "InvalidParameterException":
533
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
534
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
535
- case "InvalidParameterValueException":
536
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
537
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
538
- case "ServerInternalErrorException":
539
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
540
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
541
- default:
542
- const parsedBody = parsedOutput.body;
543
- throwDefaultError({
544
- output,
545
- parsedBody,
546
- exceptionCtor: __BaseException,
547
- errorCode,
548
- });
549
- }
550
- };
551
- export const deserializeAws_json1_1DescribeConfigurationsCommand = async (output, context) => {
552
- if (output.statusCode >= 300) {
553
- return deserializeAws_json1_1DescribeConfigurationsCommandError(output, context);
554
- }
555
- const data = await parseBody(output.body, context);
556
- let contents = {};
557
- contents = deserializeAws_json1_1DescribeConfigurationsResponse(data, context);
558
- const response = {
559
- $metadata: deserializeMetadata(output),
560
- ...contents,
561
- };
562
- return Promise.resolve(response);
563
- };
564
- const deserializeAws_json1_1DescribeConfigurationsCommandError = async (output, context) => {
565
- const parsedOutput = {
566
- ...output,
567
- body: await parseErrorBody(output.body, context),
568
- };
569
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
570
- switch (errorCode) {
571
- case "AuthorizationErrorException":
572
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
573
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
574
- case "HomeRegionNotSetException":
575
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
576
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
577
- case "InvalidParameterException":
578
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
579
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
580
- case "InvalidParameterValueException":
581
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
582
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
583
- case "ServerInternalErrorException":
584
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
585
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
586
- default:
587
- const parsedBody = parsedOutput.body;
588
- throwDefaultError({
589
- output,
590
- parsedBody,
591
- exceptionCtor: __BaseException,
592
- errorCode,
593
- });
594
- }
595
- };
596
- export const deserializeAws_json1_1DescribeContinuousExportsCommand = async (output, context) => {
597
- if (output.statusCode >= 300) {
598
- return deserializeAws_json1_1DescribeContinuousExportsCommandError(output, context);
599
- }
600
- const data = await parseBody(output.body, context);
601
- let contents = {};
602
- contents = deserializeAws_json1_1DescribeContinuousExportsResponse(data, context);
603
- const response = {
604
- $metadata: deserializeMetadata(output),
605
- ...contents,
606
- };
607
- return Promise.resolve(response);
608
- };
609
- const deserializeAws_json1_1DescribeContinuousExportsCommandError = async (output, context) => {
610
- const parsedOutput = {
611
- ...output,
612
- body: await parseErrorBody(output.body, context),
613
- };
614
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
615
- switch (errorCode) {
616
- case "AuthorizationErrorException":
617
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
618
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
619
- case "HomeRegionNotSetException":
620
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
621
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
622
- case "InvalidParameterException":
623
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
624
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
625
- case "InvalidParameterValueException":
626
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
627
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
628
- case "OperationNotPermittedException":
629
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
630
- throw await deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context);
631
- case "ResourceNotFoundException":
632
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
633
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
634
- case "ServerInternalErrorException":
635
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
636
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
637
- default:
638
- const parsedBody = parsedOutput.body;
639
- throwDefaultError({
640
- output,
641
- parsedBody,
642
- exceptionCtor: __BaseException,
643
- errorCode,
644
- });
645
- }
646
- };
647
- export const deserializeAws_json1_1DescribeExportConfigurationsCommand = async (output, context) => {
648
- if (output.statusCode >= 300) {
649
- return deserializeAws_json1_1DescribeExportConfigurationsCommandError(output, context);
650
- }
651
- const data = await parseBody(output.body, context);
652
- let contents = {};
653
- contents = deserializeAws_json1_1DescribeExportConfigurationsResponse(data, context);
654
- const response = {
655
- $metadata: deserializeMetadata(output),
656
- ...contents,
657
- };
658
- return Promise.resolve(response);
659
- };
660
- const deserializeAws_json1_1DescribeExportConfigurationsCommandError = async (output, context) => {
661
- const parsedOutput = {
662
- ...output,
663
- body: await parseErrorBody(output.body, context),
664
- };
665
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
666
- switch (errorCode) {
667
- case "AuthorizationErrorException":
668
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
669
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
670
- case "HomeRegionNotSetException":
671
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
672
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
673
- case "InvalidParameterException":
674
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
675
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
676
- case "InvalidParameterValueException":
677
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
678
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
679
- case "ResourceNotFoundException":
680
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
681
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
682
- case "ServerInternalErrorException":
683
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
684
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
685
- default:
686
- const parsedBody = parsedOutput.body;
687
- throwDefaultError({
688
- output,
689
- parsedBody,
690
- exceptionCtor: __BaseException,
691
- errorCode,
692
- });
693
- }
694
- };
695
- export const deserializeAws_json1_1DescribeExportTasksCommand = async (output, context) => {
696
- if (output.statusCode >= 300) {
697
- return deserializeAws_json1_1DescribeExportTasksCommandError(output, context);
698
- }
699
- const data = await parseBody(output.body, context);
700
- let contents = {};
701
- contents = deserializeAws_json1_1DescribeExportTasksResponse(data, context);
702
- const response = {
703
- $metadata: deserializeMetadata(output),
704
- ...contents,
705
- };
706
- return Promise.resolve(response);
707
- };
708
- const deserializeAws_json1_1DescribeExportTasksCommandError = async (output, context) => {
709
- const parsedOutput = {
710
- ...output,
711
- body: await parseErrorBody(output.body, context),
712
- };
713
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
714
- switch (errorCode) {
715
- case "AuthorizationErrorException":
716
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
717
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
718
- case "HomeRegionNotSetException":
719
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
720
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
721
- case "InvalidParameterException":
722
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
723
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
724
- case "InvalidParameterValueException":
725
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
726
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
727
- case "ServerInternalErrorException":
728
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
729
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
730
- default:
731
- const parsedBody = parsedOutput.body;
732
- throwDefaultError({
733
- output,
734
- parsedBody,
735
- exceptionCtor: __BaseException,
736
- errorCode,
737
- });
738
- }
739
- };
740
- export const deserializeAws_json1_1DescribeImportTasksCommand = async (output, context) => {
741
- if (output.statusCode >= 300) {
742
- return deserializeAws_json1_1DescribeImportTasksCommandError(output, context);
743
- }
744
- const data = await parseBody(output.body, context);
745
- let contents = {};
746
- contents = deserializeAws_json1_1DescribeImportTasksResponse(data, context);
747
- const response = {
748
- $metadata: deserializeMetadata(output),
749
- ...contents,
750
- };
751
- return Promise.resolve(response);
752
- };
753
- const deserializeAws_json1_1DescribeImportTasksCommandError = async (output, context) => {
754
- const parsedOutput = {
755
- ...output,
756
- body: await parseErrorBody(output.body, context),
757
- };
758
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
759
- switch (errorCode) {
760
- case "AuthorizationErrorException":
761
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
762
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
763
- case "HomeRegionNotSetException":
764
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
765
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
766
- case "InvalidParameterException":
767
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
768
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
769
- case "InvalidParameterValueException":
770
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
771
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
772
- case "ServerInternalErrorException":
773
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
774
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
775
- default:
776
- const parsedBody = parsedOutput.body;
777
- throwDefaultError({
778
- output,
779
- parsedBody,
780
- exceptionCtor: __BaseException,
781
- errorCode,
782
- });
783
- }
784
- };
785
- export const deserializeAws_json1_1DescribeTagsCommand = async (output, context) => {
786
- if (output.statusCode >= 300) {
787
- return deserializeAws_json1_1DescribeTagsCommandError(output, context);
788
- }
789
- const data = await parseBody(output.body, context);
790
- let contents = {};
791
- contents = deserializeAws_json1_1DescribeTagsResponse(data, context);
792
- const response = {
793
- $metadata: deserializeMetadata(output),
794
- ...contents,
795
- };
796
- return Promise.resolve(response);
797
- };
798
- const deserializeAws_json1_1DescribeTagsCommandError = async (output, context) => {
799
- const parsedOutput = {
800
- ...output,
801
- body: await parseErrorBody(output.body, context),
802
- };
803
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
804
- switch (errorCode) {
805
- case "AuthorizationErrorException":
806
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
807
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
808
- case "HomeRegionNotSetException":
809
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
810
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
811
- case "InvalidParameterException":
812
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
813
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
814
- case "InvalidParameterValueException":
815
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
816
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
817
- case "ResourceNotFoundException":
818
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
819
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
820
- case "ServerInternalErrorException":
821
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
822
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
823
- default:
824
- const parsedBody = parsedOutput.body;
825
- throwDefaultError({
826
- output,
827
- parsedBody,
828
- exceptionCtor: __BaseException,
829
- errorCode,
830
- });
831
- }
832
- };
833
- export const deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationCommand = async (output, context) => {
834
- if (output.statusCode >= 300) {
835
- return deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationCommandError(output, context);
836
- }
837
- const data = await parseBody(output.body, context);
838
- let contents = {};
839
- contents = deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationResponse(data, context);
840
- const response = {
841
- $metadata: deserializeMetadata(output),
842
- ...contents,
843
- };
844
- return Promise.resolve(response);
845
- };
846
- const deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationCommandError = async (output, context) => {
847
- const parsedOutput = {
848
- ...output,
849
- body: await parseErrorBody(output.body, context),
850
- };
851
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
852
- switch (errorCode) {
853
- case "AuthorizationErrorException":
854
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
855
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
856
- case "HomeRegionNotSetException":
857
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
858
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
859
- case "InvalidParameterException":
860
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
861
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
862
- case "InvalidParameterValueException":
863
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
864
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
865
- case "ServerInternalErrorException":
866
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
867
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
868
- default:
869
- const parsedBody = parsedOutput.body;
870
- throwDefaultError({
871
- output,
872
- parsedBody,
873
- exceptionCtor: __BaseException,
874
- errorCode,
875
- });
876
- }
877
- };
878
- export const deserializeAws_json1_1ExportConfigurationsCommand = async (output, context) => {
879
- if (output.statusCode >= 300) {
880
- return deserializeAws_json1_1ExportConfigurationsCommandError(output, context);
881
- }
882
- const data = await parseBody(output.body, context);
883
- let contents = {};
884
- contents = deserializeAws_json1_1ExportConfigurationsResponse(data, context);
885
- const response = {
886
- $metadata: deserializeMetadata(output),
887
- ...contents,
888
- };
889
- return Promise.resolve(response);
890
- };
891
- const deserializeAws_json1_1ExportConfigurationsCommandError = async (output, context) => {
892
- const parsedOutput = {
893
- ...output,
894
- body: await parseErrorBody(output.body, context),
895
- };
896
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
897
- switch (errorCode) {
898
- case "AuthorizationErrorException":
899
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
900
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
901
- case "HomeRegionNotSetException":
902
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
903
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
904
- case "InvalidParameterException":
905
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
906
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
907
- case "InvalidParameterValueException":
908
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
909
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
910
- case "OperationNotPermittedException":
911
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
912
- throw await deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context);
913
- case "ServerInternalErrorException":
914
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
915
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
916
- default:
917
- const parsedBody = parsedOutput.body;
918
- throwDefaultError({
919
- output,
920
- parsedBody,
921
- exceptionCtor: __BaseException,
922
- errorCode,
923
- });
924
- }
925
- };
926
- export const deserializeAws_json1_1GetDiscoverySummaryCommand = async (output, context) => {
927
- if (output.statusCode >= 300) {
928
- return deserializeAws_json1_1GetDiscoverySummaryCommandError(output, context);
929
- }
930
- const data = await parseBody(output.body, context);
931
- let contents = {};
932
- contents = deserializeAws_json1_1GetDiscoverySummaryResponse(data, context);
933
- const response = {
934
- $metadata: deserializeMetadata(output),
935
- ...contents,
936
- };
937
- return Promise.resolve(response);
938
- };
939
- const deserializeAws_json1_1GetDiscoverySummaryCommandError = async (output, context) => {
940
- const parsedOutput = {
941
- ...output,
942
- body: await parseErrorBody(output.body, context),
943
- };
944
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
945
- switch (errorCode) {
946
- case "AuthorizationErrorException":
947
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
948
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
949
- case "HomeRegionNotSetException":
950
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
951
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
952
- case "InvalidParameterException":
953
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
954
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
955
- case "InvalidParameterValueException":
956
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
957
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
958
- case "ServerInternalErrorException":
959
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
960
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
961
- default:
962
- const parsedBody = parsedOutput.body;
963
- throwDefaultError({
964
- output,
965
- parsedBody,
966
- exceptionCtor: __BaseException,
967
- errorCode,
968
- });
969
- }
970
- };
971
- export const deserializeAws_json1_1ListConfigurationsCommand = async (output, context) => {
972
- if (output.statusCode >= 300) {
973
- return deserializeAws_json1_1ListConfigurationsCommandError(output, context);
974
- }
975
- const data = await parseBody(output.body, context);
976
- let contents = {};
977
- contents = deserializeAws_json1_1ListConfigurationsResponse(data, context);
978
- const response = {
979
- $metadata: deserializeMetadata(output),
980
- ...contents,
981
- };
982
- return Promise.resolve(response);
983
- };
984
- const deserializeAws_json1_1ListConfigurationsCommandError = async (output, context) => {
985
- const parsedOutput = {
986
- ...output,
987
- body: await parseErrorBody(output.body, context),
988
- };
989
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
990
- switch (errorCode) {
991
- case "AuthorizationErrorException":
992
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
993
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
994
- case "HomeRegionNotSetException":
995
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
996
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
997
- case "InvalidParameterException":
998
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
999
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1000
- case "InvalidParameterValueException":
1001
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1002
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
1003
- case "ResourceNotFoundException":
1004
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
1005
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1006
- case "ServerInternalErrorException":
1007
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1008
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
1009
- default:
1010
- const parsedBody = parsedOutput.body;
1011
- throwDefaultError({
1012
- output,
1013
- parsedBody,
1014
- exceptionCtor: __BaseException,
1015
- errorCode,
1016
- });
1017
- }
1018
- };
1019
- export const deserializeAws_json1_1ListServerNeighborsCommand = async (output, context) => {
1020
- if (output.statusCode >= 300) {
1021
- return deserializeAws_json1_1ListServerNeighborsCommandError(output, context);
1022
- }
1023
- const data = await parseBody(output.body, context);
1024
- let contents = {};
1025
- contents = deserializeAws_json1_1ListServerNeighborsResponse(data, context);
1026
- const response = {
1027
- $metadata: deserializeMetadata(output),
1028
- ...contents,
1029
- };
1030
- return Promise.resolve(response);
1031
- };
1032
- const deserializeAws_json1_1ListServerNeighborsCommandError = async (output, context) => {
1033
- const parsedOutput = {
1034
- ...output,
1035
- body: await parseErrorBody(output.body, context),
1036
- };
1037
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1038
- switch (errorCode) {
1039
- case "AuthorizationErrorException":
1040
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1041
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
1042
- case "HomeRegionNotSetException":
1043
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1044
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
1045
- case "InvalidParameterException":
1046
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1047
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1048
- case "InvalidParameterValueException":
1049
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1050
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
1051
- case "ServerInternalErrorException":
1052
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1053
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
1054
- default:
1055
- const parsedBody = parsedOutput.body;
1056
- throwDefaultError({
1057
- output,
1058
- parsedBody,
1059
- exceptionCtor: __BaseException,
1060
- errorCode,
1061
- });
1062
- }
1063
- };
1064
- export const deserializeAws_json1_1StartContinuousExportCommand = async (output, context) => {
1065
- if (output.statusCode >= 300) {
1066
- return deserializeAws_json1_1StartContinuousExportCommandError(output, context);
1067
- }
1068
- const data = await parseBody(output.body, context);
1069
- let contents = {};
1070
- contents = deserializeAws_json1_1StartContinuousExportResponse(data, context);
1071
- const response = {
1072
- $metadata: deserializeMetadata(output),
1073
- ...contents,
1074
- };
1075
- return Promise.resolve(response);
1076
- };
1077
- const deserializeAws_json1_1StartContinuousExportCommandError = async (output, context) => {
1078
- const parsedOutput = {
1079
- ...output,
1080
- body: await parseErrorBody(output.body, context),
1081
- };
1082
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1083
- switch (errorCode) {
1084
- case "AuthorizationErrorException":
1085
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1086
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
1087
- case "ConflictErrorException":
1088
- case "com.amazonaws.applicationdiscoveryservice#ConflictErrorException":
1089
- throw await deserializeAws_json1_1ConflictErrorExceptionResponse(parsedOutput, context);
1090
- case "HomeRegionNotSetException":
1091
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1092
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
1093
- case "InvalidParameterException":
1094
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1095
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1096
- case "InvalidParameterValueException":
1097
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1098
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
1099
- case "OperationNotPermittedException":
1100
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1101
- throw await deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context);
1102
- case "ResourceInUseException":
1103
- case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
1104
- throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
1105
- case "ServerInternalErrorException":
1106
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1107
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
1108
- default:
1109
- const parsedBody = parsedOutput.body;
1110
- throwDefaultError({
1111
- output,
1112
- parsedBody,
1113
- exceptionCtor: __BaseException,
1114
- errorCode,
1115
- });
1116
- }
1117
- };
1118
- export const deserializeAws_json1_1StartDataCollectionByAgentIdsCommand = async (output, context) => {
1119
- if (output.statusCode >= 300) {
1120
- return deserializeAws_json1_1StartDataCollectionByAgentIdsCommandError(output, context);
1121
- }
1122
- const data = await parseBody(output.body, context);
1123
- let contents = {};
1124
- contents = deserializeAws_json1_1StartDataCollectionByAgentIdsResponse(data, context);
1125
- const response = {
1126
- $metadata: deserializeMetadata(output),
1127
- ...contents,
1128
- };
1129
- return Promise.resolve(response);
1130
- };
1131
- const deserializeAws_json1_1StartDataCollectionByAgentIdsCommandError = async (output, context) => {
1132
- const parsedOutput = {
1133
- ...output,
1134
- body: await parseErrorBody(output.body, context),
1135
- };
1136
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1137
- switch (errorCode) {
1138
- case "AuthorizationErrorException":
1139
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1140
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
1141
- case "HomeRegionNotSetException":
1142
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1143
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
1144
- case "InvalidParameterException":
1145
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1146
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1147
- case "InvalidParameterValueException":
1148
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1149
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
1150
- case "ServerInternalErrorException":
1151
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1152
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
1153
- default:
1154
- const parsedBody = parsedOutput.body;
1155
- throwDefaultError({
1156
- output,
1157
- parsedBody,
1158
- exceptionCtor: __BaseException,
1159
- errorCode,
1160
- });
1161
- }
1162
- };
1163
- export const deserializeAws_json1_1StartExportTaskCommand = async (output, context) => {
1164
- if (output.statusCode >= 300) {
1165
- return deserializeAws_json1_1StartExportTaskCommandError(output, context);
1166
- }
1167
- const data = await parseBody(output.body, context);
1168
- let contents = {};
1169
- contents = deserializeAws_json1_1StartExportTaskResponse(data, context);
1170
- const response = {
1171
- $metadata: deserializeMetadata(output),
1172
- ...contents,
1173
- };
1174
- return Promise.resolve(response);
1175
- };
1176
- const deserializeAws_json1_1StartExportTaskCommandError = async (output, context) => {
1177
- const parsedOutput = {
1178
- ...output,
1179
- body: await parseErrorBody(output.body, context),
1180
- };
1181
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1182
- switch (errorCode) {
1183
- case "AuthorizationErrorException":
1184
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1185
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
1186
- case "HomeRegionNotSetException":
1187
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1188
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
1189
- case "InvalidParameterException":
1190
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1191
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1192
- case "InvalidParameterValueException":
1193
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1194
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
1195
- case "OperationNotPermittedException":
1196
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1197
- throw await deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context);
1198
- case "ServerInternalErrorException":
1199
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1200
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
1201
- default:
1202
- const parsedBody = parsedOutput.body;
1203
- throwDefaultError({
1204
- output,
1205
- parsedBody,
1206
- exceptionCtor: __BaseException,
1207
- errorCode,
1208
- });
1209
- }
1210
- };
1211
- export const deserializeAws_json1_1StartImportTaskCommand = async (output, context) => {
1212
- if (output.statusCode >= 300) {
1213
- return deserializeAws_json1_1StartImportTaskCommandError(output, context);
1214
- }
1215
- const data = await parseBody(output.body, context);
1216
- let contents = {};
1217
- contents = deserializeAws_json1_1StartImportTaskResponse(data, context);
1218
- const response = {
1219
- $metadata: deserializeMetadata(output),
1220
- ...contents,
1221
- };
1222
- return Promise.resolve(response);
1223
- };
1224
- const deserializeAws_json1_1StartImportTaskCommandError = async (output, context) => {
1225
- const parsedOutput = {
1226
- ...output,
1227
- body: await parseErrorBody(output.body, context),
1228
- };
1229
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1230
- switch (errorCode) {
1231
- case "AuthorizationErrorException":
1232
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1233
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
1234
- case "HomeRegionNotSetException":
1235
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1236
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
1237
- case "InvalidParameterException":
1238
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1239
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1240
- case "InvalidParameterValueException":
1241
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1242
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
1243
- case "ResourceInUseException":
1244
- case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
1245
- throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
1246
- case "ServerInternalErrorException":
1247
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1248
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
1249
- default:
1250
- const parsedBody = parsedOutput.body;
1251
- throwDefaultError({
1252
- output,
1253
- parsedBody,
1254
- exceptionCtor: __BaseException,
1255
- errorCode,
1256
- });
1257
- }
1258
- };
1259
- export const deserializeAws_json1_1StopContinuousExportCommand = async (output, context) => {
1260
- if (output.statusCode >= 300) {
1261
- return deserializeAws_json1_1StopContinuousExportCommandError(output, context);
1262
- }
1263
- const data = await parseBody(output.body, context);
1264
- let contents = {};
1265
- contents = deserializeAws_json1_1StopContinuousExportResponse(data, context);
1266
- const response = {
1267
- $metadata: deserializeMetadata(output),
1268
- ...contents,
1269
- };
1270
- return Promise.resolve(response);
1271
- };
1272
- const deserializeAws_json1_1StopContinuousExportCommandError = async (output, context) => {
1273
- const parsedOutput = {
1274
- ...output,
1275
- body: await parseErrorBody(output.body, context),
1276
- };
1277
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1278
- switch (errorCode) {
1279
- case "AuthorizationErrorException":
1280
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1281
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
1282
- case "HomeRegionNotSetException":
1283
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1284
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
1285
- case "InvalidParameterException":
1286
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1287
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1288
- case "InvalidParameterValueException":
1289
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1290
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
1291
- case "OperationNotPermittedException":
1292
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1293
- throw await deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context);
1294
- case "ResourceInUseException":
1295
- case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
1296
- throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
1297
- case "ResourceNotFoundException":
1298
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
1299
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1300
- case "ServerInternalErrorException":
1301
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1302
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
1303
- default:
1304
- const parsedBody = parsedOutput.body;
1305
- throwDefaultError({
1306
- output,
1307
- parsedBody,
1308
- exceptionCtor: __BaseException,
1309
- errorCode,
1310
- });
1311
- }
1312
- };
1313
- export const deserializeAws_json1_1StopDataCollectionByAgentIdsCommand = async (output, context) => {
1314
- if (output.statusCode >= 300) {
1315
- return deserializeAws_json1_1StopDataCollectionByAgentIdsCommandError(output, context);
1316
- }
1317
- const data = await parseBody(output.body, context);
1318
- let contents = {};
1319
- contents = deserializeAws_json1_1StopDataCollectionByAgentIdsResponse(data, context);
1320
- const response = {
1321
- $metadata: deserializeMetadata(output),
1322
- ...contents,
1323
- };
1324
- return Promise.resolve(response);
1325
- };
1326
- const deserializeAws_json1_1StopDataCollectionByAgentIdsCommandError = async (output, context) => {
1327
- const parsedOutput = {
1328
- ...output,
1329
- body: await parseErrorBody(output.body, context),
1330
- };
1331
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1332
- switch (errorCode) {
1333
- case "AuthorizationErrorException":
1334
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1335
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
1336
- case "HomeRegionNotSetException":
1337
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1338
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
1339
- case "InvalidParameterException":
1340
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1341
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1342
- case "InvalidParameterValueException":
1343
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1344
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
1345
- case "ServerInternalErrorException":
1346
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1347
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
1348
- default:
1349
- const parsedBody = parsedOutput.body;
1350
- throwDefaultError({
1351
- output,
1352
- parsedBody,
1353
- exceptionCtor: __BaseException,
1354
- errorCode,
1355
- });
1356
- }
1357
- };
1358
- export const deserializeAws_json1_1UpdateApplicationCommand = async (output, context) => {
1359
- if (output.statusCode >= 300) {
1360
- return deserializeAws_json1_1UpdateApplicationCommandError(output, context);
1361
- }
1362
- const data = await parseBody(output.body, context);
1363
- let contents = {};
1364
- contents = deserializeAws_json1_1UpdateApplicationResponse(data, context);
1365
- const response = {
1366
- $metadata: deserializeMetadata(output),
1367
- ...contents,
1368
- };
1369
- return Promise.resolve(response);
1370
- };
1371
- const deserializeAws_json1_1UpdateApplicationCommandError = async (output, context) => {
1372
- const parsedOutput = {
1373
- ...output,
1374
- body: await parseErrorBody(output.body, context),
1375
- };
1376
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1377
- switch (errorCode) {
1378
- case "AuthorizationErrorException":
1379
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1380
- throw await deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context);
1381
- case "HomeRegionNotSetException":
1382
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1383
- throw await deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context);
1384
- case "InvalidParameterException":
1385
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1386
- throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1387
- case "InvalidParameterValueException":
1388
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1389
- throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
1390
- case "ServerInternalErrorException":
1391
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1392
- throw await deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context);
1393
- default:
1394
- const parsedBody = parsedOutput.body;
1395
- throwDefaultError({
1396
- output,
1397
- parsedBody,
1398
- exceptionCtor: __BaseException,
1399
- errorCode,
1400
- });
1401
- }
1402
- };
1403
- const deserializeAws_json1_1AuthorizationErrorExceptionResponse = async (parsedOutput, context) => {
1404
- const body = parsedOutput.body;
1405
- const deserialized = deserializeAws_json1_1AuthorizationErrorException(body, context);
1406
- const exception = new AuthorizationErrorException({
1407
- $metadata: deserializeMetadata(parsedOutput),
1408
- ...deserialized,
1409
- });
1410
- return __decorateServiceException(exception, body);
1411
- };
1412
- const deserializeAws_json1_1ConflictErrorExceptionResponse = async (parsedOutput, context) => {
1413
- const body = parsedOutput.body;
1414
- const deserialized = deserializeAws_json1_1ConflictErrorException(body, context);
1415
- const exception = new ConflictErrorException({
1416
- $metadata: deserializeMetadata(parsedOutput),
1417
- ...deserialized,
1418
- });
1419
- return __decorateServiceException(exception, body);
1420
- };
1421
- const deserializeAws_json1_1HomeRegionNotSetExceptionResponse = async (parsedOutput, context) => {
1422
- const body = parsedOutput.body;
1423
- const deserialized = deserializeAws_json1_1HomeRegionNotSetException(body, context);
1424
- const exception = new HomeRegionNotSetException({
1425
- $metadata: deserializeMetadata(parsedOutput),
1426
- ...deserialized,
1427
- });
1428
- return __decorateServiceException(exception, body);
1429
- };
1430
- const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
1431
- const body = parsedOutput.body;
1432
- const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
1433
- const exception = new InvalidParameterException({
1434
- $metadata: deserializeMetadata(parsedOutput),
1435
- ...deserialized,
1436
- });
1437
- return __decorateServiceException(exception, body);
1438
- };
1439
- const deserializeAws_json1_1InvalidParameterValueExceptionResponse = async (parsedOutput, context) => {
1440
- const body = parsedOutput.body;
1441
- const deserialized = deserializeAws_json1_1InvalidParameterValueException(body, context);
1442
- const exception = new InvalidParameterValueException({
1443
- $metadata: deserializeMetadata(parsedOutput),
1444
- ...deserialized,
1445
- });
1446
- return __decorateServiceException(exception, body);
1447
- };
1448
- const deserializeAws_json1_1OperationNotPermittedExceptionResponse = async (parsedOutput, context) => {
1449
- const body = parsedOutput.body;
1450
- const deserialized = deserializeAws_json1_1OperationNotPermittedException(body, context);
1451
- const exception = new OperationNotPermittedException({
1452
- $metadata: deserializeMetadata(parsedOutput),
1453
- ...deserialized,
1454
- });
1455
- return __decorateServiceException(exception, body);
1456
- };
1457
- const deserializeAws_json1_1ResourceInUseExceptionResponse = async (parsedOutput, context) => {
1458
- const body = parsedOutput.body;
1459
- const deserialized = deserializeAws_json1_1ResourceInUseException(body, context);
1460
- const exception = new ResourceInUseException({
1461
- $metadata: deserializeMetadata(parsedOutput),
1462
- ...deserialized,
1463
- });
1464
- return __decorateServiceException(exception, body);
1465
- };
1466
- const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1467
- const body = parsedOutput.body;
1468
- const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1469
- const exception = new ResourceNotFoundException({
1470
- $metadata: deserializeMetadata(parsedOutput),
1471
- ...deserialized,
1472
- });
1473
- return __decorateServiceException(exception, body);
1474
- };
1475
- const deserializeAws_json1_1ServerInternalErrorExceptionResponse = async (parsedOutput, context) => {
1476
- const body = parsedOutput.body;
1477
- const deserialized = deserializeAws_json1_1ServerInternalErrorException(body, context);
1478
- const exception = new ServerInternalErrorException({
1479
- $metadata: deserializeMetadata(parsedOutput),
1480
- ...deserialized,
1481
- });
1482
- return __decorateServiceException(exception, body);
1483
- };
1484
- const serializeAws_json1_1AgentIds = (input, context) => {
7
+ export var serializeAws_json1_1AssociateConfigurationItemsToApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
8
+ var headers, body;
9
+ return __generator(this, function (_a) {
10
+ headers = {
11
+ "content-type": "application/x-amz-json-1.1",
12
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.AssociateConfigurationItemsToApplication",
13
+ };
14
+ body = JSON.stringify(serializeAws_json1_1AssociateConfigurationItemsToApplicationRequest(input, context));
15
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
16
+ });
17
+ }); };
18
+ export var serializeAws_json1_1BatchDeleteImportDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
19
+ var headers, body;
20
+ return __generator(this, function (_a) {
21
+ headers = {
22
+ "content-type": "application/x-amz-json-1.1",
23
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.BatchDeleteImportData",
24
+ };
25
+ body = JSON.stringify(serializeAws_json1_1BatchDeleteImportDataRequest(input, context));
26
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
27
+ });
28
+ }); };
29
+ export var serializeAws_json1_1CreateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
30
+ var headers, body;
31
+ return __generator(this, function (_a) {
32
+ headers = {
33
+ "content-type": "application/x-amz-json-1.1",
34
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.CreateApplication",
35
+ };
36
+ body = JSON.stringify(serializeAws_json1_1CreateApplicationRequest(input, context));
37
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
38
+ });
39
+ }); };
40
+ export var serializeAws_json1_1CreateTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
41
+ var headers, body;
42
+ return __generator(this, function (_a) {
43
+ headers = {
44
+ "content-type": "application/x-amz-json-1.1",
45
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.CreateTags",
46
+ };
47
+ body = JSON.stringify(serializeAws_json1_1CreateTagsRequest(input, context));
48
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
49
+ });
50
+ }); };
51
+ export var serializeAws_json1_1DeleteApplicationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
52
+ var headers, body;
53
+ return __generator(this, function (_a) {
54
+ headers = {
55
+ "content-type": "application/x-amz-json-1.1",
56
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DeleteApplications",
57
+ };
58
+ body = JSON.stringify(serializeAws_json1_1DeleteApplicationsRequest(input, context));
59
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
60
+ });
61
+ }); };
62
+ export var serializeAws_json1_1DeleteTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
63
+ var headers, body;
64
+ return __generator(this, function (_a) {
65
+ headers = {
66
+ "content-type": "application/x-amz-json-1.1",
67
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DeleteTags",
68
+ };
69
+ body = JSON.stringify(serializeAws_json1_1DeleteTagsRequest(input, context));
70
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
71
+ });
72
+ }); };
73
+ export var serializeAws_json1_1DescribeAgentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
74
+ var headers, body;
75
+ return __generator(this, function (_a) {
76
+ headers = {
77
+ "content-type": "application/x-amz-json-1.1",
78
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeAgents",
79
+ };
80
+ body = JSON.stringify(serializeAws_json1_1DescribeAgentsRequest(input, context));
81
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
82
+ });
83
+ }); };
84
+ export var serializeAws_json1_1DescribeConfigurationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
85
+ var headers, body;
86
+ return __generator(this, function (_a) {
87
+ headers = {
88
+ "content-type": "application/x-amz-json-1.1",
89
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeConfigurations",
90
+ };
91
+ body = JSON.stringify(serializeAws_json1_1DescribeConfigurationsRequest(input, context));
92
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
93
+ });
94
+ }); };
95
+ export var serializeAws_json1_1DescribeContinuousExportsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
96
+ var headers, body;
97
+ return __generator(this, function (_a) {
98
+ headers = {
99
+ "content-type": "application/x-amz-json-1.1",
100
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeContinuousExports",
101
+ };
102
+ body = JSON.stringify(serializeAws_json1_1DescribeContinuousExportsRequest(input, context));
103
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
104
+ });
105
+ }); };
106
+ export var serializeAws_json1_1DescribeExportConfigurationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
107
+ var headers, body;
108
+ return __generator(this, function (_a) {
109
+ headers = {
110
+ "content-type": "application/x-amz-json-1.1",
111
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeExportConfigurations",
112
+ };
113
+ body = JSON.stringify(serializeAws_json1_1DescribeExportConfigurationsRequest(input, context));
114
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
115
+ });
116
+ }); };
117
+ export var serializeAws_json1_1DescribeExportTasksCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
118
+ var headers, body;
119
+ return __generator(this, function (_a) {
120
+ headers = {
121
+ "content-type": "application/x-amz-json-1.1",
122
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeExportTasks",
123
+ };
124
+ body = JSON.stringify(serializeAws_json1_1DescribeExportTasksRequest(input, context));
125
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
126
+ });
127
+ }); };
128
+ export var serializeAws_json1_1DescribeImportTasksCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
129
+ var headers, body;
130
+ return __generator(this, function (_a) {
131
+ headers = {
132
+ "content-type": "application/x-amz-json-1.1",
133
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeImportTasks",
134
+ };
135
+ body = JSON.stringify(serializeAws_json1_1DescribeImportTasksRequest(input, context));
136
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
137
+ });
138
+ }); };
139
+ export var serializeAws_json1_1DescribeTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
140
+ var headers, body;
141
+ return __generator(this, function (_a) {
142
+ headers = {
143
+ "content-type": "application/x-amz-json-1.1",
144
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DescribeTags",
145
+ };
146
+ body = JSON.stringify(serializeAws_json1_1DescribeTagsRequest(input, context));
147
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
148
+ });
149
+ }); };
150
+ export var serializeAws_json1_1DisassociateConfigurationItemsFromApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
151
+ var headers, body;
152
+ return __generator(this, function (_a) {
153
+ headers = {
154
+ "content-type": "application/x-amz-json-1.1",
155
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.DisassociateConfigurationItemsFromApplication",
156
+ };
157
+ body = JSON.stringify(serializeAws_json1_1DisassociateConfigurationItemsFromApplicationRequest(input, context));
158
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
159
+ });
160
+ }); };
161
+ export var serializeAws_json1_1ExportConfigurationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
162
+ var headers, body;
163
+ return __generator(this, function (_a) {
164
+ headers = {
165
+ "content-type": "application/x-amz-json-1.1",
166
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.ExportConfigurations",
167
+ };
168
+ body = "{}";
169
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
170
+ });
171
+ }); };
172
+ export var serializeAws_json1_1GetDiscoverySummaryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
173
+ var headers, body;
174
+ return __generator(this, function (_a) {
175
+ headers = {
176
+ "content-type": "application/x-amz-json-1.1",
177
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.GetDiscoverySummary",
178
+ };
179
+ body = JSON.stringify(serializeAws_json1_1GetDiscoverySummaryRequest(input, context));
180
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
181
+ });
182
+ }); };
183
+ export var serializeAws_json1_1ListConfigurationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
184
+ var headers, body;
185
+ return __generator(this, function (_a) {
186
+ headers = {
187
+ "content-type": "application/x-amz-json-1.1",
188
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.ListConfigurations",
189
+ };
190
+ body = JSON.stringify(serializeAws_json1_1ListConfigurationsRequest(input, context));
191
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
192
+ });
193
+ }); };
194
+ export var serializeAws_json1_1ListServerNeighborsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
195
+ var headers, body;
196
+ return __generator(this, function (_a) {
197
+ headers = {
198
+ "content-type": "application/x-amz-json-1.1",
199
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.ListServerNeighbors",
200
+ };
201
+ body = JSON.stringify(serializeAws_json1_1ListServerNeighborsRequest(input, context));
202
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
203
+ });
204
+ }); };
205
+ export var serializeAws_json1_1StartContinuousExportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
206
+ var headers, body;
207
+ return __generator(this, function (_a) {
208
+ headers = {
209
+ "content-type": "application/x-amz-json-1.1",
210
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.StartContinuousExport",
211
+ };
212
+ body = JSON.stringify(serializeAws_json1_1StartContinuousExportRequest(input, context));
213
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
214
+ });
215
+ }); };
216
+ export var serializeAws_json1_1StartDataCollectionByAgentIdsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
217
+ var headers, body;
218
+ return __generator(this, function (_a) {
219
+ headers = {
220
+ "content-type": "application/x-amz-json-1.1",
221
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.StartDataCollectionByAgentIds",
222
+ };
223
+ body = JSON.stringify(serializeAws_json1_1StartDataCollectionByAgentIdsRequest(input, context));
224
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
225
+ });
226
+ }); };
227
+ export var serializeAws_json1_1StartExportTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
228
+ var headers, body;
229
+ return __generator(this, function (_a) {
230
+ headers = {
231
+ "content-type": "application/x-amz-json-1.1",
232
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.StartExportTask",
233
+ };
234
+ body = JSON.stringify(serializeAws_json1_1StartExportTaskRequest(input, context));
235
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
236
+ });
237
+ }); };
238
+ export var serializeAws_json1_1StartImportTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
239
+ var headers, body;
240
+ return __generator(this, function (_a) {
241
+ headers = {
242
+ "content-type": "application/x-amz-json-1.1",
243
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.StartImportTask",
244
+ };
245
+ body = JSON.stringify(serializeAws_json1_1StartImportTaskRequest(input, context));
246
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
247
+ });
248
+ }); };
249
+ export var serializeAws_json1_1StopContinuousExportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
250
+ var headers, body;
251
+ return __generator(this, function (_a) {
252
+ headers = {
253
+ "content-type": "application/x-amz-json-1.1",
254
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.StopContinuousExport",
255
+ };
256
+ body = JSON.stringify(serializeAws_json1_1StopContinuousExportRequest(input, context));
257
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
258
+ });
259
+ }); };
260
+ export var serializeAws_json1_1StopDataCollectionByAgentIdsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
261
+ var headers, body;
262
+ return __generator(this, function (_a) {
263
+ headers = {
264
+ "content-type": "application/x-amz-json-1.1",
265
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.StopDataCollectionByAgentIds",
266
+ };
267
+ body = JSON.stringify(serializeAws_json1_1StopDataCollectionByAgentIdsRequest(input, context));
268
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
269
+ });
270
+ }); };
271
+ export var serializeAws_json1_1UpdateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
272
+ var headers, body;
273
+ return __generator(this, function (_a) {
274
+ headers = {
275
+ "content-type": "application/x-amz-json-1.1",
276
+ "x-amz-target": "AWSPoseidonService_V2015_11_01.UpdateApplication",
277
+ };
278
+ body = JSON.stringify(serializeAws_json1_1UpdateApplicationRequest(input, context));
279
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
280
+ });
281
+ }); };
282
+ export var deserializeAws_json1_1AssociateConfigurationItemsToApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
283
+ var data, contents, response;
284
+ return __generator(this, function (_a) {
285
+ switch (_a.label) {
286
+ case 0:
287
+ if (output.statusCode >= 300) {
288
+ return [2, deserializeAws_json1_1AssociateConfigurationItemsToApplicationCommandError(output, context)];
289
+ }
290
+ return [4, parseBody(output.body, context)];
291
+ case 1:
292
+ data = _a.sent();
293
+ contents = {};
294
+ contents = deserializeAws_json1_1AssociateConfigurationItemsToApplicationResponse(data, context);
295
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
296
+ return [2, Promise.resolve(response)];
297
+ }
298
+ });
299
+ }); };
300
+ var deserializeAws_json1_1AssociateConfigurationItemsToApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
301
+ var parsedOutput, _a, errorCode, _b, parsedBody;
302
+ var _c;
303
+ return __generator(this, function (_d) {
304
+ switch (_d.label) {
305
+ case 0:
306
+ _a = [__assign({}, output)];
307
+ _c = {};
308
+ return [4, parseErrorBody(output.body, context)];
309
+ case 1:
310
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
311
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
312
+ _b = errorCode;
313
+ switch (_b) {
314
+ case "AuthorizationErrorException": return [3, 2];
315
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
316
+ case "HomeRegionNotSetException": return [3, 4];
317
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
318
+ case "InvalidParameterException": return [3, 6];
319
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
320
+ case "InvalidParameterValueException": return [3, 8];
321
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
322
+ case "ServerInternalErrorException": return [3, 10];
323
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
324
+ }
325
+ return [3, 12];
326
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
327
+ case 3: throw _d.sent();
328
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
329
+ case 5: throw _d.sent();
330
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
331
+ case 7: throw _d.sent();
332
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
333
+ case 9: throw _d.sent();
334
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
335
+ case 11: throw _d.sent();
336
+ case 12:
337
+ parsedBody = parsedOutput.body;
338
+ throwDefaultError({
339
+ output: output,
340
+ parsedBody: parsedBody,
341
+ exceptionCtor: __BaseException,
342
+ errorCode: errorCode,
343
+ });
344
+ _d.label = 13;
345
+ case 13: return [2];
346
+ }
347
+ });
348
+ }); };
349
+ export var deserializeAws_json1_1BatchDeleteImportDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
350
+ var data, contents, response;
351
+ return __generator(this, function (_a) {
352
+ switch (_a.label) {
353
+ case 0:
354
+ if (output.statusCode >= 300) {
355
+ return [2, deserializeAws_json1_1BatchDeleteImportDataCommandError(output, context)];
356
+ }
357
+ return [4, parseBody(output.body, context)];
358
+ case 1:
359
+ data = _a.sent();
360
+ contents = {};
361
+ contents = deserializeAws_json1_1BatchDeleteImportDataResponse(data, context);
362
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
363
+ return [2, Promise.resolve(response)];
364
+ }
365
+ });
366
+ }); };
367
+ var deserializeAws_json1_1BatchDeleteImportDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
368
+ var parsedOutput, _a, errorCode, _b, parsedBody;
369
+ var _c;
370
+ return __generator(this, function (_d) {
371
+ switch (_d.label) {
372
+ case 0:
373
+ _a = [__assign({}, output)];
374
+ _c = {};
375
+ return [4, parseErrorBody(output.body, context)];
376
+ case 1:
377
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
378
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
379
+ _b = errorCode;
380
+ switch (_b) {
381
+ case "AuthorizationErrorException": return [3, 2];
382
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
383
+ case "HomeRegionNotSetException": return [3, 4];
384
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
385
+ case "InvalidParameterException": return [3, 6];
386
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
387
+ case "InvalidParameterValueException": return [3, 8];
388
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
389
+ case "ServerInternalErrorException": return [3, 10];
390
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
391
+ }
392
+ return [3, 12];
393
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
394
+ case 3: throw _d.sent();
395
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
396
+ case 5: throw _d.sent();
397
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
398
+ case 7: throw _d.sent();
399
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
400
+ case 9: throw _d.sent();
401
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
402
+ case 11: throw _d.sent();
403
+ case 12:
404
+ parsedBody = parsedOutput.body;
405
+ throwDefaultError({
406
+ output: output,
407
+ parsedBody: parsedBody,
408
+ exceptionCtor: __BaseException,
409
+ errorCode: errorCode,
410
+ });
411
+ _d.label = 13;
412
+ case 13: return [2];
413
+ }
414
+ });
415
+ }); };
416
+ export var deserializeAws_json1_1CreateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
417
+ var data, contents, response;
418
+ return __generator(this, function (_a) {
419
+ switch (_a.label) {
420
+ case 0:
421
+ if (output.statusCode >= 300) {
422
+ return [2, deserializeAws_json1_1CreateApplicationCommandError(output, context)];
423
+ }
424
+ return [4, parseBody(output.body, context)];
425
+ case 1:
426
+ data = _a.sent();
427
+ contents = {};
428
+ contents = deserializeAws_json1_1CreateApplicationResponse(data, context);
429
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
430
+ return [2, Promise.resolve(response)];
431
+ }
432
+ });
433
+ }); };
434
+ var deserializeAws_json1_1CreateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
435
+ var parsedOutput, _a, errorCode, _b, parsedBody;
436
+ var _c;
437
+ return __generator(this, function (_d) {
438
+ switch (_d.label) {
439
+ case 0:
440
+ _a = [__assign({}, output)];
441
+ _c = {};
442
+ return [4, parseErrorBody(output.body, context)];
443
+ case 1:
444
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
445
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
446
+ _b = errorCode;
447
+ switch (_b) {
448
+ case "AuthorizationErrorException": return [3, 2];
449
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
450
+ case "HomeRegionNotSetException": return [3, 4];
451
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
452
+ case "InvalidParameterException": return [3, 6];
453
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
454
+ case "InvalidParameterValueException": return [3, 8];
455
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
456
+ case "ServerInternalErrorException": return [3, 10];
457
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
458
+ }
459
+ return [3, 12];
460
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
461
+ case 3: throw _d.sent();
462
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
463
+ case 5: throw _d.sent();
464
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
465
+ case 7: throw _d.sent();
466
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
467
+ case 9: throw _d.sent();
468
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
469
+ case 11: throw _d.sent();
470
+ case 12:
471
+ parsedBody = parsedOutput.body;
472
+ throwDefaultError({
473
+ output: output,
474
+ parsedBody: parsedBody,
475
+ exceptionCtor: __BaseException,
476
+ errorCode: errorCode,
477
+ });
478
+ _d.label = 13;
479
+ case 13: return [2];
480
+ }
481
+ });
482
+ }); };
483
+ export var deserializeAws_json1_1CreateTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
484
+ var data, contents, response;
485
+ return __generator(this, function (_a) {
486
+ switch (_a.label) {
487
+ case 0:
488
+ if (output.statusCode >= 300) {
489
+ return [2, deserializeAws_json1_1CreateTagsCommandError(output, context)];
490
+ }
491
+ return [4, parseBody(output.body, context)];
492
+ case 1:
493
+ data = _a.sent();
494
+ contents = {};
495
+ contents = deserializeAws_json1_1CreateTagsResponse(data, context);
496
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
497
+ return [2, Promise.resolve(response)];
498
+ }
499
+ });
500
+ }); };
501
+ var deserializeAws_json1_1CreateTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
502
+ var parsedOutput, _a, errorCode, _b, parsedBody;
503
+ var _c;
504
+ return __generator(this, function (_d) {
505
+ switch (_d.label) {
506
+ case 0:
507
+ _a = [__assign({}, output)];
508
+ _c = {};
509
+ return [4, parseErrorBody(output.body, context)];
510
+ case 1:
511
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
512
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
513
+ _b = errorCode;
514
+ switch (_b) {
515
+ case "AuthorizationErrorException": return [3, 2];
516
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
517
+ case "HomeRegionNotSetException": return [3, 4];
518
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
519
+ case "InvalidParameterException": return [3, 6];
520
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
521
+ case "InvalidParameterValueException": return [3, 8];
522
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
523
+ case "ResourceNotFoundException": return [3, 10];
524
+ case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException": return [3, 10];
525
+ case "ServerInternalErrorException": return [3, 12];
526
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 12];
527
+ }
528
+ return [3, 14];
529
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
530
+ case 3: throw _d.sent();
531
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
532
+ case 5: throw _d.sent();
533
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
534
+ case 7: throw _d.sent();
535
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
536
+ case 9: throw _d.sent();
537
+ case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
538
+ case 11: throw _d.sent();
539
+ case 12: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
540
+ case 13: throw _d.sent();
541
+ case 14:
542
+ parsedBody = parsedOutput.body;
543
+ throwDefaultError({
544
+ output: output,
545
+ parsedBody: parsedBody,
546
+ exceptionCtor: __BaseException,
547
+ errorCode: errorCode,
548
+ });
549
+ _d.label = 15;
550
+ case 15: return [2];
551
+ }
552
+ });
553
+ }); };
554
+ export var deserializeAws_json1_1DeleteApplicationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
555
+ var data, contents, response;
556
+ return __generator(this, function (_a) {
557
+ switch (_a.label) {
558
+ case 0:
559
+ if (output.statusCode >= 300) {
560
+ return [2, deserializeAws_json1_1DeleteApplicationsCommandError(output, context)];
561
+ }
562
+ return [4, parseBody(output.body, context)];
563
+ case 1:
564
+ data = _a.sent();
565
+ contents = {};
566
+ contents = deserializeAws_json1_1DeleteApplicationsResponse(data, context);
567
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
568
+ return [2, Promise.resolve(response)];
569
+ }
570
+ });
571
+ }); };
572
+ var deserializeAws_json1_1DeleteApplicationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
573
+ var parsedOutput, _a, errorCode, _b, parsedBody;
574
+ var _c;
575
+ return __generator(this, function (_d) {
576
+ switch (_d.label) {
577
+ case 0:
578
+ _a = [__assign({}, output)];
579
+ _c = {};
580
+ return [4, parseErrorBody(output.body, context)];
581
+ case 1:
582
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
583
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
584
+ _b = errorCode;
585
+ switch (_b) {
586
+ case "AuthorizationErrorException": return [3, 2];
587
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
588
+ case "HomeRegionNotSetException": return [3, 4];
589
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
590
+ case "InvalidParameterException": return [3, 6];
591
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
592
+ case "InvalidParameterValueException": return [3, 8];
593
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
594
+ case "ServerInternalErrorException": return [3, 10];
595
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
596
+ }
597
+ return [3, 12];
598
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
599
+ case 3: throw _d.sent();
600
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
601
+ case 5: throw _d.sent();
602
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
603
+ case 7: throw _d.sent();
604
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
605
+ case 9: throw _d.sent();
606
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
607
+ case 11: throw _d.sent();
608
+ case 12:
609
+ parsedBody = parsedOutput.body;
610
+ throwDefaultError({
611
+ output: output,
612
+ parsedBody: parsedBody,
613
+ exceptionCtor: __BaseException,
614
+ errorCode: errorCode,
615
+ });
616
+ _d.label = 13;
617
+ case 13: return [2];
618
+ }
619
+ });
620
+ }); };
621
+ export var deserializeAws_json1_1DeleteTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
622
+ var data, contents, response;
623
+ return __generator(this, function (_a) {
624
+ switch (_a.label) {
625
+ case 0:
626
+ if (output.statusCode >= 300) {
627
+ return [2, deserializeAws_json1_1DeleteTagsCommandError(output, context)];
628
+ }
629
+ return [4, parseBody(output.body, context)];
630
+ case 1:
631
+ data = _a.sent();
632
+ contents = {};
633
+ contents = deserializeAws_json1_1DeleteTagsResponse(data, context);
634
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
635
+ return [2, Promise.resolve(response)];
636
+ }
637
+ });
638
+ }); };
639
+ var deserializeAws_json1_1DeleteTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
640
+ var parsedOutput, _a, errorCode, _b, parsedBody;
641
+ var _c;
642
+ return __generator(this, function (_d) {
643
+ switch (_d.label) {
644
+ case 0:
645
+ _a = [__assign({}, output)];
646
+ _c = {};
647
+ return [4, parseErrorBody(output.body, context)];
648
+ case 1:
649
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
650
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
651
+ _b = errorCode;
652
+ switch (_b) {
653
+ case "AuthorizationErrorException": return [3, 2];
654
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
655
+ case "HomeRegionNotSetException": return [3, 4];
656
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
657
+ case "InvalidParameterException": return [3, 6];
658
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
659
+ case "InvalidParameterValueException": return [3, 8];
660
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
661
+ case "ResourceNotFoundException": return [3, 10];
662
+ case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException": return [3, 10];
663
+ case "ServerInternalErrorException": return [3, 12];
664
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 12];
665
+ }
666
+ return [3, 14];
667
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
668
+ case 3: throw _d.sent();
669
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
670
+ case 5: throw _d.sent();
671
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
672
+ case 7: throw _d.sent();
673
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
674
+ case 9: throw _d.sent();
675
+ case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
676
+ case 11: throw _d.sent();
677
+ case 12: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
678
+ case 13: throw _d.sent();
679
+ case 14:
680
+ parsedBody = parsedOutput.body;
681
+ throwDefaultError({
682
+ output: output,
683
+ parsedBody: parsedBody,
684
+ exceptionCtor: __BaseException,
685
+ errorCode: errorCode,
686
+ });
687
+ _d.label = 15;
688
+ case 15: return [2];
689
+ }
690
+ });
691
+ }); };
692
+ export var deserializeAws_json1_1DescribeAgentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
693
+ var data, contents, response;
694
+ return __generator(this, function (_a) {
695
+ switch (_a.label) {
696
+ case 0:
697
+ if (output.statusCode >= 300) {
698
+ return [2, deserializeAws_json1_1DescribeAgentsCommandError(output, context)];
699
+ }
700
+ return [4, parseBody(output.body, context)];
701
+ case 1:
702
+ data = _a.sent();
703
+ contents = {};
704
+ contents = deserializeAws_json1_1DescribeAgentsResponse(data, context);
705
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
706
+ return [2, Promise.resolve(response)];
707
+ }
708
+ });
709
+ }); };
710
+ var deserializeAws_json1_1DescribeAgentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
711
+ var parsedOutput, _a, errorCode, _b, parsedBody;
712
+ var _c;
713
+ return __generator(this, function (_d) {
714
+ switch (_d.label) {
715
+ case 0:
716
+ _a = [__assign({}, output)];
717
+ _c = {};
718
+ return [4, parseErrorBody(output.body, context)];
719
+ case 1:
720
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
721
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
722
+ _b = errorCode;
723
+ switch (_b) {
724
+ case "AuthorizationErrorException": return [3, 2];
725
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
726
+ case "HomeRegionNotSetException": return [3, 4];
727
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
728
+ case "InvalidParameterException": return [3, 6];
729
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
730
+ case "InvalidParameterValueException": return [3, 8];
731
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
732
+ case "ServerInternalErrorException": return [3, 10];
733
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
734
+ }
735
+ return [3, 12];
736
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
737
+ case 3: throw _d.sent();
738
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
739
+ case 5: throw _d.sent();
740
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
741
+ case 7: throw _d.sent();
742
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
743
+ case 9: throw _d.sent();
744
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
745
+ case 11: throw _d.sent();
746
+ case 12:
747
+ parsedBody = parsedOutput.body;
748
+ throwDefaultError({
749
+ output: output,
750
+ parsedBody: parsedBody,
751
+ exceptionCtor: __BaseException,
752
+ errorCode: errorCode,
753
+ });
754
+ _d.label = 13;
755
+ case 13: return [2];
756
+ }
757
+ });
758
+ }); };
759
+ export var deserializeAws_json1_1DescribeConfigurationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
760
+ var data, contents, response;
761
+ return __generator(this, function (_a) {
762
+ switch (_a.label) {
763
+ case 0:
764
+ if (output.statusCode >= 300) {
765
+ return [2, deserializeAws_json1_1DescribeConfigurationsCommandError(output, context)];
766
+ }
767
+ return [4, parseBody(output.body, context)];
768
+ case 1:
769
+ data = _a.sent();
770
+ contents = {};
771
+ contents = deserializeAws_json1_1DescribeConfigurationsResponse(data, context);
772
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
773
+ return [2, Promise.resolve(response)];
774
+ }
775
+ });
776
+ }); };
777
+ var deserializeAws_json1_1DescribeConfigurationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
778
+ var parsedOutput, _a, errorCode, _b, parsedBody;
779
+ var _c;
780
+ return __generator(this, function (_d) {
781
+ switch (_d.label) {
782
+ case 0:
783
+ _a = [__assign({}, output)];
784
+ _c = {};
785
+ return [4, parseErrorBody(output.body, context)];
786
+ case 1:
787
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
788
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
789
+ _b = errorCode;
790
+ switch (_b) {
791
+ case "AuthorizationErrorException": return [3, 2];
792
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
793
+ case "HomeRegionNotSetException": return [3, 4];
794
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
795
+ case "InvalidParameterException": return [3, 6];
796
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
797
+ case "InvalidParameterValueException": return [3, 8];
798
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
799
+ case "ServerInternalErrorException": return [3, 10];
800
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
801
+ }
802
+ return [3, 12];
803
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
804
+ case 3: throw _d.sent();
805
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
806
+ case 5: throw _d.sent();
807
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
808
+ case 7: throw _d.sent();
809
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
810
+ case 9: throw _d.sent();
811
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
812
+ case 11: throw _d.sent();
813
+ case 12:
814
+ parsedBody = parsedOutput.body;
815
+ throwDefaultError({
816
+ output: output,
817
+ parsedBody: parsedBody,
818
+ exceptionCtor: __BaseException,
819
+ errorCode: errorCode,
820
+ });
821
+ _d.label = 13;
822
+ case 13: return [2];
823
+ }
824
+ });
825
+ }); };
826
+ export var deserializeAws_json1_1DescribeContinuousExportsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
827
+ var data, contents, response;
828
+ return __generator(this, function (_a) {
829
+ switch (_a.label) {
830
+ case 0:
831
+ if (output.statusCode >= 300) {
832
+ return [2, deserializeAws_json1_1DescribeContinuousExportsCommandError(output, context)];
833
+ }
834
+ return [4, parseBody(output.body, context)];
835
+ case 1:
836
+ data = _a.sent();
837
+ contents = {};
838
+ contents = deserializeAws_json1_1DescribeContinuousExportsResponse(data, context);
839
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
840
+ return [2, Promise.resolve(response)];
841
+ }
842
+ });
843
+ }); };
844
+ var deserializeAws_json1_1DescribeContinuousExportsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
845
+ var parsedOutput, _a, errorCode, _b, parsedBody;
846
+ var _c;
847
+ return __generator(this, function (_d) {
848
+ switch (_d.label) {
849
+ case 0:
850
+ _a = [__assign({}, output)];
851
+ _c = {};
852
+ return [4, parseErrorBody(output.body, context)];
853
+ case 1:
854
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
855
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
856
+ _b = errorCode;
857
+ switch (_b) {
858
+ case "AuthorizationErrorException": return [3, 2];
859
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
860
+ case "HomeRegionNotSetException": return [3, 4];
861
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
862
+ case "InvalidParameterException": return [3, 6];
863
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
864
+ case "InvalidParameterValueException": return [3, 8];
865
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
866
+ case "OperationNotPermittedException": return [3, 10];
867
+ case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException": return [3, 10];
868
+ case "ResourceNotFoundException": return [3, 12];
869
+ case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException": return [3, 12];
870
+ case "ServerInternalErrorException": return [3, 14];
871
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 14];
872
+ }
873
+ return [3, 16];
874
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
875
+ case 3: throw _d.sent();
876
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
877
+ case 5: throw _d.sent();
878
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
879
+ case 7: throw _d.sent();
880
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
881
+ case 9: throw _d.sent();
882
+ case 10: return [4, deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context)];
883
+ case 11: throw _d.sent();
884
+ case 12: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
885
+ case 13: throw _d.sent();
886
+ case 14: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
887
+ case 15: throw _d.sent();
888
+ case 16:
889
+ parsedBody = parsedOutput.body;
890
+ throwDefaultError({
891
+ output: output,
892
+ parsedBody: parsedBody,
893
+ exceptionCtor: __BaseException,
894
+ errorCode: errorCode,
895
+ });
896
+ _d.label = 17;
897
+ case 17: return [2];
898
+ }
899
+ });
900
+ }); };
901
+ export var deserializeAws_json1_1DescribeExportConfigurationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
902
+ var data, contents, response;
903
+ return __generator(this, function (_a) {
904
+ switch (_a.label) {
905
+ case 0:
906
+ if (output.statusCode >= 300) {
907
+ return [2, deserializeAws_json1_1DescribeExportConfigurationsCommandError(output, context)];
908
+ }
909
+ return [4, parseBody(output.body, context)];
910
+ case 1:
911
+ data = _a.sent();
912
+ contents = {};
913
+ contents = deserializeAws_json1_1DescribeExportConfigurationsResponse(data, context);
914
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
915
+ return [2, Promise.resolve(response)];
916
+ }
917
+ });
918
+ }); };
919
+ var deserializeAws_json1_1DescribeExportConfigurationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
920
+ var parsedOutput, _a, errorCode, _b, parsedBody;
921
+ var _c;
922
+ return __generator(this, function (_d) {
923
+ switch (_d.label) {
924
+ case 0:
925
+ _a = [__assign({}, output)];
926
+ _c = {};
927
+ return [4, parseErrorBody(output.body, context)];
928
+ case 1:
929
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
930
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
931
+ _b = errorCode;
932
+ switch (_b) {
933
+ case "AuthorizationErrorException": return [3, 2];
934
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
935
+ case "HomeRegionNotSetException": return [3, 4];
936
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
937
+ case "InvalidParameterException": return [3, 6];
938
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
939
+ case "InvalidParameterValueException": return [3, 8];
940
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
941
+ case "ResourceNotFoundException": return [3, 10];
942
+ case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException": return [3, 10];
943
+ case "ServerInternalErrorException": return [3, 12];
944
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 12];
945
+ }
946
+ return [3, 14];
947
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
948
+ case 3: throw _d.sent();
949
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
950
+ case 5: throw _d.sent();
951
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
952
+ case 7: throw _d.sent();
953
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
954
+ case 9: throw _d.sent();
955
+ case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
956
+ case 11: throw _d.sent();
957
+ case 12: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
958
+ case 13: throw _d.sent();
959
+ case 14:
960
+ parsedBody = parsedOutput.body;
961
+ throwDefaultError({
962
+ output: output,
963
+ parsedBody: parsedBody,
964
+ exceptionCtor: __BaseException,
965
+ errorCode: errorCode,
966
+ });
967
+ _d.label = 15;
968
+ case 15: return [2];
969
+ }
970
+ });
971
+ }); };
972
+ export var deserializeAws_json1_1DescribeExportTasksCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
973
+ var data, contents, response;
974
+ return __generator(this, function (_a) {
975
+ switch (_a.label) {
976
+ case 0:
977
+ if (output.statusCode >= 300) {
978
+ return [2, deserializeAws_json1_1DescribeExportTasksCommandError(output, context)];
979
+ }
980
+ return [4, parseBody(output.body, context)];
981
+ case 1:
982
+ data = _a.sent();
983
+ contents = {};
984
+ contents = deserializeAws_json1_1DescribeExportTasksResponse(data, context);
985
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
986
+ return [2, Promise.resolve(response)];
987
+ }
988
+ });
989
+ }); };
990
+ var deserializeAws_json1_1DescribeExportTasksCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
991
+ var parsedOutput, _a, errorCode, _b, parsedBody;
992
+ var _c;
993
+ return __generator(this, function (_d) {
994
+ switch (_d.label) {
995
+ case 0:
996
+ _a = [__assign({}, output)];
997
+ _c = {};
998
+ return [4, parseErrorBody(output.body, context)];
999
+ case 1:
1000
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1001
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1002
+ _b = errorCode;
1003
+ switch (_b) {
1004
+ case "AuthorizationErrorException": return [3, 2];
1005
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1006
+ case "HomeRegionNotSetException": return [3, 4];
1007
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1008
+ case "InvalidParameterException": return [3, 6];
1009
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1010
+ case "InvalidParameterValueException": return [3, 8];
1011
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1012
+ case "ServerInternalErrorException": return [3, 10];
1013
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
1014
+ }
1015
+ return [3, 12];
1016
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1017
+ case 3: throw _d.sent();
1018
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1019
+ case 5: throw _d.sent();
1020
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1021
+ case 7: throw _d.sent();
1022
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1023
+ case 9: throw _d.sent();
1024
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1025
+ case 11: throw _d.sent();
1026
+ case 12:
1027
+ parsedBody = parsedOutput.body;
1028
+ throwDefaultError({
1029
+ output: output,
1030
+ parsedBody: parsedBody,
1031
+ exceptionCtor: __BaseException,
1032
+ errorCode: errorCode,
1033
+ });
1034
+ _d.label = 13;
1035
+ case 13: return [2];
1036
+ }
1037
+ });
1038
+ }); };
1039
+ export var deserializeAws_json1_1DescribeImportTasksCommand = 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_1DescribeImportTasksCommandError(output, context)];
1046
+ }
1047
+ return [4, parseBody(output.body, context)];
1048
+ case 1:
1049
+ data = _a.sent();
1050
+ contents = {};
1051
+ contents = deserializeAws_json1_1DescribeImportTasksResponse(data, context);
1052
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1053
+ return [2, Promise.resolve(response)];
1054
+ }
1055
+ });
1056
+ }); };
1057
+ var deserializeAws_json1_1DescribeImportTasksCommandError = 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, parseErrorBody(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 "AuthorizationErrorException": return [3, 2];
1072
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1073
+ case "HomeRegionNotSetException": return [3, 4];
1074
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1075
+ case "InvalidParameterException": return [3, 6];
1076
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1077
+ case "InvalidParameterValueException": return [3, 8];
1078
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1079
+ case "ServerInternalErrorException": return [3, 10];
1080
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
1081
+ }
1082
+ return [3, 12];
1083
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1084
+ case 3: throw _d.sent();
1085
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1086
+ case 5: throw _d.sent();
1087
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1088
+ case 7: throw _d.sent();
1089
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1090
+ case 9: throw _d.sent();
1091
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1092
+ case 11: throw _d.sent();
1093
+ case 12:
1094
+ parsedBody = parsedOutput.body;
1095
+ throwDefaultError({
1096
+ output: output,
1097
+ parsedBody: parsedBody,
1098
+ exceptionCtor: __BaseException,
1099
+ errorCode: errorCode,
1100
+ });
1101
+ _d.label = 13;
1102
+ case 13: return [2];
1103
+ }
1104
+ });
1105
+ }); };
1106
+ export var deserializeAws_json1_1DescribeTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1107
+ var data, contents, response;
1108
+ return __generator(this, function (_a) {
1109
+ switch (_a.label) {
1110
+ case 0:
1111
+ if (output.statusCode >= 300) {
1112
+ return [2, deserializeAws_json1_1DescribeTagsCommandError(output, context)];
1113
+ }
1114
+ return [4, parseBody(output.body, context)];
1115
+ case 1:
1116
+ data = _a.sent();
1117
+ contents = {};
1118
+ contents = deserializeAws_json1_1DescribeTagsResponse(data, context);
1119
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1120
+ return [2, Promise.resolve(response)];
1121
+ }
1122
+ });
1123
+ }); };
1124
+ var deserializeAws_json1_1DescribeTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1125
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1126
+ var _c;
1127
+ return __generator(this, function (_d) {
1128
+ switch (_d.label) {
1129
+ case 0:
1130
+ _a = [__assign({}, output)];
1131
+ _c = {};
1132
+ return [4, parseErrorBody(output.body, context)];
1133
+ case 1:
1134
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1135
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1136
+ _b = errorCode;
1137
+ switch (_b) {
1138
+ case "AuthorizationErrorException": return [3, 2];
1139
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1140
+ case "HomeRegionNotSetException": return [3, 4];
1141
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1142
+ case "InvalidParameterException": return [3, 6];
1143
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1144
+ case "InvalidParameterValueException": return [3, 8];
1145
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1146
+ case "ResourceNotFoundException": return [3, 10];
1147
+ case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException": return [3, 10];
1148
+ case "ServerInternalErrorException": return [3, 12];
1149
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 12];
1150
+ }
1151
+ return [3, 14];
1152
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1153
+ case 3: throw _d.sent();
1154
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1155
+ case 5: throw _d.sent();
1156
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1157
+ case 7: throw _d.sent();
1158
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1159
+ case 9: throw _d.sent();
1160
+ case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1161
+ case 11: throw _d.sent();
1162
+ case 12: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1163
+ case 13: throw _d.sent();
1164
+ case 14:
1165
+ parsedBody = parsedOutput.body;
1166
+ throwDefaultError({
1167
+ output: output,
1168
+ parsedBody: parsedBody,
1169
+ exceptionCtor: __BaseException,
1170
+ errorCode: errorCode,
1171
+ });
1172
+ _d.label = 15;
1173
+ case 15: return [2];
1174
+ }
1175
+ });
1176
+ }); };
1177
+ export var deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1178
+ var data, contents, response;
1179
+ return __generator(this, function (_a) {
1180
+ switch (_a.label) {
1181
+ case 0:
1182
+ if (output.statusCode >= 300) {
1183
+ return [2, deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationCommandError(output, context)];
1184
+ }
1185
+ return [4, parseBody(output.body, context)];
1186
+ case 1:
1187
+ data = _a.sent();
1188
+ contents = {};
1189
+ contents = deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationResponse(data, context);
1190
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1191
+ return [2, Promise.resolve(response)];
1192
+ }
1193
+ });
1194
+ }); };
1195
+ var deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1196
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1197
+ var _c;
1198
+ return __generator(this, function (_d) {
1199
+ switch (_d.label) {
1200
+ case 0:
1201
+ _a = [__assign({}, output)];
1202
+ _c = {};
1203
+ return [4, parseErrorBody(output.body, context)];
1204
+ case 1:
1205
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1206
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1207
+ _b = errorCode;
1208
+ switch (_b) {
1209
+ case "AuthorizationErrorException": return [3, 2];
1210
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1211
+ case "HomeRegionNotSetException": return [3, 4];
1212
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1213
+ case "InvalidParameterException": return [3, 6];
1214
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1215
+ case "InvalidParameterValueException": return [3, 8];
1216
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1217
+ case "ServerInternalErrorException": return [3, 10];
1218
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
1219
+ }
1220
+ return [3, 12];
1221
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1222
+ case 3: throw _d.sent();
1223
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1224
+ case 5: throw _d.sent();
1225
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1226
+ case 7: throw _d.sent();
1227
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1228
+ case 9: throw _d.sent();
1229
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1230
+ case 11: throw _d.sent();
1231
+ case 12:
1232
+ parsedBody = parsedOutput.body;
1233
+ throwDefaultError({
1234
+ output: output,
1235
+ parsedBody: parsedBody,
1236
+ exceptionCtor: __BaseException,
1237
+ errorCode: errorCode,
1238
+ });
1239
+ _d.label = 13;
1240
+ case 13: return [2];
1241
+ }
1242
+ });
1243
+ }); };
1244
+ export var deserializeAws_json1_1ExportConfigurationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1245
+ var data, contents, response;
1246
+ return __generator(this, function (_a) {
1247
+ switch (_a.label) {
1248
+ case 0:
1249
+ if (output.statusCode >= 300) {
1250
+ return [2, deserializeAws_json1_1ExportConfigurationsCommandError(output, context)];
1251
+ }
1252
+ return [4, parseBody(output.body, context)];
1253
+ case 1:
1254
+ data = _a.sent();
1255
+ contents = {};
1256
+ contents = deserializeAws_json1_1ExportConfigurationsResponse(data, context);
1257
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1258
+ return [2, Promise.resolve(response)];
1259
+ }
1260
+ });
1261
+ }); };
1262
+ var deserializeAws_json1_1ExportConfigurationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1263
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1264
+ var _c;
1265
+ return __generator(this, function (_d) {
1266
+ switch (_d.label) {
1267
+ case 0:
1268
+ _a = [__assign({}, output)];
1269
+ _c = {};
1270
+ return [4, parseErrorBody(output.body, context)];
1271
+ case 1:
1272
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1273
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1274
+ _b = errorCode;
1275
+ switch (_b) {
1276
+ case "AuthorizationErrorException": return [3, 2];
1277
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1278
+ case "HomeRegionNotSetException": return [3, 4];
1279
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1280
+ case "InvalidParameterException": return [3, 6];
1281
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1282
+ case "InvalidParameterValueException": return [3, 8];
1283
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1284
+ case "OperationNotPermittedException": return [3, 10];
1285
+ case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException": return [3, 10];
1286
+ case "ServerInternalErrorException": return [3, 12];
1287
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 12];
1288
+ }
1289
+ return [3, 14];
1290
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1291
+ case 3: throw _d.sent();
1292
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1293
+ case 5: throw _d.sent();
1294
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1295
+ case 7: throw _d.sent();
1296
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1297
+ case 9: throw _d.sent();
1298
+ case 10: return [4, deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context)];
1299
+ case 11: throw _d.sent();
1300
+ case 12: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1301
+ case 13: throw _d.sent();
1302
+ case 14:
1303
+ parsedBody = parsedOutput.body;
1304
+ throwDefaultError({
1305
+ output: output,
1306
+ parsedBody: parsedBody,
1307
+ exceptionCtor: __BaseException,
1308
+ errorCode: errorCode,
1309
+ });
1310
+ _d.label = 15;
1311
+ case 15: return [2];
1312
+ }
1313
+ });
1314
+ }); };
1315
+ export var deserializeAws_json1_1GetDiscoverySummaryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1316
+ var data, contents, response;
1317
+ return __generator(this, function (_a) {
1318
+ switch (_a.label) {
1319
+ case 0:
1320
+ if (output.statusCode >= 300) {
1321
+ return [2, deserializeAws_json1_1GetDiscoverySummaryCommandError(output, context)];
1322
+ }
1323
+ return [4, parseBody(output.body, context)];
1324
+ case 1:
1325
+ data = _a.sent();
1326
+ contents = {};
1327
+ contents = deserializeAws_json1_1GetDiscoverySummaryResponse(data, context);
1328
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1329
+ return [2, Promise.resolve(response)];
1330
+ }
1331
+ });
1332
+ }); };
1333
+ var deserializeAws_json1_1GetDiscoverySummaryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1334
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1335
+ var _c;
1336
+ return __generator(this, function (_d) {
1337
+ switch (_d.label) {
1338
+ case 0:
1339
+ _a = [__assign({}, output)];
1340
+ _c = {};
1341
+ return [4, parseErrorBody(output.body, context)];
1342
+ case 1:
1343
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1344
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1345
+ _b = errorCode;
1346
+ switch (_b) {
1347
+ case "AuthorizationErrorException": return [3, 2];
1348
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1349
+ case "HomeRegionNotSetException": return [3, 4];
1350
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1351
+ case "InvalidParameterException": return [3, 6];
1352
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1353
+ case "InvalidParameterValueException": return [3, 8];
1354
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1355
+ case "ServerInternalErrorException": return [3, 10];
1356
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
1357
+ }
1358
+ return [3, 12];
1359
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1360
+ case 3: throw _d.sent();
1361
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1362
+ case 5: throw _d.sent();
1363
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1364
+ case 7: throw _d.sent();
1365
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1366
+ case 9: throw _d.sent();
1367
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1368
+ case 11: throw _d.sent();
1369
+ case 12:
1370
+ parsedBody = parsedOutput.body;
1371
+ throwDefaultError({
1372
+ output: output,
1373
+ parsedBody: parsedBody,
1374
+ exceptionCtor: __BaseException,
1375
+ errorCode: errorCode,
1376
+ });
1377
+ _d.label = 13;
1378
+ case 13: return [2];
1379
+ }
1380
+ });
1381
+ }); };
1382
+ export var deserializeAws_json1_1ListConfigurationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1383
+ var data, contents, response;
1384
+ return __generator(this, function (_a) {
1385
+ switch (_a.label) {
1386
+ case 0:
1387
+ if (output.statusCode >= 300) {
1388
+ return [2, deserializeAws_json1_1ListConfigurationsCommandError(output, context)];
1389
+ }
1390
+ return [4, parseBody(output.body, context)];
1391
+ case 1:
1392
+ data = _a.sent();
1393
+ contents = {};
1394
+ contents = deserializeAws_json1_1ListConfigurationsResponse(data, context);
1395
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1396
+ return [2, Promise.resolve(response)];
1397
+ }
1398
+ });
1399
+ }); };
1400
+ var deserializeAws_json1_1ListConfigurationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1401
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1402
+ var _c;
1403
+ return __generator(this, function (_d) {
1404
+ switch (_d.label) {
1405
+ case 0:
1406
+ _a = [__assign({}, output)];
1407
+ _c = {};
1408
+ return [4, parseErrorBody(output.body, context)];
1409
+ case 1:
1410
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1411
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1412
+ _b = errorCode;
1413
+ switch (_b) {
1414
+ case "AuthorizationErrorException": return [3, 2];
1415
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1416
+ case "HomeRegionNotSetException": return [3, 4];
1417
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1418
+ case "InvalidParameterException": return [3, 6];
1419
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1420
+ case "InvalidParameterValueException": return [3, 8];
1421
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1422
+ case "ResourceNotFoundException": return [3, 10];
1423
+ case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException": return [3, 10];
1424
+ case "ServerInternalErrorException": return [3, 12];
1425
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 12];
1426
+ }
1427
+ return [3, 14];
1428
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1429
+ case 3: throw _d.sent();
1430
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1431
+ case 5: throw _d.sent();
1432
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1433
+ case 7: throw _d.sent();
1434
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1435
+ case 9: throw _d.sent();
1436
+ case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1437
+ case 11: throw _d.sent();
1438
+ case 12: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1439
+ case 13: throw _d.sent();
1440
+ case 14:
1441
+ parsedBody = parsedOutput.body;
1442
+ throwDefaultError({
1443
+ output: output,
1444
+ parsedBody: parsedBody,
1445
+ exceptionCtor: __BaseException,
1446
+ errorCode: errorCode,
1447
+ });
1448
+ _d.label = 15;
1449
+ case 15: return [2];
1450
+ }
1451
+ });
1452
+ }); };
1453
+ export var deserializeAws_json1_1ListServerNeighborsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1454
+ var data, contents, response;
1455
+ return __generator(this, function (_a) {
1456
+ switch (_a.label) {
1457
+ case 0:
1458
+ if (output.statusCode >= 300) {
1459
+ return [2, deserializeAws_json1_1ListServerNeighborsCommandError(output, context)];
1460
+ }
1461
+ return [4, parseBody(output.body, context)];
1462
+ case 1:
1463
+ data = _a.sent();
1464
+ contents = {};
1465
+ contents = deserializeAws_json1_1ListServerNeighborsResponse(data, context);
1466
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1467
+ return [2, Promise.resolve(response)];
1468
+ }
1469
+ });
1470
+ }); };
1471
+ var deserializeAws_json1_1ListServerNeighborsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1472
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1473
+ var _c;
1474
+ return __generator(this, function (_d) {
1475
+ switch (_d.label) {
1476
+ case 0:
1477
+ _a = [__assign({}, output)];
1478
+ _c = {};
1479
+ return [4, parseErrorBody(output.body, context)];
1480
+ case 1:
1481
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1482
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1483
+ _b = errorCode;
1484
+ switch (_b) {
1485
+ case "AuthorizationErrorException": return [3, 2];
1486
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1487
+ case "HomeRegionNotSetException": return [3, 4];
1488
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1489
+ case "InvalidParameterException": return [3, 6];
1490
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1491
+ case "InvalidParameterValueException": return [3, 8];
1492
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1493
+ case "ServerInternalErrorException": return [3, 10];
1494
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
1495
+ }
1496
+ return [3, 12];
1497
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1498
+ case 3: throw _d.sent();
1499
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1500
+ case 5: throw _d.sent();
1501
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1502
+ case 7: throw _d.sent();
1503
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1504
+ case 9: throw _d.sent();
1505
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1506
+ case 11: throw _d.sent();
1507
+ case 12:
1508
+ parsedBody = parsedOutput.body;
1509
+ throwDefaultError({
1510
+ output: output,
1511
+ parsedBody: parsedBody,
1512
+ exceptionCtor: __BaseException,
1513
+ errorCode: errorCode,
1514
+ });
1515
+ _d.label = 13;
1516
+ case 13: return [2];
1517
+ }
1518
+ });
1519
+ }); };
1520
+ export var deserializeAws_json1_1StartContinuousExportCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1521
+ var data, contents, response;
1522
+ return __generator(this, function (_a) {
1523
+ switch (_a.label) {
1524
+ case 0:
1525
+ if (output.statusCode >= 300) {
1526
+ return [2, deserializeAws_json1_1StartContinuousExportCommandError(output, context)];
1527
+ }
1528
+ return [4, parseBody(output.body, context)];
1529
+ case 1:
1530
+ data = _a.sent();
1531
+ contents = {};
1532
+ contents = deserializeAws_json1_1StartContinuousExportResponse(data, context);
1533
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1534
+ return [2, Promise.resolve(response)];
1535
+ }
1536
+ });
1537
+ }); };
1538
+ var deserializeAws_json1_1StartContinuousExportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1539
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1540
+ var _c;
1541
+ return __generator(this, function (_d) {
1542
+ switch (_d.label) {
1543
+ case 0:
1544
+ _a = [__assign({}, output)];
1545
+ _c = {};
1546
+ return [4, parseErrorBody(output.body, context)];
1547
+ case 1:
1548
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1549
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1550
+ _b = errorCode;
1551
+ switch (_b) {
1552
+ case "AuthorizationErrorException": return [3, 2];
1553
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1554
+ case "ConflictErrorException": return [3, 4];
1555
+ case "com.amazonaws.applicationdiscoveryservice#ConflictErrorException": return [3, 4];
1556
+ case "HomeRegionNotSetException": return [3, 6];
1557
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 6];
1558
+ case "InvalidParameterException": return [3, 8];
1559
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 8];
1560
+ case "InvalidParameterValueException": return [3, 10];
1561
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 10];
1562
+ case "OperationNotPermittedException": return [3, 12];
1563
+ case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException": return [3, 12];
1564
+ case "ResourceInUseException": return [3, 14];
1565
+ case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException": return [3, 14];
1566
+ case "ServerInternalErrorException": return [3, 16];
1567
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 16];
1568
+ }
1569
+ return [3, 18];
1570
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1571
+ case 3: throw _d.sent();
1572
+ case 4: return [4, deserializeAws_json1_1ConflictErrorExceptionResponse(parsedOutput, context)];
1573
+ case 5: throw _d.sent();
1574
+ case 6: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1575
+ case 7: throw _d.sent();
1576
+ case 8: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1577
+ case 9: throw _d.sent();
1578
+ case 10: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1579
+ case 11: throw _d.sent();
1580
+ case 12: return [4, deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context)];
1581
+ case 13: throw _d.sent();
1582
+ case 14: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
1583
+ case 15: throw _d.sent();
1584
+ case 16: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1585
+ case 17: throw _d.sent();
1586
+ case 18:
1587
+ parsedBody = parsedOutput.body;
1588
+ throwDefaultError({
1589
+ output: output,
1590
+ parsedBody: parsedBody,
1591
+ exceptionCtor: __BaseException,
1592
+ errorCode: errorCode,
1593
+ });
1594
+ _d.label = 19;
1595
+ case 19: return [2];
1596
+ }
1597
+ });
1598
+ }); };
1599
+ export var deserializeAws_json1_1StartDataCollectionByAgentIdsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1600
+ var data, contents, response;
1601
+ return __generator(this, function (_a) {
1602
+ switch (_a.label) {
1603
+ case 0:
1604
+ if (output.statusCode >= 300) {
1605
+ return [2, deserializeAws_json1_1StartDataCollectionByAgentIdsCommandError(output, context)];
1606
+ }
1607
+ return [4, parseBody(output.body, context)];
1608
+ case 1:
1609
+ data = _a.sent();
1610
+ contents = {};
1611
+ contents = deserializeAws_json1_1StartDataCollectionByAgentIdsResponse(data, context);
1612
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1613
+ return [2, Promise.resolve(response)];
1614
+ }
1615
+ });
1616
+ }); };
1617
+ var deserializeAws_json1_1StartDataCollectionByAgentIdsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1618
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1619
+ var _c;
1620
+ return __generator(this, function (_d) {
1621
+ switch (_d.label) {
1622
+ case 0:
1623
+ _a = [__assign({}, output)];
1624
+ _c = {};
1625
+ return [4, parseErrorBody(output.body, context)];
1626
+ case 1:
1627
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1628
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1629
+ _b = errorCode;
1630
+ switch (_b) {
1631
+ case "AuthorizationErrorException": return [3, 2];
1632
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1633
+ case "HomeRegionNotSetException": return [3, 4];
1634
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1635
+ case "InvalidParameterException": return [3, 6];
1636
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1637
+ case "InvalidParameterValueException": return [3, 8];
1638
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1639
+ case "ServerInternalErrorException": return [3, 10];
1640
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
1641
+ }
1642
+ return [3, 12];
1643
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1644
+ case 3: throw _d.sent();
1645
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1646
+ case 5: throw _d.sent();
1647
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1648
+ case 7: throw _d.sent();
1649
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1650
+ case 9: throw _d.sent();
1651
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1652
+ case 11: throw _d.sent();
1653
+ case 12:
1654
+ parsedBody = parsedOutput.body;
1655
+ throwDefaultError({
1656
+ output: output,
1657
+ parsedBody: parsedBody,
1658
+ exceptionCtor: __BaseException,
1659
+ errorCode: errorCode,
1660
+ });
1661
+ _d.label = 13;
1662
+ case 13: return [2];
1663
+ }
1664
+ });
1665
+ }); };
1666
+ export var deserializeAws_json1_1StartExportTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1667
+ var data, contents, response;
1668
+ return __generator(this, function (_a) {
1669
+ switch (_a.label) {
1670
+ case 0:
1671
+ if (output.statusCode >= 300) {
1672
+ return [2, deserializeAws_json1_1StartExportTaskCommandError(output, context)];
1673
+ }
1674
+ return [4, parseBody(output.body, context)];
1675
+ case 1:
1676
+ data = _a.sent();
1677
+ contents = {};
1678
+ contents = deserializeAws_json1_1StartExportTaskResponse(data, context);
1679
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1680
+ return [2, Promise.resolve(response)];
1681
+ }
1682
+ });
1683
+ }); };
1684
+ var deserializeAws_json1_1StartExportTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1685
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1686
+ var _c;
1687
+ return __generator(this, function (_d) {
1688
+ switch (_d.label) {
1689
+ case 0:
1690
+ _a = [__assign({}, output)];
1691
+ _c = {};
1692
+ return [4, parseErrorBody(output.body, context)];
1693
+ case 1:
1694
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1695
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1696
+ _b = errorCode;
1697
+ switch (_b) {
1698
+ case "AuthorizationErrorException": return [3, 2];
1699
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1700
+ case "HomeRegionNotSetException": return [3, 4];
1701
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1702
+ case "InvalidParameterException": return [3, 6];
1703
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1704
+ case "InvalidParameterValueException": return [3, 8];
1705
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1706
+ case "OperationNotPermittedException": return [3, 10];
1707
+ case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException": return [3, 10];
1708
+ case "ServerInternalErrorException": return [3, 12];
1709
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 12];
1710
+ }
1711
+ return [3, 14];
1712
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1713
+ case 3: throw _d.sent();
1714
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1715
+ case 5: throw _d.sent();
1716
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1717
+ case 7: throw _d.sent();
1718
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1719
+ case 9: throw _d.sent();
1720
+ case 10: return [4, deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context)];
1721
+ case 11: throw _d.sent();
1722
+ case 12: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1723
+ case 13: throw _d.sent();
1724
+ case 14:
1725
+ parsedBody = parsedOutput.body;
1726
+ throwDefaultError({
1727
+ output: output,
1728
+ parsedBody: parsedBody,
1729
+ exceptionCtor: __BaseException,
1730
+ errorCode: errorCode,
1731
+ });
1732
+ _d.label = 15;
1733
+ case 15: return [2];
1734
+ }
1735
+ });
1736
+ }); };
1737
+ export var deserializeAws_json1_1StartImportTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1738
+ var data, contents, response;
1739
+ return __generator(this, function (_a) {
1740
+ switch (_a.label) {
1741
+ case 0:
1742
+ if (output.statusCode >= 300) {
1743
+ return [2, deserializeAws_json1_1StartImportTaskCommandError(output, context)];
1744
+ }
1745
+ return [4, parseBody(output.body, context)];
1746
+ case 1:
1747
+ data = _a.sent();
1748
+ contents = {};
1749
+ contents = deserializeAws_json1_1StartImportTaskResponse(data, context);
1750
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1751
+ return [2, Promise.resolve(response)];
1752
+ }
1753
+ });
1754
+ }); };
1755
+ var deserializeAws_json1_1StartImportTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1756
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1757
+ var _c;
1758
+ return __generator(this, function (_d) {
1759
+ switch (_d.label) {
1760
+ case 0:
1761
+ _a = [__assign({}, output)];
1762
+ _c = {};
1763
+ return [4, parseErrorBody(output.body, context)];
1764
+ case 1:
1765
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1766
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1767
+ _b = errorCode;
1768
+ switch (_b) {
1769
+ case "AuthorizationErrorException": return [3, 2];
1770
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1771
+ case "HomeRegionNotSetException": return [3, 4];
1772
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1773
+ case "InvalidParameterException": return [3, 6];
1774
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1775
+ case "InvalidParameterValueException": return [3, 8];
1776
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1777
+ case "ResourceInUseException": return [3, 10];
1778
+ case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException": return [3, 10];
1779
+ case "ServerInternalErrorException": return [3, 12];
1780
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 12];
1781
+ }
1782
+ return [3, 14];
1783
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1784
+ case 3: throw _d.sent();
1785
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1786
+ case 5: throw _d.sent();
1787
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1788
+ case 7: throw _d.sent();
1789
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1790
+ case 9: throw _d.sent();
1791
+ case 10: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
1792
+ case 11: throw _d.sent();
1793
+ case 12: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1794
+ case 13: throw _d.sent();
1795
+ case 14:
1796
+ parsedBody = parsedOutput.body;
1797
+ throwDefaultError({
1798
+ output: output,
1799
+ parsedBody: parsedBody,
1800
+ exceptionCtor: __BaseException,
1801
+ errorCode: errorCode,
1802
+ });
1803
+ _d.label = 15;
1804
+ case 15: return [2];
1805
+ }
1806
+ });
1807
+ }); };
1808
+ export var deserializeAws_json1_1StopContinuousExportCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1809
+ var data, contents, response;
1810
+ return __generator(this, function (_a) {
1811
+ switch (_a.label) {
1812
+ case 0:
1813
+ if (output.statusCode >= 300) {
1814
+ return [2, deserializeAws_json1_1StopContinuousExportCommandError(output, context)];
1815
+ }
1816
+ return [4, parseBody(output.body, context)];
1817
+ case 1:
1818
+ data = _a.sent();
1819
+ contents = {};
1820
+ contents = deserializeAws_json1_1StopContinuousExportResponse(data, context);
1821
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1822
+ return [2, Promise.resolve(response)];
1823
+ }
1824
+ });
1825
+ }); };
1826
+ var deserializeAws_json1_1StopContinuousExportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1827
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1828
+ var _c;
1829
+ return __generator(this, function (_d) {
1830
+ switch (_d.label) {
1831
+ case 0:
1832
+ _a = [__assign({}, output)];
1833
+ _c = {};
1834
+ return [4, parseErrorBody(output.body, context)];
1835
+ case 1:
1836
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1837
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1838
+ _b = errorCode;
1839
+ switch (_b) {
1840
+ case "AuthorizationErrorException": return [3, 2];
1841
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1842
+ case "HomeRegionNotSetException": return [3, 4];
1843
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1844
+ case "InvalidParameterException": return [3, 6];
1845
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1846
+ case "InvalidParameterValueException": return [3, 8];
1847
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1848
+ case "OperationNotPermittedException": return [3, 10];
1849
+ case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException": return [3, 10];
1850
+ case "ResourceInUseException": return [3, 12];
1851
+ case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException": return [3, 12];
1852
+ case "ResourceNotFoundException": return [3, 14];
1853
+ case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException": return [3, 14];
1854
+ case "ServerInternalErrorException": return [3, 16];
1855
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 16];
1856
+ }
1857
+ return [3, 18];
1858
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1859
+ case 3: throw _d.sent();
1860
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1861
+ case 5: throw _d.sent();
1862
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1863
+ case 7: throw _d.sent();
1864
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1865
+ case 9: throw _d.sent();
1866
+ case 10: return [4, deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context)];
1867
+ case 11: throw _d.sent();
1868
+ case 12: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
1869
+ case 13: throw _d.sent();
1870
+ case 14: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1871
+ case 15: throw _d.sent();
1872
+ case 16: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1873
+ case 17: throw _d.sent();
1874
+ case 18:
1875
+ parsedBody = parsedOutput.body;
1876
+ throwDefaultError({
1877
+ output: output,
1878
+ parsedBody: parsedBody,
1879
+ exceptionCtor: __BaseException,
1880
+ errorCode: errorCode,
1881
+ });
1882
+ _d.label = 19;
1883
+ case 19: return [2];
1884
+ }
1885
+ });
1886
+ }); };
1887
+ export var deserializeAws_json1_1StopDataCollectionByAgentIdsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1888
+ var data, contents, response;
1889
+ return __generator(this, function (_a) {
1890
+ switch (_a.label) {
1891
+ case 0:
1892
+ if (output.statusCode >= 300) {
1893
+ return [2, deserializeAws_json1_1StopDataCollectionByAgentIdsCommandError(output, context)];
1894
+ }
1895
+ return [4, parseBody(output.body, context)];
1896
+ case 1:
1897
+ data = _a.sent();
1898
+ contents = {};
1899
+ contents = deserializeAws_json1_1StopDataCollectionByAgentIdsResponse(data, context);
1900
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1901
+ return [2, Promise.resolve(response)];
1902
+ }
1903
+ });
1904
+ }); };
1905
+ var deserializeAws_json1_1StopDataCollectionByAgentIdsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1906
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1907
+ var _c;
1908
+ return __generator(this, function (_d) {
1909
+ switch (_d.label) {
1910
+ case 0:
1911
+ _a = [__assign({}, output)];
1912
+ _c = {};
1913
+ return [4, parseErrorBody(output.body, context)];
1914
+ case 1:
1915
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1916
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1917
+ _b = errorCode;
1918
+ switch (_b) {
1919
+ case "AuthorizationErrorException": return [3, 2];
1920
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1921
+ case "HomeRegionNotSetException": return [3, 4];
1922
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1923
+ case "InvalidParameterException": return [3, 6];
1924
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1925
+ case "InvalidParameterValueException": return [3, 8];
1926
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1927
+ case "ServerInternalErrorException": return [3, 10];
1928
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
1929
+ }
1930
+ return [3, 12];
1931
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1932
+ case 3: throw _d.sent();
1933
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
1934
+ case 5: throw _d.sent();
1935
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1936
+ case 7: throw _d.sent();
1937
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
1938
+ case 9: throw _d.sent();
1939
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
1940
+ case 11: throw _d.sent();
1941
+ case 12:
1942
+ parsedBody = parsedOutput.body;
1943
+ throwDefaultError({
1944
+ output: output,
1945
+ parsedBody: parsedBody,
1946
+ exceptionCtor: __BaseException,
1947
+ errorCode: errorCode,
1948
+ });
1949
+ _d.label = 13;
1950
+ case 13: return [2];
1951
+ }
1952
+ });
1953
+ }); };
1954
+ export var deserializeAws_json1_1UpdateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1955
+ var data, contents, response;
1956
+ return __generator(this, function (_a) {
1957
+ switch (_a.label) {
1958
+ case 0:
1959
+ if (output.statusCode >= 300) {
1960
+ return [2, deserializeAws_json1_1UpdateApplicationCommandError(output, context)];
1961
+ }
1962
+ return [4, parseBody(output.body, context)];
1963
+ case 1:
1964
+ data = _a.sent();
1965
+ contents = {};
1966
+ contents = deserializeAws_json1_1UpdateApplicationResponse(data, context);
1967
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1968
+ return [2, Promise.resolve(response)];
1969
+ }
1970
+ });
1971
+ }); };
1972
+ var deserializeAws_json1_1UpdateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1973
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1974
+ var _c;
1975
+ return __generator(this, function (_d) {
1976
+ switch (_d.label) {
1977
+ case 0:
1978
+ _a = [__assign({}, output)];
1979
+ _c = {};
1980
+ return [4, parseErrorBody(output.body, context)];
1981
+ case 1:
1982
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1983
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1984
+ _b = errorCode;
1985
+ switch (_b) {
1986
+ case "AuthorizationErrorException": return [3, 2];
1987
+ case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException": return [3, 2];
1988
+ case "HomeRegionNotSetException": return [3, 4];
1989
+ case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException": return [3, 4];
1990
+ case "InvalidParameterException": return [3, 6];
1991
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException": return [3, 6];
1992
+ case "InvalidParameterValueException": return [3, 8];
1993
+ case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException": return [3, 8];
1994
+ case "ServerInternalErrorException": return [3, 10];
1995
+ case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException": return [3, 10];
1996
+ }
1997
+ return [3, 12];
1998
+ case 2: return [4, deserializeAws_json1_1AuthorizationErrorExceptionResponse(parsedOutput, context)];
1999
+ case 3: throw _d.sent();
2000
+ case 4: return [4, deserializeAws_json1_1HomeRegionNotSetExceptionResponse(parsedOutput, context)];
2001
+ case 5: throw _d.sent();
2002
+ case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
2003
+ case 7: throw _d.sent();
2004
+ case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
2005
+ case 9: throw _d.sent();
2006
+ case 10: return [4, deserializeAws_json1_1ServerInternalErrorExceptionResponse(parsedOutput, context)];
2007
+ case 11: throw _d.sent();
2008
+ case 12:
2009
+ parsedBody = parsedOutput.body;
2010
+ throwDefaultError({
2011
+ output: output,
2012
+ parsedBody: parsedBody,
2013
+ exceptionCtor: __BaseException,
2014
+ errorCode: errorCode,
2015
+ });
2016
+ _d.label = 13;
2017
+ case 13: return [2];
2018
+ }
2019
+ });
2020
+ }); };
2021
+ var deserializeAws_json1_1AuthorizationErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2022
+ var body, deserialized, exception;
2023
+ return __generator(this, function (_a) {
2024
+ body = parsedOutput.body;
2025
+ deserialized = deserializeAws_json1_1AuthorizationErrorException(body, context);
2026
+ exception = new AuthorizationErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2027
+ return [2, __decorateServiceException(exception, body)];
2028
+ });
2029
+ }); };
2030
+ var deserializeAws_json1_1ConflictErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2031
+ var body, deserialized, exception;
2032
+ return __generator(this, function (_a) {
2033
+ body = parsedOutput.body;
2034
+ deserialized = deserializeAws_json1_1ConflictErrorException(body, context);
2035
+ exception = new ConflictErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2036
+ return [2, __decorateServiceException(exception, body)];
2037
+ });
2038
+ }); };
2039
+ var deserializeAws_json1_1HomeRegionNotSetExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2040
+ var body, deserialized, exception;
2041
+ return __generator(this, function (_a) {
2042
+ body = parsedOutput.body;
2043
+ deserialized = deserializeAws_json1_1HomeRegionNotSetException(body, context);
2044
+ exception = new HomeRegionNotSetException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2045
+ return [2, __decorateServiceException(exception, body)];
2046
+ });
2047
+ }); };
2048
+ var deserializeAws_json1_1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2049
+ var body, deserialized, exception;
2050
+ return __generator(this, function (_a) {
2051
+ body = parsedOutput.body;
2052
+ deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
2053
+ exception = new InvalidParameterException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2054
+ return [2, __decorateServiceException(exception, body)];
2055
+ });
2056
+ }); };
2057
+ var deserializeAws_json1_1InvalidParameterValueExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2058
+ var body, deserialized, exception;
2059
+ return __generator(this, function (_a) {
2060
+ body = parsedOutput.body;
2061
+ deserialized = deserializeAws_json1_1InvalidParameterValueException(body, context);
2062
+ exception = new InvalidParameterValueException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2063
+ return [2, __decorateServiceException(exception, body)];
2064
+ });
2065
+ }); };
2066
+ var deserializeAws_json1_1OperationNotPermittedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2067
+ var body, deserialized, exception;
2068
+ return __generator(this, function (_a) {
2069
+ body = parsedOutput.body;
2070
+ deserialized = deserializeAws_json1_1OperationNotPermittedException(body, context);
2071
+ exception = new OperationNotPermittedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2072
+ return [2, __decorateServiceException(exception, body)];
2073
+ });
2074
+ }); };
2075
+ var deserializeAws_json1_1ResourceInUseExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2076
+ var body, deserialized, exception;
2077
+ return __generator(this, function (_a) {
2078
+ body = parsedOutput.body;
2079
+ deserialized = deserializeAws_json1_1ResourceInUseException(body, context);
2080
+ exception = new ResourceInUseException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2081
+ return [2, __decorateServiceException(exception, body)];
2082
+ });
2083
+ }); };
2084
+ var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2085
+ var body, deserialized, exception;
2086
+ return __generator(this, function (_a) {
2087
+ body = parsedOutput.body;
2088
+ deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
2089
+ exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2090
+ return [2, __decorateServiceException(exception, body)];
2091
+ });
2092
+ }); };
2093
+ var deserializeAws_json1_1ServerInternalErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2094
+ var body, deserialized, exception;
2095
+ return __generator(this, function (_a) {
2096
+ body = parsedOutput.body;
2097
+ deserialized = deserializeAws_json1_1ServerInternalErrorException(body, context);
2098
+ exception = new ServerInternalErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2099
+ return [2, __decorateServiceException(exception, body)];
2100
+ });
2101
+ }); };
2102
+ var serializeAws_json1_1AgentIds = function (input, context) {
1485
2103
  return input
1486
- .filter((e) => e != null)
1487
- .map((entry) => {
2104
+ .filter(function (e) { return e != null; })
2105
+ .map(function (entry) {
1488
2106
  return entry;
1489
2107
  });
1490
2108
  };
1491
- const serializeAws_json1_1ApplicationIdsList = (input, context) => {
2109
+ var serializeAws_json1_1ApplicationIdsList = function (input, context) {
1492
2110
  return input
1493
- .filter((e) => e != null)
1494
- .map((entry) => {
2111
+ .filter(function (e) { return e != null; })
2112
+ .map(function (entry) {
1495
2113
  return entry;
1496
2114
  });
1497
2115
  };
1498
- const serializeAws_json1_1AssociateConfigurationItemsToApplicationRequest = (input, context) => {
1499
- return {
1500
- ...(input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId }),
1501
- ...(input.configurationIds != null && {
1502
- configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
1503
- }),
1504
- };
2116
+ var serializeAws_json1_1AssociateConfigurationItemsToApplicationRequest = function (input, context) {
2117
+ return __assign(__assign({}, (input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId })), (input.configurationIds != null && {
2118
+ configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
2119
+ }));
1505
2120
  };
1506
- const serializeAws_json1_1BatchDeleteImportDataRequest = (input, context) => {
1507
- return {
1508
- ...(input.importTaskIds != null && {
1509
- importTaskIds: serializeAws_json1_1ToDeleteIdentifierList(input.importTaskIds, context),
1510
- }),
1511
- };
2121
+ var serializeAws_json1_1BatchDeleteImportDataRequest = function (input, context) {
2122
+ return __assign({}, (input.importTaskIds != null && {
2123
+ importTaskIds: serializeAws_json1_1ToDeleteIdentifierList(input.importTaskIds, context),
2124
+ }));
1512
2125
  };
1513
- const serializeAws_json1_1ConfigurationIdList = (input, context) => {
2126
+ var serializeAws_json1_1ConfigurationIdList = function (input, context) {
1514
2127
  return input
1515
- .filter((e) => e != null)
1516
- .map((entry) => {
2128
+ .filter(function (e) { return e != null; })
2129
+ .map(function (entry) {
1517
2130
  return entry;
1518
2131
  });
1519
2132
  };
1520
- const serializeAws_json1_1ContinuousExportIds = (input, context) => {
2133
+ var serializeAws_json1_1ContinuousExportIds = function (input, context) {
1521
2134
  return input
1522
- .filter((e) => e != null)
1523
- .map((entry) => {
2135
+ .filter(function (e) { return e != null; })
2136
+ .map(function (entry) {
1524
2137
  return entry;
1525
2138
  });
1526
2139
  };
1527
- const serializeAws_json1_1CreateApplicationRequest = (input, context) => {
1528
- return {
1529
- ...(input.description != null && { description: input.description }),
1530
- ...(input.name != null && { name: input.name }),
1531
- };
2140
+ var serializeAws_json1_1CreateApplicationRequest = function (input, context) {
2141
+ return __assign(__assign({}, (input.description != null && { description: input.description })), (input.name != null && { name: input.name }));
1532
2142
  };
1533
- const serializeAws_json1_1CreateTagsRequest = (input, context) => {
1534
- return {
1535
- ...(input.configurationIds != null && {
1536
- configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
1537
- }),
1538
- ...(input.tags != null && { tags: serializeAws_json1_1TagSet(input.tags, context) }),
1539
- };
2143
+ var serializeAws_json1_1CreateTagsRequest = function (input, context) {
2144
+ return __assign(__assign({}, (input.configurationIds != null && {
2145
+ configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
2146
+ })), (input.tags != null && { tags: serializeAws_json1_1TagSet(input.tags, context) }));
1540
2147
  };
1541
- const serializeAws_json1_1DeleteApplicationsRequest = (input, context) => {
1542
- return {
1543
- ...(input.configurationIds != null && {
1544
- configurationIds: serializeAws_json1_1ApplicationIdsList(input.configurationIds, context),
1545
- }),
1546
- };
2148
+ var serializeAws_json1_1DeleteApplicationsRequest = function (input, context) {
2149
+ return __assign({}, (input.configurationIds != null && {
2150
+ configurationIds: serializeAws_json1_1ApplicationIdsList(input.configurationIds, context),
2151
+ }));
1547
2152
  };
1548
- const serializeAws_json1_1DeleteTagsRequest = (input, context) => {
1549
- return {
1550
- ...(input.configurationIds != null && {
1551
- configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
1552
- }),
1553
- ...(input.tags != null && { tags: serializeAws_json1_1TagSet(input.tags, context) }),
1554
- };
2153
+ var serializeAws_json1_1DeleteTagsRequest = function (input, context) {
2154
+ return __assign(__assign({}, (input.configurationIds != null && {
2155
+ configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
2156
+ })), (input.tags != null && { tags: serializeAws_json1_1TagSet(input.tags, context) }));
1555
2157
  };
1556
- const serializeAws_json1_1DescribeAgentsRequest = (input, context) => {
1557
- return {
1558
- ...(input.agentIds != null && { agentIds: serializeAws_json1_1AgentIds(input.agentIds, context) }),
1559
- ...(input.filters != null && { filters: serializeAws_json1_1Filters(input.filters, context) }),
1560
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1561
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1562
- };
2158
+ var serializeAws_json1_1DescribeAgentsRequest = function (input, context) {
2159
+ return __assign(__assign(__assign(__assign({}, (input.agentIds != null && { agentIds: serializeAws_json1_1AgentIds(input.agentIds, context) })), (input.filters != null && { filters: serializeAws_json1_1Filters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1563
2160
  };
1564
- const serializeAws_json1_1DescribeConfigurationsRequest = (input, context) => {
1565
- return {
1566
- ...(input.configurationIds != null && {
1567
- configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
1568
- }),
1569
- };
2161
+ var serializeAws_json1_1DescribeConfigurationsRequest = function (input, context) {
2162
+ return __assign({}, (input.configurationIds != null && {
2163
+ configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
2164
+ }));
1570
2165
  };
1571
- const serializeAws_json1_1DescribeContinuousExportsRequest = (input, context) => {
1572
- return {
1573
- ...(input.exportIds != null && { exportIds: serializeAws_json1_1ContinuousExportIds(input.exportIds, context) }),
1574
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1575
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1576
- };
2166
+ var serializeAws_json1_1DescribeContinuousExportsRequest = function (input, context) {
2167
+ return __assign(__assign(__assign({}, (input.exportIds != null && { exportIds: serializeAws_json1_1ContinuousExportIds(input.exportIds, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1577
2168
  };
1578
- const serializeAws_json1_1DescribeExportConfigurationsRequest = (input, context) => {
1579
- return {
1580
- ...(input.exportIds != null && { exportIds: serializeAws_json1_1ExportIds(input.exportIds, context) }),
1581
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1582
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1583
- };
2169
+ var serializeAws_json1_1DescribeExportConfigurationsRequest = function (input, context) {
2170
+ return __assign(__assign(__assign({}, (input.exportIds != null && { exportIds: serializeAws_json1_1ExportIds(input.exportIds, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1584
2171
  };
1585
- const serializeAws_json1_1DescribeExportTasksRequest = (input, context) => {
1586
- return {
1587
- ...(input.exportIds != null && { exportIds: serializeAws_json1_1ExportIds(input.exportIds, context) }),
1588
- ...(input.filters != null && { filters: serializeAws_json1_1ExportFilters(input.filters, context) }),
1589
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1590
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1591
- };
2172
+ var serializeAws_json1_1DescribeExportTasksRequest = function (input, context) {
2173
+ return __assign(__assign(__assign(__assign({}, (input.exportIds != null && { exportIds: serializeAws_json1_1ExportIds(input.exportIds, context) })), (input.filters != null && { filters: serializeAws_json1_1ExportFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1592
2174
  };
1593
- const serializeAws_json1_1DescribeImportTasksFilterList = (input, context) => {
2175
+ var serializeAws_json1_1DescribeImportTasksFilterList = function (input, context) {
1594
2176
  return input
1595
- .filter((e) => e != null)
1596
- .map((entry) => {
2177
+ .filter(function (e) { return e != null; })
2178
+ .map(function (entry) {
1597
2179
  return serializeAws_json1_1ImportTaskFilter(entry, context);
1598
2180
  });
1599
2181
  };
1600
- const serializeAws_json1_1DescribeImportTasksRequest = (input, context) => {
1601
- return {
1602
- ...(input.filters != null && {
1603
- filters: serializeAws_json1_1DescribeImportTasksFilterList(input.filters, context),
1604
- }),
1605
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1606
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1607
- };
2182
+ var serializeAws_json1_1DescribeImportTasksRequest = function (input, context) {
2183
+ return __assign(__assign(__assign({}, (input.filters != null && {
2184
+ filters: serializeAws_json1_1DescribeImportTasksFilterList(input.filters, context),
2185
+ })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1608
2186
  };
1609
- const serializeAws_json1_1DescribeTagsRequest = (input, context) => {
1610
- return {
1611
- ...(input.filters != null && { filters: serializeAws_json1_1TagFilters(input.filters, context) }),
1612
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1613
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1614
- };
2187
+ var serializeAws_json1_1DescribeTagsRequest = function (input, context) {
2188
+ return __assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_json1_1TagFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1615
2189
  };
1616
- const serializeAws_json1_1DisassociateConfigurationItemsFromApplicationRequest = (input, context) => {
1617
- return {
1618
- ...(input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId }),
1619
- ...(input.configurationIds != null && {
1620
- configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
1621
- }),
1622
- };
2190
+ var serializeAws_json1_1DisassociateConfigurationItemsFromApplicationRequest = function (input, context) {
2191
+ return __assign(__assign({}, (input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId })), (input.configurationIds != null && {
2192
+ configurationIds: serializeAws_json1_1ConfigurationIdList(input.configurationIds, context),
2193
+ }));
1623
2194
  };
1624
- const serializeAws_json1_1ExportDataFormats = (input, context) => {
2195
+ var serializeAws_json1_1ExportDataFormats = function (input, context) {
1625
2196
  return input
1626
- .filter((e) => e != null)
1627
- .map((entry) => {
2197
+ .filter(function (e) { return e != null; })
2198
+ .map(function (entry) {
1628
2199
  return entry;
1629
2200
  });
1630
2201
  };
1631
- const serializeAws_json1_1ExportFilter = (input, context) => {
1632
- return {
1633
- ...(input.condition != null && { condition: input.condition }),
1634
- ...(input.name != null && { name: input.name }),
1635
- ...(input.values != null && { values: serializeAws_json1_1FilterValues(input.values, context) }),
1636
- };
2202
+ var serializeAws_json1_1ExportFilter = function (input, context) {
2203
+ return __assign(__assign(__assign({}, (input.condition != null && { condition: input.condition })), (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_json1_1FilterValues(input.values, context) }));
1637
2204
  };
1638
- const serializeAws_json1_1ExportFilters = (input, context) => {
2205
+ var serializeAws_json1_1ExportFilters = function (input, context) {
1639
2206
  return input
1640
- .filter((e) => e != null)
1641
- .map((entry) => {
2207
+ .filter(function (e) { return e != null; })
2208
+ .map(function (entry) {
1642
2209
  return serializeAws_json1_1ExportFilter(entry, context);
1643
2210
  });
1644
2211
  };
1645
- const serializeAws_json1_1ExportIds = (input, context) => {
2212
+ var serializeAws_json1_1ExportIds = function (input, context) {
1646
2213
  return input
1647
- .filter((e) => e != null)
1648
- .map((entry) => {
2214
+ .filter(function (e) { return e != null; })
2215
+ .map(function (entry) {
1649
2216
  return entry;
1650
2217
  });
1651
2218
  };
1652
- const serializeAws_json1_1Filter = (input, context) => {
1653
- return {
1654
- ...(input.condition != null && { condition: input.condition }),
1655
- ...(input.name != null && { name: input.name }),
1656
- ...(input.values != null && { values: serializeAws_json1_1FilterValues(input.values, context) }),
1657
- };
2219
+ var serializeAws_json1_1Filter = function (input, context) {
2220
+ return __assign(__assign(__assign({}, (input.condition != null && { condition: input.condition })), (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_json1_1FilterValues(input.values, context) }));
1658
2221
  };
1659
- const serializeAws_json1_1Filters = (input, context) => {
2222
+ var serializeAws_json1_1Filters = function (input, context) {
1660
2223
  return input
1661
- .filter((e) => e != null)
1662
- .map((entry) => {
2224
+ .filter(function (e) { return e != null; })
2225
+ .map(function (entry) {
1663
2226
  return serializeAws_json1_1Filter(entry, context);
1664
2227
  });
1665
2228
  };
1666
- const serializeAws_json1_1FilterValues = (input, context) => {
2229
+ var serializeAws_json1_1FilterValues = function (input, context) {
1667
2230
  return input
1668
- .filter((e) => e != null)
1669
- .map((entry) => {
2231
+ .filter(function (e) { return e != null; })
2232
+ .map(function (entry) {
1670
2233
  return entry;
1671
2234
  });
1672
2235
  };
1673
- const serializeAws_json1_1GetDiscoverySummaryRequest = (input, context) => {
2236
+ var serializeAws_json1_1GetDiscoverySummaryRequest = function (input, context) {
1674
2237
  return {};
1675
2238
  };
1676
- const serializeAws_json1_1ImportTaskFilter = (input, context) => {
1677
- return {
1678
- ...(input.name != null && { name: input.name }),
1679
- ...(input.values != null && { values: serializeAws_json1_1ImportTaskFilterValueList(input.values, context) }),
1680
- };
2239
+ var serializeAws_json1_1ImportTaskFilter = function (input, context) {
2240
+ return __assign(__assign({}, (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_json1_1ImportTaskFilterValueList(input.values, context) }));
1681
2241
  };
1682
- const serializeAws_json1_1ImportTaskFilterValueList = (input, context) => {
2242
+ var serializeAws_json1_1ImportTaskFilterValueList = function (input, context) {
1683
2243
  return input
1684
- .filter((e) => e != null)
1685
- .map((entry) => {
2244
+ .filter(function (e) { return e != null; })
2245
+ .map(function (entry) {
1686
2246
  return entry;
1687
2247
  });
1688
2248
  };
1689
- const serializeAws_json1_1ListConfigurationsRequest = (input, context) => {
1690
- return {
1691
- ...(input.configurationType != null && { configurationType: input.configurationType }),
1692
- ...(input.filters != null && { filters: serializeAws_json1_1Filters(input.filters, context) }),
1693
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1694
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1695
- ...(input.orderBy != null && { orderBy: serializeAws_json1_1OrderByList(input.orderBy, context) }),
1696
- };
2249
+ var serializeAws_json1_1ListConfigurationsRequest = function (input, context) {
2250
+ return __assign(__assign(__assign(__assign(__assign({}, (input.configurationType != null && { configurationType: input.configurationType })), (input.filters != null && { filters: serializeAws_json1_1Filters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.orderBy != null && { orderBy: serializeAws_json1_1OrderByList(input.orderBy, context) }));
1697
2251
  };
1698
- const serializeAws_json1_1ListServerNeighborsRequest = (input, context) => {
1699
- return {
1700
- ...(input.configurationId != null && { configurationId: input.configurationId }),
1701
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1702
- ...(input.neighborConfigurationIds != null && {
1703
- neighborConfigurationIds: serializeAws_json1_1ConfigurationIdList(input.neighborConfigurationIds, context),
1704
- }),
1705
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1706
- ...(input.portInformationNeeded != null && { portInformationNeeded: input.portInformationNeeded }),
1707
- };
2252
+ var serializeAws_json1_1ListServerNeighborsRequest = function (input, context) {
2253
+ return __assign(__assign(__assign(__assign(__assign({}, (input.configurationId != null && { configurationId: input.configurationId })), (input.maxResults != null && { maxResults: input.maxResults })), (input.neighborConfigurationIds != null && {
2254
+ neighborConfigurationIds: serializeAws_json1_1ConfigurationIdList(input.neighborConfigurationIds, context),
2255
+ })), (input.nextToken != null && { nextToken: input.nextToken })), (input.portInformationNeeded != null && { portInformationNeeded: input.portInformationNeeded }));
1708
2256
  };
1709
- const serializeAws_json1_1OrderByElement = (input, context) => {
1710
- return {
1711
- ...(input.fieldName != null && { fieldName: input.fieldName }),
1712
- ...(input.sortOrder != null && { sortOrder: input.sortOrder }),
1713
- };
2257
+ var serializeAws_json1_1OrderByElement = function (input, context) {
2258
+ return __assign(__assign({}, (input.fieldName != null && { fieldName: input.fieldName })), (input.sortOrder != null && { sortOrder: input.sortOrder }));
1714
2259
  };
1715
- const serializeAws_json1_1OrderByList = (input, context) => {
2260
+ var serializeAws_json1_1OrderByList = function (input, context) {
1716
2261
  return input
1717
- .filter((e) => e != null)
1718
- .map((entry) => {
2262
+ .filter(function (e) { return e != null; })
2263
+ .map(function (entry) {
1719
2264
  return serializeAws_json1_1OrderByElement(entry, context);
1720
2265
  });
1721
2266
  };
1722
- const serializeAws_json1_1StartContinuousExportRequest = (input, context) => {
2267
+ var serializeAws_json1_1StartContinuousExportRequest = function (input, context) {
1723
2268
  return {};
1724
2269
  };
1725
- const serializeAws_json1_1StartDataCollectionByAgentIdsRequest = (input, context) => {
1726
- return {
1727
- ...(input.agentIds != null && { agentIds: serializeAws_json1_1AgentIds(input.agentIds, context) }),
1728
- };
2270
+ var serializeAws_json1_1StartDataCollectionByAgentIdsRequest = function (input, context) {
2271
+ return __assign({}, (input.agentIds != null && { agentIds: serializeAws_json1_1AgentIds(input.agentIds, context) }));
1729
2272
  };
1730
- const serializeAws_json1_1StartExportTaskRequest = (input, context) => {
1731
- return {
1732
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
1733
- ...(input.exportDataFormat != null && {
1734
- exportDataFormat: serializeAws_json1_1ExportDataFormats(input.exportDataFormat, context),
1735
- }),
1736
- ...(input.filters != null && { filters: serializeAws_json1_1ExportFilters(input.filters, context) }),
1737
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
1738
- };
2273
+ var serializeAws_json1_1StartExportTaskRequest = function (input, context) {
2274
+ return __assign(__assign(__assign(__assign({}, (input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) })), (input.exportDataFormat != null && {
2275
+ exportDataFormat: serializeAws_json1_1ExportDataFormats(input.exportDataFormat, context),
2276
+ })), (input.filters != null && { filters: serializeAws_json1_1ExportFilters(input.filters, context) })), (input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }));
1739
2277
  };
1740
- const serializeAws_json1_1StartImportTaskRequest = (input, context) => {
1741
- return {
1742
- clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
1743
- ...(input.importUrl != null && { importUrl: input.importUrl }),
1744
- ...(input.name != null && { name: input.name }),
1745
- };
2278
+ var serializeAws_json1_1StartImportTaskRequest = function (input, context) {
2279
+ var _a;
2280
+ return __assign(__assign({ clientRequestToken: (_a = input.clientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.importUrl != null && { importUrl: input.importUrl })), (input.name != null && { name: input.name }));
1746
2281
  };
1747
- const serializeAws_json1_1StopContinuousExportRequest = (input, context) => {
1748
- return {
1749
- ...(input.exportId != null && { exportId: input.exportId }),
1750
- };
2282
+ var serializeAws_json1_1StopContinuousExportRequest = function (input, context) {
2283
+ return __assign({}, (input.exportId != null && { exportId: input.exportId }));
1751
2284
  };
1752
- const serializeAws_json1_1StopDataCollectionByAgentIdsRequest = (input, context) => {
1753
- return {
1754
- ...(input.agentIds != null && { agentIds: serializeAws_json1_1AgentIds(input.agentIds, context) }),
1755
- };
2285
+ var serializeAws_json1_1StopDataCollectionByAgentIdsRequest = function (input, context) {
2286
+ return __assign({}, (input.agentIds != null && { agentIds: serializeAws_json1_1AgentIds(input.agentIds, context) }));
1756
2287
  };
1757
- const serializeAws_json1_1Tag = (input, context) => {
1758
- return {
1759
- ...(input.key != null && { key: input.key }),
1760
- ...(input.value != null && { value: input.value }),
1761
- };
2288
+ var serializeAws_json1_1Tag = function (input, context) {
2289
+ return __assign(__assign({}, (input.key != null && { key: input.key })), (input.value != null && { value: input.value }));
1762
2290
  };
1763
- const serializeAws_json1_1TagFilter = (input, context) => {
1764
- return {
1765
- ...(input.name != null && { name: input.name }),
1766
- ...(input.values != null && { values: serializeAws_json1_1FilterValues(input.values, context) }),
1767
- };
2291
+ var serializeAws_json1_1TagFilter = function (input, context) {
2292
+ return __assign(__assign({}, (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_json1_1FilterValues(input.values, context) }));
1768
2293
  };
1769
- const serializeAws_json1_1TagFilters = (input, context) => {
2294
+ var serializeAws_json1_1TagFilters = function (input, context) {
1770
2295
  return input
1771
- .filter((e) => e != null)
1772
- .map((entry) => {
2296
+ .filter(function (e) { return e != null; })
2297
+ .map(function (entry) {
1773
2298
  return serializeAws_json1_1TagFilter(entry, context);
1774
2299
  });
1775
2300
  };
1776
- const serializeAws_json1_1TagSet = (input, context) => {
2301
+ var serializeAws_json1_1TagSet = function (input, context) {
1777
2302
  return input
1778
- .filter((e) => e != null)
1779
- .map((entry) => {
2303
+ .filter(function (e) { return e != null; })
2304
+ .map(function (entry) {
1780
2305
  return serializeAws_json1_1Tag(entry, context);
1781
2306
  });
1782
2307
  };
1783
- const serializeAws_json1_1ToDeleteIdentifierList = (input, context) => {
2308
+ var serializeAws_json1_1ToDeleteIdentifierList = function (input, context) {
1784
2309
  return input
1785
- .filter((e) => e != null)
1786
- .map((entry) => {
2310
+ .filter(function (e) { return e != null; })
2311
+ .map(function (entry) {
1787
2312
  return entry;
1788
2313
  });
1789
2314
  };
1790
- const serializeAws_json1_1UpdateApplicationRequest = (input, context) => {
1791
- return {
1792
- ...(input.configurationId != null && { configurationId: input.configurationId }),
1793
- ...(input.description != null && { description: input.description }),
1794
- ...(input.name != null && { name: input.name }),
1795
- };
2315
+ var serializeAws_json1_1UpdateApplicationRequest = function (input, context) {
2316
+ return __assign(__assign(__assign({}, (input.configurationId != null && { configurationId: input.configurationId })), (input.description != null && { description: input.description })), (input.name != null && { name: input.name }));
1796
2317
  };
1797
- const deserializeAws_json1_1AgentConfigurationStatus = (output, context) => {
2318
+ var deserializeAws_json1_1AgentConfigurationStatus = function (output, context) {
1798
2319
  return {
1799
2320
  agentId: __expectString(output.agentId),
1800
2321
  description: __expectString(output.description),
1801
2322
  operationSucceeded: __expectBoolean(output.operationSucceeded),
1802
2323
  };
1803
2324
  };
1804
- const deserializeAws_json1_1AgentConfigurationStatusList = (output, context) => {
1805
- const retVal = (output || [])
1806
- .filter((e) => e != null)
1807
- .map((entry) => {
2325
+ var deserializeAws_json1_1AgentConfigurationStatusList = function (output, context) {
2326
+ var retVal = (output || [])
2327
+ .filter(function (e) { return e != null; })
2328
+ .map(function (entry) {
1808
2329
  if (entry === null) {
1809
2330
  return null;
1810
2331
  }
@@ -1812,7 +2333,7 @@ const deserializeAws_json1_1AgentConfigurationStatusList = (output, context) =>
1812
2333
  });
1813
2334
  return retVal;
1814
2335
  };
1815
- const deserializeAws_json1_1AgentInfo = (output, context) => {
2336
+ var deserializeAws_json1_1AgentInfo = function (output, context) {
1816
2337
  return {
1817
2338
  agentId: __expectString(output.agentId),
1818
2339
  agentNetworkInfoList: output.agentNetworkInfoList != null
@@ -1828,16 +2349,16 @@ const deserializeAws_json1_1AgentInfo = (output, context) => {
1828
2349
  version: __expectString(output.version),
1829
2350
  };
1830
2351
  };
1831
- const deserializeAws_json1_1AgentNetworkInfo = (output, context) => {
2352
+ var deserializeAws_json1_1AgentNetworkInfo = function (output, context) {
1832
2353
  return {
1833
2354
  ipAddress: __expectString(output.ipAddress),
1834
2355
  macAddress: __expectString(output.macAddress),
1835
2356
  };
1836
2357
  };
1837
- const deserializeAws_json1_1AgentNetworkInfoList = (output, context) => {
1838
- const retVal = (output || [])
1839
- .filter((e) => e != null)
1840
- .map((entry) => {
2358
+ var deserializeAws_json1_1AgentNetworkInfoList = function (output, context) {
2359
+ var retVal = (output || [])
2360
+ .filter(function (e) { return e != null; })
2361
+ .map(function (entry) {
1841
2362
  if (entry === null) {
1842
2363
  return null;
1843
2364
  }
@@ -1845,10 +2366,10 @@ const deserializeAws_json1_1AgentNetworkInfoList = (output, context) => {
1845
2366
  });
1846
2367
  return retVal;
1847
2368
  };
1848
- const deserializeAws_json1_1AgentsInfo = (output, context) => {
1849
- const retVal = (output || [])
1850
- .filter((e) => e != null)
1851
- .map((entry) => {
2369
+ var deserializeAws_json1_1AgentsInfo = function (output, context) {
2370
+ var retVal = (output || [])
2371
+ .filter(function (e) { return e != null; })
2372
+ .map(function (entry) {
1852
2373
  if (entry === null) {
1853
2374
  return null;
1854
2375
  }
@@ -1856,25 +2377,25 @@ const deserializeAws_json1_1AgentsInfo = (output, context) => {
1856
2377
  });
1857
2378
  return retVal;
1858
2379
  };
1859
- const deserializeAws_json1_1AssociateConfigurationItemsToApplicationResponse = (output, context) => {
2380
+ var deserializeAws_json1_1AssociateConfigurationItemsToApplicationResponse = function (output, context) {
1860
2381
  return {};
1861
2382
  };
1862
- const deserializeAws_json1_1AuthorizationErrorException = (output, context) => {
2383
+ var deserializeAws_json1_1AuthorizationErrorException = function (output, context) {
1863
2384
  return {
1864
2385
  message: __expectString(output.message),
1865
2386
  };
1866
2387
  };
1867
- const deserializeAws_json1_1BatchDeleteImportDataError = (output, context) => {
2388
+ var deserializeAws_json1_1BatchDeleteImportDataError = function (output, context) {
1868
2389
  return {
1869
2390
  errorCode: __expectString(output.errorCode),
1870
2391
  errorDescription: __expectString(output.errorDescription),
1871
2392
  importTaskId: __expectString(output.importTaskId),
1872
2393
  };
1873
2394
  };
1874
- const deserializeAws_json1_1BatchDeleteImportDataErrorList = (output, context) => {
1875
- const retVal = (output || [])
1876
- .filter((e) => e != null)
1877
- .map((entry) => {
2395
+ var deserializeAws_json1_1BatchDeleteImportDataErrorList = function (output, context) {
2396
+ var retVal = (output || [])
2397
+ .filter(function (e) { return e != null; })
2398
+ .map(function (entry) {
1878
2399
  if (entry === null) {
1879
2400
  return null;
1880
2401
  }
@@ -1882,26 +2403,25 @@ const deserializeAws_json1_1BatchDeleteImportDataErrorList = (output, context) =
1882
2403
  });
1883
2404
  return retVal;
1884
2405
  };
1885
- const deserializeAws_json1_1BatchDeleteImportDataResponse = (output, context) => {
2406
+ var deserializeAws_json1_1BatchDeleteImportDataResponse = function (output, context) {
1886
2407
  return {
1887
2408
  errors: output.errors != null ? deserializeAws_json1_1BatchDeleteImportDataErrorList(output.errors, context) : undefined,
1888
2409
  };
1889
2410
  };
1890
- const deserializeAws_json1_1Configuration = (output, context) => {
1891
- return Object.entries(output).reduce((acc, [key, value]) => {
2411
+ var deserializeAws_json1_1Configuration = function (output, context) {
2412
+ return Object.entries(output).reduce(function (acc, _a) {
2413
+ var _b;
2414
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1892
2415
  if (value === null) {
1893
2416
  return acc;
1894
2417
  }
1895
- return {
1896
- ...acc,
1897
- [key]: __expectString(value),
1898
- };
2418
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1899
2419
  }, {});
1900
2420
  };
1901
- const deserializeAws_json1_1Configurations = (output, context) => {
1902
- const retVal = (output || [])
1903
- .filter((e) => e != null)
1904
- .map((entry) => {
2421
+ var deserializeAws_json1_1Configurations = function (output, context) {
2422
+ var retVal = (output || [])
2423
+ .filter(function (e) { return e != null; })
2424
+ .map(function (entry) {
1905
2425
  if (entry === null) {
1906
2426
  return null;
1907
2427
  }
@@ -1909,7 +2429,7 @@ const deserializeAws_json1_1Configurations = (output, context) => {
1909
2429
  });
1910
2430
  return retVal;
1911
2431
  };
1912
- const deserializeAws_json1_1ConfigurationTag = (output, context) => {
2432
+ var deserializeAws_json1_1ConfigurationTag = function (output, context) {
1913
2433
  return {
1914
2434
  configurationId: __expectString(output.configurationId),
1915
2435
  configurationType: __expectString(output.configurationType),
@@ -1920,10 +2440,10 @@ const deserializeAws_json1_1ConfigurationTag = (output, context) => {
1920
2440
  value: __expectString(output.value),
1921
2441
  };
1922
2442
  };
1923
- const deserializeAws_json1_1ConfigurationTagSet = (output, context) => {
1924
- const retVal = (output || [])
1925
- .filter((e) => e != null)
1926
- .map((entry) => {
2443
+ var deserializeAws_json1_1ConfigurationTagSet = function (output, context) {
2444
+ var retVal = (output || [])
2445
+ .filter(function (e) { return e != null; })
2446
+ .map(function (entry) {
1927
2447
  if (entry === null) {
1928
2448
  return null;
1929
2449
  }
@@ -1931,12 +2451,12 @@ const deserializeAws_json1_1ConfigurationTagSet = (output, context) => {
1931
2451
  });
1932
2452
  return retVal;
1933
2453
  };
1934
- const deserializeAws_json1_1ConflictErrorException = (output, context) => {
2454
+ var deserializeAws_json1_1ConflictErrorException = function (output, context) {
1935
2455
  return {
1936
2456
  message: __expectString(output.message),
1937
2457
  };
1938
2458
  };
1939
- const deserializeAws_json1_1ContinuousExportDescription = (output, context) => {
2459
+ var deserializeAws_json1_1ContinuousExportDescription = function (output, context) {
1940
2460
  return {
1941
2461
  dataSource: __expectString(output.dataSource),
1942
2462
  exportId: __expectString(output.exportId),
@@ -1950,10 +2470,10 @@ const deserializeAws_json1_1ContinuousExportDescription = (output, context) => {
1950
2470
  stopTime: output.stopTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopTime))) : undefined,
1951
2471
  };
1952
2472
  };
1953
- const deserializeAws_json1_1ContinuousExportDescriptions = (output, context) => {
1954
- const retVal = (output || [])
1955
- .filter((e) => e != null)
1956
- .map((entry) => {
2473
+ var deserializeAws_json1_1ContinuousExportDescriptions = function (output, context) {
2474
+ var retVal = (output || [])
2475
+ .filter(function (e) { return e != null; })
2476
+ .map(function (entry) {
1957
2477
  if (entry === null) {
1958
2478
  return null;
1959
2479
  }
@@ -1961,15 +2481,15 @@ const deserializeAws_json1_1ContinuousExportDescriptions = (output, context) =>
1961
2481
  });
1962
2482
  return retVal;
1963
2483
  };
1964
- const deserializeAws_json1_1CreateApplicationResponse = (output, context) => {
2484
+ var deserializeAws_json1_1CreateApplicationResponse = function (output, context) {
1965
2485
  return {
1966
2486
  configurationId: __expectString(output.configurationId),
1967
2487
  };
1968
2488
  };
1969
- const deserializeAws_json1_1CreateTagsResponse = (output, context) => {
2489
+ var deserializeAws_json1_1CreateTagsResponse = function (output, context) {
1970
2490
  return {};
1971
2491
  };
1972
- const deserializeAws_json1_1CustomerAgentInfo = (output, context) => {
2492
+ var deserializeAws_json1_1CustomerAgentInfo = function (output, context) {
1973
2493
  return {
1974
2494
  activeAgents: __expectInt32(output.activeAgents),
1975
2495
  blackListedAgents: __expectInt32(output.blackListedAgents),
@@ -1980,7 +2500,7 @@ const deserializeAws_json1_1CustomerAgentInfo = (output, context) => {
1980
2500
  unknownAgents: __expectInt32(output.unknownAgents),
1981
2501
  };
1982
2502
  };
1983
- const deserializeAws_json1_1CustomerAgentlessCollectorInfo = (output, context) => {
2503
+ var deserializeAws_json1_1CustomerAgentlessCollectorInfo = function (output, context) {
1984
2504
  return {
1985
2505
  activeAgentlessCollectors: __expectInt32(output.activeAgentlessCollectors),
1986
2506
  denyListedAgentlessCollectors: __expectInt32(output.denyListedAgentlessCollectors),
@@ -1991,7 +2511,7 @@ const deserializeAws_json1_1CustomerAgentlessCollectorInfo = (output, context) =
1991
2511
  unknownAgentlessCollectors: __expectInt32(output.unknownAgentlessCollectors),
1992
2512
  };
1993
2513
  };
1994
- const deserializeAws_json1_1CustomerConnectorInfo = (output, context) => {
2514
+ var deserializeAws_json1_1CustomerConnectorInfo = function (output, context) {
1995
2515
  return {
1996
2516
  activeConnectors: __expectInt32(output.activeConnectors),
1997
2517
  blackListedConnectors: __expectInt32(output.blackListedConnectors),
@@ -2002,7 +2522,7 @@ const deserializeAws_json1_1CustomerConnectorInfo = (output, context) => {
2002
2522
  unknownConnectors: __expectInt32(output.unknownConnectors),
2003
2523
  };
2004
2524
  };
2005
- const deserializeAws_json1_1CustomerMeCollectorInfo = (output, context) => {
2525
+ var deserializeAws_json1_1CustomerMeCollectorInfo = function (output, context) {
2006
2526
  return {
2007
2527
  activeMeCollectors: __expectInt32(output.activeMeCollectors),
2008
2528
  denyListedMeCollectors: __expectInt32(output.denyListedMeCollectors),
@@ -2013,33 +2533,32 @@ const deserializeAws_json1_1CustomerMeCollectorInfo = (output, context) => {
2013
2533
  unknownMeCollectors: __expectInt32(output.unknownMeCollectors),
2014
2534
  };
2015
2535
  };
2016
- const deserializeAws_json1_1DeleteApplicationsResponse = (output, context) => {
2536
+ var deserializeAws_json1_1DeleteApplicationsResponse = function (output, context) {
2017
2537
  return {};
2018
2538
  };
2019
- const deserializeAws_json1_1DeleteTagsResponse = (output, context) => {
2539
+ var deserializeAws_json1_1DeleteTagsResponse = function (output, context) {
2020
2540
  return {};
2021
2541
  };
2022
- const deserializeAws_json1_1DescribeAgentsResponse = (output, context) => {
2542
+ var deserializeAws_json1_1DescribeAgentsResponse = function (output, context) {
2023
2543
  return {
2024
2544
  agentsInfo: output.agentsInfo != null ? deserializeAws_json1_1AgentsInfo(output.agentsInfo, context) : undefined,
2025
2545
  nextToken: __expectString(output.nextToken),
2026
2546
  };
2027
2547
  };
2028
- const deserializeAws_json1_1DescribeConfigurationsAttribute = (output, context) => {
2029
- return Object.entries(output).reduce((acc, [key, value]) => {
2548
+ var deserializeAws_json1_1DescribeConfigurationsAttribute = function (output, context) {
2549
+ return Object.entries(output).reduce(function (acc, _a) {
2550
+ var _b;
2551
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
2030
2552
  if (value === null) {
2031
2553
  return acc;
2032
2554
  }
2033
- return {
2034
- ...acc,
2035
- [key]: __expectString(value),
2036
- };
2555
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
2037
2556
  }, {});
2038
2557
  };
2039
- const deserializeAws_json1_1DescribeConfigurationsAttributes = (output, context) => {
2040
- const retVal = (output || [])
2041
- .filter((e) => e != null)
2042
- .map((entry) => {
2558
+ var deserializeAws_json1_1DescribeConfigurationsAttributes = function (output, context) {
2559
+ var retVal = (output || [])
2560
+ .filter(function (e) { return e != null; })
2561
+ .map(function (entry) {
2043
2562
  if (entry === null) {
2044
2563
  return null;
2045
2564
  }
@@ -2047,14 +2566,14 @@ const deserializeAws_json1_1DescribeConfigurationsAttributes = (output, context)
2047
2566
  });
2048
2567
  return retVal;
2049
2568
  };
2050
- const deserializeAws_json1_1DescribeConfigurationsResponse = (output, context) => {
2569
+ var deserializeAws_json1_1DescribeConfigurationsResponse = function (output, context) {
2051
2570
  return {
2052
2571
  configurations: output.configurations != null
2053
2572
  ? deserializeAws_json1_1DescribeConfigurationsAttributes(output.configurations, context)
2054
2573
  : undefined,
2055
2574
  };
2056
2575
  };
2057
- const deserializeAws_json1_1DescribeContinuousExportsResponse = (output, context) => {
2576
+ var deserializeAws_json1_1DescribeContinuousExportsResponse = function (output, context) {
2058
2577
  return {
2059
2578
  descriptions: output.descriptions != null
2060
2579
  ? deserializeAws_json1_1ContinuousExportDescriptions(output.descriptions, context)
@@ -2062,39 +2581,39 @@ const deserializeAws_json1_1DescribeContinuousExportsResponse = (output, context
2062
2581
  nextToken: __expectString(output.nextToken),
2063
2582
  };
2064
2583
  };
2065
- const deserializeAws_json1_1DescribeExportConfigurationsResponse = (output, context) => {
2584
+ var deserializeAws_json1_1DescribeExportConfigurationsResponse = function (output, context) {
2066
2585
  return {
2067
2586
  exportsInfo: output.exportsInfo != null ? deserializeAws_json1_1ExportsInfo(output.exportsInfo, context) : undefined,
2068
2587
  nextToken: __expectString(output.nextToken),
2069
2588
  };
2070
2589
  };
2071
- const deserializeAws_json1_1DescribeExportTasksResponse = (output, context) => {
2590
+ var deserializeAws_json1_1DescribeExportTasksResponse = function (output, context) {
2072
2591
  return {
2073
2592
  exportsInfo: output.exportsInfo != null ? deserializeAws_json1_1ExportsInfo(output.exportsInfo, context) : undefined,
2074
2593
  nextToken: __expectString(output.nextToken),
2075
2594
  };
2076
2595
  };
2077
- const deserializeAws_json1_1DescribeImportTasksResponse = (output, context) => {
2596
+ var deserializeAws_json1_1DescribeImportTasksResponse = function (output, context) {
2078
2597
  return {
2079
2598
  nextToken: __expectString(output.nextToken),
2080
2599
  tasks: output.tasks != null ? deserializeAws_json1_1ImportTaskList(output.tasks, context) : undefined,
2081
2600
  };
2082
2601
  };
2083
- const deserializeAws_json1_1DescribeTagsResponse = (output, context) => {
2602
+ var deserializeAws_json1_1DescribeTagsResponse = function (output, context) {
2084
2603
  return {
2085
2604
  nextToken: __expectString(output.nextToken),
2086
2605
  tags: output.tags != null ? deserializeAws_json1_1ConfigurationTagSet(output.tags, context) : undefined,
2087
2606
  };
2088
2607
  };
2089
- const deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationResponse = (output, context) => {
2608
+ var deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationResponse = function (output, context) {
2090
2609
  return {};
2091
2610
  };
2092
- const deserializeAws_json1_1ExportConfigurationsResponse = (output, context) => {
2611
+ var deserializeAws_json1_1ExportConfigurationsResponse = function (output, context) {
2093
2612
  return {
2094
2613
  exportId: __expectString(output.exportId),
2095
2614
  };
2096
2615
  };
2097
- const deserializeAws_json1_1ExportInfo = (output, context) => {
2616
+ var deserializeAws_json1_1ExportInfo = function (output, context) {
2098
2617
  return {
2099
2618
  configurationsDownloadUrl: __expectString(output.configurationsDownloadUrl),
2100
2619
  exportId: __expectString(output.exportId),
@@ -2112,10 +2631,10 @@ const deserializeAws_json1_1ExportInfo = (output, context) => {
2112
2631
  statusMessage: __expectString(output.statusMessage),
2113
2632
  };
2114
2633
  };
2115
- const deserializeAws_json1_1ExportsInfo = (output, context) => {
2116
- const retVal = (output || [])
2117
- .filter((e) => e != null)
2118
- .map((entry) => {
2634
+ var deserializeAws_json1_1ExportsInfo = function (output, context) {
2635
+ var retVal = (output || [])
2636
+ .filter(function (e) { return e != null; })
2637
+ .map(function (entry) {
2119
2638
  if (entry === null) {
2120
2639
  return null;
2121
2640
  }
@@ -2123,7 +2642,7 @@ const deserializeAws_json1_1ExportsInfo = (output, context) => {
2123
2642
  });
2124
2643
  return retVal;
2125
2644
  };
2126
- const deserializeAws_json1_1GetDiscoverySummaryResponse = (output, context) => {
2645
+ var deserializeAws_json1_1GetDiscoverySummaryResponse = function (output, context) {
2127
2646
  return {
2128
2647
  agentSummary: output.agentSummary != null ? deserializeAws_json1_1CustomerAgentInfo(output.agentSummary, context) : undefined,
2129
2648
  agentlessCollectorSummary: output.agentlessCollectorSummary != null
@@ -2141,12 +2660,12 @@ const deserializeAws_json1_1GetDiscoverySummaryResponse = (output, context) => {
2141
2660
  serversMappedtoTags: __expectLong(output.serversMappedtoTags),
2142
2661
  };
2143
2662
  };
2144
- const deserializeAws_json1_1HomeRegionNotSetException = (output, context) => {
2663
+ var deserializeAws_json1_1HomeRegionNotSetException = function (output, context) {
2145
2664
  return {
2146
2665
  message: __expectString(output.message),
2147
2666
  };
2148
2667
  };
2149
- const deserializeAws_json1_1ImportTask = (output, context) => {
2668
+ var deserializeAws_json1_1ImportTask = function (output, context) {
2150
2669
  return {
2151
2670
  applicationImportFailure: __expectInt32(output.applicationImportFailure),
2152
2671
  applicationImportSuccess: __expectInt32(output.applicationImportSuccess),
@@ -2169,10 +2688,10 @@ const deserializeAws_json1_1ImportTask = (output, context) => {
2169
2688
  status: __expectString(output.status),
2170
2689
  };
2171
2690
  };
2172
- const deserializeAws_json1_1ImportTaskList = (output, context) => {
2173
- const retVal = (output || [])
2174
- .filter((e) => e != null)
2175
- .map((entry) => {
2691
+ var deserializeAws_json1_1ImportTaskList = function (output, context) {
2692
+ var retVal = (output || [])
2693
+ .filter(function (e) { return e != null; })
2694
+ .map(function (entry) {
2176
2695
  if (entry === null) {
2177
2696
  return null;
2178
2697
  }
@@ -2180,30 +2699,30 @@ const deserializeAws_json1_1ImportTaskList = (output, context) => {
2180
2699
  });
2181
2700
  return retVal;
2182
2701
  };
2183
- const deserializeAws_json1_1InvalidParameterException = (output, context) => {
2702
+ var deserializeAws_json1_1InvalidParameterException = function (output, context) {
2184
2703
  return {
2185
2704
  message: __expectString(output.message),
2186
2705
  };
2187
2706
  };
2188
- const deserializeAws_json1_1InvalidParameterValueException = (output, context) => {
2707
+ var deserializeAws_json1_1InvalidParameterValueException = function (output, context) {
2189
2708
  return {
2190
2709
  message: __expectString(output.message),
2191
2710
  };
2192
2711
  };
2193
- const deserializeAws_json1_1ListConfigurationsResponse = (output, context) => {
2712
+ var deserializeAws_json1_1ListConfigurationsResponse = function (output, context) {
2194
2713
  return {
2195
2714
  configurations: output.configurations != null ? deserializeAws_json1_1Configurations(output.configurations, context) : undefined,
2196
2715
  nextToken: __expectString(output.nextToken),
2197
2716
  };
2198
2717
  };
2199
- const deserializeAws_json1_1ListServerNeighborsResponse = (output, context) => {
2718
+ var deserializeAws_json1_1ListServerNeighborsResponse = function (output, context) {
2200
2719
  return {
2201
2720
  knownDependencyCount: __expectLong(output.knownDependencyCount),
2202
2721
  neighbors: output.neighbors != null ? deserializeAws_json1_1NeighborDetailsList(output.neighbors, context) : undefined,
2203
2722
  nextToken: __expectString(output.nextToken),
2204
2723
  };
2205
2724
  };
2206
- const deserializeAws_json1_1NeighborConnectionDetail = (output, context) => {
2725
+ var deserializeAws_json1_1NeighborConnectionDetail = function (output, context) {
2207
2726
  return {
2208
2727
  connectionsCount: __expectLong(output.connectionsCount),
2209
2728
  destinationPort: __expectInt32(output.destinationPort),
@@ -2212,10 +2731,10 @@ const deserializeAws_json1_1NeighborConnectionDetail = (output, context) => {
2212
2731
  transportProtocol: __expectString(output.transportProtocol),
2213
2732
  };
2214
2733
  };
2215
- const deserializeAws_json1_1NeighborDetailsList = (output, context) => {
2216
- const retVal = (output || [])
2217
- .filter((e) => e != null)
2218
- .map((entry) => {
2734
+ var deserializeAws_json1_1NeighborDetailsList = function (output, context) {
2735
+ var retVal = (output || [])
2736
+ .filter(function (e) { return e != null; })
2737
+ .map(function (entry) {
2219
2738
  if (entry === null) {
2220
2739
  return null;
2221
2740
  }
@@ -2223,38 +2742,37 @@ const deserializeAws_json1_1NeighborDetailsList = (output, context) => {
2223
2742
  });
2224
2743
  return retVal;
2225
2744
  };
2226
- const deserializeAws_json1_1OperationNotPermittedException = (output, context) => {
2745
+ var deserializeAws_json1_1OperationNotPermittedException = function (output, context) {
2227
2746
  return {
2228
2747
  message: __expectString(output.message),
2229
2748
  };
2230
2749
  };
2231
- const deserializeAws_json1_1ResourceInUseException = (output, context) => {
2750
+ var deserializeAws_json1_1ResourceInUseException = function (output, context) {
2232
2751
  return {
2233
2752
  message: __expectString(output.message),
2234
2753
  };
2235
2754
  };
2236
- const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
2755
+ var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
2237
2756
  return {
2238
2757
  message: __expectString(output.message),
2239
2758
  };
2240
2759
  };
2241
- const deserializeAws_json1_1SchemaStorageConfig = (output, context) => {
2242
- return Object.entries(output).reduce((acc, [key, value]) => {
2760
+ var deserializeAws_json1_1SchemaStorageConfig = function (output, context) {
2761
+ return Object.entries(output).reduce(function (acc, _a) {
2762
+ var _b;
2763
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
2243
2764
  if (value === null) {
2244
2765
  return acc;
2245
2766
  }
2246
- return {
2247
- ...acc,
2248
- [key]: __expectString(value),
2249
- };
2767
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
2250
2768
  }, {});
2251
2769
  };
2252
- const deserializeAws_json1_1ServerInternalErrorException = (output, context) => {
2770
+ var deserializeAws_json1_1ServerInternalErrorException = function (output, context) {
2253
2771
  return {
2254
2772
  message: __expectString(output.message),
2255
2773
  };
2256
2774
  };
2257
- const deserializeAws_json1_1StartContinuousExportResponse = (output, context) => {
2775
+ var deserializeAws_json1_1StartContinuousExportResponse = function (output, context) {
2258
2776
  return {
2259
2777
  dataSource: __expectString(output.dataSource),
2260
2778
  exportId: __expectString(output.exportId),
@@ -2265,85 +2783,108 @@ const deserializeAws_json1_1StartContinuousExportResponse = (output, context) =>
2265
2783
  startTime: output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
2266
2784
  };
2267
2785
  };
2268
- const deserializeAws_json1_1StartDataCollectionByAgentIdsResponse = (output, context) => {
2786
+ var deserializeAws_json1_1StartDataCollectionByAgentIdsResponse = function (output, context) {
2269
2787
  return {
2270
2788
  agentsConfigurationStatus: output.agentsConfigurationStatus != null
2271
2789
  ? deserializeAws_json1_1AgentConfigurationStatusList(output.agentsConfigurationStatus, context)
2272
2790
  : undefined,
2273
2791
  };
2274
2792
  };
2275
- const deserializeAws_json1_1StartExportTaskResponse = (output, context) => {
2793
+ var deserializeAws_json1_1StartExportTaskResponse = function (output, context) {
2276
2794
  return {
2277
2795
  exportId: __expectString(output.exportId),
2278
2796
  };
2279
2797
  };
2280
- const deserializeAws_json1_1StartImportTaskResponse = (output, context) => {
2798
+ var deserializeAws_json1_1StartImportTaskResponse = function (output, context) {
2281
2799
  return {
2282
2800
  task: output.task != null ? deserializeAws_json1_1ImportTask(output.task, context) : undefined,
2283
2801
  };
2284
2802
  };
2285
- const deserializeAws_json1_1StopContinuousExportResponse = (output, context) => {
2803
+ var deserializeAws_json1_1StopContinuousExportResponse = function (output, context) {
2286
2804
  return {
2287
2805
  startTime: output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
2288
2806
  stopTime: output.stopTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopTime))) : undefined,
2289
2807
  };
2290
2808
  };
2291
- const deserializeAws_json1_1StopDataCollectionByAgentIdsResponse = (output, context) => {
2809
+ var deserializeAws_json1_1StopDataCollectionByAgentIdsResponse = function (output, context) {
2292
2810
  return {
2293
2811
  agentsConfigurationStatus: output.agentsConfigurationStatus != null
2294
2812
  ? deserializeAws_json1_1AgentConfigurationStatusList(output.agentsConfigurationStatus, context)
2295
2813
  : undefined,
2296
2814
  };
2297
2815
  };
2298
- const deserializeAws_json1_1UpdateApplicationResponse = (output, context) => {
2816
+ var deserializeAws_json1_1UpdateApplicationResponse = function (output, context) {
2299
2817
  return {};
2300
2818
  };
2301
- const deserializeMetadata = (output) => ({
2302
- httpStatusCode: output.statusCode,
2303
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2304
- extendedRequestId: output.headers["x-amz-id-2"],
2305
- cfId: output.headers["x-amz-cf-id"],
2306
- });
2307
- const collectBody = (streamBody = new Uint8Array(), context) => {
2819
+ var deserializeMetadata = function (output) {
2820
+ var _a, _b;
2821
+ return ({
2822
+ httpStatusCode: output.statusCode,
2823
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
2824
+ extendedRequestId: output.headers["x-amz-id-2"],
2825
+ cfId: output.headers["x-amz-cf-id"],
2826
+ });
2827
+ };
2828
+ var collectBody = function (streamBody, context) {
2829
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
2308
2830
  if (streamBody instanceof Uint8Array) {
2309
2831
  return Promise.resolve(streamBody);
2310
2832
  }
2311
2833
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2312
2834
  };
2313
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2314
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2315
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2316
- const contents = {
2317
- protocol,
2318
- hostname,
2319
- port,
2320
- method: "POST",
2321
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2322
- headers,
2323
- };
2324
- if (resolvedHostname !== undefined) {
2325
- contents.hostname = resolvedHostname;
2326
- }
2327
- if (body !== undefined) {
2328
- contents.body = body;
2329
- }
2330
- return new __HttpRequest(contents);
2835
+ var collectBodyString = function (streamBody, context) {
2836
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2837
+ };
2838
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2839
+ var _a, hostname, _b, protocol, port, basePath, contents;
2840
+ return __generator(this, function (_c) {
2841
+ switch (_c.label) {
2842
+ case 0: return [4, context.endpoint()];
2843
+ case 1:
2844
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2845
+ contents = {
2846
+ protocol: protocol,
2847
+ hostname: hostname,
2848
+ port: port,
2849
+ method: "POST",
2850
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2851
+ headers: headers,
2852
+ };
2853
+ if (resolvedHostname !== undefined) {
2854
+ contents.hostname = resolvedHostname;
2855
+ }
2856
+ if (body !== undefined) {
2857
+ contents.body = body;
2858
+ }
2859
+ return [2, new __HttpRequest(contents)];
2860
+ }
2861
+ });
2862
+ }); };
2863
+ var parseBody = function (streamBody, context) {
2864
+ return collectBodyString(streamBody, context).then(function (encoded) {
2865
+ if (encoded.length) {
2866
+ return JSON.parse(encoded);
2867
+ }
2868
+ return {};
2869
+ });
2331
2870
  };
2332
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2333
- if (encoded.length) {
2334
- return JSON.parse(encoded);
2335
- }
2336
- return {};
2337
- });
2338
- const parseErrorBody = async (errorBody, context) => {
2339
- const value = await parseBody(errorBody, context);
2340
- value.message = value.message ?? value.Message;
2341
- return value;
2342
- };
2343
- const loadRestJsonErrorCode = (output, data) => {
2344
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2345
- const sanitizeErrorCode = (rawValue) => {
2346
- let cleanValue = rawValue;
2871
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2872
+ var value;
2873
+ var _a;
2874
+ return __generator(this, function (_b) {
2875
+ switch (_b.label) {
2876
+ case 0: return [4, parseBody(errorBody, context)];
2877
+ case 1:
2878
+ value = _b.sent();
2879
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2880
+ return [2, value];
2881
+ }
2882
+ });
2883
+ }); };
2884
+ var loadRestJsonErrorCode = function (output, data) {
2885
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2886
+ var sanitizeErrorCode = function (rawValue) {
2887
+ var cleanValue = rawValue;
2347
2888
  if (typeof cleanValue === "number") {
2348
2889
  cleanValue = cleanValue.toString();
2349
2890
  }
@@ -2358,7 +2899,7 @@ const loadRestJsonErrorCode = (output, data) => {
2358
2899
  }
2359
2900
  return cleanValue;
2360
2901
  };
2361
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2902
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
2362
2903
  if (headerKey !== undefined) {
2363
2904
  return sanitizeErrorCode(output.headers[headerKey]);
2364
2905
  }