@aws-sdk/client-application-discovery-service 3.490.0 → 3.495.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 (49) hide show
  1. package/dist-cjs/ApplicationDiscoveryService.js +1 -67
  2. package/dist-cjs/ApplicationDiscoveryServiceClient.js +1 -43
  3. package/dist-cjs/commands/AssociateConfigurationItemsToApplicationCommand.js +1 -28
  4. package/dist-cjs/commands/BatchDeleteAgentsCommand.js +1 -28
  5. package/dist-cjs/commands/BatchDeleteImportDataCommand.js +1 -28
  6. package/dist-cjs/commands/CreateApplicationCommand.js +1 -28
  7. package/dist-cjs/commands/CreateTagsCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteApplicationsCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteTagsCommand.js +1 -28
  10. package/dist-cjs/commands/DescribeAgentsCommand.js +1 -29
  11. package/dist-cjs/commands/DescribeBatchDeleteConfigurationTaskCommand.js +1 -28
  12. package/dist-cjs/commands/DescribeConfigurationsCommand.js +1 -28
  13. package/dist-cjs/commands/DescribeContinuousExportsCommand.js +1 -28
  14. package/dist-cjs/commands/DescribeExportConfigurationsCommand.js +1 -28
  15. package/dist-cjs/commands/DescribeExportTasksCommand.js +1 -28
  16. package/dist-cjs/commands/DescribeImportTasksCommand.js +1 -28
  17. package/dist-cjs/commands/DescribeTagsCommand.js +1 -28
  18. package/dist-cjs/commands/DisassociateConfigurationItemsFromApplicationCommand.js +1 -28
  19. package/dist-cjs/commands/ExportConfigurationsCommand.js +1 -28
  20. package/dist-cjs/commands/GetDiscoverySummaryCommand.js +1 -28
  21. package/dist-cjs/commands/ListConfigurationsCommand.js +1 -28
  22. package/dist-cjs/commands/ListServerNeighborsCommand.js +1 -28
  23. package/dist-cjs/commands/StartBatchDeleteConfigurationTaskCommand.js +1 -28
  24. package/dist-cjs/commands/StartContinuousExportCommand.js +1 -28
  25. package/dist-cjs/commands/StartDataCollectionByAgentIdsCommand.js +1 -28
  26. package/dist-cjs/commands/StartExportTaskCommand.js +1 -28
  27. package/dist-cjs/commands/StartImportTaskCommand.js +1 -28
  28. package/dist-cjs/commands/StopContinuousExportCommand.js +1 -28
  29. package/dist-cjs/commands/StopDataCollectionByAgentIdsCommand.js +1 -28
  30. package/dist-cjs/commands/UpdateApplicationCommand.js +1 -28
  31. package/dist-cjs/commands/index.js +1 -31
  32. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  33. package/dist-cjs/extensionConfiguration.js +1 -2
  34. package/dist-cjs/index.js +2897 -11
  35. package/dist-cjs/models/ApplicationDiscoveryServiceServiceException.js +1 -12
  36. package/dist-cjs/models/index.js +1 -4
  37. package/dist-cjs/models/models_0.js +1 -250
  38. package/dist-cjs/pagination/DescribeAgentsPaginator.js +1 -7
  39. package/dist-cjs/pagination/DescribeContinuousExportsPaginator.js +1 -7
  40. package/dist-cjs/pagination/DescribeExportConfigurationsPaginator.js +1 -7
  41. package/dist-cjs/pagination/DescribeExportTasksPaginator.js +1 -7
  42. package/dist-cjs/pagination/DescribeImportTasksPaginator.js +1 -7
  43. package/dist-cjs/pagination/DescribeTagsPaginator.js +1 -7
  44. package/dist-cjs/pagination/Interfaces.js +1 -2
  45. package/dist-cjs/pagination/ListConfigurationsPaginator.js +1 -7
  46. package/dist-cjs/pagination/index.js +1 -11
  47. package/dist-cjs/protocols/Aws_json1_1.js +1 -1862
  48. package/dist-cjs/runtimeExtensions.js +1 -22
  49. package/package.json +40 -40
@@ -1,1862 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_StartContinuousExportCommand = exports.de_StartBatchDeleteConfigurationTaskCommand = exports.de_ListServerNeighborsCommand = exports.de_ListConfigurationsCommand = exports.de_GetDiscoverySummaryCommand = exports.de_ExportConfigurationsCommand = exports.de_DisassociateConfigurationItemsFromApplicationCommand = exports.de_DescribeTagsCommand = exports.de_DescribeImportTasksCommand = exports.de_DescribeExportTasksCommand = exports.de_DescribeExportConfigurationsCommand = exports.de_DescribeContinuousExportsCommand = exports.de_DescribeConfigurationsCommand = exports.de_DescribeBatchDeleteConfigurationTaskCommand = exports.de_DescribeAgentsCommand = exports.de_DeleteTagsCommand = exports.de_DeleteApplicationsCommand = exports.de_CreateTagsCommand = exports.de_CreateApplicationCommand = exports.de_BatchDeleteImportDataCommand = exports.de_BatchDeleteAgentsCommand = exports.de_AssociateConfigurationItemsToApplicationCommand = exports.se_UpdateApplicationCommand = exports.se_StopDataCollectionByAgentIdsCommand = exports.se_StopContinuousExportCommand = exports.se_StartImportTaskCommand = exports.se_StartExportTaskCommand = exports.se_StartDataCollectionByAgentIdsCommand = exports.se_StartContinuousExportCommand = exports.se_StartBatchDeleteConfigurationTaskCommand = exports.se_ListServerNeighborsCommand = exports.se_ListConfigurationsCommand = exports.se_GetDiscoverySummaryCommand = exports.se_ExportConfigurationsCommand = exports.se_DisassociateConfigurationItemsFromApplicationCommand = exports.se_DescribeTagsCommand = exports.se_DescribeImportTasksCommand = exports.se_DescribeExportTasksCommand = exports.se_DescribeExportConfigurationsCommand = exports.se_DescribeContinuousExportsCommand = exports.se_DescribeConfigurationsCommand = exports.se_DescribeBatchDeleteConfigurationTaskCommand = exports.se_DescribeAgentsCommand = exports.se_DeleteTagsCommand = exports.se_DeleteApplicationsCommand = exports.se_CreateTagsCommand = exports.se_CreateApplicationCommand = exports.se_BatchDeleteImportDataCommand = exports.se_BatchDeleteAgentsCommand = exports.se_AssociateConfigurationItemsToApplicationCommand = void 0;
4
- exports.de_UpdateApplicationCommand = exports.de_StopDataCollectionByAgentIdsCommand = exports.de_StopContinuousExportCommand = exports.de_StartImportTaskCommand = exports.de_StartExportTaskCommand = exports.de_StartDataCollectionByAgentIdsCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const uuid_1 = require("uuid");
8
- const ApplicationDiscoveryServiceServiceException_1 = require("../models/ApplicationDiscoveryServiceServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_AssociateConfigurationItemsToApplicationCommand = async (input, context) => {
11
- const headers = sharedHeaders("AssociateConfigurationItemsToApplication");
12
- let body;
13
- body = JSON.stringify((0, smithy_client_1._json)(input));
14
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
15
- };
16
- exports.se_AssociateConfigurationItemsToApplicationCommand = se_AssociateConfigurationItemsToApplicationCommand;
17
- const se_BatchDeleteAgentsCommand = async (input, context) => {
18
- const headers = sharedHeaders("BatchDeleteAgents");
19
- let body;
20
- body = JSON.stringify((0, smithy_client_1._json)(input));
21
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
- };
23
- exports.se_BatchDeleteAgentsCommand = se_BatchDeleteAgentsCommand;
24
- const se_BatchDeleteImportDataCommand = async (input, context) => {
25
- const headers = sharedHeaders("BatchDeleteImportData");
26
- let body;
27
- body = JSON.stringify((0, smithy_client_1._json)(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- exports.se_BatchDeleteImportDataCommand = se_BatchDeleteImportDataCommand;
31
- const se_CreateApplicationCommand = async (input, context) => {
32
- const headers = sharedHeaders("CreateApplication");
33
- let body;
34
- body = JSON.stringify((0, smithy_client_1._json)(input));
35
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
- };
37
- exports.se_CreateApplicationCommand = se_CreateApplicationCommand;
38
- const se_CreateTagsCommand = async (input, context) => {
39
- const headers = sharedHeaders("CreateTags");
40
- let body;
41
- body = JSON.stringify((0, smithy_client_1._json)(input));
42
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
43
- };
44
- exports.se_CreateTagsCommand = se_CreateTagsCommand;
45
- const se_DeleteApplicationsCommand = async (input, context) => {
46
- const headers = sharedHeaders("DeleteApplications");
47
- let body;
48
- body = JSON.stringify((0, smithy_client_1._json)(input));
49
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
- };
51
- exports.se_DeleteApplicationsCommand = se_DeleteApplicationsCommand;
52
- const se_DeleteTagsCommand = async (input, context) => {
53
- const headers = sharedHeaders("DeleteTags");
54
- let body;
55
- body = JSON.stringify((0, smithy_client_1._json)(input));
56
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
- };
58
- exports.se_DeleteTagsCommand = se_DeleteTagsCommand;
59
- const se_DescribeAgentsCommand = async (input, context) => {
60
- const headers = sharedHeaders("DescribeAgents");
61
- let body;
62
- body = JSON.stringify((0, smithy_client_1._json)(input));
63
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
- };
65
- exports.se_DescribeAgentsCommand = se_DescribeAgentsCommand;
66
- const se_DescribeBatchDeleteConfigurationTaskCommand = async (input, context) => {
67
- const headers = sharedHeaders("DescribeBatchDeleteConfigurationTask");
68
- let body;
69
- body = JSON.stringify((0, smithy_client_1._json)(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- exports.se_DescribeBatchDeleteConfigurationTaskCommand = se_DescribeBatchDeleteConfigurationTaskCommand;
73
- const se_DescribeConfigurationsCommand = async (input, context) => {
74
- const headers = sharedHeaders("DescribeConfigurations");
75
- let body;
76
- body = JSON.stringify((0, smithy_client_1._json)(input));
77
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
- };
79
- exports.se_DescribeConfigurationsCommand = se_DescribeConfigurationsCommand;
80
- const se_DescribeContinuousExportsCommand = async (input, context) => {
81
- const headers = sharedHeaders("DescribeContinuousExports");
82
- let body;
83
- body = JSON.stringify((0, smithy_client_1._json)(input));
84
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
- };
86
- exports.se_DescribeContinuousExportsCommand = se_DescribeContinuousExportsCommand;
87
- const se_DescribeExportConfigurationsCommand = async (input, context) => {
88
- const headers = sharedHeaders("DescribeExportConfigurations");
89
- let body;
90
- body = JSON.stringify((0, smithy_client_1._json)(input));
91
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
92
- };
93
- exports.se_DescribeExportConfigurationsCommand = se_DescribeExportConfigurationsCommand;
94
- const se_DescribeExportTasksCommand = async (input, context) => {
95
- const headers = sharedHeaders("DescribeExportTasks");
96
- let body;
97
- body = JSON.stringify((0, smithy_client_1._json)(input));
98
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
99
- };
100
- exports.se_DescribeExportTasksCommand = se_DescribeExportTasksCommand;
101
- const se_DescribeImportTasksCommand = async (input, context) => {
102
- const headers = sharedHeaders("DescribeImportTasks");
103
- let body;
104
- body = JSON.stringify((0, smithy_client_1._json)(input));
105
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
- };
107
- exports.se_DescribeImportTasksCommand = se_DescribeImportTasksCommand;
108
- const se_DescribeTagsCommand = async (input, context) => {
109
- const headers = sharedHeaders("DescribeTags");
110
- let body;
111
- body = JSON.stringify((0, smithy_client_1._json)(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- exports.se_DescribeTagsCommand = se_DescribeTagsCommand;
115
- const se_DisassociateConfigurationItemsFromApplicationCommand = async (input, context) => {
116
- const headers = sharedHeaders("DisassociateConfigurationItemsFromApplication");
117
- let body;
118
- body = JSON.stringify((0, smithy_client_1._json)(input));
119
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
- };
121
- exports.se_DisassociateConfigurationItemsFromApplicationCommand = se_DisassociateConfigurationItemsFromApplicationCommand;
122
- const se_ExportConfigurationsCommand = async (input, context) => {
123
- const headers = sharedHeaders("ExportConfigurations");
124
- const body = "{}";
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- exports.se_ExportConfigurationsCommand = se_ExportConfigurationsCommand;
128
- const se_GetDiscoverySummaryCommand = async (input, context) => {
129
- const headers = sharedHeaders("GetDiscoverySummary");
130
- let body;
131
- body = JSON.stringify((0, smithy_client_1._json)(input));
132
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
- };
134
- exports.se_GetDiscoverySummaryCommand = se_GetDiscoverySummaryCommand;
135
- const se_ListConfigurationsCommand = async (input, context) => {
136
- const headers = sharedHeaders("ListConfigurations");
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1._json)(input));
139
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
- };
141
- exports.se_ListConfigurationsCommand = se_ListConfigurationsCommand;
142
- const se_ListServerNeighborsCommand = async (input, context) => {
143
- const headers = sharedHeaders("ListServerNeighbors");
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1._json)(input));
146
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
- };
148
- exports.se_ListServerNeighborsCommand = se_ListServerNeighborsCommand;
149
- const se_StartBatchDeleteConfigurationTaskCommand = async (input, context) => {
150
- const headers = sharedHeaders("StartBatchDeleteConfigurationTask");
151
- let body;
152
- body = JSON.stringify((0, smithy_client_1._json)(input));
153
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
- };
155
- exports.se_StartBatchDeleteConfigurationTaskCommand = se_StartBatchDeleteConfigurationTaskCommand;
156
- const se_StartContinuousExportCommand = async (input, context) => {
157
- const headers = sharedHeaders("StartContinuousExport");
158
- let body;
159
- body = JSON.stringify((0, smithy_client_1._json)(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- exports.se_StartContinuousExportCommand = se_StartContinuousExportCommand;
163
- const se_StartDataCollectionByAgentIdsCommand = async (input, context) => {
164
- const headers = sharedHeaders("StartDataCollectionByAgentIds");
165
- let body;
166
- body = JSON.stringify((0, smithy_client_1._json)(input));
167
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
- };
169
- exports.se_StartDataCollectionByAgentIdsCommand = se_StartDataCollectionByAgentIdsCommand;
170
- const se_StartExportTaskCommand = async (input, context) => {
171
- const headers = sharedHeaders("StartExportTask");
172
- let body;
173
- body = JSON.stringify(se_StartExportTaskRequest(input, context));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- exports.se_StartExportTaskCommand = se_StartExportTaskCommand;
177
- const se_StartImportTaskCommand = async (input, context) => {
178
- const headers = sharedHeaders("StartImportTask");
179
- let body;
180
- body = JSON.stringify(se_StartImportTaskRequest(input, context));
181
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
- };
183
- exports.se_StartImportTaskCommand = se_StartImportTaskCommand;
184
- const se_StopContinuousExportCommand = async (input, context) => {
185
- const headers = sharedHeaders("StopContinuousExport");
186
- let body;
187
- body = JSON.stringify((0, smithy_client_1._json)(input));
188
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
- };
190
- exports.se_StopContinuousExportCommand = se_StopContinuousExportCommand;
191
- const se_StopDataCollectionByAgentIdsCommand = async (input, context) => {
192
- const headers = sharedHeaders("StopDataCollectionByAgentIds");
193
- let body;
194
- body = JSON.stringify((0, smithy_client_1._json)(input));
195
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
- };
197
- exports.se_StopDataCollectionByAgentIdsCommand = se_StopDataCollectionByAgentIdsCommand;
198
- const se_UpdateApplicationCommand = async (input, context) => {
199
- const headers = sharedHeaders("UpdateApplication");
200
- let body;
201
- body = JSON.stringify((0, smithy_client_1._json)(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- exports.se_UpdateApplicationCommand = se_UpdateApplicationCommand;
205
- const de_AssociateConfigurationItemsToApplicationCommand = async (output, context) => {
206
- if (output.statusCode >= 300) {
207
- return de_AssociateConfigurationItemsToApplicationCommandError(output, context);
208
- }
209
- const data = await parseBody(output.body, context);
210
- let contents = {};
211
- contents = (0, smithy_client_1._json)(data);
212
- const response = {
213
- $metadata: deserializeMetadata(output),
214
- ...contents,
215
- };
216
- return response;
217
- };
218
- exports.de_AssociateConfigurationItemsToApplicationCommand = de_AssociateConfigurationItemsToApplicationCommand;
219
- const de_AssociateConfigurationItemsToApplicationCommandError = async (output, context) => {
220
- const parsedOutput = {
221
- ...output,
222
- body: await parseErrorBody(output.body, context),
223
- };
224
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
225
- switch (errorCode) {
226
- case "AuthorizationErrorException":
227
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
228
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
229
- case "HomeRegionNotSetException":
230
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
231
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
232
- case "InvalidParameterException":
233
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
234
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
235
- case "InvalidParameterValueException":
236
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
237
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
238
- case "ServerInternalErrorException":
239
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
240
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
241
- default:
242
- const parsedBody = parsedOutput.body;
243
- return throwDefaultError({
244
- output,
245
- parsedBody,
246
- errorCode,
247
- });
248
- }
249
- };
250
- const de_BatchDeleteAgentsCommand = async (output, context) => {
251
- if (output.statusCode >= 300) {
252
- return de_BatchDeleteAgentsCommandError(output, context);
253
- }
254
- const data = await parseBody(output.body, context);
255
- let contents = {};
256
- contents = (0, smithy_client_1._json)(data);
257
- const response = {
258
- $metadata: deserializeMetadata(output),
259
- ...contents,
260
- };
261
- return response;
262
- };
263
- exports.de_BatchDeleteAgentsCommand = de_BatchDeleteAgentsCommand;
264
- const de_BatchDeleteAgentsCommandError = async (output, context) => {
265
- const parsedOutput = {
266
- ...output,
267
- body: await parseErrorBody(output.body, context),
268
- };
269
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
270
- switch (errorCode) {
271
- case "AuthorizationErrorException":
272
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
273
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
274
- case "InvalidParameterException":
275
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
276
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
277
- case "InvalidParameterValueException":
278
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
279
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
280
- case "ServerInternalErrorException":
281
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
282
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
283
- default:
284
- const parsedBody = parsedOutput.body;
285
- return throwDefaultError({
286
- output,
287
- parsedBody,
288
- errorCode,
289
- });
290
- }
291
- };
292
- const de_BatchDeleteImportDataCommand = async (output, context) => {
293
- if (output.statusCode >= 300) {
294
- return de_BatchDeleteImportDataCommandError(output, context);
295
- }
296
- const data = await parseBody(output.body, context);
297
- let contents = {};
298
- contents = (0, smithy_client_1._json)(data);
299
- const response = {
300
- $metadata: deserializeMetadata(output),
301
- ...contents,
302
- };
303
- return response;
304
- };
305
- exports.de_BatchDeleteImportDataCommand = de_BatchDeleteImportDataCommand;
306
- const de_BatchDeleteImportDataCommandError = async (output, context) => {
307
- const parsedOutput = {
308
- ...output,
309
- body: await parseErrorBody(output.body, context),
310
- };
311
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
312
- switch (errorCode) {
313
- case "AuthorizationErrorException":
314
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
315
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
316
- case "HomeRegionNotSetException":
317
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
318
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
319
- case "InvalidParameterException":
320
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
321
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
322
- case "InvalidParameterValueException":
323
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
324
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
325
- case "ServerInternalErrorException":
326
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
327
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
328
- default:
329
- const parsedBody = parsedOutput.body;
330
- return throwDefaultError({
331
- output,
332
- parsedBody,
333
- errorCode,
334
- });
335
- }
336
- };
337
- const de_CreateApplicationCommand = async (output, context) => {
338
- if (output.statusCode >= 300) {
339
- return de_CreateApplicationCommandError(output, context);
340
- }
341
- const data = await parseBody(output.body, context);
342
- let contents = {};
343
- contents = (0, smithy_client_1._json)(data);
344
- const response = {
345
- $metadata: deserializeMetadata(output),
346
- ...contents,
347
- };
348
- return response;
349
- };
350
- exports.de_CreateApplicationCommand = de_CreateApplicationCommand;
351
- const de_CreateApplicationCommandError = async (output, context) => {
352
- const parsedOutput = {
353
- ...output,
354
- body: await parseErrorBody(output.body, context),
355
- };
356
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
357
- switch (errorCode) {
358
- case "AuthorizationErrorException":
359
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
360
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
361
- case "HomeRegionNotSetException":
362
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
363
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
364
- case "InvalidParameterException":
365
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
366
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
367
- case "InvalidParameterValueException":
368
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
369
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
370
- case "ServerInternalErrorException":
371
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
372
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
373
- default:
374
- const parsedBody = parsedOutput.body;
375
- return throwDefaultError({
376
- output,
377
- parsedBody,
378
- errorCode,
379
- });
380
- }
381
- };
382
- const de_CreateTagsCommand = async (output, context) => {
383
- if (output.statusCode >= 300) {
384
- return de_CreateTagsCommandError(output, context);
385
- }
386
- const data = await parseBody(output.body, context);
387
- let contents = {};
388
- contents = (0, smithy_client_1._json)(data);
389
- const response = {
390
- $metadata: deserializeMetadata(output),
391
- ...contents,
392
- };
393
- return response;
394
- };
395
- exports.de_CreateTagsCommand = de_CreateTagsCommand;
396
- const de_CreateTagsCommandError = async (output, context) => {
397
- const parsedOutput = {
398
- ...output,
399
- body: await parseErrorBody(output.body, context),
400
- };
401
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
402
- switch (errorCode) {
403
- case "AuthorizationErrorException":
404
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
405
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
406
- case "HomeRegionNotSetException":
407
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
408
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
409
- case "InvalidParameterException":
410
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
411
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
412
- case "InvalidParameterValueException":
413
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
414
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
415
- case "ResourceNotFoundException":
416
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
417
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
418
- case "ServerInternalErrorException":
419
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
420
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
421
- default:
422
- const parsedBody = parsedOutput.body;
423
- return throwDefaultError({
424
- output,
425
- parsedBody,
426
- errorCode,
427
- });
428
- }
429
- };
430
- const de_DeleteApplicationsCommand = async (output, context) => {
431
- if (output.statusCode >= 300) {
432
- return de_DeleteApplicationsCommandError(output, context);
433
- }
434
- const data = await parseBody(output.body, context);
435
- let contents = {};
436
- contents = (0, smithy_client_1._json)(data);
437
- const response = {
438
- $metadata: deserializeMetadata(output),
439
- ...contents,
440
- };
441
- return response;
442
- };
443
- exports.de_DeleteApplicationsCommand = de_DeleteApplicationsCommand;
444
- const de_DeleteApplicationsCommandError = async (output, context) => {
445
- const parsedOutput = {
446
- ...output,
447
- body: await parseErrorBody(output.body, context),
448
- };
449
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
450
- switch (errorCode) {
451
- case "AuthorizationErrorException":
452
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
453
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
454
- case "HomeRegionNotSetException":
455
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
456
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
457
- case "InvalidParameterException":
458
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
459
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
460
- case "InvalidParameterValueException":
461
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
462
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
463
- case "ServerInternalErrorException":
464
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
465
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
466
- default:
467
- const parsedBody = parsedOutput.body;
468
- return throwDefaultError({
469
- output,
470
- parsedBody,
471
- errorCode,
472
- });
473
- }
474
- };
475
- const de_DeleteTagsCommand = async (output, context) => {
476
- if (output.statusCode >= 300) {
477
- return de_DeleteTagsCommandError(output, context);
478
- }
479
- const data = await parseBody(output.body, context);
480
- let contents = {};
481
- contents = (0, smithy_client_1._json)(data);
482
- const response = {
483
- $metadata: deserializeMetadata(output),
484
- ...contents,
485
- };
486
- return response;
487
- };
488
- exports.de_DeleteTagsCommand = de_DeleteTagsCommand;
489
- const de_DeleteTagsCommandError = async (output, context) => {
490
- const parsedOutput = {
491
- ...output,
492
- body: await parseErrorBody(output.body, context),
493
- };
494
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
495
- switch (errorCode) {
496
- case "AuthorizationErrorException":
497
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
498
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
499
- case "HomeRegionNotSetException":
500
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
501
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
502
- case "InvalidParameterException":
503
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
504
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
505
- case "InvalidParameterValueException":
506
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
507
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
508
- case "ResourceNotFoundException":
509
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
510
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
511
- case "ServerInternalErrorException":
512
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
513
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
514
- default:
515
- const parsedBody = parsedOutput.body;
516
- return throwDefaultError({
517
- output,
518
- parsedBody,
519
- errorCode,
520
- });
521
- }
522
- };
523
- const de_DescribeAgentsCommand = async (output, context) => {
524
- if (output.statusCode >= 300) {
525
- return de_DescribeAgentsCommandError(output, context);
526
- }
527
- const data = await parseBody(output.body, context);
528
- let contents = {};
529
- contents = (0, smithy_client_1._json)(data);
530
- const response = {
531
- $metadata: deserializeMetadata(output),
532
- ...contents,
533
- };
534
- return response;
535
- };
536
- exports.de_DescribeAgentsCommand = de_DescribeAgentsCommand;
537
- const de_DescribeAgentsCommandError = async (output, context) => {
538
- const parsedOutput = {
539
- ...output,
540
- body: await parseErrorBody(output.body, context),
541
- };
542
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
543
- switch (errorCode) {
544
- case "AuthorizationErrorException":
545
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
546
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
547
- case "HomeRegionNotSetException":
548
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
549
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
550
- case "InvalidParameterException":
551
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
552
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
553
- case "InvalidParameterValueException":
554
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
555
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
556
- case "ServerInternalErrorException":
557
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
558
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
559
- default:
560
- const parsedBody = parsedOutput.body;
561
- return throwDefaultError({
562
- output,
563
- parsedBody,
564
- errorCode,
565
- });
566
- }
567
- };
568
- const de_DescribeBatchDeleteConfigurationTaskCommand = async (output, context) => {
569
- if (output.statusCode >= 300) {
570
- return de_DescribeBatchDeleteConfigurationTaskCommandError(output, context);
571
- }
572
- const data = await parseBody(output.body, context);
573
- let contents = {};
574
- contents = de_DescribeBatchDeleteConfigurationTaskResponse(data, context);
575
- const response = {
576
- $metadata: deserializeMetadata(output),
577
- ...contents,
578
- };
579
- return response;
580
- };
581
- exports.de_DescribeBatchDeleteConfigurationTaskCommand = de_DescribeBatchDeleteConfigurationTaskCommand;
582
- const de_DescribeBatchDeleteConfigurationTaskCommandError = async (output, context) => {
583
- const parsedOutput = {
584
- ...output,
585
- body: await parseErrorBody(output.body, context),
586
- };
587
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
588
- switch (errorCode) {
589
- case "AuthorizationErrorException":
590
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
591
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
592
- case "HomeRegionNotSetException":
593
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
594
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
595
- case "InvalidParameterValueException":
596
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
597
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
598
- case "ServerInternalErrorException":
599
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
600
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
601
- default:
602
- const parsedBody = parsedOutput.body;
603
- return throwDefaultError({
604
- output,
605
- parsedBody,
606
- errorCode,
607
- });
608
- }
609
- };
610
- const de_DescribeConfigurationsCommand = async (output, context) => {
611
- if (output.statusCode >= 300) {
612
- return de_DescribeConfigurationsCommandError(output, context);
613
- }
614
- const data = await parseBody(output.body, context);
615
- let contents = {};
616
- contents = (0, smithy_client_1._json)(data);
617
- const response = {
618
- $metadata: deserializeMetadata(output),
619
- ...contents,
620
- };
621
- return response;
622
- };
623
- exports.de_DescribeConfigurationsCommand = de_DescribeConfigurationsCommand;
624
- const de_DescribeConfigurationsCommandError = async (output, context) => {
625
- const parsedOutput = {
626
- ...output,
627
- body: await parseErrorBody(output.body, context),
628
- };
629
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
630
- switch (errorCode) {
631
- case "AuthorizationErrorException":
632
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
633
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
634
- case "HomeRegionNotSetException":
635
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
636
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
637
- case "InvalidParameterException":
638
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
639
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
640
- case "InvalidParameterValueException":
641
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
642
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
643
- case "ServerInternalErrorException":
644
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
645
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
646
- default:
647
- const parsedBody = parsedOutput.body;
648
- return throwDefaultError({
649
- output,
650
- parsedBody,
651
- errorCode,
652
- });
653
- }
654
- };
655
- const de_DescribeContinuousExportsCommand = async (output, context) => {
656
- if (output.statusCode >= 300) {
657
- return de_DescribeContinuousExportsCommandError(output, context);
658
- }
659
- const data = await parseBody(output.body, context);
660
- let contents = {};
661
- contents = de_DescribeContinuousExportsResponse(data, context);
662
- const response = {
663
- $metadata: deserializeMetadata(output),
664
- ...contents,
665
- };
666
- return response;
667
- };
668
- exports.de_DescribeContinuousExportsCommand = de_DescribeContinuousExportsCommand;
669
- const de_DescribeContinuousExportsCommandError = async (output, context) => {
670
- const parsedOutput = {
671
- ...output,
672
- body: await parseErrorBody(output.body, context),
673
- };
674
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
675
- switch (errorCode) {
676
- case "AuthorizationErrorException":
677
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
678
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
679
- case "HomeRegionNotSetException":
680
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
681
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
682
- case "InvalidParameterException":
683
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
684
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
685
- case "InvalidParameterValueException":
686
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
687
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
688
- case "OperationNotPermittedException":
689
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
690
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
691
- case "ResourceNotFoundException":
692
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
693
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
694
- case "ServerInternalErrorException":
695
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
696
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
697
- default:
698
- const parsedBody = parsedOutput.body;
699
- return throwDefaultError({
700
- output,
701
- parsedBody,
702
- errorCode,
703
- });
704
- }
705
- };
706
- const de_DescribeExportConfigurationsCommand = async (output, context) => {
707
- if (output.statusCode >= 300) {
708
- return de_DescribeExportConfigurationsCommandError(output, context);
709
- }
710
- const data = await parseBody(output.body, context);
711
- let contents = {};
712
- contents = de_DescribeExportConfigurationsResponse(data, context);
713
- const response = {
714
- $metadata: deserializeMetadata(output),
715
- ...contents,
716
- };
717
- return response;
718
- };
719
- exports.de_DescribeExportConfigurationsCommand = de_DescribeExportConfigurationsCommand;
720
- const de_DescribeExportConfigurationsCommandError = async (output, context) => {
721
- const parsedOutput = {
722
- ...output,
723
- body: await parseErrorBody(output.body, context),
724
- };
725
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
726
- switch (errorCode) {
727
- case "AuthorizationErrorException":
728
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
729
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
730
- case "HomeRegionNotSetException":
731
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
732
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
733
- case "InvalidParameterException":
734
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
735
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
736
- case "InvalidParameterValueException":
737
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
738
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
739
- case "ResourceNotFoundException":
740
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
741
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
742
- case "ServerInternalErrorException":
743
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
744
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
745
- default:
746
- const parsedBody = parsedOutput.body;
747
- return throwDefaultError({
748
- output,
749
- parsedBody,
750
- errorCode,
751
- });
752
- }
753
- };
754
- const de_DescribeExportTasksCommand = async (output, context) => {
755
- if (output.statusCode >= 300) {
756
- return de_DescribeExportTasksCommandError(output, context);
757
- }
758
- const data = await parseBody(output.body, context);
759
- let contents = {};
760
- contents = de_DescribeExportTasksResponse(data, context);
761
- const response = {
762
- $metadata: deserializeMetadata(output),
763
- ...contents,
764
- };
765
- return response;
766
- };
767
- exports.de_DescribeExportTasksCommand = de_DescribeExportTasksCommand;
768
- const de_DescribeExportTasksCommandError = async (output, context) => {
769
- const parsedOutput = {
770
- ...output,
771
- body: await parseErrorBody(output.body, context),
772
- };
773
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
774
- switch (errorCode) {
775
- case "AuthorizationErrorException":
776
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
777
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
778
- case "HomeRegionNotSetException":
779
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
780
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
781
- case "InvalidParameterException":
782
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
783
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
784
- case "InvalidParameterValueException":
785
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
786
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
787
- case "ServerInternalErrorException":
788
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
789
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
790
- default:
791
- const parsedBody = parsedOutput.body;
792
- return throwDefaultError({
793
- output,
794
- parsedBody,
795
- errorCode,
796
- });
797
- }
798
- };
799
- const de_DescribeImportTasksCommand = async (output, context) => {
800
- if (output.statusCode >= 300) {
801
- return de_DescribeImportTasksCommandError(output, context);
802
- }
803
- const data = await parseBody(output.body, context);
804
- let contents = {};
805
- contents = de_DescribeImportTasksResponse(data, context);
806
- const response = {
807
- $metadata: deserializeMetadata(output),
808
- ...contents,
809
- };
810
- return response;
811
- };
812
- exports.de_DescribeImportTasksCommand = de_DescribeImportTasksCommand;
813
- const de_DescribeImportTasksCommandError = async (output, context) => {
814
- const parsedOutput = {
815
- ...output,
816
- body: await parseErrorBody(output.body, context),
817
- };
818
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
819
- switch (errorCode) {
820
- case "AuthorizationErrorException":
821
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
822
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
823
- case "HomeRegionNotSetException":
824
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
825
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
826
- case "InvalidParameterException":
827
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
828
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
829
- case "InvalidParameterValueException":
830
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
831
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
832
- case "ServerInternalErrorException":
833
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
834
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
835
- default:
836
- const parsedBody = parsedOutput.body;
837
- return throwDefaultError({
838
- output,
839
- parsedBody,
840
- errorCode,
841
- });
842
- }
843
- };
844
- const de_DescribeTagsCommand = async (output, context) => {
845
- if (output.statusCode >= 300) {
846
- return de_DescribeTagsCommandError(output, context);
847
- }
848
- const data = await parseBody(output.body, context);
849
- let contents = {};
850
- contents = de_DescribeTagsResponse(data, context);
851
- const response = {
852
- $metadata: deserializeMetadata(output),
853
- ...contents,
854
- };
855
- return response;
856
- };
857
- exports.de_DescribeTagsCommand = de_DescribeTagsCommand;
858
- const de_DescribeTagsCommandError = async (output, context) => {
859
- const parsedOutput = {
860
- ...output,
861
- body: await parseErrorBody(output.body, context),
862
- };
863
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
864
- switch (errorCode) {
865
- case "AuthorizationErrorException":
866
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
867
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
868
- case "HomeRegionNotSetException":
869
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
870
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
871
- case "InvalidParameterException":
872
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
873
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
874
- case "InvalidParameterValueException":
875
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
876
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
877
- case "ResourceNotFoundException":
878
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
879
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
880
- case "ServerInternalErrorException":
881
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
882
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
883
- default:
884
- const parsedBody = parsedOutput.body;
885
- return throwDefaultError({
886
- output,
887
- parsedBody,
888
- errorCode,
889
- });
890
- }
891
- };
892
- const de_DisassociateConfigurationItemsFromApplicationCommand = async (output, context) => {
893
- if (output.statusCode >= 300) {
894
- return de_DisassociateConfigurationItemsFromApplicationCommandError(output, context);
895
- }
896
- const data = await parseBody(output.body, context);
897
- let contents = {};
898
- contents = (0, smithy_client_1._json)(data);
899
- const response = {
900
- $metadata: deserializeMetadata(output),
901
- ...contents,
902
- };
903
- return response;
904
- };
905
- exports.de_DisassociateConfigurationItemsFromApplicationCommand = de_DisassociateConfigurationItemsFromApplicationCommand;
906
- const de_DisassociateConfigurationItemsFromApplicationCommandError = async (output, context) => {
907
- const parsedOutput = {
908
- ...output,
909
- body: await parseErrorBody(output.body, context),
910
- };
911
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
912
- switch (errorCode) {
913
- case "AuthorizationErrorException":
914
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
915
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
916
- case "HomeRegionNotSetException":
917
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
918
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
919
- case "InvalidParameterException":
920
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
921
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
922
- case "InvalidParameterValueException":
923
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
924
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
925
- case "ServerInternalErrorException":
926
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
927
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
928
- default:
929
- const parsedBody = parsedOutput.body;
930
- return throwDefaultError({
931
- output,
932
- parsedBody,
933
- errorCode,
934
- });
935
- }
936
- };
937
- const de_ExportConfigurationsCommand = async (output, context) => {
938
- if (output.statusCode >= 300) {
939
- return de_ExportConfigurationsCommandError(output, context);
940
- }
941
- const data = await parseBody(output.body, context);
942
- let contents = {};
943
- contents = (0, smithy_client_1._json)(data);
944
- const response = {
945
- $metadata: deserializeMetadata(output),
946
- ...contents,
947
- };
948
- return response;
949
- };
950
- exports.de_ExportConfigurationsCommand = de_ExportConfigurationsCommand;
951
- const de_ExportConfigurationsCommandError = async (output, context) => {
952
- const parsedOutput = {
953
- ...output,
954
- body: await parseErrorBody(output.body, context),
955
- };
956
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
957
- switch (errorCode) {
958
- case "AuthorizationErrorException":
959
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
960
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
961
- case "HomeRegionNotSetException":
962
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
963
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
964
- case "InvalidParameterException":
965
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
966
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
967
- case "InvalidParameterValueException":
968
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
969
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
970
- case "OperationNotPermittedException":
971
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
972
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
973
- case "ServerInternalErrorException":
974
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
975
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
976
- default:
977
- const parsedBody = parsedOutput.body;
978
- return throwDefaultError({
979
- output,
980
- parsedBody,
981
- errorCode,
982
- });
983
- }
984
- };
985
- const de_GetDiscoverySummaryCommand = async (output, context) => {
986
- if (output.statusCode >= 300) {
987
- return de_GetDiscoverySummaryCommandError(output, context);
988
- }
989
- const data = await parseBody(output.body, context);
990
- let contents = {};
991
- contents = (0, smithy_client_1._json)(data);
992
- const response = {
993
- $metadata: deserializeMetadata(output),
994
- ...contents,
995
- };
996
- return response;
997
- };
998
- exports.de_GetDiscoverySummaryCommand = de_GetDiscoverySummaryCommand;
999
- const de_GetDiscoverySummaryCommandError = async (output, context) => {
1000
- const parsedOutput = {
1001
- ...output,
1002
- body: await parseErrorBody(output.body, context),
1003
- };
1004
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1005
- switch (errorCode) {
1006
- case "AuthorizationErrorException":
1007
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1008
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1009
- case "HomeRegionNotSetException":
1010
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1011
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1012
- case "InvalidParameterException":
1013
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1014
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1015
- case "InvalidParameterValueException":
1016
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1017
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1018
- case "ServerInternalErrorException":
1019
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1020
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1021
- default:
1022
- const parsedBody = parsedOutput.body;
1023
- return throwDefaultError({
1024
- output,
1025
- parsedBody,
1026
- errorCode,
1027
- });
1028
- }
1029
- };
1030
- const de_ListConfigurationsCommand = async (output, context) => {
1031
- if (output.statusCode >= 300) {
1032
- return de_ListConfigurationsCommandError(output, context);
1033
- }
1034
- const data = await parseBody(output.body, context);
1035
- let contents = {};
1036
- contents = (0, smithy_client_1._json)(data);
1037
- const response = {
1038
- $metadata: deserializeMetadata(output),
1039
- ...contents,
1040
- };
1041
- return response;
1042
- };
1043
- exports.de_ListConfigurationsCommand = de_ListConfigurationsCommand;
1044
- const de_ListConfigurationsCommandError = async (output, context) => {
1045
- const parsedOutput = {
1046
- ...output,
1047
- body: await parseErrorBody(output.body, context),
1048
- };
1049
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1050
- switch (errorCode) {
1051
- case "AuthorizationErrorException":
1052
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1053
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1054
- case "HomeRegionNotSetException":
1055
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1056
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1057
- case "InvalidParameterException":
1058
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1059
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1060
- case "InvalidParameterValueException":
1061
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1062
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1063
- case "ResourceNotFoundException":
1064
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
1065
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1066
- case "ServerInternalErrorException":
1067
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1068
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1069
- default:
1070
- const parsedBody = parsedOutput.body;
1071
- return throwDefaultError({
1072
- output,
1073
- parsedBody,
1074
- errorCode,
1075
- });
1076
- }
1077
- };
1078
- const de_ListServerNeighborsCommand = async (output, context) => {
1079
- if (output.statusCode >= 300) {
1080
- return de_ListServerNeighborsCommandError(output, context);
1081
- }
1082
- const data = await parseBody(output.body, context);
1083
- let contents = {};
1084
- contents = (0, smithy_client_1._json)(data);
1085
- const response = {
1086
- $metadata: deserializeMetadata(output),
1087
- ...contents,
1088
- };
1089
- return response;
1090
- };
1091
- exports.de_ListServerNeighborsCommand = de_ListServerNeighborsCommand;
1092
- const de_ListServerNeighborsCommandError = async (output, context) => {
1093
- const parsedOutput = {
1094
- ...output,
1095
- body: await parseErrorBody(output.body, context),
1096
- };
1097
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1098
- switch (errorCode) {
1099
- case "AuthorizationErrorException":
1100
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1101
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1102
- case "HomeRegionNotSetException":
1103
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1104
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1105
- case "InvalidParameterException":
1106
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1107
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1108
- case "InvalidParameterValueException":
1109
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1110
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1111
- case "ServerInternalErrorException":
1112
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1113
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1114
- default:
1115
- const parsedBody = parsedOutput.body;
1116
- return throwDefaultError({
1117
- output,
1118
- parsedBody,
1119
- errorCode,
1120
- });
1121
- }
1122
- };
1123
- const de_StartBatchDeleteConfigurationTaskCommand = async (output, context) => {
1124
- if (output.statusCode >= 300) {
1125
- return de_StartBatchDeleteConfigurationTaskCommandError(output, context);
1126
- }
1127
- const data = await parseBody(output.body, context);
1128
- let contents = {};
1129
- contents = (0, smithy_client_1._json)(data);
1130
- const response = {
1131
- $metadata: deserializeMetadata(output),
1132
- ...contents,
1133
- };
1134
- return response;
1135
- };
1136
- exports.de_StartBatchDeleteConfigurationTaskCommand = de_StartBatchDeleteConfigurationTaskCommand;
1137
- const de_StartBatchDeleteConfigurationTaskCommandError = async (output, context) => {
1138
- const parsedOutput = {
1139
- ...output,
1140
- body: await parseErrorBody(output.body, context),
1141
- };
1142
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1143
- switch (errorCode) {
1144
- case "AuthorizationErrorException":
1145
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1146
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1147
- case "HomeRegionNotSetException":
1148
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1149
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1150
- case "InvalidParameterValueException":
1151
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1152
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1153
- case "LimitExceededException":
1154
- case "com.amazonaws.applicationdiscoveryservice#LimitExceededException":
1155
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1156
- case "OperationNotPermittedException":
1157
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1158
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1159
- case "ServerInternalErrorException":
1160
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1161
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1162
- default:
1163
- const parsedBody = parsedOutput.body;
1164
- return throwDefaultError({
1165
- output,
1166
- parsedBody,
1167
- errorCode,
1168
- });
1169
- }
1170
- };
1171
- const de_StartContinuousExportCommand = async (output, context) => {
1172
- if (output.statusCode >= 300) {
1173
- return de_StartContinuousExportCommandError(output, context);
1174
- }
1175
- const data = await parseBody(output.body, context);
1176
- let contents = {};
1177
- contents = de_StartContinuousExportResponse(data, context);
1178
- const response = {
1179
- $metadata: deserializeMetadata(output),
1180
- ...contents,
1181
- };
1182
- return response;
1183
- };
1184
- exports.de_StartContinuousExportCommand = de_StartContinuousExportCommand;
1185
- const de_StartContinuousExportCommandError = async (output, context) => {
1186
- const parsedOutput = {
1187
- ...output,
1188
- body: await parseErrorBody(output.body, context),
1189
- };
1190
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1191
- switch (errorCode) {
1192
- case "AuthorizationErrorException":
1193
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1194
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1195
- case "ConflictErrorException":
1196
- case "com.amazonaws.applicationdiscoveryservice#ConflictErrorException":
1197
- throw await de_ConflictErrorExceptionRes(parsedOutput, context);
1198
- case "HomeRegionNotSetException":
1199
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1200
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1201
- case "InvalidParameterException":
1202
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1203
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1204
- case "InvalidParameterValueException":
1205
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1206
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1207
- case "OperationNotPermittedException":
1208
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1209
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1210
- case "ResourceInUseException":
1211
- case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
1212
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1213
- case "ServerInternalErrorException":
1214
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1215
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1216
- default:
1217
- const parsedBody = parsedOutput.body;
1218
- return throwDefaultError({
1219
- output,
1220
- parsedBody,
1221
- errorCode,
1222
- });
1223
- }
1224
- };
1225
- const de_StartDataCollectionByAgentIdsCommand = async (output, context) => {
1226
- if (output.statusCode >= 300) {
1227
- return de_StartDataCollectionByAgentIdsCommandError(output, context);
1228
- }
1229
- const data = await parseBody(output.body, context);
1230
- let contents = {};
1231
- contents = (0, smithy_client_1._json)(data);
1232
- const response = {
1233
- $metadata: deserializeMetadata(output),
1234
- ...contents,
1235
- };
1236
- return response;
1237
- };
1238
- exports.de_StartDataCollectionByAgentIdsCommand = de_StartDataCollectionByAgentIdsCommand;
1239
- const de_StartDataCollectionByAgentIdsCommandError = async (output, context) => {
1240
- const parsedOutput = {
1241
- ...output,
1242
- body: await parseErrorBody(output.body, context),
1243
- };
1244
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1245
- switch (errorCode) {
1246
- case "AuthorizationErrorException":
1247
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1248
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1249
- case "HomeRegionNotSetException":
1250
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1251
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1252
- case "InvalidParameterException":
1253
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1254
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1255
- case "InvalidParameterValueException":
1256
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1257
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1258
- case "ServerInternalErrorException":
1259
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1260
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1261
- default:
1262
- const parsedBody = parsedOutput.body;
1263
- return throwDefaultError({
1264
- output,
1265
- parsedBody,
1266
- errorCode,
1267
- });
1268
- }
1269
- };
1270
- const de_StartExportTaskCommand = async (output, context) => {
1271
- if (output.statusCode >= 300) {
1272
- return de_StartExportTaskCommandError(output, context);
1273
- }
1274
- const data = await parseBody(output.body, context);
1275
- let contents = {};
1276
- contents = (0, smithy_client_1._json)(data);
1277
- const response = {
1278
- $metadata: deserializeMetadata(output),
1279
- ...contents,
1280
- };
1281
- return response;
1282
- };
1283
- exports.de_StartExportTaskCommand = de_StartExportTaskCommand;
1284
- const de_StartExportTaskCommandError = async (output, context) => {
1285
- const parsedOutput = {
1286
- ...output,
1287
- body: await parseErrorBody(output.body, context),
1288
- };
1289
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1290
- switch (errorCode) {
1291
- case "AuthorizationErrorException":
1292
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1293
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1294
- case "HomeRegionNotSetException":
1295
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1296
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1297
- case "InvalidParameterException":
1298
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1299
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1300
- case "InvalidParameterValueException":
1301
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1302
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1303
- case "OperationNotPermittedException":
1304
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1305
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1306
- case "ServerInternalErrorException":
1307
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1308
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1309
- default:
1310
- const parsedBody = parsedOutput.body;
1311
- return throwDefaultError({
1312
- output,
1313
- parsedBody,
1314
- errorCode,
1315
- });
1316
- }
1317
- };
1318
- const de_StartImportTaskCommand = async (output, context) => {
1319
- if (output.statusCode >= 300) {
1320
- return de_StartImportTaskCommandError(output, context);
1321
- }
1322
- const data = await parseBody(output.body, context);
1323
- let contents = {};
1324
- contents = de_StartImportTaskResponse(data, context);
1325
- const response = {
1326
- $metadata: deserializeMetadata(output),
1327
- ...contents,
1328
- };
1329
- return response;
1330
- };
1331
- exports.de_StartImportTaskCommand = de_StartImportTaskCommand;
1332
- const de_StartImportTaskCommandError = async (output, context) => {
1333
- const parsedOutput = {
1334
- ...output,
1335
- body: await parseErrorBody(output.body, context),
1336
- };
1337
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1338
- switch (errorCode) {
1339
- case "AuthorizationErrorException":
1340
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1341
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1342
- case "HomeRegionNotSetException":
1343
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1344
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1345
- case "InvalidParameterException":
1346
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1347
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1348
- case "InvalidParameterValueException":
1349
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1350
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1351
- case "ResourceInUseException":
1352
- case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
1353
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1354
- case "ServerInternalErrorException":
1355
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1356
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1357
- default:
1358
- const parsedBody = parsedOutput.body;
1359
- return throwDefaultError({
1360
- output,
1361
- parsedBody,
1362
- errorCode,
1363
- });
1364
- }
1365
- };
1366
- const de_StopContinuousExportCommand = async (output, context) => {
1367
- if (output.statusCode >= 300) {
1368
- return de_StopContinuousExportCommandError(output, context);
1369
- }
1370
- const data = await parseBody(output.body, context);
1371
- let contents = {};
1372
- contents = de_StopContinuousExportResponse(data, context);
1373
- const response = {
1374
- $metadata: deserializeMetadata(output),
1375
- ...contents,
1376
- };
1377
- return response;
1378
- };
1379
- exports.de_StopContinuousExportCommand = de_StopContinuousExportCommand;
1380
- const de_StopContinuousExportCommandError = async (output, context) => {
1381
- const parsedOutput = {
1382
- ...output,
1383
- body: await parseErrorBody(output.body, context),
1384
- };
1385
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1386
- switch (errorCode) {
1387
- case "AuthorizationErrorException":
1388
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1389
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1390
- case "HomeRegionNotSetException":
1391
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1392
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1393
- case "InvalidParameterException":
1394
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1395
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1396
- case "InvalidParameterValueException":
1397
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1398
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1399
- case "OperationNotPermittedException":
1400
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1401
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1402
- case "ResourceInUseException":
1403
- case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
1404
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1405
- case "ResourceNotFoundException":
1406
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
1407
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1408
- case "ServerInternalErrorException":
1409
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1410
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1411
- default:
1412
- const parsedBody = parsedOutput.body;
1413
- return throwDefaultError({
1414
- output,
1415
- parsedBody,
1416
- errorCode,
1417
- });
1418
- }
1419
- };
1420
- const de_StopDataCollectionByAgentIdsCommand = async (output, context) => {
1421
- if (output.statusCode >= 300) {
1422
- return de_StopDataCollectionByAgentIdsCommandError(output, context);
1423
- }
1424
- const data = await parseBody(output.body, context);
1425
- let contents = {};
1426
- contents = (0, smithy_client_1._json)(data);
1427
- const response = {
1428
- $metadata: deserializeMetadata(output),
1429
- ...contents,
1430
- };
1431
- return response;
1432
- };
1433
- exports.de_StopDataCollectionByAgentIdsCommand = de_StopDataCollectionByAgentIdsCommand;
1434
- const de_StopDataCollectionByAgentIdsCommandError = async (output, context) => {
1435
- const parsedOutput = {
1436
- ...output,
1437
- body: await parseErrorBody(output.body, context),
1438
- };
1439
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1440
- switch (errorCode) {
1441
- case "AuthorizationErrorException":
1442
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1443
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1444
- case "HomeRegionNotSetException":
1445
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1446
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1447
- case "InvalidParameterException":
1448
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1449
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1450
- case "InvalidParameterValueException":
1451
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1452
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1453
- case "ServerInternalErrorException":
1454
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1455
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1456
- default:
1457
- const parsedBody = parsedOutput.body;
1458
- return throwDefaultError({
1459
- output,
1460
- parsedBody,
1461
- errorCode,
1462
- });
1463
- }
1464
- };
1465
- const de_UpdateApplicationCommand = async (output, context) => {
1466
- if (output.statusCode >= 300) {
1467
- return de_UpdateApplicationCommandError(output, context);
1468
- }
1469
- const data = await parseBody(output.body, context);
1470
- let contents = {};
1471
- contents = (0, smithy_client_1._json)(data);
1472
- const response = {
1473
- $metadata: deserializeMetadata(output),
1474
- ...contents,
1475
- };
1476
- return response;
1477
- };
1478
- exports.de_UpdateApplicationCommand = de_UpdateApplicationCommand;
1479
- const de_UpdateApplicationCommandError = async (output, context) => {
1480
- const parsedOutput = {
1481
- ...output,
1482
- body: await parseErrorBody(output.body, context),
1483
- };
1484
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1485
- switch (errorCode) {
1486
- case "AuthorizationErrorException":
1487
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1488
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1489
- case "HomeRegionNotSetException":
1490
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1491
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1492
- case "InvalidParameterException":
1493
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1494
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1495
- case "InvalidParameterValueException":
1496
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1497
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1498
- case "ServerInternalErrorException":
1499
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1500
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1501
- default:
1502
- const parsedBody = parsedOutput.body;
1503
- return throwDefaultError({
1504
- output,
1505
- parsedBody,
1506
- errorCode,
1507
- });
1508
- }
1509
- };
1510
- const de_AuthorizationErrorExceptionRes = async (parsedOutput, context) => {
1511
- const body = parsedOutput.body;
1512
- const deserialized = (0, smithy_client_1._json)(body);
1513
- const exception = new models_0_1.AuthorizationErrorException({
1514
- $metadata: deserializeMetadata(parsedOutput),
1515
- ...deserialized,
1516
- });
1517
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1518
- };
1519
- const de_ConflictErrorExceptionRes = async (parsedOutput, context) => {
1520
- const body = parsedOutput.body;
1521
- const deserialized = (0, smithy_client_1._json)(body);
1522
- const exception = new models_0_1.ConflictErrorException({
1523
- $metadata: deserializeMetadata(parsedOutput),
1524
- ...deserialized,
1525
- });
1526
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1527
- };
1528
- const de_HomeRegionNotSetExceptionRes = async (parsedOutput, context) => {
1529
- const body = parsedOutput.body;
1530
- const deserialized = (0, smithy_client_1._json)(body);
1531
- const exception = new models_0_1.HomeRegionNotSetException({
1532
- $metadata: deserializeMetadata(parsedOutput),
1533
- ...deserialized,
1534
- });
1535
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1536
- };
1537
- const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1538
- const body = parsedOutput.body;
1539
- const deserialized = (0, smithy_client_1._json)(body);
1540
- const exception = new models_0_1.InvalidParameterException({
1541
- $metadata: deserializeMetadata(parsedOutput),
1542
- ...deserialized,
1543
- });
1544
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1545
- };
1546
- const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
1547
- const body = parsedOutput.body;
1548
- const deserialized = (0, smithy_client_1._json)(body);
1549
- const exception = new models_0_1.InvalidParameterValueException({
1550
- $metadata: deserializeMetadata(parsedOutput),
1551
- ...deserialized,
1552
- });
1553
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1554
- };
1555
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1556
- const body = parsedOutput.body;
1557
- const deserialized = (0, smithy_client_1._json)(body);
1558
- const exception = new models_0_1.LimitExceededException({
1559
- $metadata: deserializeMetadata(parsedOutput),
1560
- ...deserialized,
1561
- });
1562
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1563
- };
1564
- const de_OperationNotPermittedExceptionRes = async (parsedOutput, context) => {
1565
- const body = parsedOutput.body;
1566
- const deserialized = (0, smithy_client_1._json)(body);
1567
- const exception = new models_0_1.OperationNotPermittedException({
1568
- $metadata: deserializeMetadata(parsedOutput),
1569
- ...deserialized,
1570
- });
1571
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1572
- };
1573
- const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
1574
- const body = parsedOutput.body;
1575
- const deserialized = (0, smithy_client_1._json)(body);
1576
- const exception = new models_0_1.ResourceInUseException({
1577
- $metadata: deserializeMetadata(parsedOutput),
1578
- ...deserialized,
1579
- });
1580
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1581
- };
1582
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1583
- const body = parsedOutput.body;
1584
- const deserialized = (0, smithy_client_1._json)(body);
1585
- const exception = new models_0_1.ResourceNotFoundException({
1586
- $metadata: deserializeMetadata(parsedOutput),
1587
- ...deserialized,
1588
- });
1589
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1590
- };
1591
- const de_ServerInternalErrorExceptionRes = async (parsedOutput, context) => {
1592
- const body = parsedOutput.body;
1593
- const deserialized = (0, smithy_client_1._json)(body);
1594
- const exception = new models_0_1.ServerInternalErrorException({
1595
- $metadata: deserializeMetadata(parsedOutput),
1596
- ...deserialized,
1597
- });
1598
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1599
- };
1600
- const se_Ec2RecommendationsExportPreferences = (input, context) => {
1601
- return (0, smithy_client_1.take)(input, {
1602
- cpuPerformanceMetricBasis: (_) => se_UsageMetricBasis(_, context),
1603
- enabled: [],
1604
- excludedInstanceTypes: smithy_client_1._json,
1605
- preferredRegion: [],
1606
- ramPerformanceMetricBasis: (_) => se_UsageMetricBasis(_, context),
1607
- reservedInstanceOptions: smithy_client_1._json,
1608
- tenancy: [],
1609
- });
1610
- };
1611
- const se_ExportPreferences = (input, context) => {
1612
- return models_0_1.ExportPreferences.visit(input, {
1613
- ec2RecommendationsPreferences: (value) => ({
1614
- ec2RecommendationsPreferences: se_Ec2RecommendationsExportPreferences(value, context),
1615
- }),
1616
- _: (name, value) => ({ name: value }),
1617
- });
1618
- };
1619
- const se_StartExportTaskRequest = (input, context) => {
1620
- return (0, smithy_client_1.take)(input, {
1621
- endTime: (_) => Math.round(_.getTime() / 1000),
1622
- exportDataFormat: smithy_client_1._json,
1623
- filters: smithy_client_1._json,
1624
- preferences: (_) => se_ExportPreferences(_, context),
1625
- startTime: (_) => Math.round(_.getTime() / 1000),
1626
- });
1627
- };
1628
- const se_StartImportTaskRequest = (input, context) => {
1629
- return (0, smithy_client_1.take)(input, {
1630
- clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
1631
- importUrl: [],
1632
- name: [],
1633
- });
1634
- };
1635
- const se_UsageMetricBasis = (input, context) => {
1636
- return (0, smithy_client_1.take)(input, {
1637
- name: [],
1638
- percentageAdjust: smithy_client_1.serializeFloat,
1639
- });
1640
- };
1641
- const de_BatchDeleteConfigurationTask = (output, context) => {
1642
- return (0, smithy_client_1.take)(output, {
1643
- configurationType: smithy_client_1.expectString,
1644
- deletedConfigurations: smithy_client_1._json,
1645
- deletionWarnings: smithy_client_1._json,
1646
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1647
- failedConfigurations: smithy_client_1._json,
1648
- requestedConfigurations: smithy_client_1._json,
1649
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1650
- status: smithy_client_1.expectString,
1651
- taskId: smithy_client_1.expectString,
1652
- });
1653
- };
1654
- const de_ConfigurationTag = (output, context) => {
1655
- return (0, smithy_client_1.take)(output, {
1656
- configurationId: smithy_client_1.expectString,
1657
- configurationType: smithy_client_1.expectString,
1658
- key: smithy_client_1.expectString,
1659
- timeOfCreation: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1660
- value: smithy_client_1.expectString,
1661
- });
1662
- };
1663
- const de_ConfigurationTagSet = (output, context) => {
1664
- const retVal = (output || [])
1665
- .filter((e) => e != null)
1666
- .map((entry) => {
1667
- return de_ConfigurationTag(entry, context);
1668
- });
1669
- return retVal;
1670
- };
1671
- const de_ContinuousExportDescription = (output, context) => {
1672
- return (0, smithy_client_1.take)(output, {
1673
- dataSource: smithy_client_1.expectString,
1674
- exportId: smithy_client_1.expectString,
1675
- s3Bucket: smithy_client_1.expectString,
1676
- schemaStorageConfig: smithy_client_1._json,
1677
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1678
- status: smithy_client_1.expectString,
1679
- statusDetail: smithy_client_1.expectString,
1680
- stopTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1681
- });
1682
- };
1683
- const de_ContinuousExportDescriptions = (output, context) => {
1684
- const retVal = (output || [])
1685
- .filter((e) => e != null)
1686
- .map((entry) => {
1687
- return de_ContinuousExportDescription(entry, context);
1688
- });
1689
- return retVal;
1690
- };
1691
- const de_DescribeBatchDeleteConfigurationTaskResponse = (output, context) => {
1692
- return (0, smithy_client_1.take)(output, {
1693
- task: (_) => de_BatchDeleteConfigurationTask(_, context),
1694
- });
1695
- };
1696
- const de_DescribeContinuousExportsResponse = (output, context) => {
1697
- return (0, smithy_client_1.take)(output, {
1698
- descriptions: (_) => de_ContinuousExportDescriptions(_, context),
1699
- nextToken: smithy_client_1.expectString,
1700
- });
1701
- };
1702
- const de_DescribeExportConfigurationsResponse = (output, context) => {
1703
- return (0, smithy_client_1.take)(output, {
1704
- exportsInfo: (_) => de_ExportsInfo(_, context),
1705
- nextToken: smithy_client_1.expectString,
1706
- });
1707
- };
1708
- const de_DescribeExportTasksResponse = (output, context) => {
1709
- return (0, smithy_client_1.take)(output, {
1710
- exportsInfo: (_) => de_ExportsInfo(_, context),
1711
- nextToken: smithy_client_1.expectString,
1712
- });
1713
- };
1714
- const de_DescribeImportTasksResponse = (output, context) => {
1715
- return (0, smithy_client_1.take)(output, {
1716
- nextToken: smithy_client_1.expectString,
1717
- tasks: (_) => de_ImportTaskList(_, context),
1718
- });
1719
- };
1720
- const de_DescribeTagsResponse = (output, context) => {
1721
- return (0, smithy_client_1.take)(output, {
1722
- nextToken: smithy_client_1.expectString,
1723
- tags: (_) => de_ConfigurationTagSet(_, context),
1724
- });
1725
- };
1726
- const de_ExportInfo = (output, context) => {
1727
- return (0, smithy_client_1.take)(output, {
1728
- configurationsDownloadUrl: smithy_client_1.expectString,
1729
- exportId: smithy_client_1.expectString,
1730
- exportRequestTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1731
- exportStatus: smithy_client_1.expectString,
1732
- isTruncated: smithy_client_1.expectBoolean,
1733
- requestedEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1734
- requestedStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1735
- statusMessage: smithy_client_1.expectString,
1736
- });
1737
- };
1738
- const de_ExportsInfo = (output, context) => {
1739
- const retVal = (output || [])
1740
- .filter((e) => e != null)
1741
- .map((entry) => {
1742
- return de_ExportInfo(entry, context);
1743
- });
1744
- return retVal;
1745
- };
1746
- const de_ImportTask = (output, context) => {
1747
- return (0, smithy_client_1.take)(output, {
1748
- applicationImportFailure: smithy_client_1.expectInt32,
1749
- applicationImportSuccess: smithy_client_1.expectInt32,
1750
- clientRequestToken: smithy_client_1.expectString,
1751
- errorsAndFailedEntriesZip: smithy_client_1.expectString,
1752
- importCompletionTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1753
- importDeletedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1754
- importRequestTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1755
- importTaskId: smithy_client_1.expectString,
1756
- importUrl: smithy_client_1.expectString,
1757
- name: smithy_client_1.expectString,
1758
- serverImportFailure: smithy_client_1.expectInt32,
1759
- serverImportSuccess: smithy_client_1.expectInt32,
1760
- status: smithy_client_1.expectString,
1761
- });
1762
- };
1763
- const de_ImportTaskList = (output, context) => {
1764
- const retVal = (output || [])
1765
- .filter((e) => e != null)
1766
- .map((entry) => {
1767
- return de_ImportTask(entry, context);
1768
- });
1769
- return retVal;
1770
- };
1771
- const de_StartContinuousExportResponse = (output, context) => {
1772
- return (0, smithy_client_1.take)(output, {
1773
- dataSource: smithy_client_1.expectString,
1774
- exportId: smithy_client_1.expectString,
1775
- s3Bucket: smithy_client_1.expectString,
1776
- schemaStorageConfig: smithy_client_1._json,
1777
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1778
- });
1779
- };
1780
- const de_StartImportTaskResponse = (output, context) => {
1781
- return (0, smithy_client_1.take)(output, {
1782
- task: (_) => de_ImportTask(_, context),
1783
- });
1784
- };
1785
- const de_StopContinuousExportResponse = (output, context) => {
1786
- return (0, smithy_client_1.take)(output, {
1787
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1788
- stopTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1789
- });
1790
- };
1791
- const deserializeMetadata = (output) => ({
1792
- httpStatusCode: output.statusCode,
1793
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1794
- extendedRequestId: output.headers["x-amz-id-2"],
1795
- cfId: output.headers["x-amz-cf-id"],
1796
- });
1797
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1798
- const throwDefaultError = (0, smithy_client_1.withBaseException)(ApplicationDiscoveryServiceServiceException_1.ApplicationDiscoveryServiceServiceException);
1799
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1800
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1801
- const contents = {
1802
- protocol,
1803
- hostname,
1804
- port,
1805
- method: "POST",
1806
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1807
- headers,
1808
- };
1809
- if (resolvedHostname !== undefined) {
1810
- contents.hostname = resolvedHostname;
1811
- }
1812
- if (body !== undefined) {
1813
- contents.body = body;
1814
- }
1815
- return new protocol_http_1.HttpRequest(contents);
1816
- };
1817
- function sharedHeaders(operation) {
1818
- return {
1819
- "content-type": "application/x-amz-json-1.1",
1820
- "x-amz-target": `AWSPoseidonService_V2015_11_01.${operation}`,
1821
- };
1822
- }
1823
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1824
- if (encoded.length) {
1825
- return JSON.parse(encoded);
1826
- }
1827
- return {};
1828
- });
1829
- const parseErrorBody = async (errorBody, context) => {
1830
- const value = await parseBody(errorBody, context);
1831
- value.message = value.message ?? value.Message;
1832
- return value;
1833
- };
1834
- const loadRestJsonErrorCode = (output, data) => {
1835
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1836
- const sanitizeErrorCode = (rawValue) => {
1837
- let cleanValue = rawValue;
1838
- if (typeof cleanValue === "number") {
1839
- cleanValue = cleanValue.toString();
1840
- }
1841
- if (cleanValue.indexOf(",") >= 0) {
1842
- cleanValue = cleanValue.split(",")[0];
1843
- }
1844
- if (cleanValue.indexOf(":") >= 0) {
1845
- cleanValue = cleanValue.split(":")[0];
1846
- }
1847
- if (cleanValue.indexOf("#") >= 0) {
1848
- cleanValue = cleanValue.split("#")[1];
1849
- }
1850
- return cleanValue;
1851
- };
1852
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1853
- if (headerKey !== undefined) {
1854
- return sanitizeErrorCode(output.headers[headerKey]);
1855
- }
1856
- if (data.code !== undefined) {
1857
- return sanitizeErrorCode(data.code);
1858
- }
1859
- if (data["__type"] !== undefined) {
1860
- return sanitizeErrorCode(data["__type"]);
1861
- }
1862
- };
1
+ module.exports = require("../index.js");