@aws-sdk/client-migrationhubstrategy 3.312.0 → 3.315.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.
@@ -1,7 +1,7 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, 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, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { MigrationHubStrategyServiceException as __BaseException } from "../models/MigrationHubStrategyServiceException";
4
- import { AccessDeniedException, ConflictException, DatabaseMigrationPreference, DependencyException, InternalServerException, ManagementPreference, ResourceNotFoundException, ServiceLinkedRoleLockClientException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
4
+ import { AccessDeniedException, ConflictException, DependencyException, InternalServerException, ResourceNotFoundException, ServiceLinkedRoleLockClientException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_GetApplicationComponentDetailsCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = {};
@@ -182,16 +182,14 @@ export const se_ListApplicationComponentsCommand = async (input, context) => {
182
182
  };
183
183
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-applicationcomponents";
184
184
  let body;
185
- body = JSON.stringify({
186
- ...(input.applicationComponentCriteria != null && {
187
- applicationComponentCriteria: input.applicationComponentCriteria,
188
- }),
189
- ...(input.filterValue != null && { filterValue: input.filterValue }),
190
- ...(input.groupIdFilter != null && { groupIdFilter: se_GroupIds(input.groupIdFilter, context) }),
191
- ...(input.maxResults != null && { maxResults: input.maxResults }),
192
- ...(input.nextToken != null && { nextToken: input.nextToken }),
193
- ...(input.sort != null && { sort: input.sort }),
194
- });
185
+ body = JSON.stringify(take(input, {
186
+ applicationComponentCriteria: [],
187
+ filterValue: [],
188
+ groupIdFilter: (_) => _json(_),
189
+ maxResults: [],
190
+ nextToken: [],
191
+ sort: [],
192
+ }));
195
193
  return new __HttpRequest({
196
194
  protocol,
197
195
  hostname,
@@ -249,14 +247,14 @@ export const se_ListServersCommand = async (input, context) => {
249
247
  };
250
248
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-servers";
251
249
  let body;
252
- body = JSON.stringify({
253
- ...(input.filterValue != null && { filterValue: input.filterValue }),
254
- ...(input.groupIdFilter != null && { groupIdFilter: se_GroupIds(input.groupIdFilter, context) }),
255
- ...(input.maxResults != null && { maxResults: input.maxResults }),
256
- ...(input.nextToken != null && { nextToken: input.nextToken }),
257
- ...(input.serverCriteria != null && { serverCriteria: input.serverCriteria }),
258
- ...(input.sort != null && { sort: input.sort }),
259
- });
250
+ body = JSON.stringify(take(input, {
251
+ filterValue: [],
252
+ groupIdFilter: (_) => _json(_),
253
+ maxResults: [],
254
+ nextToken: [],
255
+ serverCriteria: [],
256
+ sort: [],
257
+ }));
260
258
  return new __HttpRequest({
261
259
  protocol,
262
260
  hostname,
@@ -274,18 +272,12 @@ export const se_PutPortfolioPreferencesCommand = async (input, context) => {
274
272
  };
275
273
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-portfolio-preferences";
276
274
  let body;
277
- body = JSON.stringify({
278
- ...(input.applicationMode != null && { applicationMode: input.applicationMode }),
279
- ...(input.applicationPreferences != null && {
280
- applicationPreferences: se_ApplicationPreferences(input.applicationPreferences, context),
281
- }),
282
- ...(input.databasePreferences != null && {
283
- databasePreferences: se_DatabasePreferences(input.databasePreferences, context),
284
- }),
285
- ...(input.prioritizeBusinessGoals != null && {
286
- prioritizeBusinessGoals: se_PrioritizeBusinessGoals(input.prioritizeBusinessGoals, context),
287
- }),
288
- });
275
+ body = JSON.stringify(take(input, {
276
+ applicationMode: [],
277
+ applicationPreferences: (_) => _json(_),
278
+ databasePreferences: (_) => _json(_),
279
+ prioritizeBusinessGoals: (_) => _json(_),
280
+ }));
289
281
  return new __HttpRequest({
290
282
  protocol,
291
283
  hostname,
@@ -303,13 +295,11 @@ export const se_StartAssessmentCommand = async (input, context) => {
303
295
  };
304
296
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-assessment";
305
297
  let body;
306
- body = JSON.stringify({
307
- ...(input.assessmentTargets != null && {
308
- assessmentTargets: se_AssessmentTargets(input.assessmentTargets, context),
309
- }),
310
- ...(input.s3bucketForAnalysisData != null && { s3bucketForAnalysisData: input.s3bucketForAnalysisData }),
311
- ...(input.s3bucketForReportData != null && { s3bucketForReportData: input.s3bucketForReportData }),
312
- });
298
+ body = JSON.stringify(take(input, {
299
+ assessmentTargets: (_) => _json(_),
300
+ s3bucketForAnalysisData: [],
301
+ s3bucketForReportData: [],
302
+ }));
313
303
  return new __HttpRequest({
314
304
  protocol,
315
305
  hostname,
@@ -327,14 +317,14 @@ export const se_StartImportFileTaskCommand = async (input, context) => {
327
317
  };
328
318
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-import-file-task";
329
319
  let body;
330
- body = JSON.stringify({
331
- ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
332
- ...(input.dataSourceType != null && { dataSourceType: input.dataSourceType }),
333
- ...(input.groupId != null && { groupId: se_GroupIds(input.groupId, context) }),
334
- ...(input.name != null && { name: input.name }),
335
- ...(input.s3bucketForReportData != null && { s3bucketForReportData: input.s3bucketForReportData }),
336
- ...(input.s3key != null && { s3key: input.s3key }),
337
- });
320
+ body = JSON.stringify(take(input, {
321
+ S3Bucket: [],
322
+ dataSourceType: [],
323
+ groupId: (_) => _json(_),
324
+ name: [],
325
+ s3bucketForReportData: [],
326
+ s3key: [],
327
+ }));
338
328
  return new __HttpRequest({
339
329
  protocol,
340
330
  hostname,
@@ -352,10 +342,10 @@ export const se_StartRecommendationReportGenerationCommand = async (input, conte
352
342
  };
353
343
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-recommendation-report-generation";
354
344
  let body;
355
- body = JSON.stringify({
356
- ...(input.groupIdFilter != null && { groupIdFilter: se_GroupIds(input.groupIdFilter, context) }),
357
- ...(input.outputFormat != null && { outputFormat: input.outputFormat }),
358
- });
345
+ body = JSON.stringify(take(input, {
346
+ groupIdFilter: (_) => _json(_),
347
+ outputFormat: [],
348
+ }));
359
349
  return new __HttpRequest({
360
350
  protocol,
361
351
  hostname,
@@ -373,9 +363,9 @@ export const se_StopAssessmentCommand = async (input, context) => {
373
363
  };
374
364
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stop-assessment";
375
365
  let body;
376
- body = JSON.stringify({
377
- ...(input.assessmentId != null && { assessmentId: input.assessmentId }),
378
- });
366
+ body = JSON.stringify(take(input, {
367
+ assessmentId: [],
368
+ }));
379
369
  return new __HttpRequest({
380
370
  protocol,
381
371
  hostname,
@@ -393,15 +383,15 @@ export const se_UpdateApplicationComponentConfigCommand = async (input, context)
393
383
  };
394
384
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-applicationcomponent-config";
395
385
  let body;
396
- body = JSON.stringify({
397
- ...(input.appType != null && { appType: input.appType }),
398
- ...(input.applicationComponentId != null && { applicationComponentId: input.applicationComponentId }),
399
- ...(input.configureOnly != null && { configureOnly: input.configureOnly }),
400
- ...(input.inclusionStatus != null && { inclusionStatus: input.inclusionStatus }),
401
- ...(input.secretsManagerKey != null && { secretsManagerKey: input.secretsManagerKey }),
402
- ...(input.sourceCodeList != null && { sourceCodeList: se_SourceCodeList(input.sourceCodeList, context) }),
403
- ...(input.strategyOption != null && { strategyOption: se_StrategyOption(input.strategyOption, context) }),
404
- });
386
+ body = JSON.stringify(take(input, {
387
+ appType: [],
388
+ applicationComponentId: [],
389
+ configureOnly: [],
390
+ inclusionStatus: [],
391
+ secretsManagerKey: [],
392
+ sourceCodeList: (_) => _json(_),
393
+ strategyOption: (_) => _json(_),
394
+ }));
405
395
  return new __HttpRequest({
406
396
  protocol,
407
397
  hostname,
@@ -419,10 +409,10 @@ export const se_UpdateServerConfigCommand = async (input, context) => {
419
409
  };
420
410
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-server-config";
421
411
  let body;
422
- body = JSON.stringify({
423
- ...(input.serverId != null && { serverId: input.serverId }),
424
- ...(input.strategyOption != null && { strategyOption: se_StrategyOption(input.strategyOption, context) }),
425
- });
412
+ body = JSON.stringify(take(input, {
413
+ serverId: [],
414
+ strategyOption: (_) => _json(_),
415
+ }));
426
416
  return new __HttpRequest({
427
417
  protocol,
428
418
  hostname,
@@ -441,18 +431,13 @@ export const de_GetApplicationComponentDetailsCommand = async (output, context)
441
431
  $metadata: deserializeMetadata(output),
442
432
  });
443
433
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
444
- if (data.applicationComponentDetail != null) {
445
- contents.applicationComponentDetail = de_ApplicationComponentDetail(data.applicationComponentDetail, context);
446
- }
447
- if (data.associatedApplications != null) {
448
- contents.associatedApplications = de_AssociatedApplications(data.associatedApplications, context);
449
- }
450
- if (data.associatedServerIds != null) {
451
- contents.associatedServerIds = de_AssociatedServerIDs(data.associatedServerIds, context);
452
- }
453
- if (data.moreApplicationResource != null) {
454
- contents.moreApplicationResource = __expectBoolean(data.moreApplicationResource);
455
- }
434
+ const doc = take(data, {
435
+ applicationComponentDetail: (_) => de_ApplicationComponentDetail(_, context),
436
+ associatedApplications: _json,
437
+ associatedServerIds: _json,
438
+ moreApplicationResource: __expectBoolean,
439
+ });
440
+ Object.assign(contents, doc);
456
441
  return contents;
457
442
  };
458
443
  const de_GetApplicationComponentDetailsCommandError = async (output, context) => {
@@ -473,10 +458,9 @@ const de_GetApplicationComponentDetailsCommandError = async (output, context) =>
473
458
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
474
459
  default:
475
460
  const parsedBody = parsedOutput.body;
476
- throwDefaultError({
461
+ return throwDefaultError({
477
462
  output,
478
463
  parsedBody,
479
- exceptionCtor: __BaseException,
480
464
  errorCode,
481
465
  });
482
466
  }
@@ -489,9 +473,10 @@ export const de_GetApplicationComponentStrategiesCommand = async (output, contex
489
473
  $metadata: deserializeMetadata(output),
490
474
  });
491
475
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
492
- if (data.applicationComponentStrategies != null) {
493
- contents.applicationComponentStrategies = de_ApplicationComponentStrategies(data.applicationComponentStrategies, context);
494
- }
476
+ const doc = take(data, {
477
+ applicationComponentStrategies: _json,
478
+ });
479
+ Object.assign(contents, doc);
495
480
  return contents;
496
481
  };
497
482
  const de_GetApplicationComponentStrategiesCommandError = async (output, context) => {
@@ -512,10 +497,9 @@ const de_GetApplicationComponentStrategiesCommandError = async (output, context)
512
497
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
513
498
  default:
514
499
  const parsedBody = parsedOutput.body;
515
- throwDefaultError({
500
+ return throwDefaultError({
516
501
  output,
517
502
  parsedBody,
518
- exceptionCtor: __BaseException,
519
503
  errorCode,
520
504
  });
521
505
  }
@@ -528,15 +512,12 @@ export const de_GetAssessmentCommand = async (output, context) => {
528
512
  $metadata: deserializeMetadata(output),
529
513
  });
530
514
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
531
- if (data.assessmentTargets != null) {
532
- contents.assessmentTargets = de_AssessmentTargets(data.assessmentTargets, context);
533
- }
534
- if (data.dataCollectionDetails != null) {
535
- contents.dataCollectionDetails = de_DataCollectionDetails(data.dataCollectionDetails, context);
536
- }
537
- if (data.id != null) {
538
- contents.id = __expectString(data.id);
539
- }
515
+ const doc = take(data, {
516
+ assessmentTargets: _json,
517
+ dataCollectionDetails: (_) => de_DataCollectionDetails(_, context),
518
+ id: __expectString,
519
+ });
520
+ Object.assign(contents, doc);
540
521
  return contents;
541
522
  };
542
523
  const de_GetAssessmentCommandError = async (output, context) => {
@@ -560,10 +541,9 @@ const de_GetAssessmentCommandError = async (output, context) => {
560
541
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
561
542
  default:
562
543
  const parsedBody = parsedOutput.body;
563
- throwDefaultError({
544
+ return throwDefaultError({
564
545
  output,
565
546
  parsedBody,
566
- exceptionCtor: __BaseException,
567
547
  errorCode,
568
548
  });
569
549
  }
@@ -576,39 +556,20 @@ export const de_GetImportFileTaskCommand = async (output, context) => {
576
556
  $metadata: deserializeMetadata(output),
577
557
  });
578
558
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
579
- if (data.completionTime != null) {
580
- contents.completionTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.completionTime)));
581
- }
582
- if (data.id != null) {
583
- contents.id = __expectString(data.id);
584
- }
585
- if (data.importName != null) {
586
- contents.importName = __expectString(data.importName);
587
- }
588
- if (data.inputS3Bucket != null) {
589
- contents.inputS3Bucket = __expectString(data.inputS3Bucket);
590
- }
591
- if (data.inputS3Key != null) {
592
- contents.inputS3Key = __expectString(data.inputS3Key);
593
- }
594
- if (data.numberOfRecordsFailed != null) {
595
- contents.numberOfRecordsFailed = __expectInt32(data.numberOfRecordsFailed);
596
- }
597
- if (data.numberOfRecordsSuccess != null) {
598
- contents.numberOfRecordsSuccess = __expectInt32(data.numberOfRecordsSuccess);
599
- }
600
- if (data.startTime != null) {
601
- contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
602
- }
603
- if (data.status != null) {
604
- contents.status = __expectString(data.status);
605
- }
606
- if (data.statusReportS3Bucket != null) {
607
- contents.statusReportS3Bucket = __expectString(data.statusReportS3Bucket);
608
- }
609
- if (data.statusReportS3Key != null) {
610
- contents.statusReportS3Key = __expectString(data.statusReportS3Key);
611
- }
559
+ const doc = take(data, {
560
+ completionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
561
+ id: __expectString,
562
+ importName: __expectString,
563
+ inputS3Bucket: __expectString,
564
+ inputS3Key: __expectString,
565
+ numberOfRecordsFailed: __expectInt32,
566
+ numberOfRecordsSuccess: __expectInt32,
567
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
568
+ status: __expectString,
569
+ statusReportS3Bucket: __expectString,
570
+ statusReportS3Key: __expectString,
571
+ });
572
+ Object.assign(contents, doc);
612
573
  return contents;
613
574
  };
614
575
  const de_GetImportFileTaskCommandError = async (output, context) => {
@@ -635,10 +596,9 @@ const de_GetImportFileTaskCommandError = async (output, context) => {
635
596
  throw await de_ValidationExceptionRes(parsedOutput, context);
636
597
  default:
637
598
  const parsedBody = parsedOutput.body;
638
- throwDefaultError({
599
+ return throwDefaultError({
639
600
  output,
640
601
  parsedBody,
641
- exceptionCtor: __BaseException,
642
602
  errorCode,
643
603
  });
644
604
  }
@@ -651,9 +611,10 @@ export const de_GetLatestAssessmentIdCommand = async (output, context) => {
651
611
  $metadata: deserializeMetadata(output),
652
612
  });
653
613
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
654
- if (data.id != null) {
655
- contents.id = __expectString(data.id);
656
- }
614
+ const doc = take(data, {
615
+ id: __expectString,
616
+ });
617
+ Object.assign(contents, doc);
657
618
  return contents;
658
619
  };
659
620
  const de_GetLatestAssessmentIdCommandError = async (output, context) => {
@@ -677,10 +638,9 @@ const de_GetLatestAssessmentIdCommandError = async (output, context) => {
677
638
  throw await de_ValidationExceptionRes(parsedOutput, context);
678
639
  default:
679
640
  const parsedBody = parsedOutput.body;
680
- throwDefaultError({
641
+ return throwDefaultError({
681
642
  output,
682
643
  parsedBody,
683
- exceptionCtor: __BaseException,
684
644
  errorCode,
685
645
  });
686
646
  }
@@ -693,18 +653,13 @@ export const de_GetPortfolioPreferencesCommand = async (output, context) => {
693
653
  $metadata: deserializeMetadata(output),
694
654
  });
695
655
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
696
- if (data.applicationMode != null) {
697
- contents.applicationMode = __expectString(data.applicationMode);
698
- }
699
- if (data.applicationPreferences != null) {
700
- contents.applicationPreferences = de_ApplicationPreferences(data.applicationPreferences, context);
701
- }
702
- if (data.databasePreferences != null) {
703
- contents.databasePreferences = de_DatabasePreferences(data.databasePreferences, context);
704
- }
705
- if (data.prioritizeBusinessGoals != null) {
706
- contents.prioritizeBusinessGoals = de_PrioritizeBusinessGoals(data.prioritizeBusinessGoals, context);
707
- }
656
+ const doc = take(data, {
657
+ applicationMode: __expectString,
658
+ applicationPreferences: _json,
659
+ databasePreferences: _json,
660
+ prioritizeBusinessGoals: _json,
661
+ });
662
+ Object.assign(contents, doc);
708
663
  return contents;
709
664
  };
710
665
  const de_GetPortfolioPreferencesCommandError = async (output, context) => {
@@ -728,10 +683,9 @@ const de_GetPortfolioPreferencesCommandError = async (output, context) => {
728
683
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
729
684
  default:
730
685
  const parsedBody = parsedOutput.body;
731
- throwDefaultError({
686
+ return throwDefaultError({
732
687
  output,
733
688
  parsedBody,
734
- exceptionCtor: __BaseException,
735
689
  errorCode,
736
690
  });
737
691
  }
@@ -744,9 +698,10 @@ export const de_GetPortfolioSummaryCommand = async (output, context) => {
744
698
  $metadata: deserializeMetadata(output),
745
699
  });
746
700
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
747
- if (data.assessmentSummary != null) {
748
- contents.assessmentSummary = de_AssessmentSummary(data.assessmentSummary, context);
749
- }
701
+ const doc = take(data, {
702
+ assessmentSummary: (_) => de_AssessmentSummary(_, context),
703
+ });
704
+ Object.assign(contents, doc);
750
705
  return contents;
751
706
  };
752
707
  const de_GetPortfolioSummaryCommandError = async (output, context) => {
@@ -767,10 +722,9 @@ const de_GetPortfolioSummaryCommandError = async (output, context) => {
767
722
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
768
723
  default:
769
724
  const parsedBody = parsedOutput.body;
770
- throwDefaultError({
725
+ return throwDefaultError({
771
726
  output,
772
727
  parsedBody,
773
- exceptionCtor: __BaseException,
774
728
  errorCode,
775
729
  });
776
730
  }
@@ -783,12 +737,11 @@ export const de_GetRecommendationReportDetailsCommand = async (output, context)
783
737
  $metadata: deserializeMetadata(output),
784
738
  });
785
739
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
786
- if (data.id != null) {
787
- contents.id = __expectString(data.id);
788
- }
789
- if (data.recommendationReportDetails != null) {
790
- contents.recommendationReportDetails = de_RecommendationReportDetails(data.recommendationReportDetails, context);
791
- }
740
+ const doc = take(data, {
741
+ id: __expectString,
742
+ recommendationReportDetails: (_) => de_RecommendationReportDetails(_, context),
743
+ });
744
+ Object.assign(contents, doc);
792
745
  return contents;
793
746
  };
794
747
  const de_GetRecommendationReportDetailsCommandError = async (output, context) => {
@@ -815,10 +768,9 @@ const de_GetRecommendationReportDetailsCommandError = async (output, context) =>
815
768
  throw await de_ValidationExceptionRes(parsedOutput, context);
816
769
  default:
817
770
  const parsedBody = parsedOutput.body;
818
- throwDefaultError({
771
+ return throwDefaultError({
819
772
  output,
820
773
  parsedBody,
821
- exceptionCtor: __BaseException,
822
774
  errorCode,
823
775
  });
824
776
  }
@@ -831,15 +783,12 @@ export const de_GetServerDetailsCommand = async (output, context) => {
831
783
  $metadata: deserializeMetadata(output),
832
784
  });
833
785
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
834
- if (data.associatedApplications != null) {
835
- contents.associatedApplications = de_AssociatedApplications(data.associatedApplications, context);
836
- }
837
- if (data.nextToken != null) {
838
- contents.nextToken = __expectString(data.nextToken);
839
- }
840
- if (data.serverDetail != null) {
841
- contents.serverDetail = de_ServerDetail(data.serverDetail, context);
842
- }
786
+ const doc = take(data, {
787
+ associatedApplications: _json,
788
+ nextToken: __expectString,
789
+ serverDetail: (_) => de_ServerDetail(_, context),
790
+ });
791
+ Object.assign(contents, doc);
843
792
  return contents;
844
793
  };
845
794
  const de_GetServerDetailsCommandError = async (output, context) => {
@@ -866,10 +815,9 @@ const de_GetServerDetailsCommandError = async (output, context) => {
866
815
  throw await de_ValidationExceptionRes(parsedOutput, context);
867
816
  default:
868
817
  const parsedBody = parsedOutput.body;
869
- throwDefaultError({
818
+ return throwDefaultError({
870
819
  output,
871
820
  parsedBody,
872
- exceptionCtor: __BaseException,
873
821
  errorCode,
874
822
  });
875
823
  }
@@ -882,9 +830,10 @@ export const de_GetServerStrategiesCommand = async (output, context) => {
882
830
  $metadata: deserializeMetadata(output),
883
831
  });
884
832
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
885
- if (data.serverStrategies != null) {
886
- contents.serverStrategies = de_ServerStrategies(data.serverStrategies, context);
887
- }
833
+ const doc = take(data, {
834
+ serverStrategies: _json,
835
+ });
836
+ Object.assign(contents, doc);
888
837
  return contents;
889
838
  };
890
839
  const de_GetServerStrategiesCommandError = async (output, context) => {
@@ -911,10 +860,9 @@ const de_GetServerStrategiesCommandError = async (output, context) => {
911
860
  throw await de_ValidationExceptionRes(parsedOutput, context);
912
861
  default:
913
862
  const parsedBody = parsedOutput.body;
914
- throwDefaultError({
863
+ return throwDefaultError({
915
864
  output,
916
865
  parsedBody,
917
- exceptionCtor: __BaseException,
918
866
  errorCode,
919
867
  });
920
868
  }
@@ -927,12 +875,11 @@ export const de_ListApplicationComponentsCommand = async (output, context) => {
927
875
  $metadata: deserializeMetadata(output),
928
876
  });
929
877
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
930
- if (data.applicationComponentInfos != null) {
931
- contents.applicationComponentInfos = de_ApplicationComponentDetails(data.applicationComponentInfos, context);
932
- }
933
- if (data.nextToken != null) {
934
- contents.nextToken = __expectString(data.nextToken);
935
- }
878
+ const doc = take(data, {
879
+ applicationComponentInfos: (_) => de_ApplicationComponentDetails(_, context),
880
+ nextToken: __expectString,
881
+ });
882
+ Object.assign(contents, doc);
936
883
  return contents;
937
884
  };
938
885
  const de_ListApplicationComponentsCommandError = async (output, context) => {
@@ -956,10 +903,9 @@ const de_ListApplicationComponentsCommandError = async (output, context) => {
956
903
  throw await de_ValidationExceptionRes(parsedOutput, context);
957
904
  default:
958
905
  const parsedBody = parsedOutput.body;
959
- throwDefaultError({
906
+ return throwDefaultError({
960
907
  output,
961
908
  parsedBody,
962
- exceptionCtor: __BaseException,
963
909
  errorCode,
964
910
  });
965
911
  }
@@ -972,12 +918,11 @@ export const de_ListCollectorsCommand = async (output, context) => {
972
918
  $metadata: deserializeMetadata(output),
973
919
  });
974
920
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
975
- if (data.Collectors != null) {
976
- contents.Collectors = de_Collectors(data.Collectors, context);
977
- }
978
- if (data.nextToken != null) {
979
- contents.nextToken = __expectString(data.nextToken);
980
- }
921
+ const doc = take(data, {
922
+ Collectors: _json,
923
+ nextToken: __expectString,
924
+ });
925
+ Object.assign(contents, doc);
981
926
  return contents;
982
927
  };
983
928
  const de_ListCollectorsCommandError = async (output, context) => {
@@ -1001,10 +946,9 @@ const de_ListCollectorsCommandError = async (output, context) => {
1001
946
  throw await de_ValidationExceptionRes(parsedOutput, context);
1002
947
  default:
1003
948
  const parsedBody = parsedOutput.body;
1004
- throwDefaultError({
949
+ return throwDefaultError({
1005
950
  output,
1006
951
  parsedBody,
1007
- exceptionCtor: __BaseException,
1008
952
  errorCode,
1009
953
  });
1010
954
  }
@@ -1017,12 +961,11 @@ export const de_ListImportFileTaskCommand = async (output, context) => {
1017
961
  $metadata: deserializeMetadata(output),
1018
962
  });
1019
963
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1020
- if (data.nextToken != null) {
1021
- contents.nextToken = __expectString(data.nextToken);
1022
- }
1023
- if (data.taskInfos != null) {
1024
- contents.taskInfos = de_ListImportFileTaskInformation(data.taskInfos, context);
1025
- }
964
+ const doc = take(data, {
965
+ nextToken: __expectString,
966
+ taskInfos: (_) => de_ListImportFileTaskInformation(_, context),
967
+ });
968
+ Object.assign(contents, doc);
1026
969
  return contents;
1027
970
  };
1028
971
  const de_ListImportFileTaskCommandError = async (output, context) => {
@@ -1046,10 +989,9 @@ const de_ListImportFileTaskCommandError = async (output, context) => {
1046
989
  throw await de_ValidationExceptionRes(parsedOutput, context);
1047
990
  default:
1048
991
  const parsedBody = parsedOutput.body;
1049
- throwDefaultError({
992
+ return throwDefaultError({
1050
993
  output,
1051
994
  parsedBody,
1052
- exceptionCtor: __BaseException,
1053
995
  errorCode,
1054
996
  });
1055
997
  }
@@ -1062,12 +1004,11 @@ export const de_ListServersCommand = async (output, context) => {
1062
1004
  $metadata: deserializeMetadata(output),
1063
1005
  });
1064
1006
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1065
- if (data.nextToken != null) {
1066
- contents.nextToken = __expectString(data.nextToken);
1067
- }
1068
- if (data.serverInfos != null) {
1069
- contents.serverInfos = de_ServerDetails(data.serverInfos, context);
1070
- }
1007
+ const doc = take(data, {
1008
+ nextToken: __expectString,
1009
+ serverInfos: (_) => de_ServerDetails(_, context),
1010
+ });
1011
+ Object.assign(contents, doc);
1071
1012
  return contents;
1072
1013
  };
1073
1014
  const de_ListServersCommandError = async (output, context) => {
@@ -1091,10 +1032,9 @@ const de_ListServersCommandError = async (output, context) => {
1091
1032
  throw await de_ValidationExceptionRes(parsedOutput, context);
1092
1033
  default:
1093
1034
  const parsedBody = parsedOutput.body;
1094
- throwDefaultError({
1035
+ return throwDefaultError({
1095
1036
  output,
1096
1037
  parsedBody,
1097
- exceptionCtor: __BaseException,
1098
1038
  errorCode,
1099
1039
  });
1100
1040
  }
@@ -1133,10 +1073,9 @@ const de_PutPortfolioPreferencesCommandError = async (output, context) => {
1133
1073
  throw await de_ValidationExceptionRes(parsedOutput, context);
1134
1074
  default:
1135
1075
  const parsedBody = parsedOutput.body;
1136
- throwDefaultError({
1076
+ return throwDefaultError({
1137
1077
  output,
1138
1078
  parsedBody,
1139
- exceptionCtor: __BaseException,
1140
1079
  errorCode,
1141
1080
  });
1142
1081
  }
@@ -1149,9 +1088,10 @@ export const de_StartAssessmentCommand = async (output, context) => {
1149
1088
  $metadata: deserializeMetadata(output),
1150
1089
  });
1151
1090
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1152
- if (data.assessmentId != null) {
1153
- contents.assessmentId = __expectString(data.assessmentId);
1154
- }
1091
+ const doc = take(data, {
1092
+ assessmentId: __expectString,
1093
+ });
1094
+ Object.assign(contents, doc);
1155
1095
  return contents;
1156
1096
  };
1157
1097
  const de_StartAssessmentCommandError = async (output, context) => {
@@ -1175,10 +1115,9 @@ const de_StartAssessmentCommandError = async (output, context) => {
1175
1115
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1176
1116
  default:
1177
1117
  const parsedBody = parsedOutput.body;
1178
- throwDefaultError({
1118
+ return throwDefaultError({
1179
1119
  output,
1180
1120
  parsedBody,
1181
- exceptionCtor: __BaseException,
1182
1121
  errorCode,
1183
1122
  });
1184
1123
  }
@@ -1191,9 +1130,10 @@ export const de_StartImportFileTaskCommand = async (output, context) => {
1191
1130
  $metadata: deserializeMetadata(output),
1192
1131
  });
1193
1132
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1194
- if (data.id != null) {
1195
- contents.id = __expectString(data.id);
1196
- }
1133
+ const doc = take(data, {
1134
+ id: __expectString,
1135
+ });
1136
+ Object.assign(contents, doc);
1197
1137
  return contents;
1198
1138
  };
1199
1139
  const de_StartImportFileTaskCommandError = async (output, context) => {
@@ -1220,10 +1160,9 @@ const de_StartImportFileTaskCommandError = async (output, context) => {
1220
1160
  throw await de_ValidationExceptionRes(parsedOutput, context);
1221
1161
  default:
1222
1162
  const parsedBody = parsedOutput.body;
1223
- throwDefaultError({
1163
+ return throwDefaultError({
1224
1164
  output,
1225
1165
  parsedBody,
1226
- exceptionCtor: __BaseException,
1227
1166
  errorCode,
1228
1167
  });
1229
1168
  }
@@ -1236,9 +1175,10 @@ export const de_StartRecommendationReportGenerationCommand = async (output, cont
1236
1175
  $metadata: deserializeMetadata(output),
1237
1176
  });
1238
1177
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1239
- if (data.id != null) {
1240
- contents.id = __expectString(data.id);
1241
- }
1178
+ const doc = take(data, {
1179
+ id: __expectString,
1180
+ });
1181
+ Object.assign(contents, doc);
1242
1182
  return contents;
1243
1183
  };
1244
1184
  const de_StartRecommendationReportGenerationCommandError = async (output, context) => {
@@ -1265,10 +1205,9 @@ const de_StartRecommendationReportGenerationCommandError = async (output, contex
1265
1205
  throw await de_ValidationExceptionRes(parsedOutput, context);
1266
1206
  default:
1267
1207
  const parsedBody = parsedOutput.body;
1268
- throwDefaultError({
1208
+ return throwDefaultError({
1269
1209
  output,
1270
1210
  parsedBody,
1271
- exceptionCtor: __BaseException,
1272
1211
  errorCode,
1273
1212
  });
1274
1213
  }
@@ -1304,10 +1243,9 @@ const de_StopAssessmentCommandError = async (output, context) => {
1304
1243
  throw await de_ValidationExceptionRes(parsedOutput, context);
1305
1244
  default:
1306
1245
  const parsedBody = parsedOutput.body;
1307
- throwDefaultError({
1246
+ return throwDefaultError({
1308
1247
  output,
1309
1248
  parsedBody,
1310
- exceptionCtor: __BaseException,
1311
1249
  errorCode,
1312
1250
  });
1313
1251
  }
@@ -1343,10 +1281,9 @@ const de_UpdateApplicationComponentConfigCommandError = async (output, context)
1343
1281
  throw await de_ValidationExceptionRes(parsedOutput, context);
1344
1282
  default:
1345
1283
  const parsedBody = parsedOutput.body;
1346
- throwDefaultError({
1284
+ return throwDefaultError({
1347
1285
  output,
1348
1286
  parsedBody,
1349
- exceptionCtor: __BaseException,
1350
1287
  errorCode,
1351
1288
  });
1352
1289
  }
@@ -1382,21 +1319,21 @@ const de_UpdateServerConfigCommandError = async (output, context) => {
1382
1319
  throw await de_ValidationExceptionRes(parsedOutput, context);
1383
1320
  default:
1384
1321
  const parsedBody = parsedOutput.body;
1385
- throwDefaultError({
1322
+ return throwDefaultError({
1386
1323
  output,
1387
1324
  parsedBody,
1388
- exceptionCtor: __BaseException,
1389
1325
  errorCode,
1390
1326
  });
1391
1327
  }
1392
1328
  };
1393
- const map = __map;
1329
+ const throwDefaultError = withBaseException(__BaseException);
1394
1330
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1395
1331
  const contents = map({});
1396
1332
  const data = parsedOutput.body;
1397
- if (data.message != null) {
1398
- contents.message = __expectString(data.message);
1399
- }
1333
+ const doc = take(data, {
1334
+ message: __expectString,
1335
+ });
1336
+ Object.assign(contents, doc);
1400
1337
  const exception = new AccessDeniedException({
1401
1338
  $metadata: deserializeMetadata(parsedOutput),
1402
1339
  ...contents,
@@ -1406,9 +1343,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1406
1343
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1407
1344
  const contents = map({});
1408
1345
  const data = parsedOutput.body;
1409
- if (data.message != null) {
1410
- contents.message = __expectString(data.message);
1411
- }
1346
+ const doc = take(data, {
1347
+ message: __expectString,
1348
+ });
1349
+ Object.assign(contents, doc);
1412
1350
  const exception = new ConflictException({
1413
1351
  $metadata: deserializeMetadata(parsedOutput),
1414
1352
  ...contents,
@@ -1418,9 +1356,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1418
1356
  const de_DependencyExceptionRes = async (parsedOutput, context) => {
1419
1357
  const contents = map({});
1420
1358
  const data = parsedOutput.body;
1421
- if (data.message != null) {
1422
- contents.message = __expectString(data.message);
1423
- }
1359
+ const doc = take(data, {
1360
+ message: __expectString,
1361
+ });
1362
+ Object.assign(contents, doc);
1424
1363
  const exception = new DependencyException({
1425
1364
  $metadata: deserializeMetadata(parsedOutput),
1426
1365
  ...contents,
@@ -1430,9 +1369,10 @@ const de_DependencyExceptionRes = async (parsedOutput, context) => {
1430
1369
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1431
1370
  const contents = map({});
1432
1371
  const data = parsedOutput.body;
1433
- if (data.message != null) {
1434
- contents.message = __expectString(data.message);
1435
- }
1372
+ const doc = take(data, {
1373
+ message: __expectString,
1374
+ });
1375
+ Object.assign(contents, doc);
1436
1376
  const exception = new InternalServerException({
1437
1377
  $metadata: deserializeMetadata(parsedOutput),
1438
1378
  ...contents,
@@ -1442,9 +1382,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1442
1382
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1443
1383
  const contents = map({});
1444
1384
  const data = parsedOutput.body;
1445
- if (data.message != null) {
1446
- contents.message = __expectString(data.message);
1447
- }
1385
+ const doc = take(data, {
1386
+ message: __expectString,
1387
+ });
1388
+ Object.assign(contents, doc);
1448
1389
  const exception = new ResourceNotFoundException({
1449
1390
  $metadata: deserializeMetadata(parsedOutput),
1450
1391
  ...contents,
@@ -1454,9 +1395,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1454
1395
  const de_ServiceLinkedRoleLockClientExceptionRes = async (parsedOutput, context) => {
1455
1396
  const contents = map({});
1456
1397
  const data = parsedOutput.body;
1457
- if (data.message != null) {
1458
- contents.message = __expectString(data.message);
1459
- }
1398
+ const doc = take(data, {
1399
+ message: __expectString,
1400
+ });
1401
+ Object.assign(contents, doc);
1460
1402
  const exception = new ServiceLinkedRoleLockClientException({
1461
1403
  $metadata: deserializeMetadata(parsedOutput),
1462
1404
  ...contents,
@@ -1466,9 +1408,10 @@ const de_ServiceLinkedRoleLockClientExceptionRes = async (parsedOutput, context)
1466
1408
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1467
1409
  const contents = map({});
1468
1410
  const data = parsedOutput.body;
1469
- if (data.message != null) {
1470
- contents.message = __expectString(data.message);
1471
- }
1411
+ const doc = take(data, {
1412
+ message: __expectString,
1413
+ });
1414
+ Object.assign(contents, doc);
1472
1415
  const exception = new ServiceQuotaExceededException({
1473
1416
  $metadata: deserializeMetadata(parsedOutput),
1474
1417
  ...contents,
@@ -1478,9 +1421,10 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1478
1421
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1479
1422
  const contents = map({});
1480
1423
  const data = parsedOutput.body;
1481
- if (data.message != null) {
1482
- contents.message = __expectString(data.message);
1483
- }
1424
+ const doc = take(data, {
1425
+ message: __expectString,
1426
+ });
1427
+ Object.assign(contents, doc);
1484
1428
  const exception = new ThrottlingException({
1485
1429
  $metadata: deserializeMetadata(parsedOutput),
1486
1430
  ...contents,
@@ -1490,1003 +1434,137 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1490
1434
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1491
1435
  const contents = map({});
1492
1436
  const data = parsedOutput.body;
1493
- if (data.message != null) {
1494
- contents.message = __expectString(data.message);
1495
- }
1437
+ const doc = take(data, {
1438
+ message: __expectString,
1439
+ });
1440
+ Object.assign(contents, doc);
1496
1441
  const exception = new ValidationException({
1497
1442
  $metadata: deserializeMetadata(parsedOutput),
1498
1443
  ...contents,
1499
1444
  });
1500
1445
  return __decorateServiceException(exception, parsedOutput.body);
1501
1446
  };
1502
- const se_ApplicationPreferences = (input, context) => {
1503
- return {
1504
- ...(input.managementPreference != null && {
1505
- managementPreference: se_ManagementPreference(input.managementPreference, context),
1506
- }),
1507
- };
1508
- };
1509
- const se_AssessmentTarget = (input, context) => {
1510
- return {
1511
- ...(input.condition != null && { condition: input.condition }),
1512
- ...(input.name != null && { name: input.name }),
1513
- ...(input.values != null && { values: se_AssessmentTargetValues(input.values, context) }),
1514
- };
1515
- };
1516
- const se_AssessmentTargets = (input, context) => {
1517
- return input
1518
- .filter((e) => e != null)
1519
- .map((entry) => {
1520
- return se_AssessmentTarget(entry, context);
1521
- });
1522
- };
1523
- const se_AssessmentTargetValues = (input, context) => {
1524
- return input
1525
- .filter((e) => e != null)
1526
- .map((entry) => {
1527
- return entry;
1528
- });
1529
- };
1530
- const se_AwsManagedResources = (input, context) => {
1531
- return {
1532
- ...(input.targetDestination != null && {
1533
- targetDestination: se_AwsManagedTargetDestinations(input.targetDestination, context),
1534
- }),
1535
- };
1536
- };
1537
- const se_AwsManagedTargetDestinations = (input, context) => {
1538
- return input
1539
- .filter((e) => e != null)
1540
- .map((entry) => {
1541
- return entry;
1542
- });
1543
- };
1544
- const se_BusinessGoals = (input, context) => {
1545
- return {
1546
- ...(input.licenseCostReduction != null && { licenseCostReduction: input.licenseCostReduction }),
1547
- ...(input.modernizeInfrastructureWithCloudNativeTechnologies != null && {
1548
- modernizeInfrastructureWithCloudNativeTechnologies: input.modernizeInfrastructureWithCloudNativeTechnologies,
1549
- }),
1550
- ...(input.reduceOperationalOverheadWithManagedServices != null && {
1551
- reduceOperationalOverheadWithManagedServices: input.reduceOperationalOverheadWithManagedServices,
1552
- }),
1553
- ...(input.speedOfMigration != null && { speedOfMigration: input.speedOfMigration }),
1554
- };
1555
- };
1556
- const se_DatabaseMigrationPreference = (input, context) => {
1557
- return DatabaseMigrationPreference.visit(input, {
1558
- heterogeneous: (value) => ({ heterogeneous: se_Heterogeneous(value, context) }),
1559
- homogeneous: (value) => ({ homogeneous: se_Homogeneous(value, context) }),
1560
- noPreference: (value) => ({ noPreference: se_NoDatabaseMigrationPreference(value, context) }),
1561
- _: (name, value) => ({ name: value }),
1562
- });
1563
- };
1564
- const se_DatabasePreferences = (input, context) => {
1565
- return {
1566
- ...(input.databaseManagementPreference != null && {
1567
- databaseManagementPreference: input.databaseManagementPreference,
1568
- }),
1569
- ...(input.databaseMigrationPreference != null && {
1570
- databaseMigrationPreference: se_DatabaseMigrationPreference(input.databaseMigrationPreference, context),
1571
- }),
1572
- };
1573
- };
1574
- const se_Group = (input, context) => {
1575
- return {
1576
- ...(input.name != null && { name: input.name }),
1577
- ...(input.value != null && { value: input.value }),
1578
- };
1579
- };
1580
- const se_GroupIds = (input, context) => {
1581
- return input
1582
- .filter((e) => e != null)
1583
- .map((entry) => {
1584
- return se_Group(entry, context);
1585
- });
1586
- };
1587
- const se_Heterogeneous = (input, context) => {
1588
- return {
1589
- ...(input.targetDatabaseEngine != null && {
1590
- targetDatabaseEngine: se_HeterogeneousTargetDatabaseEngines(input.targetDatabaseEngine, context),
1591
- }),
1592
- };
1593
- };
1594
- const se_HeterogeneousTargetDatabaseEngines = (input, context) => {
1595
- return input
1596
- .filter((e) => e != null)
1597
- .map((entry) => {
1598
- return entry;
1599
- });
1600
- };
1601
- const se_Homogeneous = (input, context) => {
1602
- return {
1603
- ...(input.targetDatabaseEngine != null && {
1604
- targetDatabaseEngine: se_HomogeneousTargetDatabaseEngines(input.targetDatabaseEngine, context),
1605
- }),
1606
- };
1607
- };
1608
- const se_HomogeneousTargetDatabaseEngines = (input, context) => {
1609
- return input
1610
- .filter((e) => e != null)
1611
- .map((entry) => {
1612
- return entry;
1613
- });
1614
- };
1615
- const se_ManagementPreference = (input, context) => {
1616
- return ManagementPreference.visit(input, {
1617
- awsManagedResources: (value) => ({ awsManagedResources: se_AwsManagedResources(value, context) }),
1618
- noPreference: (value) => ({ noPreference: se_NoManagementPreference(value, context) }),
1619
- selfManageResources: (value) => ({ selfManageResources: se_SelfManageResources(value, context) }),
1620
- _: (name, value) => ({ name: value }),
1621
- });
1622
- };
1623
- const se_NoDatabaseMigrationPreference = (input, context) => {
1624
- return {
1625
- ...(input.targetDatabaseEngine != null && {
1626
- targetDatabaseEngine: se_TargetDatabaseEngines(input.targetDatabaseEngine, context),
1627
- }),
1628
- };
1629
- };
1630
- const se_NoManagementPreference = (input, context) => {
1631
- return {
1632
- ...(input.targetDestination != null && {
1633
- targetDestination: se_NoPreferenceTargetDestinations(input.targetDestination, context),
1634
- }),
1635
- };
1636
- };
1637
- const se_NoPreferenceTargetDestinations = (input, context) => {
1638
- return input
1639
- .filter((e) => e != null)
1640
- .map((entry) => {
1641
- return entry;
1642
- });
1643
- };
1644
- const se_PrioritizeBusinessGoals = (input, context) => {
1645
- return {
1646
- ...(input.businessGoals != null && { businessGoals: se_BusinessGoals(input.businessGoals, context) }),
1647
- };
1648
- };
1649
- const se_SelfManageResources = (input, context) => {
1650
- return {
1651
- ...(input.targetDestination != null && {
1652
- targetDestination: se_SelfManageTargetDestinations(input.targetDestination, context),
1653
- }),
1654
- };
1655
- };
1656
- const se_SelfManageTargetDestinations = (input, context) => {
1657
- return input
1658
- .filter((e) => e != null)
1659
- .map((entry) => {
1660
- return entry;
1661
- });
1662
- };
1663
- const se_SourceCode = (input, context) => {
1664
- return {
1665
- ...(input.location != null && { location: input.location }),
1666
- ...(input.projectName != null && { projectName: input.projectName }),
1667
- ...(input.sourceVersion != null && { sourceVersion: input.sourceVersion }),
1668
- ...(input.versionControl != null && { versionControl: input.versionControl }),
1669
- };
1670
- };
1671
- const se_SourceCodeList = (input, context) => {
1672
- return input
1673
- .filter((e) => e != null)
1674
- .map((entry) => {
1675
- return se_SourceCode(entry, context);
1676
- });
1677
- };
1678
- const se_StrategyOption = (input, context) => {
1679
- return {
1680
- ...(input.isPreferred != null && { isPreferred: input.isPreferred }),
1681
- ...(input.strategy != null && { strategy: input.strategy }),
1682
- ...(input.targetDestination != null && { targetDestination: input.targetDestination }),
1683
- ...(input.toolName != null && { toolName: input.toolName }),
1684
- };
1685
- };
1686
- const se_TargetDatabaseEngines = (input, context) => {
1687
- return input
1688
- .filter((e) => e != null)
1689
- .map((entry) => {
1690
- return entry;
1691
- });
1692
- };
1693
- const de_AnalysisStatusUnion = (output, context) => {
1694
- if (__expectString(output.runtimeAnalysisStatus) !== undefined) {
1695
- return { runtimeAnalysisStatus: __expectString(output.runtimeAnalysisStatus) };
1696
- }
1697
- if (__expectString(output.srcCodeOrDbAnalysisStatus) !== undefined) {
1698
- return { srcCodeOrDbAnalysisStatus: __expectString(output.srcCodeOrDbAnalysisStatus) };
1699
- }
1700
- return { $unknown: Object.entries(output)[0] };
1701
- };
1702
- const de_AnalyzerNameUnion = (output, context) => {
1703
- if (__expectString(output.binaryAnalyzerName) !== undefined) {
1704
- return { binaryAnalyzerName: __expectString(output.binaryAnalyzerName) };
1705
- }
1706
- if (__expectString(output.runTimeAnalyzerName) !== undefined) {
1707
- return { runTimeAnalyzerName: __expectString(output.runTimeAnalyzerName) };
1708
- }
1709
- if (__expectString(output.sourceCodeAnalyzerName) !== undefined) {
1710
- return { sourceCodeAnalyzerName: __expectString(output.sourceCodeAnalyzerName) };
1711
- }
1712
- return { $unknown: Object.entries(output)[0] };
1713
- };
1714
- const de_AntipatternReportResult = (output, context) => {
1715
- return {
1716
- analyzerName: output.analyzerName != null ? de_AnalyzerNameUnion(__expectUnion(output.analyzerName), context) : undefined,
1717
- antiPatternReportS3Object: output.antiPatternReportS3Object != null ? de_S3Object(output.antiPatternReportS3Object, context) : undefined,
1718
- antipatternReportStatus: __expectString(output.antipatternReportStatus),
1719
- antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage),
1720
- };
1721
- };
1722
- const de_AntipatternReportResultList = (output, context) => {
1723
- const retVal = (output || [])
1724
- .filter((e) => e != null)
1725
- .map((entry) => {
1726
- if (entry === null) {
1727
- return null;
1728
- }
1729
- return de_AntipatternReportResult(entry, context);
1730
- });
1731
- return retVal;
1732
- };
1733
- const de_AntipatternSeveritySummary = (output, context) => {
1734
- return {
1735
- count: __expectInt32(output.count),
1736
- severity: __expectString(output.severity),
1737
- };
1738
- };
1739
1447
  const de_ApplicationComponentDetail = (output, context) => {
1740
- return {
1741
- analysisStatus: __expectString(output.analysisStatus),
1742
- antipatternReportS3Object: output.antipatternReportS3Object != null ? de_S3Object(output.antipatternReportS3Object, context) : undefined,
1743
- antipatternReportStatus: __expectString(output.antipatternReportStatus),
1744
- antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage),
1745
- appType: __expectString(output.appType),
1746
- appUnitError: output.appUnitError != null ? de_AppUnitError(output.appUnitError, context) : undefined,
1747
- associatedServerId: __expectString(output.associatedServerId),
1748
- databaseConfigDetail: output.databaseConfigDetail != null ? de_DatabaseConfigDetail(output.databaseConfigDetail, context) : undefined,
1749
- id: __expectString(output.id),
1750
- inclusionStatus: __expectString(output.inclusionStatus),
1751
- lastAnalyzedTimestamp: output.lastAnalyzedTimestamp != null
1752
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAnalyzedTimestamp)))
1753
- : undefined,
1754
- listAntipatternSeveritySummary: output.listAntipatternSeveritySummary != null
1755
- ? de_ListAntipatternSeveritySummary(output.listAntipatternSeveritySummary, context)
1756
- : undefined,
1757
- moreServerAssociationExists: __expectBoolean(output.moreServerAssociationExists),
1758
- name: __expectString(output.name),
1759
- osDriver: __expectString(output.osDriver),
1760
- osVersion: __expectString(output.osVersion),
1761
- recommendationSet: output.recommendationSet != null ? de_RecommendationSet(output.recommendationSet, context) : undefined,
1762
- resourceSubType: __expectString(output.resourceSubType),
1763
- resultList: output.resultList != null ? de_ResultList(output.resultList, context) : undefined,
1764
- runtimeStatus: __expectString(output.runtimeStatus),
1765
- runtimeStatusMessage: __expectString(output.runtimeStatusMessage),
1766
- sourceCodeRepositories: output.sourceCodeRepositories != null
1767
- ? de_SourceCodeRepositories(output.sourceCodeRepositories, context)
1768
- : undefined,
1769
- statusMessage: __expectString(output.statusMessage),
1770
- };
1448
+ return take(output, {
1449
+ analysisStatus: __expectString,
1450
+ antipatternReportS3Object: _json,
1451
+ antipatternReportStatus: __expectString,
1452
+ antipatternReportStatusMessage: __expectString,
1453
+ appType: __expectString,
1454
+ appUnitError: _json,
1455
+ associatedServerId: __expectString,
1456
+ databaseConfigDetail: _json,
1457
+ id: __expectString,
1458
+ inclusionStatus: __expectString,
1459
+ lastAnalyzedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1460
+ listAntipatternSeveritySummary: _json,
1461
+ moreServerAssociationExists: __expectBoolean,
1462
+ name: __expectString,
1463
+ osDriver: __expectString,
1464
+ osVersion: __expectString,
1465
+ recommendationSet: _json,
1466
+ resourceSubType: __expectString,
1467
+ resultList: _json,
1468
+ runtimeStatus: __expectString,
1469
+ runtimeStatusMessage: __expectString,
1470
+ sourceCodeRepositories: _json,
1471
+ statusMessage: __expectString,
1472
+ });
1771
1473
  };
1772
1474
  const de_ApplicationComponentDetails = (output, context) => {
1773
1475
  const retVal = (output || [])
1774
1476
  .filter((e) => e != null)
1775
1477
  .map((entry) => {
1776
- if (entry === null) {
1777
- return null;
1778
- }
1779
1478
  return de_ApplicationComponentDetail(entry, context);
1780
1479
  });
1781
1480
  return retVal;
1782
1481
  };
1783
- const de_ApplicationComponentStatusSummary = (output, context) => {
1784
- return {
1785
- count: __expectInt32(output.count),
1786
- srcCodeOrDbAnalysisStatus: __expectString(output.srcCodeOrDbAnalysisStatus),
1787
- };
1788
- };
1789
- const de_ApplicationComponentStrategies = (output, context) => {
1790
- const retVal = (output || [])
1791
- .filter((e) => e != null)
1792
- .map((entry) => {
1793
- if (entry === null) {
1794
- return null;
1795
- }
1796
- return de_ApplicationComponentStrategy(entry, context);
1797
- });
1798
- return retVal;
1799
- };
1800
- const de_ApplicationComponentStrategy = (output, context) => {
1801
- return {
1802
- isPreferred: __expectBoolean(output.isPreferred),
1803
- recommendation: output.recommendation != null ? de_RecommendationSet(output.recommendation, context) : undefined,
1804
- status: __expectString(output.status),
1805
- };
1806
- };
1807
- const de_ApplicationComponentSummary = (output, context) => {
1808
- return {
1809
- appType: __expectString(output.appType),
1810
- count: __expectInt32(output.count),
1811
- };
1812
- };
1813
- const de_ApplicationPreferences = (output, context) => {
1814
- return {
1815
- managementPreference: output.managementPreference != null
1816
- ? de_ManagementPreference(__expectUnion(output.managementPreference), context)
1817
- : undefined,
1818
- };
1819
- };
1820
- const de_AppUnitError = (output, context) => {
1821
- return {
1822
- appUnitErrorCategory: __expectString(output.appUnitErrorCategory),
1823
- };
1824
- };
1825
1482
  const de_AssessmentSummary = (output, context) => {
1826
- return {
1827
- antipatternReportS3Object: output.antipatternReportS3Object != null ? de_S3Object(output.antipatternReportS3Object, context) : undefined,
1828
- antipatternReportStatus: __expectString(output.antipatternReportStatus),
1829
- antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage),
1830
- lastAnalyzedTimestamp: output.lastAnalyzedTimestamp != null
1831
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAnalyzedTimestamp)))
1832
- : undefined,
1833
- listAntipatternSeveritySummary: output.listAntipatternSeveritySummary != null
1834
- ? de_ListAntipatternSeveritySummary(output.listAntipatternSeveritySummary, context)
1835
- : undefined,
1836
- listApplicationComponentStatusSummary: output.listApplicationComponentStatusSummary != null
1837
- ? de_ListApplicationComponentStatusSummary(output.listApplicationComponentStatusSummary, context)
1838
- : undefined,
1839
- listApplicationComponentStrategySummary: output.listApplicationComponentStrategySummary != null
1840
- ? de_ListStrategySummary(output.listApplicationComponentStrategySummary, context)
1841
- : undefined,
1842
- listApplicationComponentSummary: output.listApplicationComponentSummary != null
1843
- ? de_ListApplicationComponentSummary(output.listApplicationComponentSummary, context)
1844
- : undefined,
1845
- listServerStatusSummary: output.listServerStatusSummary != null
1846
- ? de_ListServerStatusSummary(output.listServerStatusSummary, context)
1847
- : undefined,
1848
- listServerStrategySummary: output.listServerStrategySummary != null
1849
- ? de_ListStrategySummary(output.listServerStrategySummary, context)
1850
- : undefined,
1851
- listServerSummary: output.listServerSummary != null ? de_ListServerSummary(output.listServerSummary, context) : undefined,
1852
- };
1853
- };
1854
- const de_AssessmentTarget = (output, context) => {
1855
- return {
1856
- condition: __expectString(output.condition),
1857
- name: __expectString(output.name),
1858
- values: output.values != null ? de_AssessmentTargetValues(output.values, context) : undefined,
1859
- };
1860
- };
1861
- const de_AssessmentTargets = (output, context) => {
1862
- const retVal = (output || [])
1863
- .filter((e) => e != null)
1864
- .map((entry) => {
1865
- if (entry === null) {
1866
- return null;
1867
- }
1868
- return de_AssessmentTarget(entry, context);
1869
- });
1870
- return retVal;
1871
- };
1872
- const de_AssessmentTargetValues = (output, context) => {
1873
- const retVal = (output || [])
1874
- .filter((e) => e != null)
1875
- .map((entry) => {
1876
- if (entry === null) {
1877
- return null;
1878
- }
1879
- return __expectString(entry);
1880
- });
1881
- return retVal;
1882
- };
1883
- const de_AssociatedApplication = (output, context) => {
1884
- return {
1885
- id: __expectString(output.id),
1886
- name: __expectString(output.name),
1887
- };
1888
- };
1889
- const de_AssociatedApplications = (output, context) => {
1890
- const retVal = (output || [])
1891
- .filter((e) => e != null)
1892
- .map((entry) => {
1893
- if (entry === null) {
1894
- return null;
1895
- }
1896
- return de_AssociatedApplication(entry, context);
1897
- });
1898
- return retVal;
1899
- };
1900
- const de_AssociatedServerIDs = (output, context) => {
1901
- const retVal = (output || [])
1902
- .filter((e) => e != null)
1903
- .map((entry) => {
1904
- if (entry === null) {
1905
- return null;
1906
- }
1907
- return __expectString(entry);
1908
- });
1909
- return retVal;
1910
- };
1911
- const de_AwsManagedResources = (output, context) => {
1912
- return {
1913
- targetDestination: output.targetDestination != null ? de_AwsManagedTargetDestinations(output.targetDestination, context) : undefined,
1914
- };
1915
- };
1916
- const de_AwsManagedTargetDestinations = (output, context) => {
1917
- const retVal = (output || [])
1918
- .filter((e) => e != null)
1919
- .map((entry) => {
1920
- if (entry === null) {
1921
- return null;
1922
- }
1923
- return __expectString(entry);
1924
- });
1925
- return retVal;
1926
- };
1927
- const de_BusinessGoals = (output, context) => {
1928
- return {
1929
- licenseCostReduction: __expectInt32(output.licenseCostReduction),
1930
- modernizeInfrastructureWithCloudNativeTechnologies: __expectInt32(output.modernizeInfrastructureWithCloudNativeTechnologies),
1931
- reduceOperationalOverheadWithManagedServices: __expectInt32(output.reduceOperationalOverheadWithManagedServices),
1932
- speedOfMigration: __expectInt32(output.speedOfMigration),
1933
- };
1934
- };
1935
- const de_Collector = (output, context) => {
1936
- return {
1937
- collectorHealth: __expectString(output.collectorHealth),
1938
- collectorId: __expectString(output.collectorId),
1939
- collectorVersion: __expectString(output.collectorVersion),
1940
- configurationSummary: output.configurationSummary != null ? de_ConfigurationSummary(output.configurationSummary, context) : undefined,
1941
- hostName: __expectString(output.hostName),
1942
- ipAddress: __expectString(output.ipAddress),
1943
- lastActivityTimeStamp: __expectString(output.lastActivityTimeStamp),
1944
- registeredTimeStamp: __expectString(output.registeredTimeStamp),
1945
- };
1946
- };
1947
- const de_Collectors = (output, context) => {
1948
- const retVal = (output || [])
1949
- .filter((e) => e != null)
1950
- .map((entry) => {
1951
- if (entry === null) {
1952
- return null;
1953
- }
1954
- return de_Collector(entry, context);
1483
+ return take(output, {
1484
+ antipatternReportS3Object: _json,
1485
+ antipatternReportStatus: __expectString,
1486
+ antipatternReportStatusMessage: __expectString,
1487
+ lastAnalyzedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1488
+ listAntipatternSeveritySummary: _json,
1489
+ listApplicationComponentStatusSummary: _json,
1490
+ listApplicationComponentStrategySummary: _json,
1491
+ listApplicationComponentSummary: _json,
1492
+ listServerStatusSummary: _json,
1493
+ listServerStrategySummary: _json,
1494
+ listServerSummary: _json,
1955
1495
  });
1956
- return retVal;
1957
- };
1958
- const de_ConfigurationSummary = (output, context) => {
1959
- return {
1960
- ipAddressBasedRemoteInfoList: output.ipAddressBasedRemoteInfoList != null
1961
- ? de_IPAddressBasedRemoteInfoList(output.ipAddressBasedRemoteInfoList, context)
1962
- : undefined,
1963
- pipelineInfoList: output.pipelineInfoList != null ? de_PipelineInfoList(output.pipelineInfoList, context) : undefined,
1964
- remoteSourceCodeAnalysisServerInfo: output.remoteSourceCodeAnalysisServerInfo != null
1965
- ? de_RemoteSourceCodeAnalysisServerInfo(output.remoteSourceCodeAnalysisServerInfo, context)
1966
- : undefined,
1967
- vcenterBasedRemoteInfoList: output.vcenterBasedRemoteInfoList != null
1968
- ? de_VcenterBasedRemoteInfoList(output.vcenterBasedRemoteInfoList, context)
1969
- : undefined,
1970
- versionControlInfoList: output.versionControlInfoList != null
1971
- ? de_VersionControlInfoList(output.versionControlInfoList, context)
1972
- : undefined,
1973
- };
1974
- };
1975
- const de_DatabaseConfigDetail = (output, context) => {
1976
- return {
1977
- secretName: __expectString(output.secretName),
1978
- };
1979
- };
1980
- const de_DatabaseMigrationPreference = (output, context) => {
1981
- if (output.heterogeneous != null) {
1982
- return {
1983
- heterogeneous: de_Heterogeneous(output.heterogeneous, context),
1984
- };
1985
- }
1986
- if (output.homogeneous != null) {
1987
- return {
1988
- homogeneous: de_Homogeneous(output.homogeneous, context),
1989
- };
1990
- }
1991
- if (output.noPreference != null) {
1992
- return {
1993
- noPreference: de_NoDatabaseMigrationPreference(output.noPreference, context),
1994
- };
1995
- }
1996
- return { $unknown: Object.entries(output)[0] };
1997
- };
1998
- const de_DatabasePreferences = (output, context) => {
1999
- return {
2000
- databaseManagementPreference: __expectString(output.databaseManagementPreference),
2001
- databaseMigrationPreference: output.databaseMigrationPreference != null
2002
- ? de_DatabaseMigrationPreference(__expectUnion(output.databaseMigrationPreference), context)
2003
- : undefined,
2004
- };
2005
1496
  };
2006
1497
  const de_DataCollectionDetails = (output, context) => {
2007
- return {
2008
- completionTime: output.completionTime != null
2009
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime)))
2010
- : undefined,
2011
- failed: __expectInt32(output.failed),
2012
- inProgress: __expectInt32(output.inProgress),
2013
- servers: __expectInt32(output.servers),
2014
- startTime: output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
2015
- status: __expectString(output.status),
2016
- statusMessage: __expectString(output.statusMessage),
2017
- success: __expectInt32(output.success),
2018
- };
2019
- };
2020
- const de_Heterogeneous = (output, context) => {
2021
- return {
2022
- targetDatabaseEngine: output.targetDatabaseEngine != null
2023
- ? de_HeterogeneousTargetDatabaseEngines(output.targetDatabaseEngine, context)
2024
- : undefined,
2025
- };
2026
- };
2027
- const de_HeterogeneousTargetDatabaseEngines = (output, context) => {
2028
- const retVal = (output || [])
2029
- .filter((e) => e != null)
2030
- .map((entry) => {
2031
- if (entry === null) {
2032
- return null;
2033
- }
2034
- return __expectString(entry);
2035
- });
2036
- return retVal;
2037
- };
2038
- const de_Homogeneous = (output, context) => {
2039
- return {
2040
- targetDatabaseEngine: output.targetDatabaseEngine != null
2041
- ? de_HomogeneousTargetDatabaseEngines(output.targetDatabaseEngine, context)
2042
- : undefined,
2043
- };
2044
- };
2045
- const de_HomogeneousTargetDatabaseEngines = (output, context) => {
2046
- const retVal = (output || [])
2047
- .filter((e) => e != null)
2048
- .map((entry) => {
2049
- if (entry === null) {
2050
- return null;
2051
- }
2052
- return __expectString(entry);
1498
+ return take(output, {
1499
+ completionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1500
+ failed: __expectInt32,
1501
+ inProgress: __expectInt32,
1502
+ servers: __expectInt32,
1503
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1504
+ status: __expectString,
1505
+ statusMessage: __expectString,
1506
+ success: __expectInt32,
2053
1507
  });
2054
- return retVal;
2055
1508
  };
2056
1509
  const de_ImportFileTaskInformation = (output, context) => {
2057
- return {
2058
- completionTime: output.completionTime != null
2059
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime)))
2060
- : undefined,
2061
- id: __expectString(output.id),
2062
- importName: __expectString(output.importName),
2063
- inputS3Bucket: __expectString(output.inputS3Bucket),
2064
- inputS3Key: __expectString(output.inputS3Key),
2065
- numberOfRecordsFailed: __expectInt32(output.numberOfRecordsFailed),
2066
- numberOfRecordsSuccess: __expectInt32(output.numberOfRecordsSuccess),
2067
- startTime: output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
2068
- status: __expectString(output.status),
2069
- statusReportS3Bucket: __expectString(output.statusReportS3Bucket),
2070
- statusReportS3Key: __expectString(output.statusReportS3Key),
2071
- };
2072
- };
2073
- const de_IPAddressBasedRemoteInfo = (output, context) => {
2074
- return {
2075
- authType: __expectString(output.authType),
2076
- ipAddressConfigurationTimeStamp: __expectString(output.ipAddressConfigurationTimeStamp),
2077
- osType: __expectString(output.osType),
2078
- };
2079
- };
2080
- const de_IPAddressBasedRemoteInfoList = (output, context) => {
2081
- const retVal = (output || [])
2082
- .filter((e) => e != null)
2083
- .map((entry) => {
2084
- if (entry === null) {
2085
- return null;
2086
- }
2087
- return de_IPAddressBasedRemoteInfo(entry, context);
2088
- });
2089
- return retVal;
2090
- };
2091
- const de_ListAntipatternSeveritySummary = (output, context) => {
2092
- const retVal = (output || [])
2093
- .filter((e) => e != null)
2094
- .map((entry) => {
2095
- if (entry === null) {
2096
- return null;
2097
- }
2098
- return de_AntipatternSeveritySummary(entry, context);
2099
- });
2100
- return retVal;
2101
- };
2102
- const de_ListApplicationComponentStatusSummary = (output, context) => {
2103
- const retVal = (output || [])
2104
- .filter((e) => e != null)
2105
- .map((entry) => {
2106
- if (entry === null) {
2107
- return null;
2108
- }
2109
- return de_ApplicationComponentStatusSummary(entry, context);
2110
- });
2111
- return retVal;
2112
- };
2113
- const de_ListApplicationComponentSummary = (output, context) => {
2114
- const retVal = (output || [])
2115
- .filter((e) => e != null)
2116
- .map((entry) => {
2117
- if (entry === null) {
2118
- return null;
2119
- }
2120
- return de_ApplicationComponentSummary(entry, context);
1510
+ return take(output, {
1511
+ completionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1512
+ id: __expectString,
1513
+ importName: __expectString,
1514
+ inputS3Bucket: __expectString,
1515
+ inputS3Key: __expectString,
1516
+ numberOfRecordsFailed: __expectInt32,
1517
+ numberOfRecordsSuccess: __expectInt32,
1518
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1519
+ status: __expectString,
1520
+ statusReportS3Bucket: __expectString,
1521
+ statusReportS3Key: __expectString,
2121
1522
  });
2122
- return retVal;
2123
1523
  };
2124
1524
  const de_ListImportFileTaskInformation = (output, context) => {
2125
1525
  const retVal = (output || [])
2126
1526
  .filter((e) => e != null)
2127
1527
  .map((entry) => {
2128
- if (entry === null) {
2129
- return null;
2130
- }
2131
1528
  return de_ImportFileTaskInformation(entry, context);
2132
1529
  });
2133
1530
  return retVal;
2134
1531
  };
2135
- const de_ListServerStatusSummary = (output, context) => {
2136
- const retVal = (output || [])
2137
- .filter((e) => e != null)
2138
- .map((entry) => {
2139
- if (entry === null) {
2140
- return null;
2141
- }
2142
- return de_ServerStatusSummary(entry, context);
2143
- });
2144
- return retVal;
2145
- };
2146
- const de_ListServerSummary = (output, context) => {
2147
- const retVal = (output || [])
2148
- .filter((e) => e != null)
2149
- .map((entry) => {
2150
- if (entry === null) {
2151
- return null;
2152
- }
2153
- return de_ServerSummary(entry, context);
2154
- });
2155
- return retVal;
2156
- };
2157
- const de_ListStrategySummary = (output, context) => {
2158
- const retVal = (output || [])
2159
- .filter((e) => e != null)
2160
- .map((entry) => {
2161
- if (entry === null) {
2162
- return null;
2163
- }
2164
- return de_StrategySummary(entry, context);
2165
- });
2166
- return retVal;
2167
- };
2168
- const de_ManagementPreference = (output, context) => {
2169
- if (output.awsManagedResources != null) {
2170
- return {
2171
- awsManagedResources: de_AwsManagedResources(output.awsManagedResources, context),
2172
- };
2173
- }
2174
- if (output.noPreference != null) {
2175
- return {
2176
- noPreference: de_NoManagementPreference(output.noPreference, context),
2177
- };
2178
- }
2179
- if (output.selfManageResources != null) {
2180
- return {
2181
- selfManageResources: de_SelfManageResources(output.selfManageResources, context),
2182
- };
2183
- }
2184
- return { $unknown: Object.entries(output)[0] };
2185
- };
2186
- const de_NetworkInfo = (output, context) => {
2187
- return {
2188
- interfaceName: __expectString(output.interfaceName),
2189
- ipAddress: __expectString(output.ipAddress),
2190
- macAddress: __expectString(output.macAddress),
2191
- netMask: __expectString(output.netMask),
2192
- };
2193
- };
2194
- const de_NetworkInfoList = (output, context) => {
2195
- const retVal = (output || [])
2196
- .filter((e) => e != null)
2197
- .map((entry) => {
2198
- if (entry === null) {
2199
- return null;
2200
- }
2201
- return de_NetworkInfo(entry, context);
2202
- });
2203
- return retVal;
2204
- };
2205
- const de_NoDatabaseMigrationPreference = (output, context) => {
2206
- return {
2207
- targetDatabaseEngine: output.targetDatabaseEngine != null ? de_TargetDatabaseEngines(output.targetDatabaseEngine, context) : undefined,
2208
- };
2209
- };
2210
- const de_NoManagementPreference = (output, context) => {
2211
- return {
2212
- targetDestination: output.targetDestination != null
2213
- ? de_NoPreferenceTargetDestinations(output.targetDestination, context)
2214
- : undefined,
2215
- };
2216
- };
2217
- const de_NoPreferenceTargetDestinations = (output, context) => {
2218
- const retVal = (output || [])
2219
- .filter((e) => e != null)
2220
- .map((entry) => {
2221
- if (entry === null) {
2222
- return null;
2223
- }
2224
- return __expectString(entry);
2225
- });
2226
- return retVal;
2227
- };
2228
- const de_OSInfo = (output, context) => {
2229
- return {
2230
- type: __expectString(output.type),
2231
- version: __expectString(output.version),
2232
- };
2233
- };
2234
- const de_PipelineInfo = (output, context) => {
2235
- return {
2236
- pipelineConfigurationTimeStamp: __expectString(output.pipelineConfigurationTimeStamp),
2237
- pipelineType: __expectString(output.pipelineType),
2238
- };
2239
- };
2240
- const de_PipelineInfoList = (output, context) => {
2241
- const retVal = (output || [])
2242
- .filter((e) => e != null)
2243
- .map((entry) => {
2244
- if (entry === null) {
2245
- return null;
2246
- }
2247
- return de_PipelineInfo(entry, context);
2248
- });
2249
- return retVal;
2250
- };
2251
- const de_PrioritizeBusinessGoals = (output, context) => {
2252
- return {
2253
- businessGoals: output.businessGoals != null ? de_BusinessGoals(output.businessGoals, context) : undefined,
2254
- };
2255
- };
2256
1532
  const de_RecommendationReportDetails = (output, context) => {
2257
- return {
2258
- completionTime: output.completionTime != null
2259
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime)))
2260
- : undefined,
2261
- s3Bucket: __expectString(output.s3Bucket),
2262
- s3Keys: output.s3Keys != null ? de_S3Keys(output.s3Keys, context) : undefined,
2263
- startTime: output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
2264
- status: __expectString(output.status),
2265
- statusMessage: __expectString(output.statusMessage),
2266
- };
2267
- };
2268
- const de_RecommendationSet = (output, context) => {
2269
- return {
2270
- strategy: __expectString(output.strategy),
2271
- targetDestination: __expectString(output.targetDestination),
2272
- transformationTool: output.transformationTool != null ? de_TransformationTool(output.transformationTool, context) : undefined,
2273
- };
2274
- };
2275
- const de_RemoteSourceCodeAnalysisServerInfo = (output, context) => {
2276
- return {
2277
- remoteSourceCodeAnalysisServerConfigurationTimestamp: __expectString(output.remoteSourceCodeAnalysisServerConfigurationTimestamp),
2278
- };
2279
- };
2280
- const de_Result = (output, context) => {
2281
- return {
2282
- analysisStatus: output.analysisStatus != null ? de_AnalysisStatusUnion(__expectUnion(output.analysisStatus), context) : undefined,
2283
- analysisType: __expectString(output.analysisType),
2284
- antipatternReportResultList: output.antipatternReportResultList != null
2285
- ? de_AntipatternReportResultList(output.antipatternReportResultList, context)
2286
- : undefined,
2287
- statusMessage: __expectString(output.statusMessage),
2288
- };
2289
- };
2290
- const de_ResultList = (output, context) => {
2291
- const retVal = (output || [])
2292
- .filter((e) => e != null)
2293
- .map((entry) => {
2294
- if (entry === null) {
2295
- return null;
2296
- }
2297
- return de_Result(entry, context);
2298
- });
2299
- return retVal;
2300
- };
2301
- const de_S3Keys = (output, context) => {
2302
- const retVal = (output || [])
2303
- .filter((e) => e != null)
2304
- .map((entry) => {
2305
- if (entry === null) {
2306
- return null;
2307
- }
2308
- return __expectString(entry);
2309
- });
2310
- return retVal;
2311
- };
2312
- const de_S3Object = (output, context) => {
2313
- return {
2314
- s3Bucket: __expectString(output.s3Bucket),
2315
- s3key: __expectString(output.s3key),
2316
- };
2317
- };
2318
- const de_SelfManageResources = (output, context) => {
2319
- return {
2320
- targetDestination: output.targetDestination != null ? de_SelfManageTargetDestinations(output.targetDestination, context) : undefined,
2321
- };
2322
- };
2323
- const de_SelfManageTargetDestinations = (output, context) => {
2324
- const retVal = (output || [])
2325
- .filter((e) => e != null)
2326
- .map((entry) => {
2327
- if (entry === null) {
2328
- return null;
2329
- }
2330
- return __expectString(entry);
1533
+ return take(output, {
1534
+ completionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1535
+ s3Bucket: __expectString,
1536
+ s3Keys: _json,
1537
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1538
+ status: __expectString,
1539
+ statusMessage: __expectString,
2331
1540
  });
2332
- return retVal;
2333
1541
  };
2334
1542
  const de_ServerDetail = (output, context) => {
2335
- return {
2336
- antipatternReportS3Object: output.antipatternReportS3Object != null ? de_S3Object(output.antipatternReportS3Object, context) : undefined,
2337
- antipatternReportStatus: __expectString(output.antipatternReportStatus),
2338
- antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage),
2339
- applicationComponentStrategySummary: output.applicationComponentStrategySummary != null
2340
- ? de_ListStrategySummary(output.applicationComponentStrategySummary, context)
2341
- : undefined,
2342
- dataCollectionStatus: __expectString(output.dataCollectionStatus),
2343
- id: __expectString(output.id),
2344
- lastAnalyzedTimestamp: output.lastAnalyzedTimestamp != null
2345
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAnalyzedTimestamp)))
2346
- : undefined,
2347
- listAntipatternSeveritySummary: output.listAntipatternSeveritySummary != null
2348
- ? de_ListAntipatternSeveritySummary(output.listAntipatternSeveritySummary, context)
2349
- : undefined,
2350
- name: __expectString(output.name),
2351
- recommendationSet: output.recommendationSet != null ? de_RecommendationSet(output.recommendationSet, context) : undefined,
2352
- serverError: output.serverError != null ? de_ServerError(output.serverError, context) : undefined,
2353
- serverType: __expectString(output.serverType),
2354
- statusMessage: __expectString(output.statusMessage),
2355
- systemInfo: output.systemInfo != null ? de_SystemInfo(output.systemInfo, context) : undefined,
2356
- };
1543
+ return take(output, {
1544
+ antipatternReportS3Object: _json,
1545
+ antipatternReportStatus: __expectString,
1546
+ antipatternReportStatusMessage: __expectString,
1547
+ applicationComponentStrategySummary: _json,
1548
+ dataCollectionStatus: __expectString,
1549
+ id: __expectString,
1550
+ lastAnalyzedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1551
+ listAntipatternSeveritySummary: _json,
1552
+ name: __expectString,
1553
+ recommendationSet: _json,
1554
+ serverError: _json,
1555
+ serverType: __expectString,
1556
+ statusMessage: __expectString,
1557
+ systemInfo: _json,
1558
+ });
2357
1559
  };
2358
1560
  const de_ServerDetails = (output, context) => {
2359
1561
  const retVal = (output || [])
2360
1562
  .filter((e) => e != null)
2361
1563
  .map((entry) => {
2362
- if (entry === null) {
2363
- return null;
2364
- }
2365
1564
  return de_ServerDetail(entry, context);
2366
1565
  });
2367
1566
  return retVal;
2368
1567
  };
2369
- const de_ServerError = (output, context) => {
2370
- return {
2371
- serverErrorCategory: __expectString(output.serverErrorCategory),
2372
- };
2373
- };
2374
- const de_ServerStatusSummary = (output, context) => {
2375
- return {
2376
- count: __expectInt32(output.count),
2377
- runTimeAssessmentStatus: __expectString(output.runTimeAssessmentStatus),
2378
- };
2379
- };
2380
- const de_ServerStrategies = (output, context) => {
2381
- const retVal = (output || [])
2382
- .filter((e) => e != null)
2383
- .map((entry) => {
2384
- if (entry === null) {
2385
- return null;
2386
- }
2387
- return de_ServerStrategy(entry, context);
2388
- });
2389
- return retVal;
2390
- };
2391
- const de_ServerStrategy = (output, context) => {
2392
- return {
2393
- isPreferred: __expectBoolean(output.isPreferred),
2394
- numberOfApplicationComponents: __expectInt32(output.numberOfApplicationComponents),
2395
- recommendation: output.recommendation != null ? de_RecommendationSet(output.recommendation, context) : undefined,
2396
- status: __expectString(output.status),
2397
- };
2398
- };
2399
- const de_ServerSummary = (output, context) => {
2400
- return {
2401
- ServerOsType: __expectString(output.ServerOsType),
2402
- count: __expectInt32(output.count),
2403
- };
2404
- };
2405
- const de_SourceCodeRepositories = (output, context) => {
2406
- const retVal = (output || [])
2407
- .filter((e) => e != null)
2408
- .map((entry) => {
2409
- if (entry === null) {
2410
- return null;
2411
- }
2412
- return de_SourceCodeRepository(entry, context);
2413
- });
2414
- return retVal;
2415
- };
2416
- const de_SourceCodeRepository = (output, context) => {
2417
- return {
2418
- branch: __expectString(output.branch),
2419
- projectName: __expectString(output.projectName),
2420
- repository: __expectString(output.repository),
2421
- versionControlType: __expectString(output.versionControlType),
2422
- };
2423
- };
2424
- const de_StrategySummary = (output, context) => {
2425
- return {
2426
- count: __expectInt32(output.count),
2427
- strategy: __expectString(output.strategy),
2428
- };
2429
- };
2430
- const de_SystemInfo = (output, context) => {
2431
- return {
2432
- cpuArchitecture: __expectString(output.cpuArchitecture),
2433
- fileSystemType: __expectString(output.fileSystemType),
2434
- networkInfoList: output.networkInfoList != null ? de_NetworkInfoList(output.networkInfoList, context) : undefined,
2435
- osInfo: output.osInfo != null ? de_OSInfo(output.osInfo, context) : undefined,
2436
- };
2437
- };
2438
- const de_TargetDatabaseEngines = (output, context) => {
2439
- const retVal = (output || [])
2440
- .filter((e) => e != null)
2441
- .map((entry) => {
2442
- if (entry === null) {
2443
- return null;
2444
- }
2445
- return __expectString(entry);
2446
- });
2447
- return retVal;
2448
- };
2449
- const de_TransformationTool = (output, context) => {
2450
- return {
2451
- description: __expectString(output.description),
2452
- name: __expectString(output.name),
2453
- tranformationToolInstallationLink: __expectString(output.tranformationToolInstallationLink),
2454
- };
2455
- };
2456
- const de_VcenterBasedRemoteInfo = (output, context) => {
2457
- return {
2458
- osType: __expectString(output.osType),
2459
- vcenterConfigurationTimeStamp: __expectString(output.vcenterConfigurationTimeStamp),
2460
- };
2461
- };
2462
- const de_VcenterBasedRemoteInfoList = (output, context) => {
2463
- const retVal = (output || [])
2464
- .filter((e) => e != null)
2465
- .map((entry) => {
2466
- if (entry === null) {
2467
- return null;
2468
- }
2469
- return de_VcenterBasedRemoteInfo(entry, context);
2470
- });
2471
- return retVal;
2472
- };
2473
- const de_VersionControlInfo = (output, context) => {
2474
- return {
2475
- versionControlConfigurationTimeStamp: __expectString(output.versionControlConfigurationTimeStamp),
2476
- versionControlType: __expectString(output.versionControlType),
2477
- };
2478
- };
2479
- const de_VersionControlInfoList = (output, context) => {
2480
- const retVal = (output || [])
2481
- .filter((e) => e != null)
2482
- .map((entry) => {
2483
- if (entry === null) {
2484
- return null;
2485
- }
2486
- return de_VersionControlInfo(entry, context);
2487
- });
2488
- return retVal;
2489
- };
2490
1568
  const deserializeMetadata = (output) => ({
2491
1569
  httpStatusCode: output.statusCode,
2492
1570
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],