@aws-sdk/client-migrationhubstrategy 3.928.0 → 3.930.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist-cjs/index.js +1256 -1119
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/MigrationHubStrategyClient.js +2 -0
  4. package/dist-es/commands/GetApplicationComponentDetailsCommand.js +3 -9
  5. package/dist-es/commands/GetApplicationComponentStrategiesCommand.js +3 -9
  6. package/dist-es/commands/GetAssessmentCommand.js +3 -9
  7. package/dist-es/commands/GetImportFileTaskCommand.js +3 -9
  8. package/dist-es/commands/GetLatestAssessmentIdCommand.js +3 -9
  9. package/dist-es/commands/GetPortfolioPreferencesCommand.js +3 -9
  10. package/dist-es/commands/GetPortfolioSummaryCommand.js +3 -9
  11. package/dist-es/commands/GetRecommendationReportDetailsCommand.js +3 -9
  12. package/dist-es/commands/GetServerDetailsCommand.js +3 -9
  13. package/dist-es/commands/GetServerStrategiesCommand.js +3 -9
  14. package/dist-es/commands/ListAnalyzableServersCommand.js +3 -9
  15. package/dist-es/commands/ListApplicationComponentsCommand.js +3 -9
  16. package/dist-es/commands/ListCollectorsCommand.js +3 -9
  17. package/dist-es/commands/ListImportFileTaskCommand.js +3 -9
  18. package/dist-es/commands/ListServersCommand.js +3 -9
  19. package/dist-es/commands/PutPortfolioPreferencesCommand.js +3 -9
  20. package/dist-es/commands/StartAssessmentCommand.js +3 -9
  21. package/dist-es/commands/StartImportFileTaskCommand.js +3 -9
  22. package/dist-es/commands/StartRecommendationReportGenerationCommand.js +3 -9
  23. package/dist-es/commands/StopAssessmentCommand.js +3 -9
  24. package/dist-es/commands/UpdateApplicationComponentConfigCommand.js +3 -10
  25. package/dist-es/commands/UpdateServerConfigCommand.js +3 -9
  26. package/dist-es/models/models_0.js +0 -51
  27. package/dist-es/runtimeConfig.shared.js +2 -0
  28. package/dist-es/schemas/schemas_0.js +1194 -0
  29. package/dist-types/MigrationHubStrategyClient.d.ts +10 -1
  30. package/dist-types/models/models_0.d.ts +16 -8
  31. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  32. package/dist-types/runtimeConfig.d.ts +1 -0
  33. package/dist-types/runtimeConfig.native.d.ts +1 -0
  34. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  35. package/dist-types/schemas/schemas_0.d.ts +165 -0
  36. package/dist-types/ts3.4/MigrationHubStrategyClient.d.ts +4 -0
  37. package/dist-types/ts3.4/models/models_0.d.ts +0 -10
  38. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  39. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  40. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  41. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  42. package/dist-types/ts3.4/schemas/schemas_0.d.ts +171 -0
  43. package/package.json +33 -33
  44. package/dist-es/protocols/Aws_restJson1.js +0 -890
  45. package/dist-types/protocols/Aws_restJson1.d.ts +0 -200
  46. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -269
@@ -1,890 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { MigrationHubStrategyServiceException as __BaseException } from "../models/MigrationHubStrategyServiceException";
5
- import { AccessDeniedException, ConflictException, DependencyException, InternalServerException, ResourceNotFoundException, ServiceLinkedRoleLockClientException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- export const se_GetApplicationComponentDetailsCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {};
9
- b.bp("/get-applicationcomponent-details/{applicationComponentId}");
10
- b.p("applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
11
- let body;
12
- b.m("GET").h(headers).b(body);
13
- return b.build();
14
- };
15
- export const se_GetApplicationComponentStrategiesCommand = async (input, context) => {
16
- const b = rb(input, context);
17
- const headers = {};
18
- b.bp("/get-applicationcomponent-strategies/{applicationComponentId}");
19
- b.p("applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
20
- let body;
21
- b.m("GET").h(headers).b(body);
22
- return b.build();
23
- };
24
- export const se_GetAssessmentCommand = async (input, context) => {
25
- const b = rb(input, context);
26
- const headers = {};
27
- b.bp("/get-assessment/{id}");
28
- b.p("id", () => input.id, "{id}", false);
29
- let body;
30
- b.m("GET").h(headers).b(body);
31
- return b.build();
32
- };
33
- export const se_GetImportFileTaskCommand = async (input, context) => {
34
- const b = rb(input, context);
35
- const headers = {};
36
- b.bp("/get-import-file-task/{id}");
37
- b.p("id", () => input.id, "{id}", false);
38
- let body;
39
- b.m("GET").h(headers).b(body);
40
- return b.build();
41
- };
42
- export const se_GetLatestAssessmentIdCommand = async (input, context) => {
43
- const b = rb(input, context);
44
- const headers = {};
45
- b.bp("/get-latest-assessment-id");
46
- let body;
47
- b.m("GET").h(headers).b(body);
48
- return b.build();
49
- };
50
- export const se_GetPortfolioPreferencesCommand = async (input, context) => {
51
- const b = rb(input, context);
52
- const headers = {};
53
- b.bp("/get-portfolio-preferences");
54
- let body;
55
- b.m("GET").h(headers).b(body);
56
- return b.build();
57
- };
58
- export const se_GetPortfolioSummaryCommand = async (input, context) => {
59
- const b = rb(input, context);
60
- const headers = {};
61
- b.bp("/get-portfolio-summary");
62
- let body;
63
- b.m("GET").h(headers).b(body);
64
- return b.build();
65
- };
66
- export const se_GetRecommendationReportDetailsCommand = async (input, context) => {
67
- const b = rb(input, context);
68
- const headers = {};
69
- b.bp("/get-recommendation-report-details/{id}");
70
- b.p("id", () => input.id, "{id}", false);
71
- let body;
72
- b.m("GET").h(headers).b(body);
73
- return b.build();
74
- };
75
- export const se_GetServerDetailsCommand = async (input, context) => {
76
- const b = rb(input, context);
77
- const headers = {};
78
- b.bp("/get-server-details/{serverId}");
79
- b.p("serverId", () => input.serverId, "{serverId}", false);
80
- const query = map({
81
- [_nT]: [, input[_nT]],
82
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
83
- });
84
- let body;
85
- b.m("GET").h(headers).q(query).b(body);
86
- return b.build();
87
- };
88
- export const se_GetServerStrategiesCommand = async (input, context) => {
89
- const b = rb(input, context);
90
- const headers = {};
91
- b.bp("/get-server-strategies/{serverId}");
92
- b.p("serverId", () => input.serverId, "{serverId}", false);
93
- let body;
94
- b.m("GET").h(headers).b(body);
95
- return b.build();
96
- };
97
- export const se_ListAnalyzableServersCommand = async (input, context) => {
98
- const b = rb(input, context);
99
- const headers = {
100
- "content-type": "application/json",
101
- };
102
- b.bp("/list-analyzable-servers");
103
- let body;
104
- body = JSON.stringify(take(input, {
105
- maxResults: [],
106
- nextToken: [],
107
- sort: [],
108
- }));
109
- b.m("POST").h(headers).b(body);
110
- return b.build();
111
- };
112
- export const se_ListApplicationComponentsCommand = async (input, context) => {
113
- const b = rb(input, context);
114
- const headers = {
115
- "content-type": "application/json",
116
- };
117
- b.bp("/list-applicationcomponents");
118
- let body;
119
- body = JSON.stringify(take(input, {
120
- applicationComponentCriteria: [],
121
- filterValue: [],
122
- groupIdFilter: (_) => _json(_),
123
- maxResults: [],
124
- nextToken: [],
125
- sort: [],
126
- }));
127
- b.m("POST").h(headers).b(body);
128
- return b.build();
129
- };
130
- export const se_ListCollectorsCommand = async (input, context) => {
131
- const b = rb(input, context);
132
- const headers = {};
133
- b.bp("/list-collectors");
134
- const query = map({
135
- [_nT]: [, input[_nT]],
136
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
137
- });
138
- let body;
139
- b.m("GET").h(headers).q(query).b(body);
140
- return b.build();
141
- };
142
- export const se_ListImportFileTaskCommand = async (input, context) => {
143
- const b = rb(input, context);
144
- const headers = {};
145
- b.bp("/list-import-file-task");
146
- const query = map({
147
- [_nT]: [, input[_nT]],
148
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
149
- });
150
- let body;
151
- b.m("GET").h(headers).q(query).b(body);
152
- return b.build();
153
- };
154
- export const se_ListServersCommand = async (input, context) => {
155
- const b = rb(input, context);
156
- const headers = {
157
- "content-type": "application/json",
158
- };
159
- b.bp("/list-servers");
160
- let body;
161
- body = JSON.stringify(take(input, {
162
- filterValue: [],
163
- groupIdFilter: (_) => _json(_),
164
- maxResults: [],
165
- nextToken: [],
166
- serverCriteria: [],
167
- sort: [],
168
- }));
169
- b.m("POST").h(headers).b(body);
170
- return b.build();
171
- };
172
- export const se_PutPortfolioPreferencesCommand = async (input, context) => {
173
- const b = rb(input, context);
174
- const headers = {
175
- "content-type": "application/json",
176
- };
177
- b.bp("/put-portfolio-preferences");
178
- let body;
179
- body = JSON.stringify(take(input, {
180
- applicationMode: [],
181
- applicationPreferences: (_) => _json(_),
182
- databasePreferences: (_) => _json(_),
183
- prioritizeBusinessGoals: (_) => _json(_),
184
- }));
185
- b.m("POST").h(headers).b(body);
186
- return b.build();
187
- };
188
- export const se_StartAssessmentCommand = async (input, context) => {
189
- const b = rb(input, context);
190
- const headers = {
191
- "content-type": "application/json",
192
- };
193
- b.bp("/start-assessment");
194
- let body;
195
- body = JSON.stringify(take(input, {
196
- assessmentDataSourceType: [],
197
- assessmentTargets: (_) => _json(_),
198
- s3bucketForAnalysisData: [],
199
- s3bucketForReportData: [],
200
- }));
201
- b.m("POST").h(headers).b(body);
202
- return b.build();
203
- };
204
- export const se_StartImportFileTaskCommand = async (input, context) => {
205
- const b = rb(input, context);
206
- const headers = {
207
- "content-type": "application/json",
208
- };
209
- b.bp("/start-import-file-task");
210
- let body;
211
- body = JSON.stringify(take(input, {
212
- S3Bucket: [],
213
- dataSourceType: [],
214
- groupId: (_) => _json(_),
215
- name: [],
216
- s3bucketForReportData: [],
217
- s3key: [],
218
- }));
219
- b.m("POST").h(headers).b(body);
220
- return b.build();
221
- };
222
- export const se_StartRecommendationReportGenerationCommand = async (input, context) => {
223
- const b = rb(input, context);
224
- const headers = {
225
- "content-type": "application/json",
226
- };
227
- b.bp("/start-recommendation-report-generation");
228
- let body;
229
- body = JSON.stringify(take(input, {
230
- groupIdFilter: (_) => _json(_),
231
- outputFormat: [],
232
- }));
233
- b.m("POST").h(headers).b(body);
234
- return b.build();
235
- };
236
- export const se_StopAssessmentCommand = async (input, context) => {
237
- const b = rb(input, context);
238
- const headers = {
239
- "content-type": "application/json",
240
- };
241
- b.bp("/stop-assessment");
242
- let body;
243
- body = JSON.stringify(take(input, {
244
- assessmentId: [],
245
- }));
246
- b.m("POST").h(headers).b(body);
247
- return b.build();
248
- };
249
- export const se_UpdateApplicationComponentConfigCommand = async (input, context) => {
250
- const b = rb(input, context);
251
- const headers = {
252
- "content-type": "application/json",
253
- };
254
- b.bp("/update-applicationcomponent-config");
255
- let body;
256
- body = JSON.stringify(take(input, {
257
- appType: [],
258
- applicationComponentId: [],
259
- configureOnly: [],
260
- inclusionStatus: [],
261
- secretsManagerKey: [],
262
- sourceCodeList: (_) => _json(_),
263
- strategyOption: (_) => _json(_),
264
- }));
265
- b.m("POST").h(headers).b(body);
266
- return b.build();
267
- };
268
- export const se_UpdateServerConfigCommand = async (input, context) => {
269
- const b = rb(input, context);
270
- const headers = {
271
- "content-type": "application/json",
272
- };
273
- b.bp("/update-server-config");
274
- let body;
275
- body = JSON.stringify(take(input, {
276
- serverId: [],
277
- strategyOption: (_) => _json(_),
278
- }));
279
- b.m("POST").h(headers).b(body);
280
- return b.build();
281
- };
282
- export const de_GetApplicationComponentDetailsCommand = async (output, context) => {
283
- if (output.statusCode !== 200 && output.statusCode >= 300) {
284
- return de_CommandError(output, context);
285
- }
286
- const contents = map({
287
- $metadata: deserializeMetadata(output),
288
- });
289
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
290
- const doc = take(data, {
291
- applicationComponentDetail: (_) => de_ApplicationComponentDetail(_, context),
292
- associatedApplications: _json,
293
- associatedServerIds: _json,
294
- moreApplicationResource: __expectBoolean,
295
- });
296
- Object.assign(contents, doc);
297
- return contents;
298
- };
299
- export const de_GetApplicationComponentStrategiesCommand = async (output, context) => {
300
- if (output.statusCode !== 200 && output.statusCode >= 300) {
301
- return de_CommandError(output, context);
302
- }
303
- const contents = map({
304
- $metadata: deserializeMetadata(output),
305
- });
306
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
307
- const doc = take(data, {
308
- applicationComponentStrategies: _json,
309
- });
310
- Object.assign(contents, doc);
311
- return contents;
312
- };
313
- export const de_GetAssessmentCommand = async (output, context) => {
314
- if (output.statusCode !== 200 && output.statusCode >= 300) {
315
- return de_CommandError(output, context);
316
- }
317
- const contents = map({
318
- $metadata: deserializeMetadata(output),
319
- });
320
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
321
- const doc = take(data, {
322
- assessmentTargets: _json,
323
- dataCollectionDetails: (_) => de_DataCollectionDetails(_, context),
324
- id: __expectString,
325
- });
326
- Object.assign(contents, doc);
327
- return contents;
328
- };
329
- export const de_GetImportFileTaskCommand = async (output, context) => {
330
- if (output.statusCode !== 200 && output.statusCode >= 300) {
331
- return de_CommandError(output, context);
332
- }
333
- const contents = map({
334
- $metadata: deserializeMetadata(output),
335
- });
336
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
337
- const doc = take(data, {
338
- completionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
339
- id: __expectString,
340
- importName: __expectString,
341
- inputS3Bucket: __expectString,
342
- inputS3Key: __expectString,
343
- numberOfRecordsFailed: __expectInt32,
344
- numberOfRecordsSuccess: __expectInt32,
345
- startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
346
- status: __expectString,
347
- statusReportS3Bucket: __expectString,
348
- statusReportS3Key: __expectString,
349
- });
350
- Object.assign(contents, doc);
351
- return contents;
352
- };
353
- export const de_GetLatestAssessmentIdCommand = async (output, context) => {
354
- if (output.statusCode !== 200 && output.statusCode >= 300) {
355
- return de_CommandError(output, context);
356
- }
357
- const contents = map({
358
- $metadata: deserializeMetadata(output),
359
- });
360
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
361
- const doc = take(data, {
362
- id: __expectString,
363
- });
364
- Object.assign(contents, doc);
365
- return contents;
366
- };
367
- export const de_GetPortfolioPreferencesCommand = async (output, context) => {
368
- if (output.statusCode !== 200 && output.statusCode >= 300) {
369
- return de_CommandError(output, context);
370
- }
371
- const contents = map({
372
- $metadata: deserializeMetadata(output),
373
- });
374
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
375
- const doc = take(data, {
376
- applicationMode: __expectString,
377
- applicationPreferences: _json,
378
- databasePreferences: _json,
379
- prioritizeBusinessGoals: _json,
380
- });
381
- Object.assign(contents, doc);
382
- return contents;
383
- };
384
- export const de_GetPortfolioSummaryCommand = async (output, context) => {
385
- if (output.statusCode !== 200 && output.statusCode >= 300) {
386
- return de_CommandError(output, context);
387
- }
388
- const contents = map({
389
- $metadata: deserializeMetadata(output),
390
- });
391
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
392
- const doc = take(data, {
393
- assessmentSummary: (_) => de_AssessmentSummary(_, context),
394
- });
395
- Object.assign(contents, doc);
396
- return contents;
397
- };
398
- export const de_GetRecommendationReportDetailsCommand = async (output, context) => {
399
- if (output.statusCode !== 200 && output.statusCode >= 300) {
400
- return de_CommandError(output, context);
401
- }
402
- const contents = map({
403
- $metadata: deserializeMetadata(output),
404
- });
405
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
406
- const doc = take(data, {
407
- id: __expectString,
408
- recommendationReportDetails: (_) => de_RecommendationReportDetails(_, context),
409
- });
410
- Object.assign(contents, doc);
411
- return contents;
412
- };
413
- export const de_GetServerDetailsCommand = async (output, context) => {
414
- if (output.statusCode !== 200 && output.statusCode >= 300) {
415
- return de_CommandError(output, context);
416
- }
417
- const contents = map({
418
- $metadata: deserializeMetadata(output),
419
- });
420
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
421
- const doc = take(data, {
422
- associatedApplications: _json,
423
- nextToken: __expectString,
424
- serverDetail: (_) => de_ServerDetail(_, context),
425
- });
426
- Object.assign(contents, doc);
427
- return contents;
428
- };
429
- export const de_GetServerStrategiesCommand = async (output, context) => {
430
- if (output.statusCode !== 200 && output.statusCode >= 300) {
431
- return de_CommandError(output, context);
432
- }
433
- const contents = map({
434
- $metadata: deserializeMetadata(output),
435
- });
436
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
437
- const doc = take(data, {
438
- serverStrategies: _json,
439
- });
440
- Object.assign(contents, doc);
441
- return contents;
442
- };
443
- export const de_ListAnalyzableServersCommand = async (output, context) => {
444
- if (output.statusCode !== 200 && output.statusCode >= 300) {
445
- return de_CommandError(output, context);
446
- }
447
- const contents = map({
448
- $metadata: deserializeMetadata(output),
449
- });
450
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
451
- const doc = take(data, {
452
- analyzableServers: _json,
453
- nextToken: __expectString,
454
- });
455
- Object.assign(contents, doc);
456
- return contents;
457
- };
458
- export const de_ListApplicationComponentsCommand = async (output, context) => {
459
- if (output.statusCode !== 200 && output.statusCode >= 300) {
460
- return de_CommandError(output, context);
461
- }
462
- const contents = map({
463
- $metadata: deserializeMetadata(output),
464
- });
465
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
466
- const doc = take(data, {
467
- applicationComponentInfos: (_) => de_ApplicationComponentDetails(_, context),
468
- nextToken: __expectString,
469
- });
470
- Object.assign(contents, doc);
471
- return contents;
472
- };
473
- export const de_ListCollectorsCommand = async (output, context) => {
474
- if (output.statusCode !== 200 && output.statusCode >= 300) {
475
- return de_CommandError(output, context);
476
- }
477
- const contents = map({
478
- $metadata: deserializeMetadata(output),
479
- });
480
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
481
- const doc = take(data, {
482
- Collectors: _json,
483
- nextToken: __expectString,
484
- });
485
- Object.assign(contents, doc);
486
- return contents;
487
- };
488
- export const de_ListImportFileTaskCommand = async (output, context) => {
489
- if (output.statusCode !== 200 && output.statusCode >= 300) {
490
- return de_CommandError(output, context);
491
- }
492
- const contents = map({
493
- $metadata: deserializeMetadata(output),
494
- });
495
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
496
- const doc = take(data, {
497
- nextToken: __expectString,
498
- taskInfos: (_) => de_ListImportFileTaskInformation(_, context),
499
- });
500
- Object.assign(contents, doc);
501
- return contents;
502
- };
503
- export const de_ListServersCommand = async (output, context) => {
504
- if (output.statusCode !== 200 && output.statusCode >= 300) {
505
- return de_CommandError(output, context);
506
- }
507
- const contents = map({
508
- $metadata: deserializeMetadata(output),
509
- });
510
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
511
- const doc = take(data, {
512
- nextToken: __expectString,
513
- serverInfos: (_) => de_ServerDetails(_, context),
514
- });
515
- Object.assign(contents, doc);
516
- return contents;
517
- };
518
- export const de_PutPortfolioPreferencesCommand = async (output, context) => {
519
- if (output.statusCode !== 200 && output.statusCode >= 300) {
520
- return de_CommandError(output, context);
521
- }
522
- const contents = map({
523
- $metadata: deserializeMetadata(output),
524
- });
525
- await collectBody(output.body, context);
526
- return contents;
527
- };
528
- export const de_StartAssessmentCommand = async (output, context) => {
529
- if (output.statusCode !== 200 && output.statusCode >= 300) {
530
- return de_CommandError(output, context);
531
- }
532
- const contents = map({
533
- $metadata: deserializeMetadata(output),
534
- });
535
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
536
- const doc = take(data, {
537
- assessmentId: __expectString,
538
- });
539
- Object.assign(contents, doc);
540
- return contents;
541
- };
542
- export const de_StartImportFileTaskCommand = async (output, context) => {
543
- if (output.statusCode !== 200 && output.statusCode >= 300) {
544
- return de_CommandError(output, context);
545
- }
546
- const contents = map({
547
- $metadata: deserializeMetadata(output),
548
- });
549
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
550
- const doc = take(data, {
551
- id: __expectString,
552
- });
553
- Object.assign(contents, doc);
554
- return contents;
555
- };
556
- export const de_StartRecommendationReportGenerationCommand = async (output, context) => {
557
- if (output.statusCode !== 200 && output.statusCode >= 300) {
558
- return de_CommandError(output, context);
559
- }
560
- const contents = map({
561
- $metadata: deserializeMetadata(output),
562
- });
563
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
564
- const doc = take(data, {
565
- id: __expectString,
566
- });
567
- Object.assign(contents, doc);
568
- return contents;
569
- };
570
- export const de_StopAssessmentCommand = async (output, context) => {
571
- if (output.statusCode !== 200 && output.statusCode >= 300) {
572
- return de_CommandError(output, context);
573
- }
574
- const contents = map({
575
- $metadata: deserializeMetadata(output),
576
- });
577
- await collectBody(output.body, context);
578
- return contents;
579
- };
580
- export const de_UpdateApplicationComponentConfigCommand = async (output, context) => {
581
- if (output.statusCode !== 200 && output.statusCode >= 300) {
582
- return de_CommandError(output, context);
583
- }
584
- const contents = map({
585
- $metadata: deserializeMetadata(output),
586
- });
587
- await collectBody(output.body, context);
588
- return contents;
589
- };
590
- export const de_UpdateServerConfigCommand = async (output, context) => {
591
- if (output.statusCode !== 200 && output.statusCode >= 300) {
592
- return de_CommandError(output, context);
593
- }
594
- const contents = map({
595
- $metadata: deserializeMetadata(output),
596
- });
597
- await collectBody(output.body, context);
598
- return contents;
599
- };
600
- const de_CommandError = async (output, context) => {
601
- const parsedOutput = {
602
- ...output,
603
- body: await parseErrorBody(output.body, context),
604
- };
605
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
606
- switch (errorCode) {
607
- case "InternalServerException":
608
- case "com.amazonaws.migrationhubstrategy#InternalServerException":
609
- throw await de_InternalServerExceptionRes(parsedOutput, context);
610
- case "ResourceNotFoundException":
611
- case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException":
612
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
613
- case "ThrottlingException":
614
- case "com.amazonaws.migrationhubstrategy#ThrottlingException":
615
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
616
- case "AccessDeniedException":
617
- case "com.amazonaws.migrationhubstrategy#AccessDeniedException":
618
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
619
- case "ValidationException":
620
- case "com.amazonaws.migrationhubstrategy#ValidationException":
621
- throw await de_ValidationExceptionRes(parsedOutput, context);
622
- case "DependencyException":
623
- case "com.amazonaws.migrationhubstrategy#DependencyException":
624
- throw await de_DependencyExceptionRes(parsedOutput, context);
625
- case "ServiceLinkedRoleLockClientException":
626
- case "com.amazonaws.migrationhubstrategy#ServiceLinkedRoleLockClientException":
627
- throw await de_ServiceLinkedRoleLockClientExceptionRes(parsedOutput, context);
628
- case "ConflictException":
629
- case "com.amazonaws.migrationhubstrategy#ConflictException":
630
- throw await de_ConflictExceptionRes(parsedOutput, context);
631
- case "ServiceQuotaExceededException":
632
- case "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException":
633
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
634
- default:
635
- const parsedBody = parsedOutput.body;
636
- return throwDefaultError({
637
- output,
638
- parsedBody,
639
- errorCode,
640
- });
641
- }
642
- };
643
- const throwDefaultError = withBaseException(__BaseException);
644
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
645
- const contents = map({});
646
- const data = parsedOutput.body;
647
- const doc = take(data, {
648
- message: __expectString,
649
- });
650
- Object.assign(contents, doc);
651
- const exception = new AccessDeniedException({
652
- $metadata: deserializeMetadata(parsedOutput),
653
- ...contents,
654
- });
655
- return __decorateServiceException(exception, parsedOutput.body);
656
- };
657
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
658
- const contents = map({});
659
- const data = parsedOutput.body;
660
- const doc = take(data, {
661
- message: __expectString,
662
- });
663
- Object.assign(contents, doc);
664
- const exception = new ConflictException({
665
- $metadata: deserializeMetadata(parsedOutput),
666
- ...contents,
667
- });
668
- return __decorateServiceException(exception, parsedOutput.body);
669
- };
670
- const de_DependencyExceptionRes = async (parsedOutput, context) => {
671
- const contents = map({});
672
- const data = parsedOutput.body;
673
- const doc = take(data, {
674
- message: __expectString,
675
- });
676
- Object.assign(contents, doc);
677
- const exception = new DependencyException({
678
- $metadata: deserializeMetadata(parsedOutput),
679
- ...contents,
680
- });
681
- return __decorateServiceException(exception, parsedOutput.body);
682
- };
683
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
684
- const contents = map({});
685
- const data = parsedOutput.body;
686
- const doc = take(data, {
687
- message: __expectString,
688
- });
689
- Object.assign(contents, doc);
690
- const exception = new InternalServerException({
691
- $metadata: deserializeMetadata(parsedOutput),
692
- ...contents,
693
- });
694
- return __decorateServiceException(exception, parsedOutput.body);
695
- };
696
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
697
- const contents = map({});
698
- const data = parsedOutput.body;
699
- const doc = take(data, {
700
- message: __expectString,
701
- });
702
- Object.assign(contents, doc);
703
- const exception = new ResourceNotFoundException({
704
- $metadata: deserializeMetadata(parsedOutput),
705
- ...contents,
706
- });
707
- return __decorateServiceException(exception, parsedOutput.body);
708
- };
709
- const de_ServiceLinkedRoleLockClientExceptionRes = async (parsedOutput, context) => {
710
- const contents = map({});
711
- const data = parsedOutput.body;
712
- const doc = take(data, {
713
- message: __expectString,
714
- });
715
- Object.assign(contents, doc);
716
- const exception = new ServiceLinkedRoleLockClientException({
717
- $metadata: deserializeMetadata(parsedOutput),
718
- ...contents,
719
- });
720
- return __decorateServiceException(exception, parsedOutput.body);
721
- };
722
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
723
- const contents = map({});
724
- const data = parsedOutput.body;
725
- const doc = take(data, {
726
- message: __expectString,
727
- });
728
- Object.assign(contents, doc);
729
- const exception = new ServiceQuotaExceededException({
730
- $metadata: deserializeMetadata(parsedOutput),
731
- ...contents,
732
- });
733
- return __decorateServiceException(exception, parsedOutput.body);
734
- };
735
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
736
- const contents = map({});
737
- const data = parsedOutput.body;
738
- const doc = take(data, {
739
- message: __expectString,
740
- });
741
- Object.assign(contents, doc);
742
- const exception = new ThrottlingException({
743
- $metadata: deserializeMetadata(parsedOutput),
744
- ...contents,
745
- });
746
- return __decorateServiceException(exception, parsedOutput.body);
747
- };
748
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
749
- const contents = map({});
750
- const data = parsedOutput.body;
751
- const doc = take(data, {
752
- message: __expectString,
753
- });
754
- Object.assign(contents, doc);
755
- const exception = new ValidationException({
756
- $metadata: deserializeMetadata(parsedOutput),
757
- ...contents,
758
- });
759
- return __decorateServiceException(exception, parsedOutput.body);
760
- };
761
- const de_ApplicationComponentDetail = (output, context) => {
762
- return take(output, {
763
- analysisStatus: __expectString,
764
- antipatternReportS3Object: _json,
765
- antipatternReportStatus: __expectString,
766
- antipatternReportStatusMessage: __expectString,
767
- appType: __expectString,
768
- appUnitError: _json,
769
- associatedServerId: __expectString,
770
- databaseConfigDetail: _json,
771
- id: __expectString,
772
- inclusionStatus: __expectString,
773
- lastAnalyzedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
774
- listAntipatternSeveritySummary: _json,
775
- moreServerAssociationExists: __expectBoolean,
776
- name: __expectString,
777
- osDriver: __expectString,
778
- osVersion: __expectString,
779
- recommendationSet: _json,
780
- resourceSubType: __expectString,
781
- resultList: _json,
782
- runtimeStatus: __expectString,
783
- runtimeStatusMessage: __expectString,
784
- sourceCodeRepositories: _json,
785
- statusMessage: __expectString,
786
- });
787
- };
788
- const de_ApplicationComponentDetails = (output, context) => {
789
- const retVal = (output || [])
790
- .filter((e) => e != null)
791
- .map((entry) => {
792
- return de_ApplicationComponentDetail(entry, context);
793
- });
794
- return retVal;
795
- };
796
- const de_AssessmentSummary = (output, context) => {
797
- return take(output, {
798
- antipatternReportS3Object: _json,
799
- antipatternReportStatus: __expectString,
800
- antipatternReportStatusMessage: __expectString,
801
- lastAnalyzedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
802
- listAntipatternSeveritySummary: _json,
803
- listApplicationComponentStatusSummary: _json,
804
- listApplicationComponentStrategySummary: _json,
805
- listApplicationComponentSummary: _json,
806
- listServerStatusSummary: _json,
807
- listServerStrategySummary: _json,
808
- listServerSummary: _json,
809
- });
810
- };
811
- const de_DataCollectionDetails = (output, context) => {
812
- return take(output, {
813
- completionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
814
- failed: __expectInt32,
815
- inProgress: __expectInt32,
816
- servers: __expectInt32,
817
- startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
818
- status: __expectString,
819
- statusMessage: __expectString,
820
- success: __expectInt32,
821
- });
822
- };
823
- const de_ImportFileTaskInformation = (output, context) => {
824
- return take(output, {
825
- completionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
826
- id: __expectString,
827
- importName: __expectString,
828
- inputS3Bucket: __expectString,
829
- inputS3Key: __expectString,
830
- numberOfRecordsFailed: __expectInt32,
831
- numberOfRecordsSuccess: __expectInt32,
832
- startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
833
- status: __expectString,
834
- statusReportS3Bucket: __expectString,
835
- statusReportS3Key: __expectString,
836
- });
837
- };
838
- const de_ListImportFileTaskInformation = (output, context) => {
839
- const retVal = (output || [])
840
- .filter((e) => e != null)
841
- .map((entry) => {
842
- return de_ImportFileTaskInformation(entry, context);
843
- });
844
- return retVal;
845
- };
846
- const de_RecommendationReportDetails = (output, context) => {
847
- return take(output, {
848
- completionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
849
- s3Bucket: __expectString,
850
- s3Keys: _json,
851
- startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
852
- status: __expectString,
853
- statusMessage: __expectString,
854
- });
855
- };
856
- const de_ServerDetail = (output, context) => {
857
- return take(output, {
858
- antipatternReportS3Object: _json,
859
- antipatternReportStatus: __expectString,
860
- antipatternReportStatusMessage: __expectString,
861
- applicationComponentStrategySummary: _json,
862
- dataCollectionStatus: __expectString,
863
- id: __expectString,
864
- lastAnalyzedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
865
- listAntipatternSeveritySummary: _json,
866
- name: __expectString,
867
- recommendationSet: _json,
868
- serverError: _json,
869
- serverType: __expectString,
870
- statusMessage: __expectString,
871
- systemInfo: _json,
872
- });
873
- };
874
- const de_ServerDetails = (output, context) => {
875
- const retVal = (output || [])
876
- .filter((e) => e != null)
877
- .map((entry) => {
878
- return de_ServerDetail(entry, context);
879
- });
880
- return retVal;
881
- };
882
- const deserializeMetadata = (output) => ({
883
- httpStatusCode: output.statusCode,
884
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
885
- extendedRequestId: output.headers["x-amz-id-2"],
886
- cfId: output.headers["x-amz-cf-id"],
887
- });
888
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
889
- const _mR = "maxResults";
890
- const _nT = "nextToken";