@aws-sdk/client-customer-profiles 3.52.0 → 3.54.1

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 (55) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist-cjs/CustomerProfiles.js +75 -0
  3. package/dist-cjs/commands/CreateIntegrationWorkflowCommand.js +36 -0
  4. package/dist-cjs/commands/DeleteWorkflowCommand.js +36 -0
  5. package/dist-cjs/commands/GetWorkflowCommand.js +36 -0
  6. package/dist-cjs/commands/GetWorkflowStepsCommand.js +36 -0
  7. package/dist-cjs/commands/ListWorkflowsCommand.js +36 -0
  8. package/dist-cjs/commands/index.js +5 -0
  9. package/dist-cjs/index.js +3 -0
  10. package/dist-cjs/models/CustomerProfilesServiceException.js +11 -0
  11. package/dist-cjs/models/models_0.js +349 -144
  12. package/dist-cjs/protocols/Aws_restJson1.js +997 -1353
  13. package/dist-es/CustomerProfiles.js +75 -0
  14. package/dist-es/commands/CreateIntegrationWorkflowCommand.js +39 -0
  15. package/dist-es/commands/DeleteWorkflowCommand.js +39 -0
  16. package/dist-es/commands/GetWorkflowCommand.js +39 -0
  17. package/dist-es/commands/GetWorkflowStepsCommand.js +39 -0
  18. package/dist-es/commands/ListWorkflowsCommand.js +39 -0
  19. package/dist-es/commands/index.js +5 -0
  20. package/dist-es/index.js +1 -0
  21. package/dist-es/models/CustomerProfilesServiceException.js +12 -0
  22. package/dist-es/models/models_0.js +276 -116
  23. package/dist-es/protocols/Aws_restJson1.js +1569 -1539
  24. package/dist-types/CustomerProfiles.d.ts +37 -3
  25. package/dist-types/CustomerProfilesClient.d.ts +9 -4
  26. package/dist-types/commands/CreateIntegrationWorkflowCommand.d.ts +37 -0
  27. package/dist-types/commands/DeleteWorkflowCommand.d.ts +35 -0
  28. package/dist-types/commands/GetMatchesCommand.d.ts +0 -3
  29. package/dist-types/commands/GetWorkflowCommand.d.ts +35 -0
  30. package/dist-types/commands/GetWorkflowStepsCommand.d.ts +35 -0
  31. package/dist-types/commands/ListWorkflowsCommand.d.ts +35 -0
  32. package/dist-types/commands/index.d.ts +5 -0
  33. package/dist-types/index.d.ts +1 -0
  34. package/dist-types/models/CustomerProfilesServiceException.d.ts +10 -0
  35. package/dist-types/models/models_0.d.ts +986 -477
  36. package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
  37. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  38. package/dist-types/runtimeConfig.d.ts +1 -1
  39. package/dist-types/runtimeConfig.native.d.ts +1 -1
  40. package/dist-types/ts3.4/CustomerProfiles.d.ts +25 -0
  41. package/dist-types/ts3.4/CustomerProfilesClient.d.ts +9 -4
  42. package/dist-types/ts3.4/commands/CreateIntegrationWorkflowCommand.d.ts +17 -0
  43. package/dist-types/ts3.4/commands/DeleteWorkflowCommand.d.ts +17 -0
  44. package/dist-types/ts3.4/commands/GetWorkflowCommand.d.ts +17 -0
  45. package/dist-types/ts3.4/commands/GetWorkflowStepsCommand.d.ts +17 -0
  46. package/dist-types/ts3.4/commands/ListWorkflowsCommand.d.ts +17 -0
  47. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  48. package/dist-types/ts3.4/index.d.ts +1 -0
  49. package/dist-types/ts3.4/models/CustomerProfilesServiceException.d.ts +6 -0
  50. package/dist-types/ts3.4/models/models_0.d.ts +549 -254
  51. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +15 -0
  52. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  53. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  54. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  55. package/package.json +27 -27
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1ListAccountIntegrationsCommand = exports.deserializeAws_restJson1GetProfileObjectTypeTemplateCommand = exports.deserializeAws_restJson1GetProfileObjectTypeCommand = exports.deserializeAws_restJson1GetMatchesCommand = exports.deserializeAws_restJson1GetIntegrationCommand = exports.deserializeAws_restJson1GetIdentityResolutionJobCommand = exports.deserializeAws_restJson1GetDomainCommand = exports.deserializeAws_restJson1GetAutoMergingPreviewCommand = exports.deserializeAws_restJson1DeleteProfileObjectTypeCommand = exports.deserializeAws_restJson1DeleteProfileObjectCommand = exports.deserializeAws_restJson1DeleteProfileKeyCommand = exports.deserializeAws_restJson1DeleteProfileCommand = exports.deserializeAws_restJson1DeleteIntegrationCommand = exports.deserializeAws_restJson1DeleteDomainCommand = exports.deserializeAws_restJson1CreateProfileCommand = exports.deserializeAws_restJson1CreateDomainCommand = exports.deserializeAws_restJson1AddProfileKeyCommand = exports.serializeAws_restJson1UpdateProfileCommand = exports.serializeAws_restJson1UpdateDomainCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SearchProfilesCommand = exports.serializeAws_restJson1PutProfileObjectTypeCommand = exports.serializeAws_restJson1PutProfileObjectCommand = exports.serializeAws_restJson1PutIntegrationCommand = exports.serializeAws_restJson1MergeProfilesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListProfileObjectTypeTemplatesCommand = exports.serializeAws_restJson1ListProfileObjectTypesCommand = exports.serializeAws_restJson1ListProfileObjectsCommand = exports.serializeAws_restJson1ListIntegrationsCommand = exports.serializeAws_restJson1ListIdentityResolutionJobsCommand = exports.serializeAws_restJson1ListDomainsCommand = exports.serializeAws_restJson1ListAccountIntegrationsCommand = exports.serializeAws_restJson1GetProfileObjectTypeTemplateCommand = exports.serializeAws_restJson1GetProfileObjectTypeCommand = exports.serializeAws_restJson1GetMatchesCommand = exports.serializeAws_restJson1GetIntegrationCommand = exports.serializeAws_restJson1GetIdentityResolutionJobCommand = exports.serializeAws_restJson1GetDomainCommand = exports.serializeAws_restJson1GetAutoMergingPreviewCommand = exports.serializeAws_restJson1DeleteProfileObjectTypeCommand = exports.serializeAws_restJson1DeleteProfileObjectCommand = exports.serializeAws_restJson1DeleteProfileKeyCommand = exports.serializeAws_restJson1DeleteProfileCommand = exports.serializeAws_restJson1DeleteIntegrationCommand = exports.serializeAws_restJson1DeleteDomainCommand = exports.serializeAws_restJson1CreateProfileCommand = exports.serializeAws_restJson1CreateDomainCommand = exports.serializeAws_restJson1AddProfileKeyCommand = void 0;
4
- exports.deserializeAws_restJson1UpdateProfileCommand = exports.deserializeAws_restJson1UpdateDomainCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SearchProfilesCommand = exports.deserializeAws_restJson1PutProfileObjectTypeCommand = exports.deserializeAws_restJson1PutProfileObjectCommand = exports.deserializeAws_restJson1PutIntegrationCommand = exports.deserializeAws_restJson1MergeProfilesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListProfileObjectTypeTemplatesCommand = exports.deserializeAws_restJson1ListProfileObjectTypesCommand = exports.deserializeAws_restJson1ListProfileObjectsCommand = exports.deserializeAws_restJson1ListIntegrationsCommand = exports.deserializeAws_restJson1ListIdentityResolutionJobsCommand = exports.deserializeAws_restJson1ListDomainsCommand = void 0;
3
+ exports.deserializeAws_restJson1GetAutoMergingPreviewCommand = exports.deserializeAws_restJson1DeleteWorkflowCommand = exports.deserializeAws_restJson1DeleteProfileObjectTypeCommand = exports.deserializeAws_restJson1DeleteProfileObjectCommand = exports.deserializeAws_restJson1DeleteProfileKeyCommand = exports.deserializeAws_restJson1DeleteProfileCommand = exports.deserializeAws_restJson1DeleteIntegrationCommand = exports.deserializeAws_restJson1DeleteDomainCommand = exports.deserializeAws_restJson1CreateProfileCommand = exports.deserializeAws_restJson1CreateIntegrationWorkflowCommand = exports.deserializeAws_restJson1CreateDomainCommand = exports.deserializeAws_restJson1AddProfileKeyCommand = exports.serializeAws_restJson1UpdateProfileCommand = exports.serializeAws_restJson1UpdateDomainCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SearchProfilesCommand = exports.serializeAws_restJson1PutProfileObjectTypeCommand = exports.serializeAws_restJson1PutProfileObjectCommand = exports.serializeAws_restJson1PutIntegrationCommand = exports.serializeAws_restJson1MergeProfilesCommand = exports.serializeAws_restJson1ListWorkflowsCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListProfileObjectTypeTemplatesCommand = exports.serializeAws_restJson1ListProfileObjectTypesCommand = exports.serializeAws_restJson1ListProfileObjectsCommand = exports.serializeAws_restJson1ListIntegrationsCommand = exports.serializeAws_restJson1ListIdentityResolutionJobsCommand = exports.serializeAws_restJson1ListDomainsCommand = exports.serializeAws_restJson1ListAccountIntegrationsCommand = exports.serializeAws_restJson1GetWorkflowStepsCommand = exports.serializeAws_restJson1GetWorkflowCommand = exports.serializeAws_restJson1GetProfileObjectTypeTemplateCommand = exports.serializeAws_restJson1GetProfileObjectTypeCommand = exports.serializeAws_restJson1GetMatchesCommand = exports.serializeAws_restJson1GetIntegrationCommand = exports.serializeAws_restJson1GetIdentityResolutionJobCommand = exports.serializeAws_restJson1GetDomainCommand = exports.serializeAws_restJson1GetAutoMergingPreviewCommand = exports.serializeAws_restJson1DeleteWorkflowCommand = exports.serializeAws_restJson1DeleteProfileObjectTypeCommand = exports.serializeAws_restJson1DeleteProfileObjectCommand = exports.serializeAws_restJson1DeleteProfileKeyCommand = exports.serializeAws_restJson1DeleteProfileCommand = exports.serializeAws_restJson1DeleteIntegrationCommand = exports.serializeAws_restJson1DeleteDomainCommand = exports.serializeAws_restJson1CreateProfileCommand = exports.serializeAws_restJson1CreateIntegrationWorkflowCommand = exports.serializeAws_restJson1CreateDomainCommand = exports.serializeAws_restJson1AddProfileKeyCommand = void 0;
4
+ exports.deserializeAws_restJson1UpdateProfileCommand = exports.deserializeAws_restJson1UpdateDomainCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SearchProfilesCommand = exports.deserializeAws_restJson1PutProfileObjectTypeCommand = exports.deserializeAws_restJson1PutProfileObjectCommand = exports.deserializeAws_restJson1PutIntegrationCommand = exports.deserializeAws_restJson1MergeProfilesCommand = exports.deserializeAws_restJson1ListWorkflowsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListProfileObjectTypeTemplatesCommand = exports.deserializeAws_restJson1ListProfileObjectTypesCommand = exports.deserializeAws_restJson1ListProfileObjectsCommand = exports.deserializeAws_restJson1ListIntegrationsCommand = exports.deserializeAws_restJson1ListIdentityResolutionJobsCommand = exports.deserializeAws_restJson1ListDomainsCommand = exports.deserializeAws_restJson1ListAccountIntegrationsCommand = exports.deserializeAws_restJson1GetWorkflowStepsCommand = exports.deserializeAws_restJson1GetWorkflowCommand = exports.deserializeAws_restJson1GetProfileObjectTypeTemplateCommand = exports.deserializeAws_restJson1GetProfileObjectTypeCommand = exports.deserializeAws_restJson1GetMatchesCommand = exports.deserializeAws_restJson1GetIntegrationCommand = exports.deserializeAws_restJson1GetIdentityResolutionJobCommand = exports.deserializeAws_restJson1GetDomainCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const CustomerProfilesServiceException_1 = require("../models/CustomerProfilesServiceException");
8
+ const models_0_1 = require("../models/models_0");
7
9
  const serializeAws_restJson1AddProfileKeyCommand = async (input, context) => {
8
10
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
11
  const headers = {
@@ -77,6 +79,46 @@ const serializeAws_restJson1CreateDomainCommand = async (input, context) => {
77
79
  });
78
80
  };
79
81
  exports.serializeAws_restJson1CreateDomainCommand = serializeAws_restJson1CreateDomainCommand;
82
+ const serializeAws_restJson1CreateIntegrationWorkflowCommand = async (input, context) => {
83
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const headers = {
85
+ "content-type": "application/json",
86
+ };
87
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
88
+ "/domains/{DomainName}/workflows/integrations";
89
+ if (input.DomainName !== undefined) {
90
+ const labelValue = input.DomainName;
91
+ if (labelValue.length <= 0) {
92
+ throw new Error("Empty value provided for input HTTP label: DomainName.");
93
+ }
94
+ resolvedPath = resolvedPath.replace("{DomainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
95
+ }
96
+ else {
97
+ throw new Error("No value provided for input HTTP label: DomainName.");
98
+ }
99
+ let body;
100
+ body = JSON.stringify({
101
+ ...(input.IntegrationConfig !== undefined &&
102
+ input.IntegrationConfig !== null && {
103
+ IntegrationConfig: serializeAws_restJson1IntegrationConfig(input.IntegrationConfig, context),
104
+ }),
105
+ ...(input.ObjectTypeName !== undefined &&
106
+ input.ObjectTypeName !== null && { ObjectTypeName: input.ObjectTypeName }),
107
+ ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }),
108
+ ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
109
+ ...(input.WorkflowType !== undefined && input.WorkflowType !== null && { WorkflowType: input.WorkflowType }),
110
+ });
111
+ return new protocol_http_1.HttpRequest({
112
+ protocol,
113
+ hostname,
114
+ port,
115
+ method: "POST",
116
+ headers,
117
+ path: resolvedPath,
118
+ body,
119
+ });
120
+ };
121
+ exports.serializeAws_restJson1CreateIntegrationWorkflowCommand = serializeAws_restJson1CreateIntegrationWorkflowCommand;
80
122
  const serializeAws_restJson1CreateProfileCommand = async (input, context) => {
81
123
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
124
  const headers = {
@@ -341,6 +383,43 @@ const serializeAws_restJson1DeleteProfileObjectTypeCommand = async (input, conte
341
383
  });
342
384
  };
343
385
  exports.serializeAws_restJson1DeleteProfileObjectTypeCommand = serializeAws_restJson1DeleteProfileObjectTypeCommand;
386
+ const serializeAws_restJson1DeleteWorkflowCommand = async (input, context) => {
387
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
388
+ const headers = {};
389
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
390
+ "/domains/{DomainName}/workflows/{WorkflowId}";
391
+ if (input.DomainName !== undefined) {
392
+ const labelValue = input.DomainName;
393
+ if (labelValue.length <= 0) {
394
+ throw new Error("Empty value provided for input HTTP label: DomainName.");
395
+ }
396
+ resolvedPath = resolvedPath.replace("{DomainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
397
+ }
398
+ else {
399
+ throw new Error("No value provided for input HTTP label: DomainName.");
400
+ }
401
+ if (input.WorkflowId !== undefined) {
402
+ const labelValue = input.WorkflowId;
403
+ if (labelValue.length <= 0) {
404
+ throw new Error("Empty value provided for input HTTP label: WorkflowId.");
405
+ }
406
+ resolvedPath = resolvedPath.replace("{WorkflowId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
407
+ }
408
+ else {
409
+ throw new Error("No value provided for input HTTP label: WorkflowId.");
410
+ }
411
+ let body;
412
+ return new protocol_http_1.HttpRequest({
413
+ protocol,
414
+ hostname,
415
+ port,
416
+ method: "DELETE",
417
+ headers,
418
+ path: resolvedPath,
419
+ body,
420
+ });
421
+ };
422
+ exports.serializeAws_restJson1DeleteWorkflowCommand = serializeAws_restJson1DeleteWorkflowCommand;
344
423
  const serializeAws_restJson1GetAutoMergingPreviewCommand = async (input, context) => {
345
424
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
346
425
  const headers = {
@@ -568,6 +647,85 @@ const serializeAws_restJson1GetProfileObjectTypeTemplateCommand = async (input,
568
647
  });
569
648
  };
570
649
  exports.serializeAws_restJson1GetProfileObjectTypeTemplateCommand = serializeAws_restJson1GetProfileObjectTypeTemplateCommand;
650
+ const serializeAws_restJson1GetWorkflowCommand = async (input, context) => {
651
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
652
+ const headers = {};
653
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
654
+ "/domains/{DomainName}/workflows/{WorkflowId}";
655
+ if (input.DomainName !== undefined) {
656
+ const labelValue = input.DomainName;
657
+ if (labelValue.length <= 0) {
658
+ throw new Error("Empty value provided for input HTTP label: DomainName.");
659
+ }
660
+ resolvedPath = resolvedPath.replace("{DomainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
661
+ }
662
+ else {
663
+ throw new Error("No value provided for input HTTP label: DomainName.");
664
+ }
665
+ if (input.WorkflowId !== undefined) {
666
+ const labelValue = input.WorkflowId;
667
+ if (labelValue.length <= 0) {
668
+ throw new Error("Empty value provided for input HTTP label: WorkflowId.");
669
+ }
670
+ resolvedPath = resolvedPath.replace("{WorkflowId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
671
+ }
672
+ else {
673
+ throw new Error("No value provided for input HTTP label: WorkflowId.");
674
+ }
675
+ let body;
676
+ return new protocol_http_1.HttpRequest({
677
+ protocol,
678
+ hostname,
679
+ port,
680
+ method: "GET",
681
+ headers,
682
+ path: resolvedPath,
683
+ body,
684
+ });
685
+ };
686
+ exports.serializeAws_restJson1GetWorkflowCommand = serializeAws_restJson1GetWorkflowCommand;
687
+ const serializeAws_restJson1GetWorkflowStepsCommand = async (input, context) => {
688
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
689
+ const headers = {};
690
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
691
+ "/domains/{DomainName}/workflows/{WorkflowId}/steps";
692
+ if (input.DomainName !== undefined) {
693
+ const labelValue = input.DomainName;
694
+ if (labelValue.length <= 0) {
695
+ throw new Error("Empty value provided for input HTTP label: DomainName.");
696
+ }
697
+ resolvedPath = resolvedPath.replace("{DomainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
698
+ }
699
+ else {
700
+ throw new Error("No value provided for input HTTP label: DomainName.");
701
+ }
702
+ if (input.WorkflowId !== undefined) {
703
+ const labelValue = input.WorkflowId;
704
+ if (labelValue.length <= 0) {
705
+ throw new Error("Empty value provided for input HTTP label: WorkflowId.");
706
+ }
707
+ resolvedPath = resolvedPath.replace("{WorkflowId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
708
+ }
709
+ else {
710
+ throw new Error("No value provided for input HTTP label: WorkflowId.");
711
+ }
712
+ const query = {
713
+ ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
714
+ ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
715
+ };
716
+ let body;
717
+ return new protocol_http_1.HttpRequest({
718
+ protocol,
719
+ hostname,
720
+ port,
721
+ method: "GET",
722
+ headers,
723
+ path: resolvedPath,
724
+ query,
725
+ body,
726
+ });
727
+ };
728
+ exports.serializeAws_restJson1GetWorkflowStepsCommand = serializeAws_restJson1GetWorkflowStepsCommand;
571
729
  const serializeAws_restJson1ListAccountIntegrationsCommand = async (input, context) => {
572
730
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
573
731
  const headers = {
@@ -577,6 +735,7 @@ const serializeAws_restJson1ListAccountIntegrationsCommand = async (input, conte
577
735
  const query = {
578
736
  ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
579
737
  ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
738
+ ...(input.IncludeHidden !== undefined && { "include-hidden": input.IncludeHidden.toString() }),
580
739
  };
581
740
  let body;
582
741
  body = JSON.stringify({
@@ -664,6 +823,7 @@ const serializeAws_restJson1ListIntegrationsCommand = async (input, context) =>
664
823
  const query = {
665
824
  ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
666
825
  ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
826
+ ...(input.IncludeHidden !== undefined && { "include-hidden": input.IncludeHidden.toString() }),
667
827
  };
668
828
  let body;
669
829
  return new protocol_http_1.HttpRequest({
@@ -796,6 +956,47 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
796
956
  });
797
957
  };
798
958
  exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
959
+ const serializeAws_restJson1ListWorkflowsCommand = async (input, context) => {
960
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
961
+ const headers = {
962
+ "content-type": "application/json",
963
+ };
964
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/workflows";
965
+ if (input.DomainName !== undefined) {
966
+ const labelValue = input.DomainName;
967
+ if (labelValue.length <= 0) {
968
+ throw new Error("Empty value provided for input HTTP label: DomainName.");
969
+ }
970
+ resolvedPath = resolvedPath.replace("{DomainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
971
+ }
972
+ else {
973
+ throw new Error("No value provided for input HTTP label: DomainName.");
974
+ }
975
+ const query = {
976
+ ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
977
+ ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
978
+ };
979
+ let body;
980
+ body = JSON.stringify({
981
+ ...(input.QueryEndDate !== undefined &&
982
+ input.QueryEndDate !== null && { QueryEndDate: Math.round(input.QueryEndDate.getTime() / 1000) }),
983
+ ...(input.QueryStartDate !== undefined &&
984
+ input.QueryStartDate !== null && { QueryStartDate: Math.round(input.QueryStartDate.getTime() / 1000) }),
985
+ ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
986
+ ...(input.WorkflowType !== undefined && input.WorkflowType !== null && { WorkflowType: input.WorkflowType }),
987
+ });
988
+ return new protocol_http_1.HttpRequest({
989
+ protocol,
990
+ hostname,
991
+ port,
992
+ method: "POST",
993
+ headers,
994
+ path: resolvedPath,
995
+ query,
996
+ body,
997
+ });
998
+ };
999
+ exports.serializeAws_restJson1ListWorkflowsCommand = serializeAws_restJson1ListWorkflowsCommand;
799
1000
  const serializeAws_restJson1MergeProfilesCommand = async (input, context) => {
800
1001
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
801
1002
  const headers = {
@@ -1204,59 +1405,28 @@ const deserializeAws_restJson1AddProfileKeyCommandError = async (output, context
1204
1405
  switch (errorCode) {
1205
1406
  case "AccessDeniedException":
1206
1407
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1207
- response = {
1208
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1209
- name: errorCode,
1210
- $metadata: deserializeMetadata(output),
1211
- };
1212
- break;
1408
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1213
1409
  case "BadRequestException":
1214
1410
  case "com.amazonaws.customerprofiles#BadRequestException":
1215
- response = {
1216
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1217
- name: errorCode,
1218
- $metadata: deserializeMetadata(output),
1219
- };
1220
- break;
1411
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1221
1412
  case "InternalServerException":
1222
1413
  case "com.amazonaws.customerprofiles#InternalServerException":
1223
- response = {
1224
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1225
- name: errorCode,
1226
- $metadata: deserializeMetadata(output),
1227
- };
1228
- break;
1414
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1229
1415
  case "ResourceNotFoundException":
1230
1416
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1231
- response = {
1232
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1233
- name: errorCode,
1234
- $metadata: deserializeMetadata(output),
1235
- };
1236
- break;
1417
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1237
1418
  case "ThrottlingException":
1238
1419
  case "com.amazonaws.customerprofiles#ThrottlingException":
1239
- response = {
1240
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1241
- name: errorCode,
1242
- $metadata: deserializeMetadata(output),
1243
- };
1244
- break;
1420
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1245
1421
  default:
1246
1422
  const parsedBody = parsedOutput.body;
1247
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1248
- response = {
1249
- ...parsedBody,
1250
- name: `${errorCode}`,
1251
- message: parsedBody.message || parsedBody.Message || errorCode,
1423
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1424
+ name: parsedBody.code || parsedBody.Code || errorCode,
1252
1425
  $fault: "client",
1253
1426
  $metadata: deserializeMetadata(output),
1254
- };
1427
+ });
1428
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1255
1429
  }
1256
- const message = response.message || response.Message || errorCode;
1257
- response.message = message;
1258
- delete response.Message;
1259
- return Promise.reject(Object.assign(new Error(message), response));
1260
1430
  };
1261
1431
  const deserializeAws_restJson1CreateDomainCommand = async (output, context) => {
1262
1432
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1312,59 +1482,81 @@ const deserializeAws_restJson1CreateDomainCommandError = async (output, context)
1312
1482
  switch (errorCode) {
1313
1483
  case "AccessDeniedException":
1314
1484
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1315
- response = {
1316
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1317
- name: errorCode,
1318
- $metadata: deserializeMetadata(output),
1319
- };
1320
- break;
1485
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1321
1486
  case "BadRequestException":
1322
1487
  case "com.amazonaws.customerprofiles#BadRequestException":
1323
- response = {
1324
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1325
- name: errorCode,
1326
- $metadata: deserializeMetadata(output),
1327
- };
1328
- break;
1488
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1329
1489
  case "InternalServerException":
1330
1490
  case "com.amazonaws.customerprofiles#InternalServerException":
1331
- response = {
1332
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1333
- name: errorCode,
1334
- $metadata: deserializeMetadata(output),
1335
- };
1336
- break;
1491
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1337
1492
  case "ResourceNotFoundException":
1338
1493
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1339
- response = {
1340
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1341
- name: errorCode,
1342
- $metadata: deserializeMetadata(output),
1343
- };
1344
- break;
1494
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1345
1495
  case "ThrottlingException":
1346
1496
  case "com.amazonaws.customerprofiles#ThrottlingException":
1347
- response = {
1348
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1349
- name: errorCode,
1497
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1498
+ default:
1499
+ const parsedBody = parsedOutput.body;
1500
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1501
+ name: parsedBody.code || parsedBody.Code || errorCode,
1502
+ $fault: "client",
1350
1503
  $metadata: deserializeMetadata(output),
1351
- };
1352
- break;
1504
+ });
1505
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1506
+ }
1507
+ };
1508
+ const deserializeAws_restJson1CreateIntegrationWorkflowCommand = async (output, context) => {
1509
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1510
+ return deserializeAws_restJson1CreateIntegrationWorkflowCommandError(output, context);
1511
+ }
1512
+ const contents = {
1513
+ $metadata: deserializeMetadata(output),
1514
+ Message: undefined,
1515
+ WorkflowId: undefined,
1516
+ };
1517
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1518
+ if (data.Message !== undefined && data.Message !== null) {
1519
+ contents.Message = smithy_client_1.expectString(data.Message);
1520
+ }
1521
+ if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
1522
+ contents.WorkflowId = smithy_client_1.expectString(data.WorkflowId);
1523
+ }
1524
+ return Promise.resolve(contents);
1525
+ };
1526
+ exports.deserializeAws_restJson1CreateIntegrationWorkflowCommand = deserializeAws_restJson1CreateIntegrationWorkflowCommand;
1527
+ const deserializeAws_restJson1CreateIntegrationWorkflowCommandError = async (output, context) => {
1528
+ const parsedOutput = {
1529
+ ...output,
1530
+ body: await parseBody(output.body, context),
1531
+ };
1532
+ let response;
1533
+ let errorCode = "UnknownError";
1534
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1535
+ switch (errorCode) {
1536
+ case "AccessDeniedException":
1537
+ case "com.amazonaws.customerprofiles#AccessDeniedException":
1538
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1539
+ case "BadRequestException":
1540
+ case "com.amazonaws.customerprofiles#BadRequestException":
1541
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1542
+ case "InternalServerException":
1543
+ case "com.amazonaws.customerprofiles#InternalServerException":
1544
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1545
+ case "ResourceNotFoundException":
1546
+ case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1547
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1548
+ case "ThrottlingException":
1549
+ case "com.amazonaws.customerprofiles#ThrottlingException":
1550
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1353
1551
  default:
1354
1552
  const parsedBody = parsedOutput.body;
1355
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1356
- response = {
1357
- ...parsedBody,
1358
- name: `${errorCode}`,
1359
- message: parsedBody.message || parsedBody.Message || errorCode,
1553
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1554
+ name: parsedBody.code || parsedBody.Code || errorCode,
1360
1555
  $fault: "client",
1361
1556
  $metadata: deserializeMetadata(output),
1362
- };
1557
+ });
1558
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1363
1559
  }
1364
- const message = response.message || response.Message || errorCode;
1365
- response.message = message;
1366
- delete response.Message;
1367
- return Promise.reject(Object.assign(new Error(message), response));
1368
1560
  };
1369
1561
  const deserializeAws_restJson1CreateProfileCommand = async (output, context) => {
1370
1562
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1392,59 +1584,28 @@ const deserializeAws_restJson1CreateProfileCommandError = async (output, context
1392
1584
  switch (errorCode) {
1393
1585
  case "AccessDeniedException":
1394
1586
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1395
- response = {
1396
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1397
- name: errorCode,
1398
- $metadata: deserializeMetadata(output),
1399
- };
1400
- break;
1587
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1401
1588
  case "BadRequestException":
1402
1589
  case "com.amazonaws.customerprofiles#BadRequestException":
1403
- response = {
1404
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1405
- name: errorCode,
1406
- $metadata: deserializeMetadata(output),
1407
- };
1408
- break;
1590
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1409
1591
  case "InternalServerException":
1410
1592
  case "com.amazonaws.customerprofiles#InternalServerException":
1411
- response = {
1412
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1413
- name: errorCode,
1414
- $metadata: deserializeMetadata(output),
1415
- };
1416
- break;
1593
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1417
1594
  case "ResourceNotFoundException":
1418
1595
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1419
- response = {
1420
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1421
- name: errorCode,
1422
- $metadata: deserializeMetadata(output),
1423
- };
1424
- break;
1596
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1425
1597
  case "ThrottlingException":
1426
1598
  case "com.amazonaws.customerprofiles#ThrottlingException":
1427
- response = {
1428
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1429
- name: errorCode,
1430
- $metadata: deserializeMetadata(output),
1431
- };
1432
- break;
1599
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1433
1600
  default:
1434
1601
  const parsedBody = parsedOutput.body;
1435
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1436
- response = {
1437
- ...parsedBody,
1438
- name: `${errorCode}`,
1439
- message: parsedBody.message || parsedBody.Message || errorCode,
1602
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1603
+ name: parsedBody.code || parsedBody.Code || errorCode,
1440
1604
  $fault: "client",
1441
1605
  $metadata: deserializeMetadata(output),
1442
- };
1606
+ });
1607
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1443
1608
  }
1444
- const message = response.message || response.Message || errorCode;
1445
- response.message = message;
1446
- delete response.Message;
1447
- return Promise.reject(Object.assign(new Error(message), response));
1448
1609
  };
1449
1610
  const deserializeAws_restJson1DeleteDomainCommand = async (output, context) => {
1450
1611
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1472,59 +1633,28 @@ const deserializeAws_restJson1DeleteDomainCommandError = async (output, context)
1472
1633
  switch (errorCode) {
1473
1634
  case "AccessDeniedException":
1474
1635
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1475
- response = {
1476
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1477
- name: errorCode,
1478
- $metadata: deserializeMetadata(output),
1479
- };
1480
- break;
1636
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1481
1637
  case "BadRequestException":
1482
1638
  case "com.amazonaws.customerprofiles#BadRequestException":
1483
- response = {
1484
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1485
- name: errorCode,
1486
- $metadata: deserializeMetadata(output),
1487
- };
1488
- break;
1639
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1489
1640
  case "InternalServerException":
1490
1641
  case "com.amazonaws.customerprofiles#InternalServerException":
1491
- response = {
1492
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1493
- name: errorCode,
1494
- $metadata: deserializeMetadata(output),
1495
- };
1496
- break;
1642
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1497
1643
  case "ResourceNotFoundException":
1498
1644
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1499
- response = {
1500
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1501
- name: errorCode,
1502
- $metadata: deserializeMetadata(output),
1503
- };
1504
- break;
1645
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1505
1646
  case "ThrottlingException":
1506
1647
  case "com.amazonaws.customerprofiles#ThrottlingException":
1507
- response = {
1508
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1509
- name: errorCode,
1510
- $metadata: deserializeMetadata(output),
1511
- };
1512
- break;
1648
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1513
1649
  default:
1514
1650
  const parsedBody = parsedOutput.body;
1515
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1516
- response = {
1517
- ...parsedBody,
1518
- name: `${errorCode}`,
1519
- message: parsedBody.message || parsedBody.Message || errorCode,
1651
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1652
+ name: parsedBody.code || parsedBody.Code || errorCode,
1520
1653
  $fault: "client",
1521
1654
  $metadata: deserializeMetadata(output),
1522
- };
1655
+ });
1656
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1523
1657
  }
1524
- const message = response.message || response.Message || errorCode;
1525
- response.message = message;
1526
- delete response.Message;
1527
- return Promise.reject(Object.assign(new Error(message), response));
1528
1658
  };
1529
1659
  const deserializeAws_restJson1DeleteIntegrationCommand = async (output, context) => {
1530
1660
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1552,59 +1682,28 @@ const deserializeAws_restJson1DeleteIntegrationCommandError = async (output, con
1552
1682
  switch (errorCode) {
1553
1683
  case "AccessDeniedException":
1554
1684
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1555
- response = {
1556
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1557
- name: errorCode,
1558
- $metadata: deserializeMetadata(output),
1559
- };
1560
- break;
1685
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1561
1686
  case "BadRequestException":
1562
1687
  case "com.amazonaws.customerprofiles#BadRequestException":
1563
- response = {
1564
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1565
- name: errorCode,
1566
- $metadata: deserializeMetadata(output),
1567
- };
1568
- break;
1688
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1569
1689
  case "InternalServerException":
1570
1690
  case "com.amazonaws.customerprofiles#InternalServerException":
1571
- response = {
1572
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1573
- name: errorCode,
1574
- $metadata: deserializeMetadata(output),
1575
- };
1576
- break;
1691
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1577
1692
  case "ResourceNotFoundException":
1578
1693
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1579
- response = {
1580
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1581
- name: errorCode,
1582
- $metadata: deserializeMetadata(output),
1583
- };
1584
- break;
1694
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1585
1695
  case "ThrottlingException":
1586
1696
  case "com.amazonaws.customerprofiles#ThrottlingException":
1587
- response = {
1588
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1589
- name: errorCode,
1590
- $metadata: deserializeMetadata(output),
1591
- };
1592
- break;
1697
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1593
1698
  default:
1594
1699
  const parsedBody = parsedOutput.body;
1595
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1596
- response = {
1597
- ...parsedBody,
1598
- name: `${errorCode}`,
1599
- message: parsedBody.message || parsedBody.Message || errorCode,
1700
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1701
+ name: parsedBody.code || parsedBody.Code || errorCode,
1600
1702
  $fault: "client",
1601
1703
  $metadata: deserializeMetadata(output),
1602
- };
1704
+ });
1705
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1603
1706
  }
1604
- const message = response.message || response.Message || errorCode;
1605
- response.message = message;
1606
- delete response.Message;
1607
- return Promise.reject(Object.assign(new Error(message), response));
1608
1707
  };
1609
1708
  const deserializeAws_restJson1DeleteProfileCommand = async (output, context) => {
1610
1709
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1632,59 +1731,28 @@ const deserializeAws_restJson1DeleteProfileCommandError = async (output, context
1632
1731
  switch (errorCode) {
1633
1732
  case "AccessDeniedException":
1634
1733
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1635
- response = {
1636
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1637
- name: errorCode,
1638
- $metadata: deserializeMetadata(output),
1639
- };
1640
- break;
1734
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1641
1735
  case "BadRequestException":
1642
1736
  case "com.amazonaws.customerprofiles#BadRequestException":
1643
- response = {
1644
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1645
- name: errorCode,
1646
- $metadata: deserializeMetadata(output),
1647
- };
1648
- break;
1737
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1649
1738
  case "InternalServerException":
1650
1739
  case "com.amazonaws.customerprofiles#InternalServerException":
1651
- response = {
1652
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1653
- name: errorCode,
1654
- $metadata: deserializeMetadata(output),
1655
- };
1656
- break;
1740
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1657
1741
  case "ResourceNotFoundException":
1658
1742
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1659
- response = {
1660
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1661
- name: errorCode,
1662
- $metadata: deserializeMetadata(output),
1663
- };
1664
- break;
1743
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1665
1744
  case "ThrottlingException":
1666
1745
  case "com.amazonaws.customerprofiles#ThrottlingException":
1667
- response = {
1668
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1669
- name: errorCode,
1670
- $metadata: deserializeMetadata(output),
1671
- };
1672
- break;
1746
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1673
1747
  default:
1674
1748
  const parsedBody = parsedOutput.body;
1675
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1676
- response = {
1677
- ...parsedBody,
1678
- name: `${errorCode}`,
1679
- message: parsedBody.message || parsedBody.Message || errorCode,
1749
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1750
+ name: parsedBody.code || parsedBody.Code || errorCode,
1680
1751
  $fault: "client",
1681
1752
  $metadata: deserializeMetadata(output),
1682
- };
1753
+ });
1754
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1683
1755
  }
1684
- const message = response.message || response.Message || errorCode;
1685
- response.message = message;
1686
- delete response.Message;
1687
- return Promise.reject(Object.assign(new Error(message), response));
1688
1756
  };
1689
1757
  const deserializeAws_restJson1DeleteProfileKeyCommand = async (output, context) => {
1690
1758
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1712,59 +1780,28 @@ const deserializeAws_restJson1DeleteProfileKeyCommandError = async (output, cont
1712
1780
  switch (errorCode) {
1713
1781
  case "AccessDeniedException":
1714
1782
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1715
- response = {
1716
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1717
- name: errorCode,
1718
- $metadata: deserializeMetadata(output),
1719
- };
1720
- break;
1783
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1721
1784
  case "BadRequestException":
1722
1785
  case "com.amazonaws.customerprofiles#BadRequestException":
1723
- response = {
1724
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1725
- name: errorCode,
1726
- $metadata: deserializeMetadata(output),
1727
- };
1728
- break;
1786
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1729
1787
  case "InternalServerException":
1730
1788
  case "com.amazonaws.customerprofiles#InternalServerException":
1731
- response = {
1732
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1733
- name: errorCode,
1734
- $metadata: deserializeMetadata(output),
1735
- };
1736
- break;
1789
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1737
1790
  case "ResourceNotFoundException":
1738
1791
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1739
- response = {
1740
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1741
- name: errorCode,
1742
- $metadata: deserializeMetadata(output),
1743
- };
1744
- break;
1792
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1745
1793
  case "ThrottlingException":
1746
1794
  case "com.amazonaws.customerprofiles#ThrottlingException":
1747
- response = {
1748
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1749
- name: errorCode,
1750
- $metadata: deserializeMetadata(output),
1751
- };
1752
- break;
1795
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1753
1796
  default:
1754
1797
  const parsedBody = parsedOutput.body;
1755
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1756
- response = {
1757
- ...parsedBody,
1758
- name: `${errorCode}`,
1759
- message: parsedBody.message || parsedBody.Message || errorCode,
1798
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1799
+ name: parsedBody.code || parsedBody.Code || errorCode,
1760
1800
  $fault: "client",
1761
1801
  $metadata: deserializeMetadata(output),
1762
- };
1802
+ });
1803
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1763
1804
  }
1764
- const message = response.message || response.Message || errorCode;
1765
- response.message = message;
1766
- delete response.Message;
1767
- return Promise.reject(Object.assign(new Error(message), response));
1768
1805
  };
1769
1806
  const deserializeAws_restJson1DeleteProfileObjectCommand = async (output, context) => {
1770
1807
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1792,59 +1829,28 @@ const deserializeAws_restJson1DeleteProfileObjectCommandError = async (output, c
1792
1829
  switch (errorCode) {
1793
1830
  case "AccessDeniedException":
1794
1831
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1795
- response = {
1796
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1797
- name: errorCode,
1798
- $metadata: deserializeMetadata(output),
1799
- };
1800
- break;
1832
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1801
1833
  case "BadRequestException":
1802
1834
  case "com.amazonaws.customerprofiles#BadRequestException":
1803
- response = {
1804
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1805
- name: errorCode,
1806
- $metadata: deserializeMetadata(output),
1807
- };
1808
- break;
1835
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1809
1836
  case "InternalServerException":
1810
1837
  case "com.amazonaws.customerprofiles#InternalServerException":
1811
- response = {
1812
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1813
- name: errorCode,
1814
- $metadata: deserializeMetadata(output),
1815
- };
1816
- break;
1838
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1817
1839
  case "ResourceNotFoundException":
1818
1840
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1819
- response = {
1820
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1821
- name: errorCode,
1822
- $metadata: deserializeMetadata(output),
1823
- };
1824
- break;
1841
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1825
1842
  case "ThrottlingException":
1826
1843
  case "com.amazonaws.customerprofiles#ThrottlingException":
1827
- response = {
1828
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1829
- name: errorCode,
1830
- $metadata: deserializeMetadata(output),
1831
- };
1832
- break;
1844
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1833
1845
  default:
1834
1846
  const parsedBody = parsedOutput.body;
1835
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1836
- response = {
1837
- ...parsedBody,
1838
- name: `${errorCode}`,
1839
- message: parsedBody.message || parsedBody.Message || errorCode,
1847
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1848
+ name: parsedBody.code || parsedBody.Code || errorCode,
1840
1849
  $fault: "client",
1841
1850
  $metadata: deserializeMetadata(output),
1842
- };
1851
+ });
1852
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1843
1853
  }
1844
- const message = response.message || response.Message || errorCode;
1845
- response.message = message;
1846
- delete response.Message;
1847
- return Promise.reject(Object.assign(new Error(message), response));
1848
1854
  };
1849
1855
  const deserializeAws_restJson1DeleteProfileObjectTypeCommand = async (output, context) => {
1850
1856
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1872,59 +1878,73 @@ const deserializeAws_restJson1DeleteProfileObjectTypeCommandError = async (outpu
1872
1878
  switch (errorCode) {
1873
1879
  case "AccessDeniedException":
1874
1880
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1875
- response = {
1876
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1877
- name: errorCode,
1878
- $metadata: deserializeMetadata(output),
1879
- };
1880
- break;
1881
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1881
1882
  case "BadRequestException":
1882
1883
  case "com.amazonaws.customerprofiles#BadRequestException":
1883
- response = {
1884
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1885
- name: errorCode,
1886
- $metadata: deserializeMetadata(output),
1887
- };
1888
- break;
1884
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1889
1885
  case "InternalServerException":
1890
1886
  case "com.amazonaws.customerprofiles#InternalServerException":
1891
- response = {
1892
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1893
- name: errorCode,
1894
- $metadata: deserializeMetadata(output),
1895
- };
1896
- break;
1887
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1897
1888
  case "ResourceNotFoundException":
1898
1889
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1899
- response = {
1900
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1901
- name: errorCode,
1902
- $metadata: deserializeMetadata(output),
1903
- };
1904
- break;
1890
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1905
1891
  case "ThrottlingException":
1906
1892
  case "com.amazonaws.customerprofiles#ThrottlingException":
1907
- response = {
1908
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1909
- name: errorCode,
1893
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1894
+ default:
1895
+ const parsedBody = parsedOutput.body;
1896
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1897
+ name: parsedBody.code || parsedBody.Code || errorCode,
1898
+ $fault: "client",
1910
1899
  $metadata: deserializeMetadata(output),
1911
- };
1912
- break;
1900
+ });
1901
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1902
+ }
1903
+ };
1904
+ const deserializeAws_restJson1DeleteWorkflowCommand = async (output, context) => {
1905
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1906
+ return deserializeAws_restJson1DeleteWorkflowCommandError(output, context);
1907
+ }
1908
+ const contents = {
1909
+ $metadata: deserializeMetadata(output),
1910
+ };
1911
+ await collectBody(output.body, context);
1912
+ return Promise.resolve(contents);
1913
+ };
1914
+ exports.deserializeAws_restJson1DeleteWorkflowCommand = deserializeAws_restJson1DeleteWorkflowCommand;
1915
+ const deserializeAws_restJson1DeleteWorkflowCommandError = async (output, context) => {
1916
+ const parsedOutput = {
1917
+ ...output,
1918
+ body: await parseBody(output.body, context),
1919
+ };
1920
+ let response;
1921
+ let errorCode = "UnknownError";
1922
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1923
+ switch (errorCode) {
1924
+ case "AccessDeniedException":
1925
+ case "com.amazonaws.customerprofiles#AccessDeniedException":
1926
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1927
+ case "BadRequestException":
1928
+ case "com.amazonaws.customerprofiles#BadRequestException":
1929
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1930
+ case "InternalServerException":
1931
+ case "com.amazonaws.customerprofiles#InternalServerException":
1932
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1933
+ case "ResourceNotFoundException":
1934
+ case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1935
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1936
+ case "ThrottlingException":
1937
+ case "com.amazonaws.customerprofiles#ThrottlingException":
1938
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1913
1939
  default:
1914
1940
  const parsedBody = parsedOutput.body;
1915
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1916
- response = {
1917
- ...parsedBody,
1918
- name: `${errorCode}`,
1919
- message: parsedBody.message || parsedBody.Message || errorCode,
1941
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
1942
+ name: parsedBody.code || parsedBody.Code || errorCode,
1920
1943
  $fault: "client",
1921
1944
  $metadata: deserializeMetadata(output),
1922
- };
1945
+ });
1946
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1923
1947
  }
1924
- const message = response.message || response.Message || errorCode;
1925
- response.message = message;
1926
- delete response.Message;
1927
- return Promise.reject(Object.assign(new Error(message), response));
1928
1948
  };
1929
1949
  const deserializeAws_restJson1GetAutoMergingPreviewCommand = async (output, context) => {
1930
1950
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1964,59 +1984,28 @@ const deserializeAws_restJson1GetAutoMergingPreviewCommandError = async (output,
1964
1984
  switch (errorCode) {
1965
1985
  case "AccessDeniedException":
1966
1986
  case "com.amazonaws.customerprofiles#AccessDeniedException":
1967
- response = {
1968
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1969
- name: errorCode,
1970
- $metadata: deserializeMetadata(output),
1971
- };
1972
- break;
1987
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1973
1988
  case "BadRequestException":
1974
1989
  case "com.amazonaws.customerprofiles#BadRequestException":
1975
- response = {
1976
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1977
- name: errorCode,
1978
- $metadata: deserializeMetadata(output),
1979
- };
1980
- break;
1990
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1981
1991
  case "InternalServerException":
1982
1992
  case "com.amazonaws.customerprofiles#InternalServerException":
1983
- response = {
1984
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1985
- name: errorCode,
1986
- $metadata: deserializeMetadata(output),
1987
- };
1988
- break;
1993
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1989
1994
  case "ResourceNotFoundException":
1990
1995
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
1991
- response = {
1992
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1993
- name: errorCode,
1994
- $metadata: deserializeMetadata(output),
1995
- };
1996
- break;
1996
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1997
1997
  case "ThrottlingException":
1998
1998
  case "com.amazonaws.customerprofiles#ThrottlingException":
1999
- response = {
2000
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2001
- name: errorCode,
2002
- $metadata: deserializeMetadata(output),
2003
- };
2004
- break;
1999
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2005
2000
  default:
2006
2001
  const parsedBody = parsedOutput.body;
2007
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2008
- response = {
2009
- ...parsedBody,
2010
- name: `${errorCode}`,
2011
- message: parsedBody.message || parsedBody.Message || errorCode,
2002
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2003
+ name: parsedBody.code || parsedBody.Code || errorCode,
2012
2004
  $fault: "client",
2013
2005
  $metadata: deserializeMetadata(output),
2014
- };
2006
+ });
2007
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2015
2008
  }
2016
- const message = response.message || response.Message || errorCode;
2017
- response.message = message;
2018
- delete response.Message;
2019
- return Promise.reject(Object.assign(new Error(message), response));
2020
2009
  };
2021
2010
  const deserializeAws_restJson1GetDomainCommand = async (output, context) => {
2022
2011
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2076,59 +2065,28 @@ const deserializeAws_restJson1GetDomainCommandError = async (output, context) =>
2076
2065
  switch (errorCode) {
2077
2066
  case "AccessDeniedException":
2078
2067
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2079
- response = {
2080
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2081
- name: errorCode,
2082
- $metadata: deserializeMetadata(output),
2083
- };
2084
- break;
2068
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2085
2069
  case "BadRequestException":
2086
2070
  case "com.amazonaws.customerprofiles#BadRequestException":
2087
- response = {
2088
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2089
- name: errorCode,
2090
- $metadata: deserializeMetadata(output),
2091
- };
2092
- break;
2071
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2093
2072
  case "InternalServerException":
2094
2073
  case "com.amazonaws.customerprofiles#InternalServerException":
2095
- response = {
2096
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2097
- name: errorCode,
2098
- $metadata: deserializeMetadata(output),
2099
- };
2100
- break;
2074
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2101
2075
  case "ResourceNotFoundException":
2102
2076
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2103
- response = {
2104
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2105
- name: errorCode,
2106
- $metadata: deserializeMetadata(output),
2107
- };
2108
- break;
2077
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2109
2078
  case "ThrottlingException":
2110
2079
  case "com.amazonaws.customerprofiles#ThrottlingException":
2111
- response = {
2112
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2113
- name: errorCode,
2114
- $metadata: deserializeMetadata(output),
2115
- };
2116
- break;
2080
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2117
2081
  default:
2118
2082
  const parsedBody = parsedOutput.body;
2119
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2120
- response = {
2121
- ...parsedBody,
2122
- name: `${errorCode}`,
2123
- message: parsedBody.message || parsedBody.Message || errorCode,
2083
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2084
+ name: parsedBody.code || parsedBody.Code || errorCode,
2124
2085
  $fault: "client",
2125
2086
  $metadata: deserializeMetadata(output),
2126
- };
2087
+ });
2088
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2127
2089
  }
2128
- const message = response.message || response.Message || errorCode;
2129
- response.message = message;
2130
- delete response.Message;
2131
- return Promise.reject(Object.assign(new Error(message), response));
2132
2090
  };
2133
2091
  const deserializeAws_restJson1GetIdentityResolutionJobCommand = async (output, context) => {
2134
2092
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2196,59 +2154,28 @@ const deserializeAws_restJson1GetIdentityResolutionJobCommandError = async (outp
2196
2154
  switch (errorCode) {
2197
2155
  case "AccessDeniedException":
2198
2156
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2199
- response = {
2200
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2201
- name: errorCode,
2202
- $metadata: deserializeMetadata(output),
2203
- };
2204
- break;
2157
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2205
2158
  case "BadRequestException":
2206
2159
  case "com.amazonaws.customerprofiles#BadRequestException":
2207
- response = {
2208
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2209
- name: errorCode,
2210
- $metadata: deserializeMetadata(output),
2211
- };
2212
- break;
2160
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2213
2161
  case "InternalServerException":
2214
2162
  case "com.amazonaws.customerprofiles#InternalServerException":
2215
- response = {
2216
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2217
- name: errorCode,
2218
- $metadata: deserializeMetadata(output),
2219
- };
2220
- break;
2163
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2221
2164
  case "ResourceNotFoundException":
2222
2165
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2223
- response = {
2224
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2225
- name: errorCode,
2226
- $metadata: deserializeMetadata(output),
2227
- };
2228
- break;
2166
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2229
2167
  case "ThrottlingException":
2230
2168
  case "com.amazonaws.customerprofiles#ThrottlingException":
2231
- response = {
2232
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2233
- name: errorCode,
2234
- $metadata: deserializeMetadata(output),
2235
- };
2236
- break;
2169
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2237
2170
  default:
2238
2171
  const parsedBody = parsedOutput.body;
2239
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2240
- response = {
2241
- ...parsedBody,
2242
- name: `${errorCode}`,
2243
- message: parsedBody.message || parsedBody.Message || errorCode,
2172
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2173
+ name: parsedBody.code || parsedBody.Code || errorCode,
2244
2174
  $fault: "client",
2245
2175
  $metadata: deserializeMetadata(output),
2246
- };
2176
+ });
2177
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2247
2178
  }
2248
- const message = response.message || response.Message || errorCode;
2249
- response.message = message;
2250
- delete response.Message;
2251
- return Promise.reject(Object.assign(new Error(message), response));
2252
2179
  };
2253
2180
  const deserializeAws_restJson1GetIntegrationCommand = async (output, context) => {
2254
2181
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2263,6 +2190,7 @@ const deserializeAws_restJson1GetIntegrationCommand = async (output, context) =>
2263
2190
  ObjectTypeNames: undefined,
2264
2191
  Tags: undefined,
2265
2192
  Uri: undefined,
2193
+ WorkflowId: undefined,
2266
2194
  };
2267
2195
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2268
2196
  if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
@@ -2286,6 +2214,9 @@ const deserializeAws_restJson1GetIntegrationCommand = async (output, context) =>
2286
2214
  if (data.Uri !== undefined && data.Uri !== null) {
2287
2215
  contents.Uri = smithy_client_1.expectString(data.Uri);
2288
2216
  }
2217
+ if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
2218
+ contents.WorkflowId = smithy_client_1.expectString(data.WorkflowId);
2219
+ }
2289
2220
  return Promise.resolve(contents);
2290
2221
  };
2291
2222
  exports.deserializeAws_restJson1GetIntegrationCommand = deserializeAws_restJson1GetIntegrationCommand;
@@ -2300,59 +2231,28 @@ const deserializeAws_restJson1GetIntegrationCommandError = async (output, contex
2300
2231
  switch (errorCode) {
2301
2232
  case "AccessDeniedException":
2302
2233
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2303
- response = {
2304
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2305
- name: errorCode,
2306
- $metadata: deserializeMetadata(output),
2307
- };
2308
- break;
2234
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2309
2235
  case "BadRequestException":
2310
2236
  case "com.amazonaws.customerprofiles#BadRequestException":
2311
- response = {
2312
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2313
- name: errorCode,
2314
- $metadata: deserializeMetadata(output),
2315
- };
2316
- break;
2237
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2317
2238
  case "InternalServerException":
2318
2239
  case "com.amazonaws.customerprofiles#InternalServerException":
2319
- response = {
2320
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2321
- name: errorCode,
2322
- $metadata: deserializeMetadata(output),
2323
- };
2324
- break;
2240
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2325
2241
  case "ResourceNotFoundException":
2326
2242
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2327
- response = {
2328
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2329
- name: errorCode,
2330
- $metadata: deserializeMetadata(output),
2331
- };
2332
- break;
2243
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2333
2244
  case "ThrottlingException":
2334
2245
  case "com.amazonaws.customerprofiles#ThrottlingException":
2335
- response = {
2336
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2337
- name: errorCode,
2338
- $metadata: deserializeMetadata(output),
2339
- };
2340
- break;
2246
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2341
2247
  default:
2342
2248
  const parsedBody = parsedOutput.body;
2343
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2344
- response = {
2345
- ...parsedBody,
2346
- name: `${errorCode}`,
2347
- message: parsedBody.message || parsedBody.Message || errorCode,
2249
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2250
+ name: parsedBody.code || parsedBody.Code || errorCode,
2348
2251
  $fault: "client",
2349
2252
  $metadata: deserializeMetadata(output),
2350
- };
2253
+ });
2254
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2351
2255
  }
2352
- const message = response.message || response.Message || errorCode;
2353
- response.message = message;
2354
- delete response.Message;
2355
- return Promise.reject(Object.assign(new Error(message), response));
2356
2256
  };
2357
2257
  const deserializeAws_restJson1GetMatchesCommand = async (output, context) => {
2358
2258
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2392,59 +2292,28 @@ const deserializeAws_restJson1GetMatchesCommandError = async (output, context) =
2392
2292
  switch (errorCode) {
2393
2293
  case "AccessDeniedException":
2394
2294
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2395
- response = {
2396
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2397
- name: errorCode,
2398
- $metadata: deserializeMetadata(output),
2399
- };
2400
- break;
2295
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2401
2296
  case "BadRequestException":
2402
2297
  case "com.amazonaws.customerprofiles#BadRequestException":
2403
- response = {
2404
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2405
- name: errorCode,
2406
- $metadata: deserializeMetadata(output),
2407
- };
2408
- break;
2298
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2409
2299
  case "InternalServerException":
2410
2300
  case "com.amazonaws.customerprofiles#InternalServerException":
2411
- response = {
2412
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2413
- name: errorCode,
2414
- $metadata: deserializeMetadata(output),
2415
- };
2416
- break;
2301
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2417
2302
  case "ResourceNotFoundException":
2418
2303
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2419
- response = {
2420
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2421
- name: errorCode,
2422
- $metadata: deserializeMetadata(output),
2423
- };
2424
- break;
2304
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2425
2305
  case "ThrottlingException":
2426
2306
  case "com.amazonaws.customerprofiles#ThrottlingException":
2427
- response = {
2428
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2429
- name: errorCode,
2430
- $metadata: deserializeMetadata(output),
2431
- };
2432
- break;
2307
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2433
2308
  default:
2434
2309
  const parsedBody = parsedOutput.body;
2435
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2436
- response = {
2437
- ...parsedBody,
2438
- name: `${errorCode}`,
2439
- message: parsedBody.message || parsedBody.Message || errorCode,
2310
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2311
+ name: parsedBody.code || parsedBody.Code || errorCode,
2440
2312
  $fault: "client",
2441
2313
  $metadata: deserializeMetadata(output),
2442
- };
2314
+ });
2315
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2443
2316
  }
2444
- const message = response.message || response.Message || errorCode;
2445
- response.message = message;
2446
- delete response.Message;
2447
- return Promise.reject(Object.assign(new Error(message), response));
2448
2317
  };
2449
2318
  const deserializeAws_restJson1GetProfileObjectTypeCommand = async (output, context) => {
2450
2319
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2516,59 +2385,28 @@ const deserializeAws_restJson1GetProfileObjectTypeCommandError = async (output,
2516
2385
  switch (errorCode) {
2517
2386
  case "AccessDeniedException":
2518
2387
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2519
- response = {
2520
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2521
- name: errorCode,
2522
- $metadata: deserializeMetadata(output),
2523
- };
2524
- break;
2388
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2525
2389
  case "BadRequestException":
2526
2390
  case "com.amazonaws.customerprofiles#BadRequestException":
2527
- response = {
2528
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2529
- name: errorCode,
2530
- $metadata: deserializeMetadata(output),
2531
- };
2532
- break;
2391
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2533
2392
  case "InternalServerException":
2534
2393
  case "com.amazonaws.customerprofiles#InternalServerException":
2535
- response = {
2536
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2537
- name: errorCode,
2538
- $metadata: deserializeMetadata(output),
2539
- };
2540
- break;
2394
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2541
2395
  case "ResourceNotFoundException":
2542
2396
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2543
- response = {
2544
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2545
- name: errorCode,
2546
- $metadata: deserializeMetadata(output),
2547
- };
2548
- break;
2397
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2549
2398
  case "ThrottlingException":
2550
2399
  case "com.amazonaws.customerprofiles#ThrottlingException":
2551
- response = {
2552
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2553
- name: errorCode,
2554
- $metadata: deserializeMetadata(output),
2555
- };
2556
- break;
2400
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2557
2401
  default:
2558
2402
  const parsedBody = parsedOutput.body;
2559
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2560
- response = {
2561
- ...parsedBody,
2562
- name: `${errorCode}`,
2563
- message: parsedBody.message || parsedBody.Message || errorCode,
2403
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2404
+ name: parsedBody.code || parsedBody.Code || errorCode,
2564
2405
  $fault: "client",
2565
2406
  $metadata: deserializeMetadata(output),
2566
- };
2407
+ });
2408
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2567
2409
  }
2568
- const message = response.message || response.Message || errorCode;
2569
- response.message = message;
2570
- delete response.Message;
2571
- return Promise.reject(Object.assign(new Error(message), response));
2572
2410
  };
2573
2411
  const deserializeAws_restJson1GetProfileObjectTypeTemplateCommand = async (output, context) => {
2574
2412
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2576,40 +2414,178 @@ const deserializeAws_restJson1GetProfileObjectTypeTemplateCommand = async (outpu
2576
2414
  }
2577
2415
  const contents = {
2578
2416
  $metadata: deserializeMetadata(output),
2579
- AllowProfileCreation: undefined,
2580
- Fields: undefined,
2581
- Keys: undefined,
2582
- SourceLastUpdatedTimestampFormat: undefined,
2583
- SourceName: undefined,
2584
- SourceObject: undefined,
2585
- TemplateId: undefined,
2417
+ AllowProfileCreation: undefined,
2418
+ Fields: undefined,
2419
+ Keys: undefined,
2420
+ SourceLastUpdatedTimestampFormat: undefined,
2421
+ SourceName: undefined,
2422
+ SourceObject: undefined,
2423
+ TemplateId: undefined,
2424
+ };
2425
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2426
+ if (data.AllowProfileCreation !== undefined && data.AllowProfileCreation !== null) {
2427
+ contents.AllowProfileCreation = smithy_client_1.expectBoolean(data.AllowProfileCreation);
2428
+ }
2429
+ if (data.Fields !== undefined && data.Fields !== null) {
2430
+ contents.Fields = deserializeAws_restJson1FieldMap(data.Fields, context);
2431
+ }
2432
+ if (data.Keys !== undefined && data.Keys !== null) {
2433
+ contents.Keys = deserializeAws_restJson1KeyMap(data.Keys, context);
2434
+ }
2435
+ if (data.SourceLastUpdatedTimestampFormat !== undefined && data.SourceLastUpdatedTimestampFormat !== null) {
2436
+ contents.SourceLastUpdatedTimestampFormat = smithy_client_1.expectString(data.SourceLastUpdatedTimestampFormat);
2437
+ }
2438
+ if (data.SourceName !== undefined && data.SourceName !== null) {
2439
+ contents.SourceName = smithy_client_1.expectString(data.SourceName);
2440
+ }
2441
+ if (data.SourceObject !== undefined && data.SourceObject !== null) {
2442
+ contents.SourceObject = smithy_client_1.expectString(data.SourceObject);
2443
+ }
2444
+ if (data.TemplateId !== undefined && data.TemplateId !== null) {
2445
+ contents.TemplateId = smithy_client_1.expectString(data.TemplateId);
2446
+ }
2447
+ return Promise.resolve(contents);
2448
+ };
2449
+ exports.deserializeAws_restJson1GetProfileObjectTypeTemplateCommand = deserializeAws_restJson1GetProfileObjectTypeTemplateCommand;
2450
+ const deserializeAws_restJson1GetProfileObjectTypeTemplateCommandError = async (output, context) => {
2451
+ const parsedOutput = {
2452
+ ...output,
2453
+ body: await parseBody(output.body, context),
2454
+ };
2455
+ let response;
2456
+ let errorCode = "UnknownError";
2457
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2458
+ switch (errorCode) {
2459
+ case "AccessDeniedException":
2460
+ case "com.amazonaws.customerprofiles#AccessDeniedException":
2461
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2462
+ case "BadRequestException":
2463
+ case "com.amazonaws.customerprofiles#BadRequestException":
2464
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2465
+ case "InternalServerException":
2466
+ case "com.amazonaws.customerprofiles#InternalServerException":
2467
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2468
+ case "ResourceNotFoundException":
2469
+ case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2470
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2471
+ case "ThrottlingException":
2472
+ case "com.amazonaws.customerprofiles#ThrottlingException":
2473
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2474
+ default:
2475
+ const parsedBody = parsedOutput.body;
2476
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2477
+ name: parsedBody.code || parsedBody.Code || errorCode,
2478
+ $fault: "client",
2479
+ $metadata: deserializeMetadata(output),
2480
+ });
2481
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2482
+ }
2483
+ };
2484
+ const deserializeAws_restJson1GetWorkflowCommand = async (output, context) => {
2485
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2486
+ return deserializeAws_restJson1GetWorkflowCommandError(output, context);
2487
+ }
2488
+ const contents = {
2489
+ $metadata: deserializeMetadata(output),
2490
+ Attributes: undefined,
2491
+ ErrorDescription: undefined,
2492
+ LastUpdatedAt: undefined,
2493
+ Metrics: undefined,
2494
+ StartDate: undefined,
2495
+ Status: undefined,
2496
+ WorkflowId: undefined,
2497
+ WorkflowType: undefined,
2498
+ };
2499
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2500
+ if (data.Attributes !== undefined && data.Attributes !== null) {
2501
+ contents.Attributes = deserializeAws_restJson1WorkflowAttributes(data.Attributes, context);
2502
+ }
2503
+ if (data.ErrorDescription !== undefined && data.ErrorDescription !== null) {
2504
+ contents.ErrorDescription = smithy_client_1.expectString(data.ErrorDescription);
2505
+ }
2506
+ if (data.LastUpdatedAt !== undefined && data.LastUpdatedAt !== null) {
2507
+ contents.LastUpdatedAt = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.LastUpdatedAt)));
2508
+ }
2509
+ if (data.Metrics !== undefined && data.Metrics !== null) {
2510
+ contents.Metrics = deserializeAws_restJson1WorkflowMetrics(data.Metrics, context);
2511
+ }
2512
+ if (data.StartDate !== undefined && data.StartDate !== null) {
2513
+ contents.StartDate = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.StartDate)));
2514
+ }
2515
+ if (data.Status !== undefined && data.Status !== null) {
2516
+ contents.Status = smithy_client_1.expectString(data.Status);
2517
+ }
2518
+ if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
2519
+ contents.WorkflowId = smithy_client_1.expectString(data.WorkflowId);
2520
+ }
2521
+ if (data.WorkflowType !== undefined && data.WorkflowType !== null) {
2522
+ contents.WorkflowType = smithy_client_1.expectString(data.WorkflowType);
2523
+ }
2524
+ return Promise.resolve(contents);
2525
+ };
2526
+ exports.deserializeAws_restJson1GetWorkflowCommand = deserializeAws_restJson1GetWorkflowCommand;
2527
+ const deserializeAws_restJson1GetWorkflowCommandError = async (output, context) => {
2528
+ const parsedOutput = {
2529
+ ...output,
2530
+ body: await parseBody(output.body, context),
2531
+ };
2532
+ let response;
2533
+ let errorCode = "UnknownError";
2534
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2535
+ switch (errorCode) {
2536
+ case "AccessDeniedException":
2537
+ case "com.amazonaws.customerprofiles#AccessDeniedException":
2538
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2539
+ case "BadRequestException":
2540
+ case "com.amazonaws.customerprofiles#BadRequestException":
2541
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2542
+ case "InternalServerException":
2543
+ case "com.amazonaws.customerprofiles#InternalServerException":
2544
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2545
+ case "ResourceNotFoundException":
2546
+ case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2547
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2548
+ case "ThrottlingException":
2549
+ case "com.amazonaws.customerprofiles#ThrottlingException":
2550
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2551
+ default:
2552
+ const parsedBody = parsedOutput.body;
2553
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2554
+ name: parsedBody.code || parsedBody.Code || errorCode,
2555
+ $fault: "client",
2556
+ $metadata: deserializeMetadata(output),
2557
+ });
2558
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2559
+ }
2560
+ };
2561
+ const deserializeAws_restJson1GetWorkflowStepsCommand = async (output, context) => {
2562
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2563
+ return deserializeAws_restJson1GetWorkflowStepsCommandError(output, context);
2564
+ }
2565
+ const contents = {
2566
+ $metadata: deserializeMetadata(output),
2567
+ Items: undefined,
2568
+ NextToken: undefined,
2569
+ WorkflowId: undefined,
2570
+ WorkflowType: undefined,
2586
2571
  };
2587
2572
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2588
- if (data.AllowProfileCreation !== undefined && data.AllowProfileCreation !== null) {
2589
- contents.AllowProfileCreation = smithy_client_1.expectBoolean(data.AllowProfileCreation);
2590
- }
2591
- if (data.Fields !== undefined && data.Fields !== null) {
2592
- contents.Fields = deserializeAws_restJson1FieldMap(data.Fields, context);
2593
- }
2594
- if (data.Keys !== undefined && data.Keys !== null) {
2595
- contents.Keys = deserializeAws_restJson1KeyMap(data.Keys, context);
2596
- }
2597
- if (data.SourceLastUpdatedTimestampFormat !== undefined && data.SourceLastUpdatedTimestampFormat !== null) {
2598
- contents.SourceLastUpdatedTimestampFormat = smithy_client_1.expectString(data.SourceLastUpdatedTimestampFormat);
2573
+ if (data.Items !== undefined && data.Items !== null) {
2574
+ contents.Items = deserializeAws_restJson1WorkflowStepsList(data.Items, context);
2599
2575
  }
2600
- if (data.SourceName !== undefined && data.SourceName !== null) {
2601
- contents.SourceName = smithy_client_1.expectString(data.SourceName);
2576
+ if (data.NextToken !== undefined && data.NextToken !== null) {
2577
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
2602
2578
  }
2603
- if (data.SourceObject !== undefined && data.SourceObject !== null) {
2604
- contents.SourceObject = smithy_client_1.expectString(data.SourceObject);
2579
+ if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
2580
+ contents.WorkflowId = smithy_client_1.expectString(data.WorkflowId);
2605
2581
  }
2606
- if (data.TemplateId !== undefined && data.TemplateId !== null) {
2607
- contents.TemplateId = smithy_client_1.expectString(data.TemplateId);
2582
+ if (data.WorkflowType !== undefined && data.WorkflowType !== null) {
2583
+ contents.WorkflowType = smithy_client_1.expectString(data.WorkflowType);
2608
2584
  }
2609
2585
  return Promise.resolve(contents);
2610
2586
  };
2611
- exports.deserializeAws_restJson1GetProfileObjectTypeTemplateCommand = deserializeAws_restJson1GetProfileObjectTypeTemplateCommand;
2612
- const deserializeAws_restJson1GetProfileObjectTypeTemplateCommandError = async (output, context) => {
2587
+ exports.deserializeAws_restJson1GetWorkflowStepsCommand = deserializeAws_restJson1GetWorkflowStepsCommand;
2588
+ const deserializeAws_restJson1GetWorkflowStepsCommandError = async (output, context) => {
2613
2589
  const parsedOutput = {
2614
2590
  ...output,
2615
2591
  body: await parseBody(output.body, context),
@@ -2620,59 +2596,28 @@ const deserializeAws_restJson1GetProfileObjectTypeTemplateCommandError = async (
2620
2596
  switch (errorCode) {
2621
2597
  case "AccessDeniedException":
2622
2598
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2623
- response = {
2624
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2625
- name: errorCode,
2626
- $metadata: deserializeMetadata(output),
2627
- };
2628
- break;
2599
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2629
2600
  case "BadRequestException":
2630
2601
  case "com.amazonaws.customerprofiles#BadRequestException":
2631
- response = {
2632
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2633
- name: errorCode,
2634
- $metadata: deserializeMetadata(output),
2635
- };
2636
- break;
2602
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2637
2603
  case "InternalServerException":
2638
2604
  case "com.amazonaws.customerprofiles#InternalServerException":
2639
- response = {
2640
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2641
- name: errorCode,
2642
- $metadata: deserializeMetadata(output),
2643
- };
2644
- break;
2605
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2645
2606
  case "ResourceNotFoundException":
2646
2607
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2647
- response = {
2648
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2649
- name: errorCode,
2650
- $metadata: deserializeMetadata(output),
2651
- };
2652
- break;
2608
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2653
2609
  case "ThrottlingException":
2654
2610
  case "com.amazonaws.customerprofiles#ThrottlingException":
2655
- response = {
2656
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2657
- name: errorCode,
2658
- $metadata: deserializeMetadata(output),
2659
- };
2660
- break;
2611
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2661
2612
  default:
2662
2613
  const parsedBody = parsedOutput.body;
2663
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2664
- response = {
2665
- ...parsedBody,
2666
- name: `${errorCode}`,
2667
- message: parsedBody.message || parsedBody.Message || errorCode,
2614
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2615
+ name: parsedBody.code || parsedBody.Code || errorCode,
2668
2616
  $fault: "client",
2669
2617
  $metadata: deserializeMetadata(output),
2670
- };
2618
+ });
2619
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2671
2620
  }
2672
- const message = response.message || response.Message || errorCode;
2673
- response.message = message;
2674
- delete response.Message;
2675
- return Promise.reject(Object.assign(new Error(message), response));
2676
2621
  };
2677
2622
  const deserializeAws_restJson1ListAccountIntegrationsCommand = async (output, context) => {
2678
2623
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2704,59 +2649,28 @@ const deserializeAws_restJson1ListAccountIntegrationsCommandError = async (outpu
2704
2649
  switch (errorCode) {
2705
2650
  case "AccessDeniedException":
2706
2651
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2707
- response = {
2708
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2709
- name: errorCode,
2710
- $metadata: deserializeMetadata(output),
2711
- };
2712
- break;
2652
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2713
2653
  case "BadRequestException":
2714
2654
  case "com.amazonaws.customerprofiles#BadRequestException":
2715
- response = {
2716
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2717
- name: errorCode,
2718
- $metadata: deserializeMetadata(output),
2719
- };
2720
- break;
2655
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2721
2656
  case "InternalServerException":
2722
2657
  case "com.amazonaws.customerprofiles#InternalServerException":
2723
- response = {
2724
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2725
- name: errorCode,
2726
- $metadata: deserializeMetadata(output),
2727
- };
2728
- break;
2658
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2729
2659
  case "ResourceNotFoundException":
2730
2660
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2731
- response = {
2732
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2733
- name: errorCode,
2734
- $metadata: deserializeMetadata(output),
2735
- };
2736
- break;
2661
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2737
2662
  case "ThrottlingException":
2738
2663
  case "com.amazonaws.customerprofiles#ThrottlingException":
2739
- response = {
2740
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2741
- name: errorCode,
2742
- $metadata: deserializeMetadata(output),
2743
- };
2744
- break;
2664
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2745
2665
  default:
2746
2666
  const parsedBody = parsedOutput.body;
2747
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2748
- response = {
2749
- ...parsedBody,
2750
- name: `${errorCode}`,
2751
- message: parsedBody.message || parsedBody.Message || errorCode,
2667
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2668
+ name: parsedBody.code || parsedBody.Code || errorCode,
2752
2669
  $fault: "client",
2753
2670
  $metadata: deserializeMetadata(output),
2754
- };
2671
+ });
2672
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2755
2673
  }
2756
- const message = response.message || response.Message || errorCode;
2757
- response.message = message;
2758
- delete response.Message;
2759
- return Promise.reject(Object.assign(new Error(message), response));
2760
2674
  };
2761
2675
  const deserializeAws_restJson1ListDomainsCommand = async (output, context) => {
2762
2676
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2788,59 +2702,28 @@ const deserializeAws_restJson1ListDomainsCommandError = async (output, context)
2788
2702
  switch (errorCode) {
2789
2703
  case "AccessDeniedException":
2790
2704
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2791
- response = {
2792
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2793
- name: errorCode,
2794
- $metadata: deserializeMetadata(output),
2795
- };
2796
- break;
2705
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2797
2706
  case "BadRequestException":
2798
2707
  case "com.amazonaws.customerprofiles#BadRequestException":
2799
- response = {
2800
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2801
- name: errorCode,
2802
- $metadata: deserializeMetadata(output),
2803
- };
2804
- break;
2708
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2805
2709
  case "InternalServerException":
2806
2710
  case "com.amazonaws.customerprofiles#InternalServerException":
2807
- response = {
2808
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2809
- name: errorCode,
2810
- $metadata: deserializeMetadata(output),
2811
- };
2812
- break;
2711
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2813
2712
  case "ResourceNotFoundException":
2814
2713
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2815
- response = {
2816
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2817
- name: errorCode,
2818
- $metadata: deserializeMetadata(output),
2819
- };
2820
- break;
2714
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2821
2715
  case "ThrottlingException":
2822
2716
  case "com.amazonaws.customerprofiles#ThrottlingException":
2823
- response = {
2824
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2825
- name: errorCode,
2826
- $metadata: deserializeMetadata(output),
2827
- };
2828
- break;
2717
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2829
2718
  default:
2830
2719
  const parsedBody = parsedOutput.body;
2831
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2832
- response = {
2833
- ...parsedBody,
2834
- name: `${errorCode}`,
2835
- message: parsedBody.message || parsedBody.Message || errorCode,
2720
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2721
+ name: parsedBody.code || parsedBody.Code || errorCode,
2836
2722
  $fault: "client",
2837
2723
  $metadata: deserializeMetadata(output),
2838
- };
2724
+ });
2725
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2839
2726
  }
2840
- const message = response.message || response.Message || errorCode;
2841
- response.message = message;
2842
- delete response.Message;
2843
- return Promise.reject(Object.assign(new Error(message), response));
2844
2727
  };
2845
2728
  const deserializeAws_restJson1ListIdentityResolutionJobsCommand = async (output, context) => {
2846
2729
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2872,59 +2755,28 @@ const deserializeAws_restJson1ListIdentityResolutionJobsCommandError = async (ou
2872
2755
  switch (errorCode) {
2873
2756
  case "AccessDeniedException":
2874
2757
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2875
- response = {
2876
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2877
- name: errorCode,
2878
- $metadata: deserializeMetadata(output),
2879
- };
2880
- break;
2758
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2881
2759
  case "BadRequestException":
2882
2760
  case "com.amazonaws.customerprofiles#BadRequestException":
2883
- response = {
2884
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2885
- name: errorCode,
2886
- $metadata: deserializeMetadata(output),
2887
- };
2888
- break;
2761
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2889
2762
  case "InternalServerException":
2890
2763
  case "com.amazonaws.customerprofiles#InternalServerException":
2891
- response = {
2892
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2893
- name: errorCode,
2894
- $metadata: deserializeMetadata(output),
2895
- };
2896
- break;
2764
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2897
2765
  case "ResourceNotFoundException":
2898
2766
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2899
- response = {
2900
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2901
- name: errorCode,
2902
- $metadata: deserializeMetadata(output),
2903
- };
2904
- break;
2767
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2905
2768
  case "ThrottlingException":
2906
2769
  case "com.amazonaws.customerprofiles#ThrottlingException":
2907
- response = {
2908
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2909
- name: errorCode,
2910
- $metadata: deserializeMetadata(output),
2911
- };
2912
- break;
2770
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2913
2771
  default:
2914
2772
  const parsedBody = parsedOutput.body;
2915
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2916
- response = {
2917
- ...parsedBody,
2918
- name: `${errorCode}`,
2919
- message: parsedBody.message || parsedBody.Message || errorCode,
2773
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2774
+ name: parsedBody.code || parsedBody.Code || errorCode,
2920
2775
  $fault: "client",
2921
2776
  $metadata: deserializeMetadata(output),
2922
- };
2777
+ });
2778
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2923
2779
  }
2924
- const message = response.message || response.Message || errorCode;
2925
- response.message = message;
2926
- delete response.Message;
2927
- return Promise.reject(Object.assign(new Error(message), response));
2928
2780
  };
2929
2781
  const deserializeAws_restJson1ListIntegrationsCommand = async (output, context) => {
2930
2782
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2956,59 +2808,28 @@ const deserializeAws_restJson1ListIntegrationsCommandError = async (output, cont
2956
2808
  switch (errorCode) {
2957
2809
  case "AccessDeniedException":
2958
2810
  case "com.amazonaws.customerprofiles#AccessDeniedException":
2959
- response = {
2960
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2961
- name: errorCode,
2962
- $metadata: deserializeMetadata(output),
2963
- };
2964
- break;
2811
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2965
2812
  case "BadRequestException":
2966
2813
  case "com.amazonaws.customerprofiles#BadRequestException":
2967
- response = {
2968
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2969
- name: errorCode,
2970
- $metadata: deserializeMetadata(output),
2971
- };
2972
- break;
2814
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2973
2815
  case "InternalServerException":
2974
2816
  case "com.amazonaws.customerprofiles#InternalServerException":
2975
- response = {
2976
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2977
- name: errorCode,
2978
- $metadata: deserializeMetadata(output),
2979
- };
2980
- break;
2817
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2981
2818
  case "ResourceNotFoundException":
2982
2819
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
2983
- response = {
2984
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2985
- name: errorCode,
2986
- $metadata: deserializeMetadata(output),
2987
- };
2988
- break;
2820
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2989
2821
  case "ThrottlingException":
2990
2822
  case "com.amazonaws.customerprofiles#ThrottlingException":
2991
- response = {
2992
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2993
- name: errorCode,
2994
- $metadata: deserializeMetadata(output),
2995
- };
2996
- break;
2823
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2997
2824
  default:
2998
2825
  const parsedBody = parsedOutput.body;
2999
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3000
- response = {
3001
- ...parsedBody,
3002
- name: `${errorCode}`,
3003
- message: parsedBody.message || parsedBody.Message || errorCode,
2826
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2827
+ name: parsedBody.code || parsedBody.Code || errorCode,
3004
2828
  $fault: "client",
3005
2829
  $metadata: deserializeMetadata(output),
3006
- };
2830
+ });
2831
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3007
2832
  }
3008
- const message = response.message || response.Message || errorCode;
3009
- response.message = message;
3010
- delete response.Message;
3011
- return Promise.reject(Object.assign(new Error(message), response));
3012
2833
  };
3013
2834
  const deserializeAws_restJson1ListProfileObjectsCommand = async (output, context) => {
3014
2835
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3040,59 +2861,28 @@ const deserializeAws_restJson1ListProfileObjectsCommandError = async (output, co
3040
2861
  switch (errorCode) {
3041
2862
  case "AccessDeniedException":
3042
2863
  case "com.amazonaws.customerprofiles#AccessDeniedException":
3043
- response = {
3044
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3045
- name: errorCode,
3046
- $metadata: deserializeMetadata(output),
3047
- };
3048
- break;
2864
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3049
2865
  case "BadRequestException":
3050
2866
  case "com.amazonaws.customerprofiles#BadRequestException":
3051
- response = {
3052
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3053
- name: errorCode,
3054
- $metadata: deserializeMetadata(output),
3055
- };
3056
- break;
2867
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3057
2868
  case "InternalServerException":
3058
2869
  case "com.amazonaws.customerprofiles#InternalServerException":
3059
- response = {
3060
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3061
- name: errorCode,
3062
- $metadata: deserializeMetadata(output),
3063
- };
3064
- break;
2870
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3065
2871
  case "ResourceNotFoundException":
3066
2872
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3067
- response = {
3068
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3069
- name: errorCode,
3070
- $metadata: deserializeMetadata(output),
3071
- };
3072
- break;
2873
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3073
2874
  case "ThrottlingException":
3074
2875
  case "com.amazonaws.customerprofiles#ThrottlingException":
3075
- response = {
3076
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3077
- name: errorCode,
3078
- $metadata: deserializeMetadata(output),
3079
- };
3080
- break;
2876
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3081
2877
  default:
3082
2878
  const parsedBody = parsedOutput.body;
3083
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3084
- response = {
3085
- ...parsedBody,
3086
- name: `${errorCode}`,
3087
- message: parsedBody.message || parsedBody.Message || errorCode,
2879
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2880
+ name: parsedBody.code || parsedBody.Code || errorCode,
3088
2881
  $fault: "client",
3089
2882
  $metadata: deserializeMetadata(output),
3090
- };
2883
+ });
2884
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3091
2885
  }
3092
- const message = response.message || response.Message || errorCode;
3093
- response.message = message;
3094
- delete response.Message;
3095
- return Promise.reject(Object.assign(new Error(message), response));
3096
2886
  };
3097
2887
  const deserializeAws_restJson1ListProfileObjectTypesCommand = async (output, context) => {
3098
2888
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3124,59 +2914,28 @@ const deserializeAws_restJson1ListProfileObjectTypesCommandError = async (output
3124
2914
  switch (errorCode) {
3125
2915
  case "AccessDeniedException":
3126
2916
  case "com.amazonaws.customerprofiles#AccessDeniedException":
3127
- response = {
3128
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3129
- name: errorCode,
3130
- $metadata: deserializeMetadata(output),
3131
- };
3132
- break;
2917
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3133
2918
  case "BadRequestException":
3134
2919
  case "com.amazonaws.customerprofiles#BadRequestException":
3135
- response = {
3136
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3137
- name: errorCode,
3138
- $metadata: deserializeMetadata(output),
3139
- };
3140
- break;
2920
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3141
2921
  case "InternalServerException":
3142
2922
  case "com.amazonaws.customerprofiles#InternalServerException":
3143
- response = {
3144
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3145
- name: errorCode,
3146
- $metadata: deserializeMetadata(output),
3147
- };
3148
- break;
2923
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3149
2924
  case "ResourceNotFoundException":
3150
2925
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3151
- response = {
3152
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3153
- name: errorCode,
3154
- $metadata: deserializeMetadata(output),
3155
- };
3156
- break;
2926
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3157
2927
  case "ThrottlingException":
3158
2928
  case "com.amazonaws.customerprofiles#ThrottlingException":
3159
- response = {
3160
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3161
- name: errorCode,
3162
- $metadata: deserializeMetadata(output),
3163
- };
3164
- break;
2929
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3165
2930
  default:
3166
2931
  const parsedBody = parsedOutput.body;
3167
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3168
- response = {
3169
- ...parsedBody,
3170
- name: `${errorCode}`,
3171
- message: parsedBody.message || parsedBody.Message || errorCode,
2932
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2933
+ name: parsedBody.code || parsedBody.Code || errorCode,
3172
2934
  $fault: "client",
3173
2935
  $metadata: deserializeMetadata(output),
3174
- };
2936
+ });
2937
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3175
2938
  }
3176
- const message = response.message || response.Message || errorCode;
3177
- response.message = message;
3178
- delete response.Message;
3179
- return Promise.reject(Object.assign(new Error(message), response));
3180
2939
  };
3181
2940
  const deserializeAws_restJson1ListProfileObjectTypeTemplatesCommand = async (output, context) => {
3182
2941
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3208,59 +2967,28 @@ const deserializeAws_restJson1ListProfileObjectTypeTemplatesCommandError = async
3208
2967
  switch (errorCode) {
3209
2968
  case "AccessDeniedException":
3210
2969
  case "com.amazonaws.customerprofiles#AccessDeniedException":
3211
- response = {
3212
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3213
- name: errorCode,
3214
- $metadata: deserializeMetadata(output),
3215
- };
3216
- break;
2970
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3217
2971
  case "BadRequestException":
3218
2972
  case "com.amazonaws.customerprofiles#BadRequestException":
3219
- response = {
3220
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3221
- name: errorCode,
3222
- $metadata: deserializeMetadata(output),
3223
- };
3224
- break;
2973
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3225
2974
  case "InternalServerException":
3226
2975
  case "com.amazonaws.customerprofiles#InternalServerException":
3227
- response = {
3228
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3229
- name: errorCode,
3230
- $metadata: deserializeMetadata(output),
3231
- };
3232
- break;
2976
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3233
2977
  case "ResourceNotFoundException":
3234
2978
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3235
- response = {
3236
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3237
- name: errorCode,
3238
- $metadata: deserializeMetadata(output),
3239
- };
3240
- break;
2979
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3241
2980
  case "ThrottlingException":
3242
2981
  case "com.amazonaws.customerprofiles#ThrottlingException":
3243
- response = {
3244
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3245
- name: errorCode,
3246
- $metadata: deserializeMetadata(output),
3247
- };
3248
- break;
2982
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3249
2983
  default:
3250
2984
  const parsedBody = parsedOutput.body;
3251
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3252
- response = {
3253
- ...parsedBody,
3254
- name: `${errorCode}`,
3255
- message: parsedBody.message || parsedBody.Message || errorCode,
2985
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
2986
+ name: parsedBody.code || parsedBody.Code || errorCode,
3256
2987
  $fault: "client",
3257
2988
  $metadata: deserializeMetadata(output),
3258
- };
2989
+ });
2990
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3259
2991
  }
3260
- const message = response.message || response.Message || errorCode;
3261
- response.message = message;
3262
- delete response.Message;
3263
- return Promise.reject(Object.assign(new Error(message), response));
3264
2992
  };
3265
2993
  const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
3266
2994
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3288,43 +3016,75 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
3288
3016
  switch (errorCode) {
3289
3017
  case "BadRequestException":
3290
3018
  case "com.amazonaws.customerprofiles#BadRequestException":
3291
- response = {
3292
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3293
- name: errorCode,
3294
- $metadata: deserializeMetadata(output),
3295
- };
3296
- break;
3019
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3297
3020
  case "InternalServerException":
3298
3021
  case "com.amazonaws.customerprofiles#InternalServerException":
3299
- response = {
3300
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3301
- name: errorCode,
3302
- $metadata: deserializeMetadata(output),
3303
- };
3304
- break;
3022
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3305
3023
  case "ResourceNotFoundException":
3306
3024
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3307
- response = {
3308
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3309
- name: errorCode,
3025
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3026
+ default:
3027
+ const parsedBody = parsedOutput.body;
3028
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3029
+ name: parsedBody.code || parsedBody.Code || errorCode,
3030
+ $fault: "client",
3310
3031
  $metadata: deserializeMetadata(output),
3311
- };
3312
- break;
3032
+ });
3033
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3034
+ }
3035
+ };
3036
+ const deserializeAws_restJson1ListWorkflowsCommand = async (output, context) => {
3037
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3038
+ return deserializeAws_restJson1ListWorkflowsCommandError(output, context);
3039
+ }
3040
+ const contents = {
3041
+ $metadata: deserializeMetadata(output),
3042
+ Items: undefined,
3043
+ NextToken: undefined,
3044
+ };
3045
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3046
+ if (data.Items !== undefined && data.Items !== null) {
3047
+ contents.Items = deserializeAws_restJson1WorkflowList(data.Items, context);
3048
+ }
3049
+ if (data.NextToken !== undefined && data.NextToken !== null) {
3050
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
3051
+ }
3052
+ return Promise.resolve(contents);
3053
+ };
3054
+ exports.deserializeAws_restJson1ListWorkflowsCommand = deserializeAws_restJson1ListWorkflowsCommand;
3055
+ const deserializeAws_restJson1ListWorkflowsCommandError = async (output, context) => {
3056
+ const parsedOutput = {
3057
+ ...output,
3058
+ body: await parseBody(output.body, context),
3059
+ };
3060
+ let response;
3061
+ let errorCode = "UnknownError";
3062
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3063
+ switch (errorCode) {
3064
+ case "AccessDeniedException":
3065
+ case "com.amazonaws.customerprofiles#AccessDeniedException":
3066
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3067
+ case "BadRequestException":
3068
+ case "com.amazonaws.customerprofiles#BadRequestException":
3069
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3070
+ case "InternalServerException":
3071
+ case "com.amazonaws.customerprofiles#InternalServerException":
3072
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3073
+ case "ResourceNotFoundException":
3074
+ case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3075
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3076
+ case "ThrottlingException":
3077
+ case "com.amazonaws.customerprofiles#ThrottlingException":
3078
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3313
3079
  default:
3314
3080
  const parsedBody = parsedOutput.body;
3315
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3316
- response = {
3317
- ...parsedBody,
3318
- name: `${errorCode}`,
3319
- message: parsedBody.message || parsedBody.Message || errorCode,
3081
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3082
+ name: parsedBody.code || parsedBody.Code || errorCode,
3320
3083
  $fault: "client",
3321
3084
  $metadata: deserializeMetadata(output),
3322
- };
3085
+ });
3086
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3323
3087
  }
3324
- const message = response.message || response.Message || errorCode;
3325
- response.message = message;
3326
- delete response.Message;
3327
- return Promise.reject(Object.assign(new Error(message), response));
3328
3088
  };
3329
3089
  const deserializeAws_restJson1MergeProfilesCommand = async (output, context) => {
3330
3090
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3352,51 +3112,25 @@ const deserializeAws_restJson1MergeProfilesCommandError = async (output, context
3352
3112
  switch (errorCode) {
3353
3113
  case "BadRequestException":
3354
3114
  case "com.amazonaws.customerprofiles#BadRequestException":
3355
- response = {
3356
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3357
- name: errorCode,
3358
- $metadata: deserializeMetadata(output),
3359
- };
3360
- break;
3115
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3361
3116
  case "InternalServerException":
3362
3117
  case "com.amazonaws.customerprofiles#InternalServerException":
3363
- response = {
3364
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3365
- name: errorCode,
3366
- $metadata: deserializeMetadata(output),
3367
- };
3368
- break;
3118
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3369
3119
  case "ResourceNotFoundException":
3370
3120
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3371
- response = {
3372
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3373
- name: errorCode,
3374
- $metadata: deserializeMetadata(output),
3375
- };
3376
- break;
3121
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3377
3122
  case "ThrottlingException":
3378
3123
  case "com.amazonaws.customerprofiles#ThrottlingException":
3379
- response = {
3380
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3381
- name: errorCode,
3382
- $metadata: deserializeMetadata(output),
3383
- };
3384
- break;
3124
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3385
3125
  default:
3386
3126
  const parsedBody = parsedOutput.body;
3387
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3388
- response = {
3389
- ...parsedBody,
3390
- name: `${errorCode}`,
3391
- message: parsedBody.message || parsedBody.Message || errorCode,
3127
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3128
+ name: parsedBody.code || parsedBody.Code || errorCode,
3392
3129
  $fault: "client",
3393
3130
  $metadata: deserializeMetadata(output),
3394
- };
3131
+ });
3132
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3395
3133
  }
3396
- const message = response.message || response.Message || errorCode;
3397
- response.message = message;
3398
- delete response.Message;
3399
- return Promise.reject(Object.assign(new Error(message), response));
3400
3134
  };
3401
3135
  const deserializeAws_restJson1PutIntegrationCommand = async (output, context) => {
3402
3136
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3411,6 +3145,7 @@ const deserializeAws_restJson1PutIntegrationCommand = async (output, context) =>
3411
3145
  ObjectTypeNames: undefined,
3412
3146
  Tags: undefined,
3413
3147
  Uri: undefined,
3148
+ WorkflowId: undefined,
3414
3149
  };
3415
3150
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3416
3151
  if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
@@ -3434,6 +3169,9 @@ const deserializeAws_restJson1PutIntegrationCommand = async (output, context) =>
3434
3169
  if (data.Uri !== undefined && data.Uri !== null) {
3435
3170
  contents.Uri = smithy_client_1.expectString(data.Uri);
3436
3171
  }
3172
+ if (data.WorkflowId !== undefined && data.WorkflowId !== null) {
3173
+ contents.WorkflowId = smithy_client_1.expectString(data.WorkflowId);
3174
+ }
3437
3175
  return Promise.resolve(contents);
3438
3176
  };
3439
3177
  exports.deserializeAws_restJson1PutIntegrationCommand = deserializeAws_restJson1PutIntegrationCommand;
@@ -3448,59 +3186,28 @@ const deserializeAws_restJson1PutIntegrationCommandError = async (output, contex
3448
3186
  switch (errorCode) {
3449
3187
  case "AccessDeniedException":
3450
3188
  case "com.amazonaws.customerprofiles#AccessDeniedException":
3451
- response = {
3452
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3453
- name: errorCode,
3454
- $metadata: deserializeMetadata(output),
3455
- };
3456
- break;
3189
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3457
3190
  case "BadRequestException":
3458
3191
  case "com.amazonaws.customerprofiles#BadRequestException":
3459
- response = {
3460
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3461
- name: errorCode,
3462
- $metadata: deserializeMetadata(output),
3463
- };
3464
- break;
3192
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3465
3193
  case "InternalServerException":
3466
3194
  case "com.amazonaws.customerprofiles#InternalServerException":
3467
- response = {
3468
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3469
- name: errorCode,
3470
- $metadata: deserializeMetadata(output),
3471
- };
3472
- break;
3195
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3473
3196
  case "ResourceNotFoundException":
3474
3197
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3475
- response = {
3476
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3477
- name: errorCode,
3478
- $metadata: deserializeMetadata(output),
3479
- };
3480
- break;
3198
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3481
3199
  case "ThrottlingException":
3482
3200
  case "com.amazonaws.customerprofiles#ThrottlingException":
3483
- response = {
3484
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3485
- name: errorCode,
3486
- $metadata: deserializeMetadata(output),
3487
- };
3488
- break;
3201
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3489
3202
  default:
3490
3203
  const parsedBody = parsedOutput.body;
3491
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3492
- response = {
3493
- ...parsedBody,
3494
- name: `${errorCode}`,
3495
- message: parsedBody.message || parsedBody.Message || errorCode,
3204
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3205
+ name: parsedBody.code || parsedBody.Code || errorCode,
3496
3206
  $fault: "client",
3497
3207
  $metadata: deserializeMetadata(output),
3498
- };
3208
+ });
3209
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3499
3210
  }
3500
- const message = response.message || response.Message || errorCode;
3501
- response.message = message;
3502
- delete response.Message;
3503
- return Promise.reject(Object.assign(new Error(message), response));
3504
3211
  };
3505
3212
  const deserializeAws_restJson1PutProfileObjectCommand = async (output, context) => {
3506
3213
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3528,59 +3235,28 @@ const deserializeAws_restJson1PutProfileObjectCommandError = async (output, cont
3528
3235
  switch (errorCode) {
3529
3236
  case "AccessDeniedException":
3530
3237
  case "com.amazonaws.customerprofiles#AccessDeniedException":
3531
- response = {
3532
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3533
- name: errorCode,
3534
- $metadata: deserializeMetadata(output),
3535
- };
3536
- break;
3238
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3537
3239
  case "BadRequestException":
3538
3240
  case "com.amazonaws.customerprofiles#BadRequestException":
3539
- response = {
3540
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3541
- name: errorCode,
3542
- $metadata: deserializeMetadata(output),
3543
- };
3544
- break;
3241
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3545
3242
  case "InternalServerException":
3546
3243
  case "com.amazonaws.customerprofiles#InternalServerException":
3547
- response = {
3548
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3549
- name: errorCode,
3550
- $metadata: deserializeMetadata(output),
3551
- };
3552
- break;
3244
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3553
3245
  case "ResourceNotFoundException":
3554
3246
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3555
- response = {
3556
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3557
- name: errorCode,
3558
- $metadata: deserializeMetadata(output),
3559
- };
3560
- break;
3247
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3561
3248
  case "ThrottlingException":
3562
3249
  case "com.amazonaws.customerprofiles#ThrottlingException":
3563
- response = {
3564
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3565
- name: errorCode,
3566
- $metadata: deserializeMetadata(output),
3567
- };
3568
- break;
3250
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3569
3251
  default:
3570
3252
  const parsedBody = parsedOutput.body;
3571
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3572
- response = {
3573
- ...parsedBody,
3574
- name: `${errorCode}`,
3575
- message: parsedBody.message || parsedBody.Message || errorCode,
3253
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3254
+ name: parsedBody.code || parsedBody.Code || errorCode,
3576
3255
  $fault: "client",
3577
3256
  $metadata: deserializeMetadata(output),
3578
- };
3257
+ });
3258
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3579
3259
  }
3580
- const message = response.message || response.Message || errorCode;
3581
- response.message = message;
3582
- delete response.Message;
3583
- return Promise.reject(Object.assign(new Error(message), response));
3584
3260
  };
3585
3261
  const deserializeAws_restJson1PutProfileObjectTypeCommand = async (output, context) => {
3586
3262
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3652,59 +3328,28 @@ const deserializeAws_restJson1PutProfileObjectTypeCommandError = async (output,
3652
3328
  switch (errorCode) {
3653
3329
  case "AccessDeniedException":
3654
3330
  case "com.amazonaws.customerprofiles#AccessDeniedException":
3655
- response = {
3656
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3657
- name: errorCode,
3658
- $metadata: deserializeMetadata(output),
3659
- };
3660
- break;
3331
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3661
3332
  case "BadRequestException":
3662
3333
  case "com.amazonaws.customerprofiles#BadRequestException":
3663
- response = {
3664
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3665
- name: errorCode,
3666
- $metadata: deserializeMetadata(output),
3667
- };
3668
- break;
3334
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3669
3335
  case "InternalServerException":
3670
3336
  case "com.amazonaws.customerprofiles#InternalServerException":
3671
- response = {
3672
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3673
- name: errorCode,
3674
- $metadata: deserializeMetadata(output),
3675
- };
3676
- break;
3337
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3677
3338
  case "ResourceNotFoundException":
3678
3339
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3679
- response = {
3680
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3681
- name: errorCode,
3682
- $metadata: deserializeMetadata(output),
3683
- };
3684
- break;
3340
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3685
3341
  case "ThrottlingException":
3686
3342
  case "com.amazonaws.customerprofiles#ThrottlingException":
3687
- response = {
3688
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3689
- name: errorCode,
3690
- $metadata: deserializeMetadata(output),
3691
- };
3692
- break;
3343
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3693
3344
  default:
3694
3345
  const parsedBody = parsedOutput.body;
3695
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3696
- response = {
3697
- ...parsedBody,
3698
- name: `${errorCode}`,
3699
- message: parsedBody.message || parsedBody.Message || errorCode,
3346
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3347
+ name: parsedBody.code || parsedBody.Code || errorCode,
3700
3348
  $fault: "client",
3701
3349
  $metadata: deserializeMetadata(output),
3702
- };
3350
+ });
3351
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3703
3352
  }
3704
- const message = response.message || response.Message || errorCode;
3705
- response.message = message;
3706
- delete response.Message;
3707
- return Promise.reject(Object.assign(new Error(message), response));
3708
3353
  };
3709
3354
  const deserializeAws_restJson1SearchProfilesCommand = async (output, context) => {
3710
3355
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3736,59 +3381,28 @@ const deserializeAws_restJson1SearchProfilesCommandError = async (output, contex
3736
3381
  switch (errorCode) {
3737
3382
  case "AccessDeniedException":
3738
3383
  case "com.amazonaws.customerprofiles#AccessDeniedException":
3739
- response = {
3740
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3741
- name: errorCode,
3742
- $metadata: deserializeMetadata(output),
3743
- };
3744
- break;
3384
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3745
3385
  case "BadRequestException":
3746
3386
  case "com.amazonaws.customerprofiles#BadRequestException":
3747
- response = {
3748
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3749
- name: errorCode,
3750
- $metadata: deserializeMetadata(output),
3751
- };
3752
- break;
3387
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3753
3388
  case "InternalServerException":
3754
3389
  case "com.amazonaws.customerprofiles#InternalServerException":
3755
- response = {
3756
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3757
- name: errorCode,
3758
- $metadata: deserializeMetadata(output),
3759
- };
3760
- break;
3390
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3761
3391
  case "ResourceNotFoundException":
3762
3392
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3763
- response = {
3764
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3765
- name: errorCode,
3766
- $metadata: deserializeMetadata(output),
3767
- };
3768
- break;
3393
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3769
3394
  case "ThrottlingException":
3770
3395
  case "com.amazonaws.customerprofiles#ThrottlingException":
3771
- response = {
3772
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3773
- name: errorCode,
3774
- $metadata: deserializeMetadata(output),
3775
- };
3776
- break;
3396
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3777
3397
  default:
3778
3398
  const parsedBody = parsedOutput.body;
3779
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3780
- response = {
3781
- ...parsedBody,
3782
- name: `${errorCode}`,
3783
- message: parsedBody.message || parsedBody.Message || errorCode,
3399
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3400
+ name: parsedBody.code || parsedBody.Code || errorCode,
3784
3401
  $fault: "client",
3785
3402
  $metadata: deserializeMetadata(output),
3786
- };
3403
+ });
3404
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3787
3405
  }
3788
- const message = response.message || response.Message || errorCode;
3789
- response.message = message;
3790
- delete response.Message;
3791
- return Promise.reject(Object.assign(new Error(message), response));
3792
3406
  };
3793
3407
  const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
3794
3408
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3812,43 +3426,22 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
3812
3426
  switch (errorCode) {
3813
3427
  case "BadRequestException":
3814
3428
  case "com.amazonaws.customerprofiles#BadRequestException":
3815
- response = {
3816
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3817
- name: errorCode,
3818
- $metadata: deserializeMetadata(output),
3819
- };
3820
- break;
3429
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3821
3430
  case "InternalServerException":
3822
3431
  case "com.amazonaws.customerprofiles#InternalServerException":
3823
- response = {
3824
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3825
- name: errorCode,
3826
- $metadata: deserializeMetadata(output),
3827
- };
3828
- break;
3432
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3829
3433
  case "ResourceNotFoundException":
3830
3434
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3831
- response = {
3832
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3833
- name: errorCode,
3834
- $metadata: deserializeMetadata(output),
3835
- };
3836
- break;
3435
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3837
3436
  default:
3838
3437
  const parsedBody = parsedOutput.body;
3839
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3840
- response = {
3841
- ...parsedBody,
3842
- name: `${errorCode}`,
3843
- message: parsedBody.message || parsedBody.Message || errorCode,
3438
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3439
+ name: parsedBody.code || parsedBody.Code || errorCode,
3844
3440
  $fault: "client",
3845
3441
  $metadata: deserializeMetadata(output),
3846
- };
3442
+ });
3443
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3847
3444
  }
3848
- const message = response.message || response.Message || errorCode;
3849
- response.message = message;
3850
- delete response.Message;
3851
- return Promise.reject(Object.assign(new Error(message), response));
3852
3445
  };
3853
3446
  const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
3854
3447
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3872,43 +3465,22 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
3872
3465
  switch (errorCode) {
3873
3466
  case "BadRequestException":
3874
3467
  case "com.amazonaws.customerprofiles#BadRequestException":
3875
- response = {
3876
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3877
- name: errorCode,
3878
- $metadata: deserializeMetadata(output),
3879
- };
3880
- break;
3468
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3881
3469
  case "InternalServerException":
3882
3470
  case "com.amazonaws.customerprofiles#InternalServerException":
3883
- response = {
3884
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3885
- name: errorCode,
3886
- $metadata: deserializeMetadata(output),
3887
- };
3888
- break;
3471
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3889
3472
  case "ResourceNotFoundException":
3890
3473
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3891
- response = {
3892
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3893
- name: errorCode,
3894
- $metadata: deserializeMetadata(output),
3895
- };
3896
- break;
3474
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3897
3475
  default:
3898
3476
  const parsedBody = parsedOutput.body;
3899
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3900
- response = {
3901
- ...parsedBody,
3902
- name: `${errorCode}`,
3903
- message: parsedBody.message || parsedBody.Message || errorCode,
3477
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3478
+ name: parsedBody.code || parsedBody.Code || errorCode,
3904
3479
  $fault: "client",
3905
3480
  $metadata: deserializeMetadata(output),
3906
- };
3481
+ });
3482
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3907
3483
  }
3908
- const message = response.message || response.Message || errorCode;
3909
- response.message = message;
3910
- delete response.Message;
3911
- return Promise.reject(Object.assign(new Error(message), response));
3912
3484
  };
3913
3485
  const deserializeAws_restJson1UpdateDomainCommand = async (output, context) => {
3914
3486
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3964,59 +3536,28 @@ const deserializeAws_restJson1UpdateDomainCommandError = async (output, context)
3964
3536
  switch (errorCode) {
3965
3537
  case "AccessDeniedException":
3966
3538
  case "com.amazonaws.customerprofiles#AccessDeniedException":
3967
- response = {
3968
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3969
- name: errorCode,
3970
- $metadata: deserializeMetadata(output),
3971
- };
3972
- break;
3539
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3973
3540
  case "BadRequestException":
3974
3541
  case "com.amazonaws.customerprofiles#BadRequestException":
3975
- response = {
3976
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3977
- name: errorCode,
3978
- $metadata: deserializeMetadata(output),
3979
- };
3980
- break;
3542
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3981
3543
  case "InternalServerException":
3982
3544
  case "com.amazonaws.customerprofiles#InternalServerException":
3983
- response = {
3984
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3985
- name: errorCode,
3986
- $metadata: deserializeMetadata(output),
3987
- };
3988
- break;
3545
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3989
3546
  case "ResourceNotFoundException":
3990
3547
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
3991
- response = {
3992
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3993
- name: errorCode,
3994
- $metadata: deserializeMetadata(output),
3995
- };
3996
- break;
3548
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3997
3549
  case "ThrottlingException":
3998
3550
  case "com.amazonaws.customerprofiles#ThrottlingException":
3999
- response = {
4000
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
4001
- name: errorCode,
4002
- $metadata: deserializeMetadata(output),
4003
- };
4004
- break;
3551
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4005
3552
  default:
4006
3553
  const parsedBody = parsedOutput.body;
4007
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
4008
- response = {
4009
- ...parsedBody,
4010
- name: `${errorCode}`,
4011
- message: parsedBody.message || parsedBody.Message || errorCode,
3554
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3555
+ name: parsedBody.code || parsedBody.Code || errorCode,
4012
3556
  $fault: "client",
4013
3557
  $metadata: deserializeMetadata(output),
4014
- };
3558
+ });
3559
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
4015
3560
  }
4016
- const message = response.message || response.Message || errorCode;
4017
- response.message = message;
4018
- delete response.Message;
4019
- return Promise.reject(Object.assign(new Error(message), response));
4020
3561
  };
4021
3562
  const deserializeAws_restJson1UpdateProfileCommand = async (output, context) => {
4022
3563
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -4044,124 +3585,88 @@ const deserializeAws_restJson1UpdateProfileCommandError = async (output, context
4044
3585
  switch (errorCode) {
4045
3586
  case "AccessDeniedException":
4046
3587
  case "com.amazonaws.customerprofiles#AccessDeniedException":
4047
- response = {
4048
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
4049
- name: errorCode,
4050
- $metadata: deserializeMetadata(output),
4051
- };
4052
- break;
3588
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
4053
3589
  case "BadRequestException":
4054
3590
  case "com.amazonaws.customerprofiles#BadRequestException":
4055
- response = {
4056
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
4057
- name: errorCode,
4058
- $metadata: deserializeMetadata(output),
4059
- };
4060
- break;
3591
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
4061
3592
  case "InternalServerException":
4062
3593
  case "com.amazonaws.customerprofiles#InternalServerException":
4063
- response = {
4064
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
4065
- name: errorCode,
4066
- $metadata: deserializeMetadata(output),
4067
- };
4068
- break;
3594
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
4069
3595
  case "ResourceNotFoundException":
4070
3596
  case "com.amazonaws.customerprofiles#ResourceNotFoundException":
4071
- response = {
4072
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
4073
- name: errorCode,
4074
- $metadata: deserializeMetadata(output),
4075
- };
4076
- break;
3597
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
4077
3598
  case "ThrottlingException":
4078
3599
  case "com.amazonaws.customerprofiles#ThrottlingException":
4079
- response = {
4080
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
4081
- name: errorCode,
4082
- $metadata: deserializeMetadata(output),
4083
- };
4084
- break;
3600
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4085
3601
  default:
4086
3602
  const parsedBody = parsedOutput.body;
4087
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
4088
- response = {
4089
- ...parsedBody,
4090
- name: `${errorCode}`,
4091
- message: parsedBody.message || parsedBody.Message || errorCode,
3603
+ response = new CustomerProfilesServiceException_1.CustomerProfilesServiceException({
3604
+ name: parsedBody.code || parsedBody.Code || errorCode,
4092
3605
  $fault: "client",
4093
3606
  $metadata: deserializeMetadata(output),
4094
- };
3607
+ });
3608
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
4095
3609
  }
4096
- const message = response.message || response.Message || errorCode;
4097
- response.message = message;
4098
- delete response.Message;
4099
- return Promise.reject(Object.assign(new Error(message), response));
4100
3610
  };
4101
3611
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
4102
- const contents = {
4103
- name: "AccessDeniedException",
4104
- $fault: "client",
4105
- $metadata: deserializeMetadata(parsedOutput),
4106
- Message: undefined,
4107
- };
3612
+ const contents = {};
4108
3613
  const data = parsedOutput.body;
4109
3614
  if (data.Message !== undefined && data.Message !== null) {
4110
3615
  contents.Message = smithy_client_1.expectString(data.Message);
4111
3616
  }
4112
- return contents;
3617
+ const exception = new models_0_1.AccessDeniedException({
3618
+ $metadata: deserializeMetadata(parsedOutput),
3619
+ ...contents,
3620
+ });
3621
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
4113
3622
  };
4114
3623
  const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
4115
- const contents = {
4116
- name: "BadRequestException",
4117
- $fault: "client",
4118
- $metadata: deserializeMetadata(parsedOutput),
4119
- Message: undefined,
4120
- };
3624
+ const contents = {};
4121
3625
  const data = parsedOutput.body;
4122
3626
  if (data.Message !== undefined && data.Message !== null) {
4123
3627
  contents.Message = smithy_client_1.expectString(data.Message);
4124
3628
  }
4125
- return contents;
3629
+ const exception = new models_0_1.BadRequestException({
3630
+ $metadata: deserializeMetadata(parsedOutput),
3631
+ ...contents,
3632
+ });
3633
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
4126
3634
  };
4127
3635
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
4128
- const contents = {
4129
- name: "InternalServerException",
4130
- $fault: "server",
4131
- $metadata: deserializeMetadata(parsedOutput),
4132
- Message: undefined,
4133
- };
3636
+ const contents = {};
4134
3637
  const data = parsedOutput.body;
4135
3638
  if (data.Message !== undefined && data.Message !== null) {
4136
3639
  contents.Message = smithy_client_1.expectString(data.Message);
4137
3640
  }
4138
- return contents;
3641
+ const exception = new models_0_1.InternalServerException({
3642
+ $metadata: deserializeMetadata(parsedOutput),
3643
+ ...contents,
3644
+ });
3645
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
4139
3646
  };
4140
3647
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
4141
- const contents = {
4142
- name: "ResourceNotFoundException",
4143
- $fault: "client",
4144
- $metadata: deserializeMetadata(parsedOutput),
4145
- Message: undefined,
4146
- };
3648
+ const contents = {};
4147
3649
  const data = parsedOutput.body;
4148
3650
  if (data.Message !== undefined && data.Message !== null) {
4149
3651
  contents.Message = smithy_client_1.expectString(data.Message);
4150
3652
  }
4151
- return contents;
3653
+ const exception = new models_0_1.ResourceNotFoundException({
3654
+ $metadata: deserializeMetadata(parsedOutput),
3655
+ ...contents,
3656
+ });
3657
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
4152
3658
  };
4153
3659
  const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
4154
- const contents = {
4155
- name: "ThrottlingException",
4156
- $fault: "client",
4157
- $metadata: deserializeMetadata(parsedOutput),
4158
- Message: undefined,
4159
- };
3660
+ const contents = {};
4160
3661
  const data = parsedOutput.body;
4161
3662
  if (data.Message !== undefined && data.Message !== null) {
4162
3663
  contents.Message = smithy_client_1.expectString(data.Message);
4163
3664
  }
4164
- return contents;
3665
+ const exception = new models_0_1.ThrottlingException({
3666
+ $metadata: deserializeMetadata(parsedOutput),
3667
+ ...contents,
3668
+ });
3669
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
4165
3670
  };
4166
3671
  const serializeAws_restJson1Address = (input, context) => {
4167
3672
  return {
@@ -4177,6 +3682,16 @@ const serializeAws_restJson1Address = (input, context) => {
4177
3682
  ...(input.State !== undefined && input.State !== null && { State: input.State }),
4178
3683
  };
4179
3684
  };
3685
+ const serializeAws_restJson1AppflowIntegration = (input, context) => {
3686
+ return {
3687
+ ...(input.Batches !== undefined &&
3688
+ input.Batches !== null && { Batches: serializeAws_restJson1Batches(input.Batches, context) }),
3689
+ ...(input.FlowDefinition !== undefined &&
3690
+ input.FlowDefinition !== null && {
3691
+ FlowDefinition: serializeAws_restJson1FlowDefinition(input.FlowDefinition, context),
3692
+ }),
3693
+ };
3694
+ };
4180
3695
  const serializeAws_restJson1Attributes = (input, context) => {
4181
3696
  return Object.entries(input).reduce((acc, [key, value]) => {
4182
3697
  if (value === null) {
@@ -4212,6 +3727,24 @@ const serializeAws_restJson1AutoMerging = (input, context) => {
4212
3727
  ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
4213
3728
  };
4214
3729
  };
3730
+ const serializeAws_restJson1Batch = (input, context) => {
3731
+ return {
3732
+ ...(input.EndTime !== undefined &&
3733
+ input.EndTime !== null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
3734
+ ...(input.StartTime !== undefined &&
3735
+ input.StartTime !== null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
3736
+ };
3737
+ };
3738
+ const serializeAws_restJson1Batches = (input, context) => {
3739
+ return input
3740
+ .filter((e) => e != null)
3741
+ .map((entry) => {
3742
+ if (entry === null) {
3743
+ return null;
3744
+ }
3745
+ return serializeAws_restJson1Batch(entry, context);
3746
+ });
3747
+ };
4215
3748
  const serializeAws_restJson1ConflictResolution = (input, context) => {
4216
3749
  return {
4217
3750
  ...(input.ConflictResolvingModel !== undefined &&
@@ -4325,6 +3858,14 @@ const serializeAws_restJson1IncrementalPullConfig = (input, context) => {
4325
3858
  input.DatetimeTypeFieldName !== null && { DatetimeTypeFieldName: input.DatetimeTypeFieldName }),
4326
3859
  };
4327
3860
  };
3861
+ const serializeAws_restJson1IntegrationConfig = (input, context) => {
3862
+ return {
3863
+ ...(input.AppflowIntegration !== undefined &&
3864
+ input.AppflowIntegration !== null && {
3865
+ AppflowIntegration: serializeAws_restJson1AppflowIntegration(input.AppflowIntegration, context),
3866
+ }),
3867
+ };
3868
+ };
4328
3869
  const serializeAws_restJson1JobSchedule = (input, context) => {
4329
3870
  return {
4330
3871
  ...(input.DayOfTheWeek !== undefined && input.DayOfTheWeek !== null && { DayOfTheWeek: input.DayOfTheWeek }),
@@ -4652,6 +4193,36 @@ const deserializeAws_restJson1Address = (output, context) => {
4652
4193
  State: smithy_client_1.expectString(output.State),
4653
4194
  };
4654
4195
  };
4196
+ const deserializeAws_restJson1AppflowIntegrationWorkflowAttributes = (output, context) => {
4197
+ return {
4198
+ ConnectorProfileName: smithy_client_1.expectString(output.ConnectorProfileName),
4199
+ RoleArn: smithy_client_1.expectString(output.RoleArn),
4200
+ SourceConnectorType: smithy_client_1.expectString(output.SourceConnectorType),
4201
+ };
4202
+ };
4203
+ const deserializeAws_restJson1AppflowIntegrationWorkflowMetrics = (output, context) => {
4204
+ return {
4205
+ RecordsProcessed: smithy_client_1.expectLong(output.RecordsProcessed),
4206
+ StepsCompleted: smithy_client_1.expectLong(output.StepsCompleted),
4207
+ TotalSteps: smithy_client_1.expectLong(output.TotalSteps),
4208
+ };
4209
+ };
4210
+ const deserializeAws_restJson1AppflowIntegrationWorkflowStep = (output, context) => {
4211
+ return {
4212
+ BatchRecordsEndTime: smithy_client_1.expectString(output.BatchRecordsEndTime),
4213
+ BatchRecordsStartTime: smithy_client_1.expectString(output.BatchRecordsStartTime),
4214
+ CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
4215
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.CreatedAt)))
4216
+ : undefined,
4217
+ ExecutionMessage: smithy_client_1.expectString(output.ExecutionMessage),
4218
+ FlowName: smithy_client_1.expectString(output.FlowName),
4219
+ LastUpdatedAt: output.LastUpdatedAt !== undefined && output.LastUpdatedAt !== null
4220
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.LastUpdatedAt)))
4221
+ : undefined,
4222
+ RecordsProcessed: smithy_client_1.expectLong(output.RecordsProcessed),
4223
+ Status: smithy_client_1.expectString(output.Status),
4224
+ };
4225
+ };
4655
4226
  const deserializeAws_restJson1Attributes = (output, context) => {
4656
4227
  return Object.entries(output).reduce((acc, [key, value]) => {
4657
4228
  if (value === null) {
@@ -4688,7 +4259,7 @@ const deserializeAws_restJson1Consolidation = (output, context) => {
4688
4259
  };
4689
4260
  };
4690
4261
  const deserializeAws_restJson1DomainList = (output, context) => {
4691
- return (output || [])
4262
+ const retVal = (output || [])
4692
4263
  .filter((e) => e != null)
4693
4264
  .map((entry) => {
4694
4265
  if (entry === null) {
@@ -4696,6 +4267,7 @@ const deserializeAws_restJson1DomainList = (output, context) => {
4696
4267
  }
4697
4268
  return deserializeAws_restJson1ListDomainItem(entry, context);
4698
4269
  });
4270
+ return retVal;
4699
4271
  };
4700
4272
  const deserializeAws_restJson1DomainStats = (output, context) => {
4701
4273
  return {
@@ -4731,7 +4303,7 @@ const deserializeAws_restJson1FieldMap = (output, context) => {
4731
4303
  }, {});
4732
4304
  };
4733
4305
  const deserializeAws_restJson1FieldNameList = (output, context) => {
4734
- return (output || [])
4306
+ const retVal = (output || [])
4735
4307
  .filter((e) => e != null)
4736
4308
  .map((entry) => {
4737
4309
  if (entry === null) {
@@ -4739,6 +4311,7 @@ const deserializeAws_restJson1FieldNameList = (output, context) => {
4739
4311
  }
4740
4312
  return smithy_client_1.expectString(entry);
4741
4313
  });
4314
+ return retVal;
4742
4315
  };
4743
4316
  const deserializeAws_restJson1IdentityResolutionJob = (output, context) => {
4744
4317
  return {
@@ -4761,7 +4334,7 @@ const deserializeAws_restJson1IdentityResolutionJob = (output, context) => {
4761
4334
  };
4762
4335
  };
4763
4336
  const deserializeAws_restJson1IdentityResolutionJobsList = (output, context) => {
4764
- return (output || [])
4337
+ const retVal = (output || [])
4765
4338
  .filter((e) => e != null)
4766
4339
  .map((entry) => {
4767
4340
  if (entry === null) {
@@ -4769,9 +4342,10 @@ const deserializeAws_restJson1IdentityResolutionJobsList = (output, context) =>
4769
4342
  }
4770
4343
  return deserializeAws_restJson1IdentityResolutionJob(entry, context);
4771
4344
  });
4345
+ return retVal;
4772
4346
  };
4773
4347
  const deserializeAws_restJson1IntegrationList = (output, context) => {
4774
- return (output || [])
4348
+ const retVal = (output || [])
4775
4349
  .filter((e) => e != null)
4776
4350
  .map((entry) => {
4777
4351
  if (entry === null) {
@@ -4779,6 +4353,7 @@ const deserializeAws_restJson1IntegrationList = (output, context) => {
4779
4353
  }
4780
4354
  return deserializeAws_restJson1ListIntegrationItem(entry, context);
4781
4355
  });
4356
+ return retVal;
4782
4357
  };
4783
4358
  const deserializeAws_restJson1JobSchedule = (output, context) => {
4784
4359
  return {
@@ -4835,6 +4410,7 @@ const deserializeAws_restJson1ListIntegrationItem = (output, context) => {
4835
4410
  ? deserializeAws_restJson1TagMap(output.Tags, context)
4836
4411
  : undefined,
4837
4412
  Uri: smithy_client_1.expectString(output.Uri),
4413
+ WorkflowId: smithy_client_1.expectString(output.WorkflowId),
4838
4414
  };
4839
4415
  };
4840
4416
  const deserializeAws_restJson1ListProfileObjectsItem = (output, context) => {
@@ -4866,8 +4442,22 @@ const deserializeAws_restJson1ListProfileObjectTypeTemplateItem = (output, conte
4866
4442
  TemplateId: smithy_client_1.expectString(output.TemplateId),
4867
4443
  };
4868
4444
  };
4445
+ const deserializeAws_restJson1ListWorkflowsItem = (output, context) => {
4446
+ return {
4447
+ CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
4448
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.CreatedAt)))
4449
+ : undefined,
4450
+ LastUpdatedAt: output.LastUpdatedAt !== undefined && output.LastUpdatedAt !== null
4451
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.LastUpdatedAt)))
4452
+ : undefined,
4453
+ Status: smithy_client_1.expectString(output.Status),
4454
+ StatusDescription: smithy_client_1.expectString(output.StatusDescription),
4455
+ WorkflowId: smithy_client_1.expectString(output.WorkflowId),
4456
+ WorkflowType: smithy_client_1.expectString(output.WorkflowType),
4457
+ };
4458
+ };
4869
4459
  const deserializeAws_restJson1MatchesList = (output, context) => {
4870
- return (output || [])
4460
+ const retVal = (output || [])
4871
4461
  .filter((e) => e != null)
4872
4462
  .map((entry) => {
4873
4463
  if (entry === null) {
@@ -4875,9 +4465,10 @@ const deserializeAws_restJson1MatchesList = (output, context) => {
4875
4465
  }
4876
4466
  return deserializeAws_restJson1MatchItem(entry, context);
4877
4467
  });
4468
+ return retVal;
4878
4469
  };
4879
4470
  const deserializeAws_restJson1MatchingAttributes = (output, context) => {
4880
- return (output || [])
4471
+ const retVal = (output || [])
4881
4472
  .filter((e) => e != null)
4882
4473
  .map((entry) => {
4883
4474
  if (entry === null) {
@@ -4885,9 +4476,10 @@ const deserializeAws_restJson1MatchingAttributes = (output, context) => {
4885
4476
  }
4886
4477
  return smithy_client_1.expectString(entry);
4887
4478
  });
4479
+ return retVal;
4888
4480
  };
4889
4481
  const deserializeAws_restJson1MatchingAttributesList = (output, context) => {
4890
- return (output || [])
4482
+ const retVal = (output || [])
4891
4483
  .filter((e) => e != null)
4892
4484
  .map((entry) => {
4893
4485
  if (entry === null) {
@@ -4895,6 +4487,7 @@ const deserializeAws_restJson1MatchingAttributesList = (output, context) => {
4895
4487
  }
4896
4488
  return deserializeAws_restJson1MatchingAttributes(entry, context);
4897
4489
  });
4490
+ return retVal;
4898
4491
  };
4899
4492
  const deserializeAws_restJson1MatchingResponse = (output, context) => {
4900
4493
  return {
@@ -4937,7 +4530,7 @@ const deserializeAws_restJson1ObjectTypeKey = (output, context) => {
4937
4530
  };
4938
4531
  };
4939
4532
  const deserializeAws_restJson1ObjectTypeKeyList = (output, context) => {
4940
- return (output || [])
4533
+ const retVal = (output || [])
4941
4534
  .filter((e) => e != null)
4942
4535
  .map((entry) => {
4943
4536
  if (entry === null) {
@@ -4945,6 +4538,7 @@ const deserializeAws_restJson1ObjectTypeKeyList = (output, context) => {
4945
4538
  }
4946
4539
  return deserializeAws_restJson1ObjectTypeKey(entry, context);
4947
4540
  });
4541
+ return retVal;
4948
4542
  };
4949
4543
  const deserializeAws_restJson1ObjectTypeNames = (output, context) => {
4950
4544
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -4994,7 +4588,7 @@ const deserializeAws_restJson1Profile = (output, context) => {
4994
4588
  };
4995
4589
  };
4996
4590
  const deserializeAws_restJson1ProfileIdList = (output, context) => {
4997
- return (output || [])
4591
+ const retVal = (output || [])
4998
4592
  .filter((e) => e != null)
4999
4593
  .map((entry) => {
5000
4594
  if (entry === null) {
@@ -5002,9 +4596,10 @@ const deserializeAws_restJson1ProfileIdList = (output, context) => {
5002
4596
  }
5003
4597
  return smithy_client_1.expectString(entry);
5004
4598
  });
4599
+ return retVal;
5005
4600
  };
5006
4601
  const deserializeAws_restJson1ProfileList = (output, context) => {
5007
- return (output || [])
4602
+ const retVal = (output || [])
5008
4603
  .filter((e) => e != null)
5009
4604
  .map((entry) => {
5010
4605
  if (entry === null) {
@@ -5012,9 +4607,10 @@ const deserializeAws_restJson1ProfileList = (output, context) => {
5012
4607
  }
5013
4608
  return deserializeAws_restJson1Profile(entry, context);
5014
4609
  });
4610
+ return retVal;
5015
4611
  };
5016
4612
  const deserializeAws_restJson1ProfileObjectList = (output, context) => {
5017
- return (output || [])
4613
+ const retVal = (output || [])
5018
4614
  .filter((e) => e != null)
5019
4615
  .map((entry) => {
5020
4616
  if (entry === null) {
@@ -5022,9 +4618,10 @@ const deserializeAws_restJson1ProfileObjectList = (output, context) => {
5022
4618
  }
5023
4619
  return deserializeAws_restJson1ListProfileObjectsItem(entry, context);
5024
4620
  });
4621
+ return retVal;
5025
4622
  };
5026
4623
  const deserializeAws_restJson1ProfileObjectTypeList = (output, context) => {
5027
- return (output || [])
4624
+ const retVal = (output || [])
5028
4625
  .filter((e) => e != null)
5029
4626
  .map((entry) => {
5030
4627
  if (entry === null) {
@@ -5032,9 +4629,10 @@ const deserializeAws_restJson1ProfileObjectTypeList = (output, context) => {
5032
4629
  }
5033
4630
  return deserializeAws_restJson1ListProfileObjectTypeItem(entry, context);
5034
4631
  });
4632
+ return retVal;
5035
4633
  };
5036
4634
  const deserializeAws_restJson1ProfileObjectTypeTemplateList = (output, context) => {
5037
- return (output || [])
4635
+ const retVal = (output || [])
5038
4636
  .filter((e) => e != null)
5039
4637
  .map((entry) => {
5040
4638
  if (entry === null) {
@@ -5042,9 +4640,10 @@ const deserializeAws_restJson1ProfileObjectTypeTemplateList = (output, context)
5042
4640
  }
5043
4641
  return deserializeAws_restJson1ListProfileObjectTypeTemplateItem(entry, context);
5044
4642
  });
4643
+ return retVal;
5045
4644
  };
5046
4645
  const deserializeAws_restJson1requestValueList = (output, context) => {
5047
- return (output || [])
4646
+ const retVal = (output || [])
5048
4647
  .filter((e) => e != null)
5049
4648
  .map((entry) => {
5050
4649
  if (entry === null) {
@@ -5052,6 +4651,7 @@ const deserializeAws_restJson1requestValueList = (output, context) => {
5052
4651
  }
5053
4652
  return smithy_client_1.expectString(entry);
5054
4653
  });
4654
+ return retVal;
5055
4655
  };
5056
4656
  const deserializeAws_restJson1S3ExportingConfig = (output, context) => {
5057
4657
  return {
@@ -5066,7 +4666,7 @@ const deserializeAws_restJson1S3ExportingLocation = (output, context) => {
5066
4666
  };
5067
4667
  };
5068
4668
  const deserializeAws_restJson1StandardIdentifierList = (output, context) => {
5069
- return (output || [])
4669
+ const retVal = (output || [])
5070
4670
  .filter((e) => e != null)
5071
4671
  .map((entry) => {
5072
4672
  if (entry === null) {
@@ -5074,6 +4674,7 @@ const deserializeAws_restJson1StandardIdentifierList = (output, context) => {
5074
4674
  }
5075
4675
  return smithy_client_1.expectString(entry);
5076
4676
  });
4677
+ return retVal;
5077
4678
  };
5078
4679
  const deserializeAws_restJson1TagMap = (output, context) => {
5079
4680
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -5086,6 +4687,49 @@ const deserializeAws_restJson1TagMap = (output, context) => {
5086
4687
  };
5087
4688
  }, {});
5088
4689
  };
4690
+ const deserializeAws_restJson1WorkflowAttributes = (output, context) => {
4691
+ return {
4692
+ AppflowIntegration: output.AppflowIntegration !== undefined && output.AppflowIntegration !== null
4693
+ ? deserializeAws_restJson1AppflowIntegrationWorkflowAttributes(output.AppflowIntegration, context)
4694
+ : undefined,
4695
+ };
4696
+ };
4697
+ const deserializeAws_restJson1WorkflowList = (output, context) => {
4698
+ const retVal = (output || [])
4699
+ .filter((e) => e != null)
4700
+ .map((entry) => {
4701
+ if (entry === null) {
4702
+ return null;
4703
+ }
4704
+ return deserializeAws_restJson1ListWorkflowsItem(entry, context);
4705
+ });
4706
+ return retVal;
4707
+ };
4708
+ const deserializeAws_restJson1WorkflowMetrics = (output, context) => {
4709
+ return {
4710
+ AppflowIntegration: output.AppflowIntegration !== undefined && output.AppflowIntegration !== null
4711
+ ? deserializeAws_restJson1AppflowIntegrationWorkflowMetrics(output.AppflowIntegration, context)
4712
+ : undefined,
4713
+ };
4714
+ };
4715
+ const deserializeAws_restJson1WorkflowStepItem = (output, context) => {
4716
+ return {
4717
+ AppflowIntegration: output.AppflowIntegration !== undefined && output.AppflowIntegration !== null
4718
+ ? deserializeAws_restJson1AppflowIntegrationWorkflowStep(output.AppflowIntegration, context)
4719
+ : undefined,
4720
+ };
4721
+ };
4722
+ const deserializeAws_restJson1WorkflowStepsList = (output, context) => {
4723
+ const retVal = (output || [])
4724
+ .filter((e) => e != null)
4725
+ .map((entry) => {
4726
+ if (entry === null) {
4727
+ return null;
4728
+ }
4729
+ return deserializeAws_restJson1WorkflowStepItem(entry, context);
4730
+ });
4731
+ return retVal;
4732
+ };
5089
4733
  const deserializeMetadata = (output) => {
5090
4734
  var _a;
5091
4735
  return ({