@aws-sdk/client-customer-profiles 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,11 +14,11 @@ const se_AddProfileKeyCommand = async (input, context) => {
14
14
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/keys";
15
15
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
16
16
  let body;
17
- body = JSON.stringify({
18
- ...(input.KeyName != null && { KeyName: input.KeyName }),
19
- ...(input.ProfileId != null && { ProfileId: input.ProfileId }),
20
- ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }),
21
- });
17
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
18
+ KeyName: [],
19
+ ProfileId: [],
20
+ Values: (_) => (0, smithy_client_1._json)(_),
21
+ }));
22
22
  return new protocol_http_1.HttpRequest({
23
23
  protocol,
24
24
  hostname,
@@ -38,13 +38,13 @@ const se_CreateDomainCommand = async (input, context) => {
38
38
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}";
39
39
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
40
40
  let body;
41
- body = JSON.stringify({
42
- ...(input.DeadLetterQueueUrl != null && { DeadLetterQueueUrl: input.DeadLetterQueueUrl }),
43
- ...(input.DefaultEncryptionKey != null && { DefaultEncryptionKey: input.DefaultEncryptionKey }),
44
- ...(input.DefaultExpirationDays != null && { DefaultExpirationDays: input.DefaultExpirationDays }),
45
- ...(input.Matching != null && { Matching: se_MatchingRequest(input.Matching, context) }),
46
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
47
- });
41
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
42
+ DeadLetterQueueUrl: [],
43
+ DefaultEncryptionKey: [],
44
+ DefaultExpirationDays: [],
45
+ Matching: (_) => se_MatchingRequest(_, context),
46
+ Tags: (_) => (0, smithy_client_1._json)(_),
47
+ }));
48
48
  return new protocol_http_1.HttpRequest({
49
49
  protocol,
50
50
  hostname,
@@ -65,15 +65,13 @@ const se_CreateIntegrationWorkflowCommand = async (input, context) => {
65
65
  "/domains/{DomainName}/workflows/integrations";
66
66
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
67
67
  let body;
68
- body = JSON.stringify({
69
- ...(input.IntegrationConfig != null && {
70
- IntegrationConfig: se_IntegrationConfig(input.IntegrationConfig, context),
71
- }),
72
- ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }),
73
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
74
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
75
- ...(input.WorkflowType != null && { WorkflowType: input.WorkflowType }),
76
- });
68
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
69
+ IntegrationConfig: (_) => se_IntegrationConfig(_, context),
70
+ ObjectTypeName: [],
71
+ RoleArn: [],
72
+ Tags: (_) => (0, smithy_client_1._json)(_),
73
+ WorkflowType: [],
74
+ }));
77
75
  return new protocol_http_1.HttpRequest({
78
76
  protocol,
79
77
  hostname,
@@ -93,31 +91,31 @@ const se_CreateProfileCommand = async (input, context) => {
93
91
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles";
94
92
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
95
93
  let body;
96
- body = JSON.stringify({
97
- ...(input.AccountNumber != null && { AccountNumber: input.AccountNumber }),
98
- ...(input.AdditionalInformation != null && { AdditionalInformation: input.AdditionalInformation }),
99
- ...(input.Address != null && { Address: se_Address(input.Address, context) }),
100
- ...(input.Attributes != null && { Attributes: se_Attributes(input.Attributes, context) }),
101
- ...(input.BillingAddress != null && { BillingAddress: se_Address(input.BillingAddress, context) }),
102
- ...(input.BirthDate != null && { BirthDate: input.BirthDate }),
103
- ...(input.BusinessEmailAddress != null && { BusinessEmailAddress: input.BusinessEmailAddress }),
104
- ...(input.BusinessName != null && { BusinessName: input.BusinessName }),
105
- ...(input.BusinessPhoneNumber != null && { BusinessPhoneNumber: input.BusinessPhoneNumber }),
106
- ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }),
107
- ...(input.FirstName != null && { FirstName: input.FirstName }),
108
- ...(input.Gender != null && { Gender: input.Gender }),
109
- ...(input.GenderString != null && { GenderString: input.GenderString }),
110
- ...(input.HomePhoneNumber != null && { HomePhoneNumber: input.HomePhoneNumber }),
111
- ...(input.LastName != null && { LastName: input.LastName }),
112
- ...(input.MailingAddress != null && { MailingAddress: se_Address(input.MailingAddress, context) }),
113
- ...(input.MiddleName != null && { MiddleName: input.MiddleName }),
114
- ...(input.MobilePhoneNumber != null && { MobilePhoneNumber: input.MobilePhoneNumber }),
115
- ...(input.PartyType != null && { PartyType: input.PartyType }),
116
- ...(input.PartyTypeString != null && { PartyTypeString: input.PartyTypeString }),
117
- ...(input.PersonalEmailAddress != null && { PersonalEmailAddress: input.PersonalEmailAddress }),
118
- ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
119
- ...(input.ShippingAddress != null && { ShippingAddress: se_Address(input.ShippingAddress, context) }),
120
- });
94
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
95
+ AccountNumber: [],
96
+ AdditionalInformation: [],
97
+ Address: (_) => (0, smithy_client_1._json)(_),
98
+ Attributes: (_) => (0, smithy_client_1._json)(_),
99
+ BillingAddress: (_) => (0, smithy_client_1._json)(_),
100
+ BirthDate: [],
101
+ BusinessEmailAddress: [],
102
+ BusinessName: [],
103
+ BusinessPhoneNumber: [],
104
+ EmailAddress: [],
105
+ FirstName: [],
106
+ Gender: [],
107
+ GenderString: [],
108
+ HomePhoneNumber: [],
109
+ LastName: [],
110
+ MailingAddress: (_) => (0, smithy_client_1._json)(_),
111
+ MiddleName: [],
112
+ MobilePhoneNumber: [],
113
+ PartyType: [],
114
+ PartyTypeString: [],
115
+ PersonalEmailAddress: [],
116
+ PhoneNumber: [],
117
+ ShippingAddress: (_) => (0, smithy_client_1._json)(_),
118
+ }));
121
119
  return new protocol_http_1.HttpRequest({
122
120
  protocol,
123
121
  hostname,
@@ -154,9 +152,9 @@ const se_DeleteIntegrationCommand = async (input, context) => {
154
152
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations/delete";
155
153
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
156
154
  let body;
157
- body = JSON.stringify({
158
- ...(input.Uri != null && { Uri: input.Uri }),
159
- });
155
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
156
+ Uri: [],
157
+ }));
160
158
  return new protocol_http_1.HttpRequest({
161
159
  protocol,
162
160
  hostname,
@@ -176,9 +174,9 @@ const se_DeleteProfileCommand = async (input, context) => {
176
174
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/delete";
177
175
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
178
176
  let body;
179
- body = JSON.stringify({
180
- ...(input.ProfileId != null && { ProfileId: input.ProfileId }),
181
- });
177
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
178
+ ProfileId: [],
179
+ }));
182
180
  return new protocol_http_1.HttpRequest({
183
181
  protocol,
184
182
  hostname,
@@ -199,11 +197,11 @@ const se_DeleteProfileKeyCommand = async (input, context) => {
199
197
  "/domains/{DomainName}/profiles/keys/delete";
200
198
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
201
199
  let body;
202
- body = JSON.stringify({
203
- ...(input.KeyName != null && { KeyName: input.KeyName }),
204
- ...(input.ProfileId != null && { ProfileId: input.ProfileId }),
205
- ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }),
206
- });
200
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
201
+ KeyName: [],
202
+ ProfileId: [],
203
+ Values: (_) => (0, smithy_client_1._json)(_),
204
+ }));
207
205
  return new protocol_http_1.HttpRequest({
208
206
  protocol,
209
207
  hostname,
@@ -224,11 +222,11 @@ const se_DeleteProfileObjectCommand = async (input, context) => {
224
222
  "/domains/{DomainName}/profiles/objects/delete";
225
223
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
226
224
  let body;
227
- body = JSON.stringify({
228
- ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }),
229
- ...(input.ProfileId != null && { ProfileId: input.ProfileId }),
230
- ...(input.ProfileObjectUniqueKey != null && { ProfileObjectUniqueKey: input.ProfileObjectUniqueKey }),
231
- });
225
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
226
+ ObjectTypeName: [],
227
+ ProfileId: [],
228
+ ProfileObjectUniqueKey: [],
229
+ }));
232
230
  return new protocol_http_1.HttpRequest({
233
231
  protocol,
234
232
  hostname,
@@ -287,15 +285,11 @@ const se_GetAutoMergingPreviewCommand = async (input, context) => {
287
285
  "/domains/{DomainName}/identity-resolution-jobs/auto-merging-preview";
288
286
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
289
287
  let body;
290
- body = JSON.stringify({
291
- ...(input.ConflictResolution != null && {
292
- ConflictResolution: se_ConflictResolution(input.ConflictResolution, context),
293
- }),
294
- ...(input.Consolidation != null && { Consolidation: se_Consolidation(input.Consolidation, context) }),
295
- ...(input.MinAllowedConfidenceScoreForMerging != null && {
296
- MinAllowedConfidenceScoreForMerging: (0, smithy_client_1.serializeFloat)(input.MinAllowedConfidenceScoreForMerging),
297
- }),
298
- });
288
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
289
+ ConflictResolution: (_) => (0, smithy_client_1._json)(_),
290
+ Consolidation: (_) => (0, smithy_client_1._json)(_),
291
+ MinAllowedConfidenceScoreForMerging: (_) => (0, smithy_client_1.serializeFloat)(_),
292
+ }));
299
293
  return new protocol_http_1.HttpRequest({
300
294
  protocol,
301
295
  hostname,
@@ -351,9 +345,9 @@ const se_GetIntegrationCommand = async (input, context) => {
351
345
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations";
352
346
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
353
347
  let body;
354
- body = JSON.stringify({
355
- ...(input.Uri != null && { Uri: input.Uri }),
356
- });
348
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
349
+ Uri: [],
350
+ }));
357
351
  return new protocol_http_1.HttpRequest({
358
352
  protocol,
359
353
  hostname,
@@ -370,7 +364,7 @@ const se_GetMatchesCommand = async (input, context) => {
370
364
  const headers = {};
371
365
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/matches";
372
366
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
373
- const query = map({
367
+ const query = (0, smithy_client_1.map)({
374
368
  "next-token": [, input.NextToken],
375
369
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
376
370
  });
@@ -449,7 +443,7 @@ const se_GetWorkflowStepsCommand = async (input, context) => {
449
443
  "/domains/{DomainName}/workflows/{WorkflowId}/steps";
450
444
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
451
445
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkflowId", () => input.WorkflowId, "{WorkflowId}", false);
452
- const query = map({
446
+ const query = (0, smithy_client_1.map)({
453
447
  "next-token": [, input.NextToken],
454
448
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
455
449
  });
@@ -472,15 +466,15 @@ const se_ListAccountIntegrationsCommand = async (input, context) => {
472
466
  "content-type": "application/json",
473
467
  };
474
468
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/integrations";
475
- const query = map({
469
+ const query = (0, smithy_client_1.map)({
476
470
  "next-token": [, input.NextToken],
477
471
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
478
472
  "include-hidden": [() => input.IncludeHidden !== void 0, () => input.IncludeHidden.toString()],
479
473
  });
480
474
  let body;
481
- body = JSON.stringify({
482
- ...(input.Uri != null && { Uri: input.Uri }),
483
- });
475
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
476
+ Uri: [],
477
+ }));
484
478
  return new protocol_http_1.HttpRequest({
485
479
  protocol,
486
480
  hostname,
@@ -497,7 +491,7 @@ const se_ListDomainsCommand = async (input, context) => {
497
491
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
498
492
  const headers = {};
499
493
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains";
500
- const query = map({
494
+ const query = (0, smithy_client_1.map)({
501
495
  "next-token": [, input.NextToken],
502
496
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
503
497
  });
@@ -520,7 +514,7 @@ const se_ListIdentityResolutionJobsCommand = async (input, context) => {
520
514
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
521
515
  "/domains/{DomainName}/identity-resolution-jobs";
522
516
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
523
- const query = map({
517
+ const query = (0, smithy_client_1.map)({
524
518
  "next-token": [, input.NextToken],
525
519
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
526
520
  });
@@ -542,7 +536,7 @@ const se_ListIntegrationsCommand = async (input, context) => {
542
536
  const headers = {};
543
537
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations";
544
538
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
545
- const query = map({
539
+ const query = (0, smithy_client_1.map)({
546
540
  "next-token": [, input.NextToken],
547
541
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
548
542
  "include-hidden": [() => input.IncludeHidden !== void 0, () => input.IncludeHidden.toString()],
@@ -567,16 +561,16 @@ const se_ListProfileObjectsCommand = async (input, context) => {
567
561
  };
568
562
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/objects";
569
563
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
570
- const query = map({
564
+ const query = (0, smithy_client_1.map)({
571
565
  "next-token": [, input.NextToken],
572
566
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
573
567
  });
574
568
  let body;
575
- body = JSON.stringify({
576
- ...(input.ObjectFilter != null && { ObjectFilter: se_ObjectFilter(input.ObjectFilter, context) }),
577
- ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }),
578
- ...(input.ProfileId != null && { ProfileId: input.ProfileId }),
579
- });
569
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
570
+ ObjectFilter: (_) => (0, smithy_client_1._json)(_),
571
+ ObjectTypeName: [],
572
+ ProfileId: [],
573
+ }));
580
574
  return new protocol_http_1.HttpRequest({
581
575
  protocol,
582
576
  hostname,
@@ -594,7 +588,7 @@ const se_ListProfileObjectTypesCommand = async (input, context) => {
594
588
  const headers = {};
595
589
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/object-types";
596
590
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
597
- const query = map({
591
+ const query = (0, smithy_client_1.map)({
598
592
  "next-token": [, input.NextToken],
599
593
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
600
594
  });
@@ -615,7 +609,7 @@ const se_ListProfileObjectTypeTemplatesCommand = async (input, context) => {
615
609
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
616
610
  const headers = {};
617
611
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates";
618
- const query = map({
612
+ const query = (0, smithy_client_1.map)({
619
613
  "next-token": [, input.NextToken],
620
614
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
621
615
  });
@@ -656,17 +650,17 @@ const se_ListWorkflowsCommand = async (input, context) => {
656
650
  };
657
651
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/workflows";
658
652
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
659
- const query = map({
653
+ const query = (0, smithy_client_1.map)({
660
654
  "next-token": [, input.NextToken],
661
655
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
662
656
  });
663
657
  let body;
664
- body = JSON.stringify({
665
- ...(input.QueryEndDate != null && { QueryEndDate: Math.round(input.QueryEndDate.getTime() / 1000) }),
666
- ...(input.QueryStartDate != null && { QueryStartDate: Math.round(input.QueryStartDate.getTime() / 1000) }),
667
- ...(input.Status != null && { Status: input.Status }),
668
- ...(input.WorkflowType != null && { WorkflowType: input.WorkflowType }),
669
- });
658
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
659
+ QueryEndDate: (_) => Math.round(_.getTime() / 1000),
660
+ QueryStartDate: (_) => Math.round(_.getTime() / 1000),
661
+ Status: [],
662
+ WorkflowType: [],
663
+ }));
670
664
  return new protocol_http_1.HttpRequest({
671
665
  protocol,
672
666
  hostname,
@@ -688,15 +682,11 @@ const se_MergeProfilesCommand = async (input, context) => {
688
682
  "/domains/{DomainName}/profiles/objects/merge";
689
683
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
690
684
  let body;
691
- body = JSON.stringify({
692
- ...(input.FieldSourceProfileIds != null && {
693
- FieldSourceProfileIds: se_FieldSourceProfileIds(input.FieldSourceProfileIds, context),
694
- }),
695
- ...(input.MainProfileId != null && { MainProfileId: input.MainProfileId }),
696
- ...(input.ProfileIdsToBeMerged != null && {
697
- ProfileIdsToBeMerged: se_ProfileIdToBeMergedList(input.ProfileIdsToBeMerged, context),
698
- }),
699
- });
685
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
686
+ FieldSourceProfileIds: (_) => (0, smithy_client_1._json)(_),
687
+ MainProfileId: [],
688
+ ProfileIdsToBeMerged: (_) => (0, smithy_client_1._json)(_),
689
+ }));
700
690
  return new protocol_http_1.HttpRequest({
701
691
  protocol,
702
692
  hostname,
@@ -716,13 +706,13 @@ const se_PutIntegrationCommand = async (input, context) => {
716
706
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations";
717
707
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
718
708
  let body;
719
- body = JSON.stringify({
720
- ...(input.FlowDefinition != null && { FlowDefinition: se_FlowDefinition(input.FlowDefinition, context) }),
721
- ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }),
722
- ...(input.ObjectTypeNames != null && { ObjectTypeNames: se_ObjectTypeNames(input.ObjectTypeNames, context) }),
723
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
724
- ...(input.Uri != null && { Uri: input.Uri }),
725
- });
709
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
710
+ FlowDefinition: (_) => se_FlowDefinition(_, context),
711
+ ObjectTypeName: [],
712
+ ObjectTypeNames: (_) => (0, smithy_client_1._json)(_),
713
+ Tags: (_) => (0, smithy_client_1._json)(_),
714
+ Uri: [],
715
+ }));
726
716
  return new protocol_http_1.HttpRequest({
727
717
  protocol,
728
718
  hostname,
@@ -742,10 +732,10 @@ const se_PutProfileObjectCommand = async (input, context) => {
742
732
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/objects";
743
733
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
744
734
  let body;
745
- body = JSON.stringify({
746
- ...(input.Object != null && { Object: input.Object }),
747
- ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }),
748
- });
735
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
736
+ Object: [],
737
+ ObjectTypeName: [],
738
+ }));
749
739
  return new protocol_http_1.HttpRequest({
750
740
  protocol,
751
741
  hostname,
@@ -767,19 +757,17 @@ const se_PutProfileObjectTypeCommand = async (input, context) => {
767
757
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
768
758
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ObjectTypeName", () => input.ObjectTypeName, "{ObjectTypeName}", false);
769
759
  let body;
770
- body = JSON.stringify({
771
- ...(input.AllowProfileCreation != null && { AllowProfileCreation: input.AllowProfileCreation }),
772
- ...(input.Description != null && { Description: input.Description }),
773
- ...(input.EncryptionKey != null && { EncryptionKey: input.EncryptionKey }),
774
- ...(input.ExpirationDays != null && { ExpirationDays: input.ExpirationDays }),
775
- ...(input.Fields != null && { Fields: se_FieldMap(input.Fields, context) }),
776
- ...(input.Keys != null && { Keys: se_KeyMap(input.Keys, context) }),
777
- ...(input.SourceLastUpdatedTimestampFormat != null && {
778
- SourceLastUpdatedTimestampFormat: input.SourceLastUpdatedTimestampFormat,
779
- }),
780
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
781
- ...(input.TemplateId != null && { TemplateId: input.TemplateId }),
782
- });
760
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
761
+ AllowProfileCreation: [],
762
+ Description: [],
763
+ EncryptionKey: [],
764
+ ExpirationDays: [],
765
+ Fields: (_) => (0, smithy_client_1._json)(_),
766
+ Keys: (_) => (0, smithy_client_1._json)(_),
767
+ SourceLastUpdatedTimestampFormat: [],
768
+ Tags: (_) => (0, smithy_client_1._json)(_),
769
+ TemplateId: [],
770
+ }));
783
771
  return new protocol_http_1.HttpRequest({
784
772
  protocol,
785
773
  hostname,
@@ -798,19 +786,17 @@ const se_SearchProfilesCommand = async (input, context) => {
798
786
  };
799
787
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/search";
800
788
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
801
- const query = map({
789
+ const query = (0, smithy_client_1.map)({
802
790
  "next-token": [, input.NextToken],
803
791
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
804
792
  });
805
793
  let body;
806
- body = JSON.stringify({
807
- ...(input.AdditionalSearchKeys != null && {
808
- AdditionalSearchKeys: se_additionalSearchKeysList(input.AdditionalSearchKeys, context),
809
- }),
810
- ...(input.KeyName != null && { KeyName: input.KeyName }),
811
- ...(input.LogicalOperator != null && { LogicalOperator: input.LogicalOperator }),
812
- ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }),
813
- });
794
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
795
+ AdditionalSearchKeys: (_) => (0, smithy_client_1._json)(_),
796
+ KeyName: [],
797
+ LogicalOperator: [],
798
+ Values: (_) => (0, smithy_client_1._json)(_),
799
+ }));
814
800
  return new protocol_http_1.HttpRequest({
815
801
  protocol,
816
802
  hostname,
@@ -831,9 +817,9 @@ const se_TagResourceCommand = async (input, context) => {
831
817
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
832
818
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
833
819
  let body;
834
- body = JSON.stringify({
835
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
836
- });
820
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
821
+ tags: (_) => (0, smithy_client_1._json)(_),
822
+ }));
837
823
  return new protocol_http_1.HttpRequest({
838
824
  protocol,
839
825
  hostname,
@@ -850,7 +836,7 @@ const se_UntagResourceCommand = async (input, context) => {
850
836
  const headers = {};
851
837
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
852
838
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
853
- const query = map({
839
+ const query = (0, smithy_client_1.map)({
854
840
  tagKeys: [
855
841
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
856
842
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -877,13 +863,13 @@ const se_UpdateDomainCommand = async (input, context) => {
877
863
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}";
878
864
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
879
865
  let body;
880
- body = JSON.stringify({
881
- ...(input.DeadLetterQueueUrl != null && { DeadLetterQueueUrl: input.DeadLetterQueueUrl }),
882
- ...(input.DefaultEncryptionKey != null && { DefaultEncryptionKey: input.DefaultEncryptionKey }),
883
- ...(input.DefaultExpirationDays != null && { DefaultExpirationDays: input.DefaultExpirationDays }),
884
- ...(input.Matching != null && { Matching: se_MatchingRequest(input.Matching, context) }),
885
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
886
- });
866
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
867
+ DeadLetterQueueUrl: [],
868
+ DefaultEncryptionKey: [],
869
+ DefaultExpirationDays: [],
870
+ Matching: (_) => se_MatchingRequest(_, context),
871
+ Tags: (_) => (0, smithy_client_1._json)(_),
872
+ }));
887
873
  return new protocol_http_1.HttpRequest({
888
874
  protocol,
889
875
  hostname,
@@ -903,32 +889,32 @@ const se_UpdateProfileCommand = async (input, context) => {
903
889
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles";
904
890
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
905
891
  let body;
906
- body = JSON.stringify({
907
- ...(input.AccountNumber != null && { AccountNumber: input.AccountNumber }),
908
- ...(input.AdditionalInformation != null && { AdditionalInformation: input.AdditionalInformation }),
909
- ...(input.Address != null && { Address: se_UpdateAddress(input.Address, context) }),
910
- ...(input.Attributes != null && { Attributes: se_UpdateAttributes(input.Attributes, context) }),
911
- ...(input.BillingAddress != null && { BillingAddress: se_UpdateAddress(input.BillingAddress, context) }),
912
- ...(input.BirthDate != null && { BirthDate: input.BirthDate }),
913
- ...(input.BusinessEmailAddress != null && { BusinessEmailAddress: input.BusinessEmailAddress }),
914
- ...(input.BusinessName != null && { BusinessName: input.BusinessName }),
915
- ...(input.BusinessPhoneNumber != null && { BusinessPhoneNumber: input.BusinessPhoneNumber }),
916
- ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }),
917
- ...(input.FirstName != null && { FirstName: input.FirstName }),
918
- ...(input.Gender != null && { Gender: input.Gender }),
919
- ...(input.GenderString != null && { GenderString: input.GenderString }),
920
- ...(input.HomePhoneNumber != null && { HomePhoneNumber: input.HomePhoneNumber }),
921
- ...(input.LastName != null && { LastName: input.LastName }),
922
- ...(input.MailingAddress != null && { MailingAddress: se_UpdateAddress(input.MailingAddress, context) }),
923
- ...(input.MiddleName != null && { MiddleName: input.MiddleName }),
924
- ...(input.MobilePhoneNumber != null && { MobilePhoneNumber: input.MobilePhoneNumber }),
925
- ...(input.PartyType != null && { PartyType: input.PartyType }),
926
- ...(input.PartyTypeString != null && { PartyTypeString: input.PartyTypeString }),
927
- ...(input.PersonalEmailAddress != null && { PersonalEmailAddress: input.PersonalEmailAddress }),
928
- ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
929
- ...(input.ProfileId != null && { ProfileId: input.ProfileId }),
930
- ...(input.ShippingAddress != null && { ShippingAddress: se_UpdateAddress(input.ShippingAddress, context) }),
931
- });
892
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
893
+ AccountNumber: [],
894
+ AdditionalInformation: [],
895
+ Address: (_) => (0, smithy_client_1._json)(_),
896
+ Attributes: (_) => (0, smithy_client_1._json)(_),
897
+ BillingAddress: (_) => (0, smithy_client_1._json)(_),
898
+ BirthDate: [],
899
+ BusinessEmailAddress: [],
900
+ BusinessName: [],
901
+ BusinessPhoneNumber: [],
902
+ EmailAddress: [],
903
+ FirstName: [],
904
+ Gender: [],
905
+ GenderString: [],
906
+ HomePhoneNumber: [],
907
+ LastName: [],
908
+ MailingAddress: (_) => (0, smithy_client_1._json)(_),
909
+ MiddleName: [],
910
+ MobilePhoneNumber: [],
911
+ PartyType: [],
912
+ PartyTypeString: [],
913
+ PersonalEmailAddress: [],
914
+ PhoneNumber: [],
915
+ ProfileId: [],
916
+ ShippingAddress: (_) => (0, smithy_client_1._json)(_),
917
+ }));
932
918
  return new protocol_http_1.HttpRequest({
933
919
  protocol,
934
920
  hostname,
@@ -944,16 +930,15 @@ const de_AddProfileKeyCommand = async (output, context) => {
944
930
  if (output.statusCode !== 200 && output.statusCode >= 300) {
945
931
  return de_AddProfileKeyCommandError(output, context);
946
932
  }
947
- const contents = map({
933
+ const contents = (0, smithy_client_1.map)({
948
934
  $metadata: deserializeMetadata(output),
949
935
  });
950
936
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
951
- if (data.KeyName != null) {
952
- contents.KeyName = (0, smithy_client_1.expectString)(data.KeyName);
953
- }
954
- if (data.Values != null) {
955
- contents.Values = de_requestValueList(data.Values, context);
956
- }
937
+ const doc = (0, smithy_client_1.take)(data, {
938
+ KeyName: smithy_client_1.expectString,
939
+ Values: smithy_client_1._json,
940
+ });
941
+ Object.assign(contents, doc);
957
942
  return contents;
958
943
  };
959
944
  exports.de_AddProfileKeyCommand = de_AddProfileKeyCommand;
@@ -981,10 +966,9 @@ const de_AddProfileKeyCommandError = async (output, context) => {
981
966
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
982
967
  default:
983
968
  const parsedBody = parsedOutput.body;
984
- (0, smithy_client_1.throwDefaultError)({
969
+ return throwDefaultError({
985
970
  output,
986
971
  parsedBody,
987
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
988
972
  errorCode,
989
973
  });
990
974
  }
@@ -993,34 +977,21 @@ const de_CreateDomainCommand = async (output, context) => {
993
977
  if (output.statusCode !== 200 && output.statusCode >= 300) {
994
978
  return de_CreateDomainCommandError(output, context);
995
979
  }
996
- const contents = map({
980
+ const contents = (0, smithy_client_1.map)({
997
981
  $metadata: deserializeMetadata(output),
998
982
  });
999
983
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1000
- if (data.CreatedAt != null) {
1001
- contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
1002
- }
1003
- if (data.DeadLetterQueueUrl != null) {
1004
- contents.DeadLetterQueueUrl = (0, smithy_client_1.expectString)(data.DeadLetterQueueUrl);
1005
- }
1006
- if (data.DefaultEncryptionKey != null) {
1007
- contents.DefaultEncryptionKey = (0, smithy_client_1.expectString)(data.DefaultEncryptionKey);
1008
- }
1009
- if (data.DefaultExpirationDays != null) {
1010
- contents.DefaultExpirationDays = (0, smithy_client_1.expectInt32)(data.DefaultExpirationDays);
1011
- }
1012
- if (data.DomainName != null) {
1013
- contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
1014
- }
1015
- if (data.LastUpdatedAt != null) {
1016
- contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
1017
- }
1018
- if (data.Matching != null) {
1019
- contents.Matching = de_MatchingResponse(data.Matching, context);
1020
- }
1021
- if (data.Tags != null) {
1022
- contents.Tags = de_TagMap(data.Tags, context);
1023
- }
984
+ const doc = (0, smithy_client_1.take)(data, {
985
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
986
+ DeadLetterQueueUrl: smithy_client_1.expectString,
987
+ DefaultEncryptionKey: smithy_client_1.expectString,
988
+ DefaultExpirationDays: smithy_client_1.expectInt32,
989
+ DomainName: smithy_client_1.expectString,
990
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
991
+ Matching: (_) => de_MatchingResponse(_, context),
992
+ Tags: smithy_client_1._json,
993
+ });
994
+ Object.assign(contents, doc);
1024
995
  return contents;
1025
996
  };
1026
997
  exports.de_CreateDomainCommand = de_CreateDomainCommand;
@@ -1048,10 +1019,9 @@ const de_CreateDomainCommandError = async (output, context) => {
1048
1019
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1049
1020
  default:
1050
1021
  const parsedBody = parsedOutput.body;
1051
- (0, smithy_client_1.throwDefaultError)({
1022
+ return throwDefaultError({
1052
1023
  output,
1053
1024
  parsedBody,
1054
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1055
1025
  errorCode,
1056
1026
  });
1057
1027
  }
@@ -1060,16 +1030,15 @@ const de_CreateIntegrationWorkflowCommand = async (output, context) => {
1060
1030
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1061
1031
  return de_CreateIntegrationWorkflowCommandError(output, context);
1062
1032
  }
1063
- const contents = map({
1033
+ const contents = (0, smithy_client_1.map)({
1064
1034
  $metadata: deserializeMetadata(output),
1065
1035
  });
1066
1036
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1067
- if (data.Message != null) {
1068
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1069
- }
1070
- if (data.WorkflowId != null) {
1071
- contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
1072
- }
1037
+ const doc = (0, smithy_client_1.take)(data, {
1038
+ Message: smithy_client_1.expectString,
1039
+ WorkflowId: smithy_client_1.expectString,
1040
+ });
1041
+ Object.assign(contents, doc);
1073
1042
  return contents;
1074
1043
  };
1075
1044
  exports.de_CreateIntegrationWorkflowCommand = de_CreateIntegrationWorkflowCommand;
@@ -1097,10 +1066,9 @@ const de_CreateIntegrationWorkflowCommandError = async (output, context) => {
1097
1066
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1098
1067
  default:
1099
1068
  const parsedBody = parsedOutput.body;
1100
- (0, smithy_client_1.throwDefaultError)({
1069
+ return throwDefaultError({
1101
1070
  output,
1102
1071
  parsedBody,
1103
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1104
1072
  errorCode,
1105
1073
  });
1106
1074
  }
@@ -1109,13 +1077,14 @@ const de_CreateProfileCommand = async (output, context) => {
1109
1077
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1110
1078
  return de_CreateProfileCommandError(output, context);
1111
1079
  }
1112
- const contents = map({
1080
+ const contents = (0, smithy_client_1.map)({
1113
1081
  $metadata: deserializeMetadata(output),
1114
1082
  });
1115
1083
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1116
- if (data.ProfileId != null) {
1117
- contents.ProfileId = (0, smithy_client_1.expectString)(data.ProfileId);
1118
- }
1084
+ const doc = (0, smithy_client_1.take)(data, {
1085
+ ProfileId: smithy_client_1.expectString,
1086
+ });
1087
+ Object.assign(contents, doc);
1119
1088
  return contents;
1120
1089
  };
1121
1090
  exports.de_CreateProfileCommand = de_CreateProfileCommand;
@@ -1143,10 +1112,9 @@ const de_CreateProfileCommandError = async (output, context) => {
1143
1112
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1144
1113
  default:
1145
1114
  const parsedBody = parsedOutput.body;
1146
- (0, smithy_client_1.throwDefaultError)({
1115
+ return throwDefaultError({
1147
1116
  output,
1148
1117
  parsedBody,
1149
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1150
1118
  errorCode,
1151
1119
  });
1152
1120
  }
@@ -1155,13 +1123,14 @@ const de_DeleteDomainCommand = async (output, context) => {
1155
1123
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1156
1124
  return de_DeleteDomainCommandError(output, context);
1157
1125
  }
1158
- const contents = map({
1126
+ const contents = (0, smithy_client_1.map)({
1159
1127
  $metadata: deserializeMetadata(output),
1160
1128
  });
1161
1129
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1162
- if (data.Message != null) {
1163
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1164
- }
1130
+ const doc = (0, smithy_client_1.take)(data, {
1131
+ Message: smithy_client_1.expectString,
1132
+ });
1133
+ Object.assign(contents, doc);
1165
1134
  return contents;
1166
1135
  };
1167
1136
  exports.de_DeleteDomainCommand = de_DeleteDomainCommand;
@@ -1189,10 +1158,9 @@ const de_DeleteDomainCommandError = async (output, context) => {
1189
1158
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1190
1159
  default:
1191
1160
  const parsedBody = parsedOutput.body;
1192
- (0, smithy_client_1.throwDefaultError)({
1161
+ return throwDefaultError({
1193
1162
  output,
1194
1163
  parsedBody,
1195
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1196
1164
  errorCode,
1197
1165
  });
1198
1166
  }
@@ -1201,13 +1169,14 @@ const de_DeleteIntegrationCommand = async (output, context) => {
1201
1169
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1202
1170
  return de_DeleteIntegrationCommandError(output, context);
1203
1171
  }
1204
- const contents = map({
1172
+ const contents = (0, smithy_client_1.map)({
1205
1173
  $metadata: deserializeMetadata(output),
1206
1174
  });
1207
1175
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1208
- if (data.Message != null) {
1209
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1210
- }
1176
+ const doc = (0, smithy_client_1.take)(data, {
1177
+ Message: smithy_client_1.expectString,
1178
+ });
1179
+ Object.assign(contents, doc);
1211
1180
  return contents;
1212
1181
  };
1213
1182
  exports.de_DeleteIntegrationCommand = de_DeleteIntegrationCommand;
@@ -1235,10 +1204,9 @@ const de_DeleteIntegrationCommandError = async (output, context) => {
1235
1204
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1236
1205
  default:
1237
1206
  const parsedBody = parsedOutput.body;
1238
- (0, smithy_client_1.throwDefaultError)({
1207
+ return throwDefaultError({
1239
1208
  output,
1240
1209
  parsedBody,
1241
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1242
1210
  errorCode,
1243
1211
  });
1244
1212
  }
@@ -1247,13 +1215,14 @@ const de_DeleteProfileCommand = async (output, context) => {
1247
1215
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1248
1216
  return de_DeleteProfileCommandError(output, context);
1249
1217
  }
1250
- const contents = map({
1218
+ const contents = (0, smithy_client_1.map)({
1251
1219
  $metadata: deserializeMetadata(output),
1252
1220
  });
1253
1221
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1254
- if (data.Message != null) {
1255
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1256
- }
1222
+ const doc = (0, smithy_client_1.take)(data, {
1223
+ Message: smithy_client_1.expectString,
1224
+ });
1225
+ Object.assign(contents, doc);
1257
1226
  return contents;
1258
1227
  };
1259
1228
  exports.de_DeleteProfileCommand = de_DeleteProfileCommand;
@@ -1281,10 +1250,9 @@ const de_DeleteProfileCommandError = async (output, context) => {
1281
1250
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1282
1251
  default:
1283
1252
  const parsedBody = parsedOutput.body;
1284
- (0, smithy_client_1.throwDefaultError)({
1253
+ return throwDefaultError({
1285
1254
  output,
1286
1255
  parsedBody,
1287
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1288
1256
  errorCode,
1289
1257
  });
1290
1258
  }
@@ -1293,13 +1261,14 @@ const de_DeleteProfileKeyCommand = async (output, context) => {
1293
1261
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1294
1262
  return de_DeleteProfileKeyCommandError(output, context);
1295
1263
  }
1296
- const contents = map({
1264
+ const contents = (0, smithy_client_1.map)({
1297
1265
  $metadata: deserializeMetadata(output),
1298
1266
  });
1299
1267
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1300
- if (data.Message != null) {
1301
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1302
- }
1268
+ const doc = (0, smithy_client_1.take)(data, {
1269
+ Message: smithy_client_1.expectString,
1270
+ });
1271
+ Object.assign(contents, doc);
1303
1272
  return contents;
1304
1273
  };
1305
1274
  exports.de_DeleteProfileKeyCommand = de_DeleteProfileKeyCommand;
@@ -1327,10 +1296,9 @@ const de_DeleteProfileKeyCommandError = async (output, context) => {
1327
1296
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1328
1297
  default:
1329
1298
  const parsedBody = parsedOutput.body;
1330
- (0, smithy_client_1.throwDefaultError)({
1299
+ return throwDefaultError({
1331
1300
  output,
1332
1301
  parsedBody,
1333
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1334
1302
  errorCode,
1335
1303
  });
1336
1304
  }
@@ -1339,13 +1307,14 @@ const de_DeleteProfileObjectCommand = async (output, context) => {
1339
1307
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1340
1308
  return de_DeleteProfileObjectCommandError(output, context);
1341
1309
  }
1342
- const contents = map({
1310
+ const contents = (0, smithy_client_1.map)({
1343
1311
  $metadata: deserializeMetadata(output),
1344
1312
  });
1345
1313
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1346
- if (data.Message != null) {
1347
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1348
- }
1314
+ const doc = (0, smithy_client_1.take)(data, {
1315
+ Message: smithy_client_1.expectString,
1316
+ });
1317
+ Object.assign(contents, doc);
1349
1318
  return contents;
1350
1319
  };
1351
1320
  exports.de_DeleteProfileObjectCommand = de_DeleteProfileObjectCommand;
@@ -1373,10 +1342,9 @@ const de_DeleteProfileObjectCommandError = async (output, context) => {
1373
1342
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1374
1343
  default:
1375
1344
  const parsedBody = parsedOutput.body;
1376
- (0, smithy_client_1.throwDefaultError)({
1345
+ return throwDefaultError({
1377
1346
  output,
1378
1347
  parsedBody,
1379
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1380
1348
  errorCode,
1381
1349
  });
1382
1350
  }
@@ -1385,13 +1353,14 @@ const de_DeleteProfileObjectTypeCommand = async (output, context) => {
1385
1353
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1386
1354
  return de_DeleteProfileObjectTypeCommandError(output, context);
1387
1355
  }
1388
- const contents = map({
1356
+ const contents = (0, smithy_client_1.map)({
1389
1357
  $metadata: deserializeMetadata(output),
1390
1358
  });
1391
1359
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1392
- if (data.Message != null) {
1393
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1394
- }
1360
+ const doc = (0, smithy_client_1.take)(data, {
1361
+ Message: smithy_client_1.expectString,
1362
+ });
1363
+ Object.assign(contents, doc);
1395
1364
  return contents;
1396
1365
  };
1397
1366
  exports.de_DeleteProfileObjectTypeCommand = de_DeleteProfileObjectTypeCommand;
@@ -1419,10 +1388,9 @@ const de_DeleteProfileObjectTypeCommandError = async (output, context) => {
1419
1388
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1420
1389
  default:
1421
1390
  const parsedBody = parsedOutput.body;
1422
- (0, smithy_client_1.throwDefaultError)({
1391
+ return throwDefaultError({
1423
1392
  output,
1424
1393
  parsedBody,
1425
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1426
1394
  errorCode,
1427
1395
  });
1428
1396
  }
@@ -1431,7 +1399,7 @@ const de_DeleteWorkflowCommand = async (output, context) => {
1431
1399
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1432
1400
  return de_DeleteWorkflowCommandError(output, context);
1433
1401
  }
1434
- const contents = map({
1402
+ const contents = (0, smithy_client_1.map)({
1435
1403
  $metadata: deserializeMetadata(output),
1436
1404
  });
1437
1405
  await collectBody(output.body, context);
@@ -1462,10 +1430,9 @@ const de_DeleteWorkflowCommandError = async (output, context) => {
1462
1430
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1463
1431
  default:
1464
1432
  const parsedBody = parsedOutput.body;
1465
- (0, smithy_client_1.throwDefaultError)({
1433
+ return throwDefaultError({
1466
1434
  output,
1467
1435
  parsedBody,
1468
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1469
1436
  errorCode,
1470
1437
  });
1471
1438
  }
@@ -1474,22 +1441,17 @@ const de_GetAutoMergingPreviewCommand = async (output, context) => {
1474
1441
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1475
1442
  return de_GetAutoMergingPreviewCommandError(output, context);
1476
1443
  }
1477
- const contents = map({
1444
+ const contents = (0, smithy_client_1.map)({
1478
1445
  $metadata: deserializeMetadata(output),
1479
1446
  });
1480
1447
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1481
- if (data.DomainName != null) {
1482
- contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
1483
- }
1484
- if (data.NumberOfMatchesInSample != null) {
1485
- contents.NumberOfMatchesInSample = (0, smithy_client_1.expectLong)(data.NumberOfMatchesInSample);
1486
- }
1487
- if (data.NumberOfProfilesInSample != null) {
1488
- contents.NumberOfProfilesInSample = (0, smithy_client_1.expectLong)(data.NumberOfProfilesInSample);
1489
- }
1490
- if (data.NumberOfProfilesWillBeMerged != null) {
1491
- contents.NumberOfProfilesWillBeMerged = (0, smithy_client_1.expectLong)(data.NumberOfProfilesWillBeMerged);
1492
- }
1448
+ const doc = (0, smithy_client_1.take)(data, {
1449
+ DomainName: smithy_client_1.expectString,
1450
+ NumberOfMatchesInSample: smithy_client_1.expectLong,
1451
+ NumberOfProfilesInSample: smithy_client_1.expectLong,
1452
+ NumberOfProfilesWillBeMerged: smithy_client_1.expectLong,
1453
+ });
1454
+ Object.assign(contents, doc);
1493
1455
  return contents;
1494
1456
  };
1495
1457
  exports.de_GetAutoMergingPreviewCommand = de_GetAutoMergingPreviewCommand;
@@ -1517,10 +1479,9 @@ const de_GetAutoMergingPreviewCommandError = async (output, context) => {
1517
1479
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1518
1480
  default:
1519
1481
  const parsedBody = parsedOutput.body;
1520
- (0, smithy_client_1.throwDefaultError)({
1482
+ return throwDefaultError({
1521
1483
  output,
1522
1484
  parsedBody,
1523
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1524
1485
  errorCode,
1525
1486
  });
1526
1487
  }
@@ -1529,37 +1490,22 @@ const de_GetDomainCommand = async (output, context) => {
1529
1490
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1530
1491
  return de_GetDomainCommandError(output, context);
1531
1492
  }
1532
- const contents = map({
1493
+ const contents = (0, smithy_client_1.map)({
1533
1494
  $metadata: deserializeMetadata(output),
1534
1495
  });
1535
1496
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1536
- if (data.CreatedAt != null) {
1537
- contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
1538
- }
1539
- if (data.DeadLetterQueueUrl != null) {
1540
- contents.DeadLetterQueueUrl = (0, smithy_client_1.expectString)(data.DeadLetterQueueUrl);
1541
- }
1542
- if (data.DefaultEncryptionKey != null) {
1543
- contents.DefaultEncryptionKey = (0, smithy_client_1.expectString)(data.DefaultEncryptionKey);
1544
- }
1545
- if (data.DefaultExpirationDays != null) {
1546
- contents.DefaultExpirationDays = (0, smithy_client_1.expectInt32)(data.DefaultExpirationDays);
1547
- }
1548
- if (data.DomainName != null) {
1549
- contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
1550
- }
1551
- if (data.LastUpdatedAt != null) {
1552
- contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
1553
- }
1554
- if (data.Matching != null) {
1555
- contents.Matching = de_MatchingResponse(data.Matching, context);
1556
- }
1557
- if (data.Stats != null) {
1558
- contents.Stats = de_DomainStats(data.Stats, context);
1559
- }
1560
- if (data.Tags != null) {
1561
- contents.Tags = de_TagMap(data.Tags, context);
1562
- }
1497
+ const doc = (0, smithy_client_1.take)(data, {
1498
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1499
+ DeadLetterQueueUrl: smithy_client_1.expectString,
1500
+ DefaultEncryptionKey: smithy_client_1.expectString,
1501
+ DefaultExpirationDays: smithy_client_1.expectInt32,
1502
+ DomainName: smithy_client_1.expectString,
1503
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1504
+ Matching: (_) => de_MatchingResponse(_, context),
1505
+ Stats: smithy_client_1._json,
1506
+ Tags: smithy_client_1._json,
1507
+ });
1508
+ Object.assign(contents, doc);
1563
1509
  return contents;
1564
1510
  };
1565
1511
  exports.de_GetDomainCommand = de_GetDomainCommand;
@@ -1587,10 +1533,9 @@ const de_GetDomainCommandError = async (output, context) => {
1587
1533
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1588
1534
  default:
1589
1535
  const parsedBody = parsedOutput.body;
1590
- (0, smithy_client_1.throwDefaultError)({
1536
+ return throwDefaultError({
1591
1537
  output,
1592
1538
  parsedBody,
1593
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1594
1539
  errorCode,
1595
1540
  });
1596
1541
  }
@@ -1599,43 +1544,24 @@ const de_GetIdentityResolutionJobCommand = async (output, context) => {
1599
1544
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1600
1545
  return de_GetIdentityResolutionJobCommandError(output, context);
1601
1546
  }
1602
- const contents = map({
1547
+ const contents = (0, smithy_client_1.map)({
1603
1548
  $metadata: deserializeMetadata(output),
1604
1549
  });
1605
1550
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1606
- if (data.AutoMerging != null) {
1607
- contents.AutoMerging = de_AutoMerging(data.AutoMerging, context);
1608
- }
1609
- if (data.DomainName != null) {
1610
- contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
1611
- }
1612
- if (data.ExportingLocation != null) {
1613
- contents.ExportingLocation = de_ExportingLocation(data.ExportingLocation, context);
1614
- }
1615
- if (data.JobEndTime != null) {
1616
- contents.JobEndTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.JobEndTime)));
1617
- }
1618
- if (data.JobExpirationTime != null) {
1619
- contents.JobExpirationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.JobExpirationTime)));
1620
- }
1621
- if (data.JobId != null) {
1622
- contents.JobId = (0, smithy_client_1.expectString)(data.JobId);
1623
- }
1624
- if (data.JobStartTime != null) {
1625
- contents.JobStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.JobStartTime)));
1626
- }
1627
- if (data.JobStats != null) {
1628
- contents.JobStats = de_JobStats(data.JobStats, context);
1629
- }
1630
- if (data.LastUpdatedAt != null) {
1631
- contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
1632
- }
1633
- if (data.Message != null) {
1634
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1635
- }
1636
- if (data.Status != null) {
1637
- contents.Status = (0, smithy_client_1.expectString)(data.Status);
1638
- }
1551
+ const doc = (0, smithy_client_1.take)(data, {
1552
+ AutoMerging: (_) => de_AutoMerging(_, context),
1553
+ DomainName: smithy_client_1.expectString,
1554
+ ExportingLocation: smithy_client_1._json,
1555
+ JobEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1556
+ JobExpirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1557
+ JobId: smithy_client_1.expectString,
1558
+ JobStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1559
+ JobStats: smithy_client_1._json,
1560
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1561
+ Message: smithy_client_1.expectString,
1562
+ Status: smithy_client_1.expectString,
1563
+ });
1564
+ Object.assign(contents, doc);
1639
1565
  return contents;
1640
1566
  };
1641
1567
  exports.de_GetIdentityResolutionJobCommand = de_GetIdentityResolutionJobCommand;
@@ -1663,10 +1589,9 @@ const de_GetIdentityResolutionJobCommandError = async (output, context) => {
1663
1589
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1664
1590
  default:
1665
1591
  const parsedBody = parsedOutput.body;
1666
- (0, smithy_client_1.throwDefaultError)({
1592
+ return throwDefaultError({
1667
1593
  output,
1668
1594
  parsedBody,
1669
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1670
1595
  errorCode,
1671
1596
  });
1672
1597
  }
@@ -1675,37 +1600,22 @@ const de_GetIntegrationCommand = async (output, context) => {
1675
1600
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1676
1601
  return de_GetIntegrationCommandError(output, context);
1677
1602
  }
1678
- const contents = map({
1603
+ const contents = (0, smithy_client_1.map)({
1679
1604
  $metadata: deserializeMetadata(output),
1680
1605
  });
1681
1606
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1682
- if (data.CreatedAt != null) {
1683
- contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
1684
- }
1685
- if (data.DomainName != null) {
1686
- contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
1687
- }
1688
- if (data.IsUnstructured != null) {
1689
- contents.IsUnstructured = (0, smithy_client_1.expectBoolean)(data.IsUnstructured);
1690
- }
1691
- if (data.LastUpdatedAt != null) {
1692
- contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
1693
- }
1694
- if (data.ObjectTypeName != null) {
1695
- contents.ObjectTypeName = (0, smithy_client_1.expectString)(data.ObjectTypeName);
1696
- }
1697
- if (data.ObjectTypeNames != null) {
1698
- contents.ObjectTypeNames = de_ObjectTypeNames(data.ObjectTypeNames, context);
1699
- }
1700
- if (data.Tags != null) {
1701
- contents.Tags = de_TagMap(data.Tags, context);
1702
- }
1703
- if (data.Uri != null) {
1704
- contents.Uri = (0, smithy_client_1.expectString)(data.Uri);
1705
- }
1706
- if (data.WorkflowId != null) {
1707
- contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
1708
- }
1607
+ const doc = (0, smithy_client_1.take)(data, {
1608
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1609
+ DomainName: smithy_client_1.expectString,
1610
+ IsUnstructured: smithy_client_1.expectBoolean,
1611
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1612
+ ObjectTypeName: smithy_client_1.expectString,
1613
+ ObjectTypeNames: smithy_client_1._json,
1614
+ Tags: smithy_client_1._json,
1615
+ Uri: smithy_client_1.expectString,
1616
+ WorkflowId: smithy_client_1.expectString,
1617
+ });
1618
+ Object.assign(contents, doc);
1709
1619
  return contents;
1710
1620
  };
1711
1621
  exports.de_GetIntegrationCommand = de_GetIntegrationCommand;
@@ -1733,10 +1643,9 @@ const de_GetIntegrationCommandError = async (output, context) => {
1733
1643
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1734
1644
  default:
1735
1645
  const parsedBody = parsedOutput.body;
1736
- (0, smithy_client_1.throwDefaultError)({
1646
+ return throwDefaultError({
1737
1647
  output,
1738
1648
  parsedBody,
1739
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1740
1649
  errorCode,
1741
1650
  });
1742
1651
  }
@@ -1745,22 +1654,17 @@ const de_GetMatchesCommand = async (output, context) => {
1745
1654
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1746
1655
  return de_GetMatchesCommandError(output, context);
1747
1656
  }
1748
- const contents = map({
1657
+ const contents = (0, smithy_client_1.map)({
1749
1658
  $metadata: deserializeMetadata(output),
1750
1659
  });
1751
1660
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1752
- if (data.MatchGenerationDate != null) {
1753
- contents.MatchGenerationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.MatchGenerationDate)));
1754
- }
1755
- if (data.Matches != null) {
1756
- contents.Matches = de_MatchesList(data.Matches, context);
1757
- }
1758
- if (data.NextToken != null) {
1759
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1760
- }
1761
- if (data.PotentialMatches != null) {
1762
- contents.PotentialMatches = (0, smithy_client_1.expectInt32)(data.PotentialMatches);
1763
- }
1661
+ const doc = (0, smithy_client_1.take)(data, {
1662
+ MatchGenerationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1663
+ Matches: (_) => de_MatchesList(_, context),
1664
+ NextToken: smithy_client_1.expectString,
1665
+ PotentialMatches: smithy_client_1.expectInt32,
1666
+ });
1667
+ Object.assign(contents, doc);
1764
1668
  return contents;
1765
1669
  };
1766
1670
  exports.de_GetMatchesCommand = de_GetMatchesCommand;
@@ -1788,10 +1692,9 @@ const de_GetMatchesCommandError = async (output, context) => {
1788
1692
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1789
1693
  default:
1790
1694
  const parsedBody = parsedOutput.body;
1791
- (0, smithy_client_1.throwDefaultError)({
1695
+ return throwDefaultError({
1792
1696
  output,
1793
1697
  parsedBody,
1794
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1795
1698
  errorCode,
1796
1699
  });
1797
1700
  }
@@ -1800,46 +1703,25 @@ const de_GetProfileObjectTypeCommand = async (output, context) => {
1800
1703
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1801
1704
  return de_GetProfileObjectTypeCommandError(output, context);
1802
1705
  }
1803
- const contents = map({
1706
+ const contents = (0, smithy_client_1.map)({
1804
1707
  $metadata: deserializeMetadata(output),
1805
1708
  });
1806
1709
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1807
- if (data.AllowProfileCreation != null) {
1808
- contents.AllowProfileCreation = (0, smithy_client_1.expectBoolean)(data.AllowProfileCreation);
1809
- }
1810
- if (data.CreatedAt != null) {
1811
- contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
1812
- }
1813
- if (data.Description != null) {
1814
- contents.Description = (0, smithy_client_1.expectString)(data.Description);
1815
- }
1816
- if (data.EncryptionKey != null) {
1817
- contents.EncryptionKey = (0, smithy_client_1.expectString)(data.EncryptionKey);
1818
- }
1819
- if (data.ExpirationDays != null) {
1820
- contents.ExpirationDays = (0, smithy_client_1.expectInt32)(data.ExpirationDays);
1821
- }
1822
- if (data.Fields != null) {
1823
- contents.Fields = de_FieldMap(data.Fields, context);
1824
- }
1825
- if (data.Keys != null) {
1826
- contents.Keys = de_KeyMap(data.Keys, context);
1827
- }
1828
- if (data.LastUpdatedAt != null) {
1829
- contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
1830
- }
1831
- if (data.ObjectTypeName != null) {
1832
- contents.ObjectTypeName = (0, smithy_client_1.expectString)(data.ObjectTypeName);
1833
- }
1834
- if (data.SourceLastUpdatedTimestampFormat != null) {
1835
- contents.SourceLastUpdatedTimestampFormat = (0, smithy_client_1.expectString)(data.SourceLastUpdatedTimestampFormat);
1836
- }
1837
- if (data.Tags != null) {
1838
- contents.Tags = de_TagMap(data.Tags, context);
1839
- }
1840
- if (data.TemplateId != null) {
1841
- contents.TemplateId = (0, smithy_client_1.expectString)(data.TemplateId);
1842
- }
1710
+ const doc = (0, smithy_client_1.take)(data, {
1711
+ AllowProfileCreation: smithy_client_1.expectBoolean,
1712
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1713
+ Description: smithy_client_1.expectString,
1714
+ EncryptionKey: smithy_client_1.expectString,
1715
+ ExpirationDays: smithy_client_1.expectInt32,
1716
+ Fields: smithy_client_1._json,
1717
+ Keys: smithy_client_1._json,
1718
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1719
+ ObjectTypeName: smithy_client_1.expectString,
1720
+ SourceLastUpdatedTimestampFormat: smithy_client_1.expectString,
1721
+ Tags: smithy_client_1._json,
1722
+ TemplateId: smithy_client_1.expectString,
1723
+ });
1724
+ Object.assign(contents, doc);
1843
1725
  return contents;
1844
1726
  };
1845
1727
  exports.de_GetProfileObjectTypeCommand = de_GetProfileObjectTypeCommand;
@@ -1867,10 +1749,9 @@ const de_GetProfileObjectTypeCommandError = async (output, context) => {
1867
1749
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1868
1750
  default:
1869
1751
  const parsedBody = parsedOutput.body;
1870
- (0, smithy_client_1.throwDefaultError)({
1752
+ return throwDefaultError({
1871
1753
  output,
1872
1754
  parsedBody,
1873
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1874
1755
  errorCode,
1875
1756
  });
1876
1757
  }
@@ -1879,31 +1760,20 @@ const de_GetProfileObjectTypeTemplateCommand = async (output, context) => {
1879
1760
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1880
1761
  return de_GetProfileObjectTypeTemplateCommandError(output, context);
1881
1762
  }
1882
- const contents = map({
1763
+ const contents = (0, smithy_client_1.map)({
1883
1764
  $metadata: deserializeMetadata(output),
1884
1765
  });
1885
1766
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1886
- if (data.AllowProfileCreation != null) {
1887
- contents.AllowProfileCreation = (0, smithy_client_1.expectBoolean)(data.AllowProfileCreation);
1888
- }
1889
- if (data.Fields != null) {
1890
- contents.Fields = de_FieldMap(data.Fields, context);
1891
- }
1892
- if (data.Keys != null) {
1893
- contents.Keys = de_KeyMap(data.Keys, context);
1894
- }
1895
- if (data.SourceLastUpdatedTimestampFormat != null) {
1896
- contents.SourceLastUpdatedTimestampFormat = (0, smithy_client_1.expectString)(data.SourceLastUpdatedTimestampFormat);
1897
- }
1898
- if (data.SourceName != null) {
1899
- contents.SourceName = (0, smithy_client_1.expectString)(data.SourceName);
1900
- }
1901
- if (data.SourceObject != null) {
1902
- contents.SourceObject = (0, smithy_client_1.expectString)(data.SourceObject);
1903
- }
1904
- if (data.TemplateId != null) {
1905
- contents.TemplateId = (0, smithy_client_1.expectString)(data.TemplateId);
1906
- }
1767
+ const doc = (0, smithy_client_1.take)(data, {
1768
+ AllowProfileCreation: smithy_client_1.expectBoolean,
1769
+ Fields: smithy_client_1._json,
1770
+ Keys: smithy_client_1._json,
1771
+ SourceLastUpdatedTimestampFormat: smithy_client_1.expectString,
1772
+ SourceName: smithy_client_1.expectString,
1773
+ SourceObject: smithy_client_1.expectString,
1774
+ TemplateId: smithy_client_1.expectString,
1775
+ });
1776
+ Object.assign(contents, doc);
1907
1777
  return contents;
1908
1778
  };
1909
1779
  exports.de_GetProfileObjectTypeTemplateCommand = de_GetProfileObjectTypeTemplateCommand;
@@ -1931,10 +1801,9 @@ const de_GetProfileObjectTypeTemplateCommandError = async (output, context) => {
1931
1801
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1932
1802
  default:
1933
1803
  const parsedBody = parsedOutput.body;
1934
- (0, smithy_client_1.throwDefaultError)({
1804
+ return throwDefaultError({
1935
1805
  output,
1936
1806
  parsedBody,
1937
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
1938
1807
  errorCode,
1939
1808
  });
1940
1809
  }
@@ -1943,34 +1812,21 @@ const de_GetWorkflowCommand = async (output, context) => {
1943
1812
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1944
1813
  return de_GetWorkflowCommandError(output, context);
1945
1814
  }
1946
- const contents = map({
1815
+ const contents = (0, smithy_client_1.map)({
1947
1816
  $metadata: deserializeMetadata(output),
1948
1817
  });
1949
1818
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1950
- if (data.Attributes != null) {
1951
- contents.Attributes = de_WorkflowAttributes(data.Attributes, context);
1952
- }
1953
- if (data.ErrorDescription != null) {
1954
- contents.ErrorDescription = (0, smithy_client_1.expectString)(data.ErrorDescription);
1955
- }
1956
- if (data.LastUpdatedAt != null) {
1957
- contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
1958
- }
1959
- if (data.Metrics != null) {
1960
- contents.Metrics = de_WorkflowMetrics(data.Metrics, context);
1961
- }
1962
- if (data.StartDate != null) {
1963
- contents.StartDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.StartDate)));
1964
- }
1965
- if (data.Status != null) {
1966
- contents.Status = (0, smithy_client_1.expectString)(data.Status);
1967
- }
1968
- if (data.WorkflowId != null) {
1969
- contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
1970
- }
1971
- if (data.WorkflowType != null) {
1972
- contents.WorkflowType = (0, smithy_client_1.expectString)(data.WorkflowType);
1973
- }
1819
+ const doc = (0, smithy_client_1.take)(data, {
1820
+ Attributes: smithy_client_1._json,
1821
+ ErrorDescription: smithy_client_1.expectString,
1822
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1823
+ Metrics: smithy_client_1._json,
1824
+ StartDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1825
+ Status: smithy_client_1.expectString,
1826
+ WorkflowId: smithy_client_1.expectString,
1827
+ WorkflowType: smithy_client_1.expectString,
1828
+ });
1829
+ Object.assign(contents, doc);
1974
1830
  return contents;
1975
1831
  };
1976
1832
  exports.de_GetWorkflowCommand = de_GetWorkflowCommand;
@@ -1998,10 +1854,9 @@ const de_GetWorkflowCommandError = async (output, context) => {
1998
1854
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1999
1855
  default:
2000
1856
  const parsedBody = parsedOutput.body;
2001
- (0, smithy_client_1.throwDefaultError)({
1857
+ return throwDefaultError({
2002
1858
  output,
2003
1859
  parsedBody,
2004
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2005
1860
  errorCode,
2006
1861
  });
2007
1862
  }
@@ -2010,22 +1865,17 @@ const de_GetWorkflowStepsCommand = async (output, context) => {
2010
1865
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2011
1866
  return de_GetWorkflowStepsCommandError(output, context);
2012
1867
  }
2013
- const contents = map({
1868
+ const contents = (0, smithy_client_1.map)({
2014
1869
  $metadata: deserializeMetadata(output),
2015
1870
  });
2016
1871
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2017
- if (data.Items != null) {
2018
- contents.Items = de_WorkflowStepsList(data.Items, context);
2019
- }
2020
- if (data.NextToken != null) {
2021
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2022
- }
2023
- if (data.WorkflowId != null) {
2024
- contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
2025
- }
2026
- if (data.WorkflowType != null) {
2027
- contents.WorkflowType = (0, smithy_client_1.expectString)(data.WorkflowType);
2028
- }
1872
+ const doc = (0, smithy_client_1.take)(data, {
1873
+ Items: (_) => de_WorkflowStepsList(_, context),
1874
+ NextToken: smithy_client_1.expectString,
1875
+ WorkflowId: smithy_client_1.expectString,
1876
+ WorkflowType: smithy_client_1.expectString,
1877
+ });
1878
+ Object.assign(contents, doc);
2029
1879
  return contents;
2030
1880
  };
2031
1881
  exports.de_GetWorkflowStepsCommand = de_GetWorkflowStepsCommand;
@@ -2053,10 +1903,9 @@ const de_GetWorkflowStepsCommandError = async (output, context) => {
2053
1903
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2054
1904
  default:
2055
1905
  const parsedBody = parsedOutput.body;
2056
- (0, smithy_client_1.throwDefaultError)({
1906
+ return throwDefaultError({
2057
1907
  output,
2058
1908
  parsedBody,
2059
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2060
1909
  errorCode,
2061
1910
  });
2062
1911
  }
@@ -2065,16 +1914,15 @@ const de_ListAccountIntegrationsCommand = async (output, context) => {
2065
1914
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2066
1915
  return de_ListAccountIntegrationsCommandError(output, context);
2067
1916
  }
2068
- const contents = map({
1917
+ const contents = (0, smithy_client_1.map)({
2069
1918
  $metadata: deserializeMetadata(output),
2070
1919
  });
2071
1920
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2072
- if (data.Items != null) {
2073
- contents.Items = de_IntegrationList(data.Items, context);
2074
- }
2075
- if (data.NextToken != null) {
2076
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2077
- }
1921
+ const doc = (0, smithy_client_1.take)(data, {
1922
+ Items: (_) => de_IntegrationList(_, context),
1923
+ NextToken: smithy_client_1.expectString,
1924
+ });
1925
+ Object.assign(contents, doc);
2078
1926
  return contents;
2079
1927
  };
2080
1928
  exports.de_ListAccountIntegrationsCommand = de_ListAccountIntegrationsCommand;
@@ -2102,10 +1950,9 @@ const de_ListAccountIntegrationsCommandError = async (output, context) => {
2102
1950
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2103
1951
  default:
2104
1952
  const parsedBody = parsedOutput.body;
2105
- (0, smithy_client_1.throwDefaultError)({
1953
+ return throwDefaultError({
2106
1954
  output,
2107
1955
  parsedBody,
2108
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2109
1956
  errorCode,
2110
1957
  });
2111
1958
  }
@@ -2114,16 +1961,15 @@ const de_ListDomainsCommand = async (output, context) => {
2114
1961
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2115
1962
  return de_ListDomainsCommandError(output, context);
2116
1963
  }
2117
- const contents = map({
1964
+ const contents = (0, smithy_client_1.map)({
2118
1965
  $metadata: deserializeMetadata(output),
2119
1966
  });
2120
1967
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2121
- if (data.Items != null) {
2122
- contents.Items = de_DomainList(data.Items, context);
2123
- }
2124
- if (data.NextToken != null) {
2125
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2126
- }
1968
+ const doc = (0, smithy_client_1.take)(data, {
1969
+ Items: (_) => de_DomainList(_, context),
1970
+ NextToken: smithy_client_1.expectString,
1971
+ });
1972
+ Object.assign(contents, doc);
2127
1973
  return contents;
2128
1974
  };
2129
1975
  exports.de_ListDomainsCommand = de_ListDomainsCommand;
@@ -2151,10 +1997,9 @@ const de_ListDomainsCommandError = async (output, context) => {
2151
1997
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2152
1998
  default:
2153
1999
  const parsedBody = parsedOutput.body;
2154
- (0, smithy_client_1.throwDefaultError)({
2000
+ return throwDefaultError({
2155
2001
  output,
2156
2002
  parsedBody,
2157
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2158
2003
  errorCode,
2159
2004
  });
2160
2005
  }
@@ -2163,16 +2008,15 @@ const de_ListIdentityResolutionJobsCommand = async (output, context) => {
2163
2008
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2164
2009
  return de_ListIdentityResolutionJobsCommandError(output, context);
2165
2010
  }
2166
- const contents = map({
2011
+ const contents = (0, smithy_client_1.map)({
2167
2012
  $metadata: deserializeMetadata(output),
2168
2013
  });
2169
2014
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2170
- if (data.IdentityResolutionJobsList != null) {
2171
- contents.IdentityResolutionJobsList = de_IdentityResolutionJobsList(data.IdentityResolutionJobsList, context);
2172
- }
2173
- if (data.NextToken != null) {
2174
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2175
- }
2015
+ const doc = (0, smithy_client_1.take)(data, {
2016
+ IdentityResolutionJobsList: (_) => de_IdentityResolutionJobsList(_, context),
2017
+ NextToken: smithy_client_1.expectString,
2018
+ });
2019
+ Object.assign(contents, doc);
2176
2020
  return contents;
2177
2021
  };
2178
2022
  exports.de_ListIdentityResolutionJobsCommand = de_ListIdentityResolutionJobsCommand;
@@ -2200,10 +2044,9 @@ const de_ListIdentityResolutionJobsCommandError = async (output, context) => {
2200
2044
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2201
2045
  default:
2202
2046
  const parsedBody = parsedOutput.body;
2203
- (0, smithy_client_1.throwDefaultError)({
2047
+ return throwDefaultError({
2204
2048
  output,
2205
2049
  parsedBody,
2206
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2207
2050
  errorCode,
2208
2051
  });
2209
2052
  }
@@ -2212,16 +2055,15 @@ const de_ListIntegrationsCommand = async (output, context) => {
2212
2055
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2213
2056
  return de_ListIntegrationsCommandError(output, context);
2214
2057
  }
2215
- const contents = map({
2058
+ const contents = (0, smithy_client_1.map)({
2216
2059
  $metadata: deserializeMetadata(output),
2217
2060
  });
2218
2061
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2219
- if (data.Items != null) {
2220
- contents.Items = de_IntegrationList(data.Items, context);
2221
- }
2222
- if (data.NextToken != null) {
2223
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2224
- }
2062
+ const doc = (0, smithy_client_1.take)(data, {
2063
+ Items: (_) => de_IntegrationList(_, context),
2064
+ NextToken: smithy_client_1.expectString,
2065
+ });
2066
+ Object.assign(contents, doc);
2225
2067
  return contents;
2226
2068
  };
2227
2069
  exports.de_ListIntegrationsCommand = de_ListIntegrationsCommand;
@@ -2249,10 +2091,9 @@ const de_ListIntegrationsCommandError = async (output, context) => {
2249
2091
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2250
2092
  default:
2251
2093
  const parsedBody = parsedOutput.body;
2252
- (0, smithy_client_1.throwDefaultError)({
2094
+ return throwDefaultError({
2253
2095
  output,
2254
2096
  parsedBody,
2255
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2256
2097
  errorCode,
2257
2098
  });
2258
2099
  }
@@ -2261,16 +2102,15 @@ const de_ListProfileObjectsCommand = async (output, context) => {
2261
2102
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2262
2103
  return de_ListProfileObjectsCommandError(output, context);
2263
2104
  }
2264
- const contents = map({
2105
+ const contents = (0, smithy_client_1.map)({
2265
2106
  $metadata: deserializeMetadata(output),
2266
2107
  });
2267
2108
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2268
- if (data.Items != null) {
2269
- contents.Items = de_ProfileObjectList(data.Items, context);
2270
- }
2271
- if (data.NextToken != null) {
2272
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2273
- }
2109
+ const doc = (0, smithy_client_1.take)(data, {
2110
+ Items: smithy_client_1._json,
2111
+ NextToken: smithy_client_1.expectString,
2112
+ });
2113
+ Object.assign(contents, doc);
2274
2114
  return contents;
2275
2115
  };
2276
2116
  exports.de_ListProfileObjectsCommand = de_ListProfileObjectsCommand;
@@ -2298,10 +2138,9 @@ const de_ListProfileObjectsCommandError = async (output, context) => {
2298
2138
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2299
2139
  default:
2300
2140
  const parsedBody = parsedOutput.body;
2301
- (0, smithy_client_1.throwDefaultError)({
2141
+ return throwDefaultError({
2302
2142
  output,
2303
2143
  parsedBody,
2304
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2305
2144
  errorCode,
2306
2145
  });
2307
2146
  }
@@ -2310,16 +2149,15 @@ const de_ListProfileObjectTypesCommand = async (output, context) => {
2310
2149
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2311
2150
  return de_ListProfileObjectTypesCommandError(output, context);
2312
2151
  }
2313
- const contents = map({
2152
+ const contents = (0, smithy_client_1.map)({
2314
2153
  $metadata: deserializeMetadata(output),
2315
2154
  });
2316
2155
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2317
- if (data.Items != null) {
2318
- contents.Items = de_ProfileObjectTypeList(data.Items, context);
2319
- }
2320
- if (data.NextToken != null) {
2321
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2322
- }
2156
+ const doc = (0, smithy_client_1.take)(data, {
2157
+ Items: (_) => de_ProfileObjectTypeList(_, context),
2158
+ NextToken: smithy_client_1.expectString,
2159
+ });
2160
+ Object.assign(contents, doc);
2323
2161
  return contents;
2324
2162
  };
2325
2163
  exports.de_ListProfileObjectTypesCommand = de_ListProfileObjectTypesCommand;
@@ -2347,10 +2185,9 @@ const de_ListProfileObjectTypesCommandError = async (output, context) => {
2347
2185
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2348
2186
  default:
2349
2187
  const parsedBody = parsedOutput.body;
2350
- (0, smithy_client_1.throwDefaultError)({
2188
+ return throwDefaultError({
2351
2189
  output,
2352
2190
  parsedBody,
2353
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2354
2191
  errorCode,
2355
2192
  });
2356
2193
  }
@@ -2359,16 +2196,15 @@ const de_ListProfileObjectTypeTemplatesCommand = async (output, context) => {
2359
2196
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2360
2197
  return de_ListProfileObjectTypeTemplatesCommandError(output, context);
2361
2198
  }
2362
- const contents = map({
2199
+ const contents = (0, smithy_client_1.map)({
2363
2200
  $metadata: deserializeMetadata(output),
2364
2201
  });
2365
2202
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2366
- if (data.Items != null) {
2367
- contents.Items = de_ProfileObjectTypeTemplateList(data.Items, context);
2368
- }
2369
- if (data.NextToken != null) {
2370
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2371
- }
2203
+ const doc = (0, smithy_client_1.take)(data, {
2204
+ Items: smithy_client_1._json,
2205
+ NextToken: smithy_client_1.expectString,
2206
+ });
2207
+ Object.assign(contents, doc);
2372
2208
  return contents;
2373
2209
  };
2374
2210
  exports.de_ListProfileObjectTypeTemplatesCommand = de_ListProfileObjectTypeTemplatesCommand;
@@ -2396,10 +2232,9 @@ const de_ListProfileObjectTypeTemplatesCommandError = async (output, context) =>
2396
2232
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2397
2233
  default:
2398
2234
  const parsedBody = parsedOutput.body;
2399
- (0, smithy_client_1.throwDefaultError)({
2235
+ return throwDefaultError({
2400
2236
  output,
2401
2237
  parsedBody,
2402
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2403
2238
  errorCode,
2404
2239
  });
2405
2240
  }
@@ -2408,13 +2243,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
2408
2243
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2409
2244
  return de_ListTagsForResourceCommandError(output, context);
2410
2245
  }
2411
- const contents = map({
2246
+ const contents = (0, smithy_client_1.map)({
2412
2247
  $metadata: deserializeMetadata(output),
2413
2248
  });
2414
2249
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2415
- if (data.tags != null) {
2416
- contents.tags = de_TagMap(data.tags, context);
2417
- }
2250
+ const doc = (0, smithy_client_1.take)(data, {
2251
+ tags: smithy_client_1._json,
2252
+ });
2253
+ Object.assign(contents, doc);
2418
2254
  return contents;
2419
2255
  };
2420
2256
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -2436,10 +2272,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2436
2272
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2437
2273
  default:
2438
2274
  const parsedBody = parsedOutput.body;
2439
- (0, smithy_client_1.throwDefaultError)({
2275
+ return throwDefaultError({
2440
2276
  output,
2441
2277
  parsedBody,
2442
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2443
2278
  errorCode,
2444
2279
  });
2445
2280
  }
@@ -2448,16 +2283,15 @@ const de_ListWorkflowsCommand = async (output, context) => {
2448
2283
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2449
2284
  return de_ListWorkflowsCommandError(output, context);
2450
2285
  }
2451
- const contents = map({
2286
+ const contents = (0, smithy_client_1.map)({
2452
2287
  $metadata: deserializeMetadata(output),
2453
2288
  });
2454
2289
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2455
- if (data.Items != null) {
2456
- contents.Items = de_WorkflowList(data.Items, context);
2457
- }
2458
- if (data.NextToken != null) {
2459
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2460
- }
2290
+ const doc = (0, smithy_client_1.take)(data, {
2291
+ Items: (_) => de_WorkflowList(_, context),
2292
+ NextToken: smithy_client_1.expectString,
2293
+ });
2294
+ Object.assign(contents, doc);
2461
2295
  return contents;
2462
2296
  };
2463
2297
  exports.de_ListWorkflowsCommand = de_ListWorkflowsCommand;
@@ -2485,10 +2319,9 @@ const de_ListWorkflowsCommandError = async (output, context) => {
2485
2319
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2486
2320
  default:
2487
2321
  const parsedBody = parsedOutput.body;
2488
- (0, smithy_client_1.throwDefaultError)({
2322
+ return throwDefaultError({
2489
2323
  output,
2490
2324
  parsedBody,
2491
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2492
2325
  errorCode,
2493
2326
  });
2494
2327
  }
@@ -2497,13 +2330,14 @@ const de_MergeProfilesCommand = async (output, context) => {
2497
2330
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2498
2331
  return de_MergeProfilesCommandError(output, context);
2499
2332
  }
2500
- const contents = map({
2333
+ const contents = (0, smithy_client_1.map)({
2501
2334
  $metadata: deserializeMetadata(output),
2502
2335
  });
2503
2336
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2504
- if (data.Message != null) {
2505
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2506
- }
2337
+ const doc = (0, smithy_client_1.take)(data, {
2338
+ Message: smithy_client_1.expectString,
2339
+ });
2340
+ Object.assign(contents, doc);
2507
2341
  return contents;
2508
2342
  };
2509
2343
  exports.de_MergeProfilesCommand = de_MergeProfilesCommand;
@@ -2528,10 +2362,9 @@ const de_MergeProfilesCommandError = async (output, context) => {
2528
2362
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2529
2363
  default:
2530
2364
  const parsedBody = parsedOutput.body;
2531
- (0, smithy_client_1.throwDefaultError)({
2365
+ return throwDefaultError({
2532
2366
  output,
2533
2367
  parsedBody,
2534
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2535
2368
  errorCode,
2536
2369
  });
2537
2370
  }
@@ -2540,37 +2373,22 @@ const de_PutIntegrationCommand = async (output, context) => {
2540
2373
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2541
2374
  return de_PutIntegrationCommandError(output, context);
2542
2375
  }
2543
- const contents = map({
2376
+ const contents = (0, smithy_client_1.map)({
2544
2377
  $metadata: deserializeMetadata(output),
2545
2378
  });
2546
2379
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2547
- if (data.CreatedAt != null) {
2548
- contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
2549
- }
2550
- if (data.DomainName != null) {
2551
- contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
2552
- }
2553
- if (data.IsUnstructured != null) {
2554
- contents.IsUnstructured = (0, smithy_client_1.expectBoolean)(data.IsUnstructured);
2555
- }
2556
- if (data.LastUpdatedAt != null) {
2557
- contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
2558
- }
2559
- if (data.ObjectTypeName != null) {
2560
- contents.ObjectTypeName = (0, smithy_client_1.expectString)(data.ObjectTypeName);
2561
- }
2562
- if (data.ObjectTypeNames != null) {
2563
- contents.ObjectTypeNames = de_ObjectTypeNames(data.ObjectTypeNames, context);
2564
- }
2565
- if (data.Tags != null) {
2566
- contents.Tags = de_TagMap(data.Tags, context);
2567
- }
2568
- if (data.Uri != null) {
2569
- contents.Uri = (0, smithy_client_1.expectString)(data.Uri);
2570
- }
2571
- if (data.WorkflowId != null) {
2572
- contents.WorkflowId = (0, smithy_client_1.expectString)(data.WorkflowId);
2573
- }
2380
+ const doc = (0, smithy_client_1.take)(data, {
2381
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2382
+ DomainName: smithy_client_1.expectString,
2383
+ IsUnstructured: smithy_client_1.expectBoolean,
2384
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2385
+ ObjectTypeName: smithy_client_1.expectString,
2386
+ ObjectTypeNames: smithy_client_1._json,
2387
+ Tags: smithy_client_1._json,
2388
+ Uri: smithy_client_1.expectString,
2389
+ WorkflowId: smithy_client_1.expectString,
2390
+ });
2391
+ Object.assign(contents, doc);
2574
2392
  return contents;
2575
2393
  };
2576
2394
  exports.de_PutIntegrationCommand = de_PutIntegrationCommand;
@@ -2598,10 +2416,9 @@ const de_PutIntegrationCommandError = async (output, context) => {
2598
2416
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2599
2417
  default:
2600
2418
  const parsedBody = parsedOutput.body;
2601
- (0, smithy_client_1.throwDefaultError)({
2419
+ return throwDefaultError({
2602
2420
  output,
2603
2421
  parsedBody,
2604
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2605
2422
  errorCode,
2606
2423
  });
2607
2424
  }
@@ -2610,13 +2427,14 @@ const de_PutProfileObjectCommand = async (output, context) => {
2610
2427
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2611
2428
  return de_PutProfileObjectCommandError(output, context);
2612
2429
  }
2613
- const contents = map({
2430
+ const contents = (0, smithy_client_1.map)({
2614
2431
  $metadata: deserializeMetadata(output),
2615
2432
  });
2616
2433
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2617
- if (data.ProfileObjectUniqueKey != null) {
2618
- contents.ProfileObjectUniqueKey = (0, smithy_client_1.expectString)(data.ProfileObjectUniqueKey);
2619
- }
2434
+ const doc = (0, smithy_client_1.take)(data, {
2435
+ ProfileObjectUniqueKey: smithy_client_1.expectString,
2436
+ });
2437
+ Object.assign(contents, doc);
2620
2438
  return contents;
2621
2439
  };
2622
2440
  exports.de_PutProfileObjectCommand = de_PutProfileObjectCommand;
@@ -2644,10 +2462,9 @@ const de_PutProfileObjectCommandError = async (output, context) => {
2644
2462
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2645
2463
  default:
2646
2464
  const parsedBody = parsedOutput.body;
2647
- (0, smithy_client_1.throwDefaultError)({
2465
+ return throwDefaultError({
2648
2466
  output,
2649
2467
  parsedBody,
2650
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2651
2468
  errorCode,
2652
2469
  });
2653
2470
  }
@@ -2656,46 +2473,25 @@ const de_PutProfileObjectTypeCommand = async (output, context) => {
2656
2473
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2657
2474
  return de_PutProfileObjectTypeCommandError(output, context);
2658
2475
  }
2659
- const contents = map({
2476
+ const contents = (0, smithy_client_1.map)({
2660
2477
  $metadata: deserializeMetadata(output),
2661
2478
  });
2662
2479
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2663
- if (data.AllowProfileCreation != null) {
2664
- contents.AllowProfileCreation = (0, smithy_client_1.expectBoolean)(data.AllowProfileCreation);
2665
- }
2666
- if (data.CreatedAt != null) {
2667
- contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
2668
- }
2669
- if (data.Description != null) {
2670
- contents.Description = (0, smithy_client_1.expectString)(data.Description);
2671
- }
2672
- if (data.EncryptionKey != null) {
2673
- contents.EncryptionKey = (0, smithy_client_1.expectString)(data.EncryptionKey);
2674
- }
2675
- if (data.ExpirationDays != null) {
2676
- contents.ExpirationDays = (0, smithy_client_1.expectInt32)(data.ExpirationDays);
2677
- }
2678
- if (data.Fields != null) {
2679
- contents.Fields = de_FieldMap(data.Fields, context);
2680
- }
2681
- if (data.Keys != null) {
2682
- contents.Keys = de_KeyMap(data.Keys, context);
2683
- }
2684
- if (data.LastUpdatedAt != null) {
2685
- contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
2686
- }
2687
- if (data.ObjectTypeName != null) {
2688
- contents.ObjectTypeName = (0, smithy_client_1.expectString)(data.ObjectTypeName);
2689
- }
2690
- if (data.SourceLastUpdatedTimestampFormat != null) {
2691
- contents.SourceLastUpdatedTimestampFormat = (0, smithy_client_1.expectString)(data.SourceLastUpdatedTimestampFormat);
2692
- }
2693
- if (data.Tags != null) {
2694
- contents.Tags = de_TagMap(data.Tags, context);
2695
- }
2696
- if (data.TemplateId != null) {
2697
- contents.TemplateId = (0, smithy_client_1.expectString)(data.TemplateId);
2698
- }
2480
+ const doc = (0, smithy_client_1.take)(data, {
2481
+ AllowProfileCreation: smithy_client_1.expectBoolean,
2482
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2483
+ Description: smithy_client_1.expectString,
2484
+ EncryptionKey: smithy_client_1.expectString,
2485
+ ExpirationDays: smithy_client_1.expectInt32,
2486
+ Fields: smithy_client_1._json,
2487
+ Keys: smithy_client_1._json,
2488
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2489
+ ObjectTypeName: smithy_client_1.expectString,
2490
+ SourceLastUpdatedTimestampFormat: smithy_client_1.expectString,
2491
+ Tags: smithy_client_1._json,
2492
+ TemplateId: smithy_client_1.expectString,
2493
+ });
2494
+ Object.assign(contents, doc);
2699
2495
  return contents;
2700
2496
  };
2701
2497
  exports.de_PutProfileObjectTypeCommand = de_PutProfileObjectTypeCommand;
@@ -2723,10 +2519,9 @@ const de_PutProfileObjectTypeCommandError = async (output, context) => {
2723
2519
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2724
2520
  default:
2725
2521
  const parsedBody = parsedOutput.body;
2726
- (0, smithy_client_1.throwDefaultError)({
2522
+ return throwDefaultError({
2727
2523
  output,
2728
2524
  parsedBody,
2729
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2730
2525
  errorCode,
2731
2526
  });
2732
2527
  }
@@ -2735,16 +2530,15 @@ const de_SearchProfilesCommand = async (output, context) => {
2735
2530
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2736
2531
  return de_SearchProfilesCommandError(output, context);
2737
2532
  }
2738
- const contents = map({
2533
+ const contents = (0, smithy_client_1.map)({
2739
2534
  $metadata: deserializeMetadata(output),
2740
2535
  });
2741
2536
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2742
- if (data.Items != null) {
2743
- contents.Items = de_ProfileList(data.Items, context);
2744
- }
2745
- if (data.NextToken != null) {
2746
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2747
- }
2537
+ const doc = (0, smithy_client_1.take)(data, {
2538
+ Items: smithy_client_1._json,
2539
+ NextToken: smithy_client_1.expectString,
2540
+ });
2541
+ Object.assign(contents, doc);
2748
2542
  return contents;
2749
2543
  };
2750
2544
  exports.de_SearchProfilesCommand = de_SearchProfilesCommand;
@@ -2772,10 +2566,9 @@ const de_SearchProfilesCommandError = async (output, context) => {
2772
2566
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2773
2567
  default:
2774
2568
  const parsedBody = parsedOutput.body;
2775
- (0, smithy_client_1.throwDefaultError)({
2569
+ return throwDefaultError({
2776
2570
  output,
2777
2571
  parsedBody,
2778
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2779
2572
  errorCode,
2780
2573
  });
2781
2574
  }
@@ -2784,7 +2577,7 @@ const de_TagResourceCommand = async (output, context) => {
2784
2577
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2785
2578
  return de_TagResourceCommandError(output, context);
2786
2579
  }
2787
- const contents = map({
2580
+ const contents = (0, smithy_client_1.map)({
2788
2581
  $metadata: deserializeMetadata(output),
2789
2582
  });
2790
2583
  await collectBody(output.body, context);
@@ -2809,10 +2602,9 @@ const de_TagResourceCommandError = async (output, context) => {
2809
2602
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2810
2603
  default:
2811
2604
  const parsedBody = parsedOutput.body;
2812
- (0, smithy_client_1.throwDefaultError)({
2605
+ return throwDefaultError({
2813
2606
  output,
2814
2607
  parsedBody,
2815
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2816
2608
  errorCode,
2817
2609
  });
2818
2610
  }
@@ -2821,7 +2613,7 @@ const de_UntagResourceCommand = async (output, context) => {
2821
2613
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2822
2614
  return de_UntagResourceCommandError(output, context);
2823
2615
  }
2824
- const contents = map({
2616
+ const contents = (0, smithy_client_1.map)({
2825
2617
  $metadata: deserializeMetadata(output),
2826
2618
  });
2827
2619
  await collectBody(output.body, context);
@@ -2846,10 +2638,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2846
2638
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2847
2639
  default:
2848
2640
  const parsedBody = parsedOutput.body;
2849
- (0, smithy_client_1.throwDefaultError)({
2641
+ return throwDefaultError({
2850
2642
  output,
2851
2643
  parsedBody,
2852
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2853
2644
  errorCode,
2854
2645
  });
2855
2646
  }
@@ -2858,34 +2649,21 @@ const de_UpdateDomainCommand = async (output, context) => {
2858
2649
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2859
2650
  return de_UpdateDomainCommandError(output, context);
2860
2651
  }
2861
- const contents = map({
2652
+ const contents = (0, smithy_client_1.map)({
2862
2653
  $metadata: deserializeMetadata(output),
2863
2654
  });
2864
2655
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2865
- if (data.CreatedAt != null) {
2866
- contents.CreatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreatedAt)));
2867
- }
2868
- if (data.DeadLetterQueueUrl != null) {
2869
- contents.DeadLetterQueueUrl = (0, smithy_client_1.expectString)(data.DeadLetterQueueUrl);
2870
- }
2871
- if (data.DefaultEncryptionKey != null) {
2872
- contents.DefaultEncryptionKey = (0, smithy_client_1.expectString)(data.DefaultEncryptionKey);
2873
- }
2874
- if (data.DefaultExpirationDays != null) {
2875
- contents.DefaultExpirationDays = (0, smithy_client_1.expectInt32)(data.DefaultExpirationDays);
2876
- }
2877
- if (data.DomainName != null) {
2878
- contents.DomainName = (0, smithy_client_1.expectString)(data.DomainName);
2879
- }
2880
- if (data.LastUpdatedAt != null) {
2881
- contents.LastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedAt)));
2882
- }
2883
- if (data.Matching != null) {
2884
- contents.Matching = de_MatchingResponse(data.Matching, context);
2885
- }
2886
- if (data.Tags != null) {
2887
- contents.Tags = de_TagMap(data.Tags, context);
2888
- }
2656
+ const doc = (0, smithy_client_1.take)(data, {
2657
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2658
+ DeadLetterQueueUrl: smithy_client_1.expectString,
2659
+ DefaultEncryptionKey: smithy_client_1.expectString,
2660
+ DefaultExpirationDays: smithy_client_1.expectInt32,
2661
+ DomainName: smithy_client_1.expectString,
2662
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2663
+ Matching: (_) => de_MatchingResponse(_, context),
2664
+ Tags: smithy_client_1._json,
2665
+ });
2666
+ Object.assign(contents, doc);
2889
2667
  return contents;
2890
2668
  };
2891
2669
  exports.de_UpdateDomainCommand = de_UpdateDomainCommand;
@@ -2913,10 +2691,9 @@ const de_UpdateDomainCommandError = async (output, context) => {
2913
2691
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2914
2692
  default:
2915
2693
  const parsedBody = parsedOutput.body;
2916
- (0, smithy_client_1.throwDefaultError)({
2694
+ return throwDefaultError({
2917
2695
  output,
2918
2696
  parsedBody,
2919
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2920
2697
  errorCode,
2921
2698
  });
2922
2699
  }
@@ -2925,13 +2702,14 @@ const de_UpdateProfileCommand = async (output, context) => {
2925
2702
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2926
2703
  return de_UpdateProfileCommandError(output, context);
2927
2704
  }
2928
- const contents = map({
2705
+ const contents = (0, smithy_client_1.map)({
2929
2706
  $metadata: deserializeMetadata(output),
2930
2707
  });
2931
2708
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2932
- if (data.ProfileId != null) {
2933
- contents.ProfileId = (0, smithy_client_1.expectString)(data.ProfileId);
2934
- }
2709
+ const doc = (0, smithy_client_1.take)(data, {
2710
+ ProfileId: smithy_client_1.expectString,
2711
+ });
2712
+ Object.assign(contents, doc);
2935
2713
  return contents;
2936
2714
  };
2937
2715
  exports.de_UpdateProfileCommand = de_UpdateProfileCommand;
@@ -2959,21 +2737,21 @@ const de_UpdateProfileCommandError = async (output, context) => {
2959
2737
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2960
2738
  default:
2961
2739
  const parsedBody = parsedOutput.body;
2962
- (0, smithy_client_1.throwDefaultError)({
2740
+ return throwDefaultError({
2963
2741
  output,
2964
2742
  parsedBody,
2965
- exceptionCtor: CustomerProfilesServiceException_1.CustomerProfilesServiceException,
2966
2743
  errorCode,
2967
2744
  });
2968
2745
  }
2969
2746
  };
2970
- const map = smithy_client_1.map;
2747
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(CustomerProfilesServiceException_1.CustomerProfilesServiceException);
2971
2748
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2972
- const contents = map({});
2749
+ const contents = (0, smithy_client_1.map)({});
2973
2750
  const data = parsedOutput.body;
2974
- if (data.Message != null) {
2975
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2976
- }
2751
+ const doc = (0, smithy_client_1.take)(data, {
2752
+ Message: smithy_client_1.expectString,
2753
+ });
2754
+ Object.assign(contents, doc);
2977
2755
  const exception = new models_0_1.AccessDeniedException({
2978
2756
  $metadata: deserializeMetadata(parsedOutput),
2979
2757
  ...contents,
@@ -2981,11 +2759,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2981
2759
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2982
2760
  };
2983
2761
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2984
- const contents = map({});
2762
+ const contents = (0, smithy_client_1.map)({});
2985
2763
  const data = parsedOutput.body;
2986
- if (data.Message != null) {
2987
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2988
- }
2764
+ const doc = (0, smithy_client_1.take)(data, {
2765
+ Message: smithy_client_1.expectString,
2766
+ });
2767
+ Object.assign(contents, doc);
2989
2768
  const exception = new models_0_1.BadRequestException({
2990
2769
  $metadata: deserializeMetadata(parsedOutput),
2991
2770
  ...contents,
@@ -2993,11 +2772,12 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2993
2772
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2994
2773
  };
2995
2774
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2996
- const contents = map({});
2775
+ const contents = (0, smithy_client_1.map)({});
2997
2776
  const data = parsedOutput.body;
2998
- if (data.Message != null) {
2999
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3000
- }
2777
+ const doc = (0, smithy_client_1.take)(data, {
2778
+ Message: smithy_client_1.expectString,
2779
+ });
2780
+ Object.assign(contents, doc);
3001
2781
  const exception = new models_0_1.InternalServerException({
3002
2782
  $metadata: deserializeMetadata(parsedOutput),
3003
2783
  ...contents,
@@ -3005,11 +2785,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
3005
2785
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3006
2786
  };
3007
2787
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3008
- const contents = map({});
2788
+ const contents = (0, smithy_client_1.map)({});
3009
2789
  const data = parsedOutput.body;
3010
- if (data.Message != null) {
3011
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3012
- }
2790
+ const doc = (0, smithy_client_1.take)(data, {
2791
+ Message: smithy_client_1.expectString,
2792
+ });
2793
+ Object.assign(contents, doc);
3013
2794
  const exception = new models_0_1.ResourceNotFoundException({
3014
2795
  $metadata: deserializeMetadata(parsedOutput),
3015
2796
  ...contents,
@@ -3017,85 +2798,37 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3017
2798
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3018
2799
  };
3019
2800
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
3020
- const contents = map({});
2801
+ const contents = (0, smithy_client_1.map)({});
3021
2802
  const data = parsedOutput.body;
3022
- if (data.Message != null) {
3023
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
3024
- }
2803
+ const doc = (0, smithy_client_1.take)(data, {
2804
+ Message: smithy_client_1.expectString,
2805
+ });
2806
+ Object.assign(contents, doc);
3025
2807
  const exception = new models_0_1.ThrottlingException({
3026
2808
  $metadata: deserializeMetadata(parsedOutput),
3027
2809
  ...contents,
3028
2810
  });
3029
2811
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3030
2812
  };
3031
- const se_AdditionalSearchKey = (input, context) => {
3032
- return {
3033
- ...(input.KeyName != null && { KeyName: input.KeyName }),
3034
- ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }),
3035
- };
3036
- };
3037
- const se_additionalSearchKeysList = (input, context) => {
3038
- return input
3039
- .filter((e) => e != null)
3040
- .map((entry) => {
3041
- return se_AdditionalSearchKey(entry, context);
3042
- });
3043
- };
3044
- const se_Address = (input, context) => {
3045
- return {
3046
- ...(input.Address1 != null && { Address1: input.Address1 }),
3047
- ...(input.Address2 != null && { Address2: input.Address2 }),
3048
- ...(input.Address3 != null && { Address3: input.Address3 }),
3049
- ...(input.Address4 != null && { Address4: input.Address4 }),
3050
- ...(input.City != null && { City: input.City }),
3051
- ...(input.Country != null && { Country: input.Country }),
3052
- ...(input.County != null && { County: input.County }),
3053
- ...(input.PostalCode != null && { PostalCode: input.PostalCode }),
3054
- ...(input.Province != null && { Province: input.Province }),
3055
- ...(input.State != null && { State: input.State }),
3056
- };
3057
- };
3058
2813
  const se_AppflowIntegration = (input, context) => {
3059
- return {
3060
- ...(input.Batches != null && { Batches: se_Batches(input.Batches, context) }),
3061
- ...(input.FlowDefinition != null && { FlowDefinition: se_FlowDefinition(input.FlowDefinition, context) }),
3062
- };
3063
- };
3064
- const se_Attributes = (input, context) => {
3065
- return Object.entries(input).reduce((acc, [key, value]) => {
3066
- if (value === null) {
3067
- return acc;
3068
- }
3069
- acc[key] = value;
3070
- return acc;
3071
- }, {});
3072
- };
3073
- const se_AttributeSourceIdMap = (input, context) => {
3074
- return Object.entries(input).reduce((acc, [key, value]) => {
3075
- if (value === null) {
3076
- return acc;
3077
- }
3078
- acc[key] = value;
3079
- return acc;
3080
- }, {});
2814
+ return (0, smithy_client_1.take)(input, {
2815
+ Batches: (_) => se_Batches(_, context),
2816
+ FlowDefinition: (_) => se_FlowDefinition(_, context),
2817
+ });
3081
2818
  };
3082
2819
  const se_AutoMerging = (input, context) => {
3083
- return {
3084
- ...(input.ConflictResolution != null && {
3085
- ConflictResolution: se_ConflictResolution(input.ConflictResolution, context),
3086
- }),
3087
- ...(input.Consolidation != null && { Consolidation: se_Consolidation(input.Consolidation, context) }),
3088
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3089
- ...(input.MinAllowedConfidenceScoreForMerging != null && {
3090
- MinAllowedConfidenceScoreForMerging: (0, smithy_client_1.serializeFloat)(input.MinAllowedConfidenceScoreForMerging),
3091
- }),
3092
- };
2820
+ return (0, smithy_client_1.take)(input, {
2821
+ ConflictResolution: smithy_client_1._json,
2822
+ Consolidation: smithy_client_1._json,
2823
+ Enabled: [],
2824
+ MinAllowedConfidenceScoreForMerging: smithy_client_1.serializeFloat,
2825
+ });
3093
2826
  };
3094
2827
  const se_Batch = (input, context) => {
3095
- return {
3096
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
3097
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
3098
- };
2828
+ return (0, smithy_client_1.take)(input, {
2829
+ EndTime: (_) => Math.round(_.getTime() / 1000),
2830
+ StartTime: (_) => Math.round(_.getTime() / 1000),
2831
+ });
3099
2832
  };
3100
2833
  const se_Batches = (input, context) => {
3101
2834
  return input
@@ -3104,497 +2837,95 @@ const se_Batches = (input, context) => {
3104
2837
  return se_Batch(entry, context);
3105
2838
  });
3106
2839
  };
3107
- const se_ConflictResolution = (input, context) => {
3108
- return {
3109
- ...(input.ConflictResolvingModel != null && { ConflictResolvingModel: input.ConflictResolvingModel }),
3110
- ...(input.SourceName != null && { SourceName: input.SourceName }),
3111
- };
3112
- };
3113
- const se_ConnectorOperator = (input, context) => {
3114
- return {
3115
- ...(input.Marketo != null && { Marketo: input.Marketo }),
3116
- ...(input.S3 != null && { S3: input.S3 }),
3117
- ...(input.Salesforce != null && { Salesforce: input.Salesforce }),
3118
- ...(input.ServiceNow != null && { ServiceNow: input.ServiceNow }),
3119
- ...(input.Zendesk != null && { Zendesk: input.Zendesk }),
3120
- };
3121
- };
3122
- const se_Consolidation = (input, context) => {
3123
- return {
3124
- ...(input.MatchingAttributesList != null && {
3125
- MatchingAttributesList: se_MatchingAttributesList(input.MatchingAttributesList, context),
3126
- }),
3127
- };
3128
- };
3129
- const se_ExportingConfig = (input, context) => {
3130
- return {
3131
- ...(input.S3Exporting != null && { S3Exporting: se_S3ExportingConfig(input.S3Exporting, context) }),
3132
- };
3133
- };
3134
- const se_FieldMap = (input, context) => {
3135
- return Object.entries(input).reduce((acc, [key, value]) => {
3136
- if (value === null) {
3137
- return acc;
3138
- }
3139
- acc[key] = se_ObjectTypeField(value, context);
3140
- return acc;
3141
- }, {});
3142
- };
3143
- const se_FieldNameList = (input, context) => {
3144
- return input
3145
- .filter((e) => e != null)
3146
- .map((entry) => {
3147
- return entry;
3148
- });
3149
- };
3150
- const se_FieldSourceProfileIds = (input, context) => {
3151
- return {
3152
- ...(input.AccountNumber != null && { AccountNumber: input.AccountNumber }),
3153
- ...(input.AdditionalInformation != null && { AdditionalInformation: input.AdditionalInformation }),
3154
- ...(input.Address != null && { Address: input.Address }),
3155
- ...(input.Attributes != null && { Attributes: se_AttributeSourceIdMap(input.Attributes, context) }),
3156
- ...(input.BillingAddress != null && { BillingAddress: input.BillingAddress }),
3157
- ...(input.BirthDate != null && { BirthDate: input.BirthDate }),
3158
- ...(input.BusinessEmailAddress != null && { BusinessEmailAddress: input.BusinessEmailAddress }),
3159
- ...(input.BusinessName != null && { BusinessName: input.BusinessName }),
3160
- ...(input.BusinessPhoneNumber != null && { BusinessPhoneNumber: input.BusinessPhoneNumber }),
3161
- ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }),
3162
- ...(input.FirstName != null && { FirstName: input.FirstName }),
3163
- ...(input.Gender != null && { Gender: input.Gender }),
3164
- ...(input.HomePhoneNumber != null && { HomePhoneNumber: input.HomePhoneNumber }),
3165
- ...(input.LastName != null && { LastName: input.LastName }),
3166
- ...(input.MailingAddress != null && { MailingAddress: input.MailingAddress }),
3167
- ...(input.MiddleName != null && { MiddleName: input.MiddleName }),
3168
- ...(input.MobilePhoneNumber != null && { MobilePhoneNumber: input.MobilePhoneNumber }),
3169
- ...(input.PartyType != null && { PartyType: input.PartyType }),
3170
- ...(input.PersonalEmailAddress != null && { PersonalEmailAddress: input.PersonalEmailAddress }),
3171
- ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
3172
- ...(input.ShippingAddress != null && { ShippingAddress: input.ShippingAddress }),
3173
- };
3174
- };
3175
2840
  const se_FlowDefinition = (input, context) => {
3176
- return {
3177
- ...(input.Description != null && { Description: input.Description }),
3178
- ...(input.FlowName != null && { FlowName: input.FlowName }),
3179
- ...(input.KmsArn != null && { KmsArn: input.KmsArn }),
3180
- ...(input.SourceFlowConfig != null && { SourceFlowConfig: se_SourceFlowConfig(input.SourceFlowConfig, context) }),
3181
- ...(input.Tasks != null && { Tasks: se_Tasks(input.Tasks, context) }),
3182
- ...(input.TriggerConfig != null && { TriggerConfig: se_TriggerConfig(input.TriggerConfig, context) }),
3183
- };
3184
- };
3185
- const se_IncrementalPullConfig = (input, context) => {
3186
- return {
3187
- ...(input.DatetimeTypeFieldName != null && { DatetimeTypeFieldName: input.DatetimeTypeFieldName }),
3188
- };
3189
- };
3190
- const se_IntegrationConfig = (input, context) => {
3191
- return {
3192
- ...(input.AppflowIntegration != null && {
3193
- AppflowIntegration: se_AppflowIntegration(input.AppflowIntegration, context),
3194
- }),
3195
- };
3196
- };
3197
- const se_JobSchedule = (input, context) => {
3198
- return {
3199
- ...(input.DayOfTheWeek != null && { DayOfTheWeek: input.DayOfTheWeek }),
3200
- ...(input.Time != null && { Time: input.Time }),
3201
- };
3202
- };
3203
- const se_KeyMap = (input, context) => {
3204
- return Object.entries(input).reduce((acc, [key, value]) => {
3205
- if (value === null) {
3206
- return acc;
3207
- }
3208
- acc[key] = se_ObjectTypeKeyList(value, context);
3209
- return acc;
3210
- }, {});
3211
- };
3212
- const se_MarketoSourceProperties = (input, context) => {
3213
- return {
3214
- ...(input.Object != null && { Object: input.Object }),
3215
- };
3216
- };
3217
- const se_MatchingAttributes = (input, context) => {
3218
- return input
3219
- .filter((e) => e != null)
3220
- .map((entry) => {
3221
- return entry;
2841
+ return (0, smithy_client_1.take)(input, {
2842
+ Description: [],
2843
+ FlowName: [],
2844
+ KmsArn: [],
2845
+ SourceFlowConfig: smithy_client_1._json,
2846
+ Tasks: smithy_client_1._json,
2847
+ TriggerConfig: (_) => se_TriggerConfig(_, context),
3222
2848
  });
3223
2849
  };
3224
- const se_MatchingAttributesList = (input, context) => {
3225
- return input
3226
- .filter((e) => e != null)
3227
- .map((entry) => {
3228
- return se_MatchingAttributes(entry, context);
2850
+ const se_IntegrationConfig = (input, context) => {
2851
+ return (0, smithy_client_1.take)(input, {
2852
+ AppflowIntegration: (_) => se_AppflowIntegration(_, context),
3229
2853
  });
3230
2854
  };
3231
2855
  const se_MatchingRequest = (input, context) => {
3232
- return {
3233
- ...(input.AutoMerging != null && { AutoMerging: se_AutoMerging(input.AutoMerging, context) }),
3234
- ...(input.Enabled != null && { Enabled: input.Enabled }),
3235
- ...(input.ExportingConfig != null && { ExportingConfig: se_ExportingConfig(input.ExportingConfig, context) }),
3236
- ...(input.JobSchedule != null && { JobSchedule: se_JobSchedule(input.JobSchedule, context) }),
3237
- };
3238
- };
3239
- const se_ObjectFilter = (input, context) => {
3240
- return {
3241
- ...(input.KeyName != null && { KeyName: input.KeyName }),
3242
- ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }),
3243
- };
3244
- };
3245
- const se_ObjectTypeField = (input, context) => {
3246
- return {
3247
- ...(input.ContentType != null && { ContentType: input.ContentType }),
3248
- ...(input.Source != null && { Source: input.Source }),
3249
- ...(input.Target != null && { Target: input.Target }),
3250
- };
3251
- };
3252
- const se_ObjectTypeKey = (input, context) => {
3253
- return {
3254
- ...(input.FieldNames != null && { FieldNames: se_FieldNameList(input.FieldNames, context) }),
3255
- ...(input.StandardIdentifiers != null && {
3256
- StandardIdentifiers: se_StandardIdentifierList(input.StandardIdentifiers, context),
3257
- }),
3258
- };
3259
- };
3260
- const se_ObjectTypeKeyList = (input, context) => {
3261
- return input
3262
- .filter((e) => e != null)
3263
- .map((entry) => {
3264
- return se_ObjectTypeKey(entry, context);
3265
- });
3266
- };
3267
- const se_ObjectTypeNames = (input, context) => {
3268
- return Object.entries(input).reduce((acc, [key, value]) => {
3269
- if (value === null) {
3270
- return acc;
3271
- }
3272
- acc[key] = value;
3273
- return acc;
3274
- }, {});
3275
- };
3276
- const se_ProfileIdToBeMergedList = (input, context) => {
3277
- return input
3278
- .filter((e) => e != null)
3279
- .map((entry) => {
3280
- return entry;
2856
+ return (0, smithy_client_1.take)(input, {
2857
+ AutoMerging: (_) => se_AutoMerging(_, context),
2858
+ Enabled: [],
2859
+ ExportingConfig: smithy_client_1._json,
2860
+ JobSchedule: smithy_client_1._json,
3281
2861
  });
3282
2862
  };
3283
- const se_requestValueList = (input, context) => {
3284
- return input
3285
- .filter((e) => e != null)
3286
- .map((entry) => {
3287
- return entry;
3288
- });
3289
- };
3290
- const se_S3ExportingConfig = (input, context) => {
3291
- return {
3292
- ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }),
3293
- ...(input.S3KeyName != null && { S3KeyName: input.S3KeyName }),
3294
- };
3295
- };
3296
- const se_S3SourceProperties = (input, context) => {
3297
- return {
3298
- ...(input.BucketName != null && { BucketName: input.BucketName }),
3299
- ...(input.BucketPrefix != null && { BucketPrefix: input.BucketPrefix }),
3300
- };
3301
- };
3302
- const se_SalesforceSourceProperties = (input, context) => {
3303
- return {
3304
- ...(input.EnableDynamicFieldUpdate != null && { EnableDynamicFieldUpdate: input.EnableDynamicFieldUpdate }),
3305
- ...(input.IncludeDeletedRecords != null && { IncludeDeletedRecords: input.IncludeDeletedRecords }),
3306
- ...(input.Object != null && { Object: input.Object }),
3307
- };
3308
- };
3309
2863
  const se_ScheduledTriggerProperties = (input, context) => {
3310
- return {
3311
- ...(input.DataPullMode != null && { DataPullMode: input.DataPullMode }),
3312
- ...(input.FirstExecutionFrom != null && {
3313
- FirstExecutionFrom: Math.round(input.FirstExecutionFrom.getTime() / 1000),
3314
- }),
3315
- ...(input.ScheduleEndTime != null && { ScheduleEndTime: Math.round(input.ScheduleEndTime.getTime() / 1000) }),
3316
- ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }),
3317
- ...(input.ScheduleOffset != null && { ScheduleOffset: input.ScheduleOffset }),
3318
- ...(input.ScheduleStartTime != null && { ScheduleStartTime: Math.round(input.ScheduleStartTime.getTime() / 1000) }),
3319
- ...(input.Timezone != null && { Timezone: input.Timezone }),
3320
- };
3321
- };
3322
- const se_ServiceNowSourceProperties = (input, context) => {
3323
- return {
3324
- ...(input.Object != null && { Object: input.Object }),
3325
- };
3326
- };
3327
- const se_SourceConnectorProperties = (input, context) => {
3328
- return {
3329
- ...(input.Marketo != null && { Marketo: se_MarketoSourceProperties(input.Marketo, context) }),
3330
- ...(input.S3 != null && { S3: se_S3SourceProperties(input.S3, context) }),
3331
- ...(input.Salesforce != null && { Salesforce: se_SalesforceSourceProperties(input.Salesforce, context) }),
3332
- ...(input.ServiceNow != null && { ServiceNow: se_ServiceNowSourceProperties(input.ServiceNow, context) }),
3333
- ...(input.Zendesk != null && { Zendesk: se_ZendeskSourceProperties(input.Zendesk, context) }),
3334
- };
3335
- };
3336
- const se_SourceFields = (input, context) => {
3337
- return input
3338
- .filter((e) => e != null)
3339
- .map((entry) => {
3340
- return entry;
3341
- });
3342
- };
3343
- const se_SourceFlowConfig = (input, context) => {
3344
- return {
3345
- ...(input.ConnectorProfileName != null && { ConnectorProfileName: input.ConnectorProfileName }),
3346
- ...(input.ConnectorType != null && { ConnectorType: input.ConnectorType }),
3347
- ...(input.IncrementalPullConfig != null && {
3348
- IncrementalPullConfig: se_IncrementalPullConfig(input.IncrementalPullConfig, context),
3349
- }),
3350
- ...(input.SourceConnectorProperties != null && {
3351
- SourceConnectorProperties: se_SourceConnectorProperties(input.SourceConnectorProperties, context),
3352
- }),
3353
- };
3354
- };
3355
- const se_StandardIdentifierList = (input, context) => {
3356
- return input
3357
- .filter((e) => e != null)
3358
- .map((entry) => {
3359
- return entry;
3360
- });
3361
- };
3362
- const se_TagMap = (input, context) => {
3363
- return Object.entries(input).reduce((acc, [key, value]) => {
3364
- if (value === null) {
3365
- return acc;
3366
- }
3367
- acc[key] = value;
3368
- return acc;
3369
- }, {});
3370
- };
3371
- const se_Task = (input, context) => {
3372
- return {
3373
- ...(input.ConnectorOperator != null && {
3374
- ConnectorOperator: se_ConnectorOperator(input.ConnectorOperator, context),
3375
- }),
3376
- ...(input.DestinationField != null && { DestinationField: input.DestinationField }),
3377
- ...(input.SourceFields != null && { SourceFields: se_SourceFields(input.SourceFields, context) }),
3378
- ...(input.TaskProperties != null && { TaskProperties: se_TaskPropertiesMap(input.TaskProperties, context) }),
3379
- ...(input.TaskType != null && { TaskType: input.TaskType }),
3380
- };
3381
- };
3382
- const se_TaskPropertiesMap = (input, context) => {
3383
- return Object.entries(input).reduce((acc, [key, value]) => {
3384
- if (value === null) {
3385
- return acc;
3386
- }
3387
- acc[key] = value;
3388
- return acc;
3389
- }, {});
3390
- };
3391
- const se_Tasks = (input, context) => {
3392
- return input
3393
- .filter((e) => e != null)
3394
- .map((entry) => {
3395
- return se_Task(entry, context);
2864
+ return (0, smithy_client_1.take)(input, {
2865
+ DataPullMode: [],
2866
+ FirstExecutionFrom: (_) => Math.round(_.getTime() / 1000),
2867
+ ScheduleEndTime: (_) => Math.round(_.getTime() / 1000),
2868
+ ScheduleExpression: [],
2869
+ ScheduleOffset: [],
2870
+ ScheduleStartTime: (_) => Math.round(_.getTime() / 1000),
2871
+ Timezone: [],
3396
2872
  });
3397
2873
  };
3398
2874
  const se_TriggerConfig = (input, context) => {
3399
- return {
3400
- ...(input.TriggerProperties != null && {
3401
- TriggerProperties: se_TriggerProperties(input.TriggerProperties, context),
3402
- }),
3403
- ...(input.TriggerType != null && { TriggerType: input.TriggerType }),
3404
- };
2875
+ return (0, smithy_client_1.take)(input, {
2876
+ TriggerProperties: (_) => se_TriggerProperties(_, context),
2877
+ TriggerType: [],
2878
+ });
3405
2879
  };
3406
2880
  const se_TriggerProperties = (input, context) => {
3407
- return {
3408
- ...(input.Scheduled != null && { Scheduled: se_ScheduledTriggerProperties(input.Scheduled, context) }),
3409
- };
3410
- };
3411
- const se_UpdateAddress = (input, context) => {
3412
- return {
3413
- ...(input.Address1 != null && { Address1: input.Address1 }),
3414
- ...(input.Address2 != null && { Address2: input.Address2 }),
3415
- ...(input.Address3 != null && { Address3: input.Address3 }),
3416
- ...(input.Address4 != null && { Address4: input.Address4 }),
3417
- ...(input.City != null && { City: input.City }),
3418
- ...(input.Country != null && { Country: input.Country }),
3419
- ...(input.County != null && { County: input.County }),
3420
- ...(input.PostalCode != null && { PostalCode: input.PostalCode }),
3421
- ...(input.Province != null && { Province: input.Province }),
3422
- ...(input.State != null && { State: input.State }),
3423
- };
3424
- };
3425
- const se_UpdateAttributes = (input, context) => {
3426
- return Object.entries(input).reduce((acc, [key, value]) => {
3427
- if (value === null) {
3428
- return acc;
3429
- }
3430
- acc[key] = value;
3431
- return acc;
3432
- }, {});
3433
- };
3434
- const se_ZendeskSourceProperties = (input, context) => {
3435
- return {
3436
- ...(input.Object != null && { Object: input.Object }),
3437
- };
3438
- };
3439
- const de_Address = (output, context) => {
3440
- return {
3441
- Address1: (0, smithy_client_1.expectString)(output.Address1),
3442
- Address2: (0, smithy_client_1.expectString)(output.Address2),
3443
- Address3: (0, smithy_client_1.expectString)(output.Address3),
3444
- Address4: (0, smithy_client_1.expectString)(output.Address4),
3445
- City: (0, smithy_client_1.expectString)(output.City),
3446
- Country: (0, smithy_client_1.expectString)(output.Country),
3447
- County: (0, smithy_client_1.expectString)(output.County),
3448
- PostalCode: (0, smithy_client_1.expectString)(output.PostalCode),
3449
- Province: (0, smithy_client_1.expectString)(output.Province),
3450
- State: (0, smithy_client_1.expectString)(output.State),
3451
- };
3452
- };
3453
- const de_AppflowIntegrationWorkflowAttributes = (output, context) => {
3454
- return {
3455
- ConnectorProfileName: (0, smithy_client_1.expectString)(output.ConnectorProfileName),
3456
- RoleArn: (0, smithy_client_1.expectString)(output.RoleArn),
3457
- SourceConnectorType: (0, smithy_client_1.expectString)(output.SourceConnectorType),
3458
- };
3459
- };
3460
- const de_AppflowIntegrationWorkflowMetrics = (output, context) => {
3461
- return {
3462
- RecordsProcessed: (0, smithy_client_1.expectLong)(output.RecordsProcessed),
3463
- StepsCompleted: (0, smithy_client_1.expectLong)(output.StepsCompleted),
3464
- TotalSteps: (0, smithy_client_1.expectLong)(output.TotalSteps),
3465
- };
2881
+ return (0, smithy_client_1.take)(input, {
2882
+ Scheduled: (_) => se_ScheduledTriggerProperties(_, context),
2883
+ });
3466
2884
  };
3467
2885
  const de_AppflowIntegrationWorkflowStep = (output, context) => {
3468
- return {
3469
- BatchRecordsEndTime: (0, smithy_client_1.expectString)(output.BatchRecordsEndTime),
3470
- BatchRecordsStartTime: (0, smithy_client_1.expectString)(output.BatchRecordsStartTime),
3471
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
3472
- ExecutionMessage: (0, smithy_client_1.expectString)(output.ExecutionMessage),
3473
- FlowName: (0, smithy_client_1.expectString)(output.FlowName),
3474
- LastUpdatedAt: output.LastUpdatedAt != null
3475
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
3476
- : undefined,
3477
- RecordsProcessed: (0, smithy_client_1.expectLong)(output.RecordsProcessed),
3478
- Status: (0, smithy_client_1.expectString)(output.Status),
3479
- };
3480
- };
3481
- const de_Attributes = (output, context) => {
3482
- return Object.entries(output).reduce((acc, [key, value]) => {
3483
- if (value === null) {
3484
- return acc;
3485
- }
3486
- acc[key] = (0, smithy_client_1.expectString)(value);
3487
- return acc;
3488
- }, {});
2886
+ return (0, smithy_client_1.take)(output, {
2887
+ BatchRecordsEndTime: smithy_client_1.expectString,
2888
+ BatchRecordsStartTime: smithy_client_1.expectString,
2889
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2890
+ ExecutionMessage: smithy_client_1.expectString,
2891
+ FlowName: smithy_client_1.expectString,
2892
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2893
+ RecordsProcessed: smithy_client_1.expectLong,
2894
+ Status: smithy_client_1.expectString,
2895
+ });
3489
2896
  };
3490
2897
  const de_AutoMerging = (output, context) => {
3491
- return {
3492
- ConflictResolution: output.ConflictResolution != null ? de_ConflictResolution(output.ConflictResolution, context) : undefined,
3493
- Consolidation: output.Consolidation != null ? de_Consolidation(output.Consolidation, context) : undefined,
3494
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
3495
- MinAllowedConfidenceScoreForMerging: (0, smithy_client_1.limitedParseDouble)(output.MinAllowedConfidenceScoreForMerging),
3496
- };
3497
- };
3498
- const de_ConflictResolution = (output, context) => {
3499
- return {
3500
- ConflictResolvingModel: (0, smithy_client_1.expectString)(output.ConflictResolvingModel),
3501
- SourceName: (0, smithy_client_1.expectString)(output.SourceName),
3502
- };
3503
- };
3504
- const de_Consolidation = (output, context) => {
3505
- return {
3506
- MatchingAttributesList: output.MatchingAttributesList != null
3507
- ? de_MatchingAttributesList(output.MatchingAttributesList, context)
3508
- : undefined,
3509
- };
2898
+ return (0, smithy_client_1.take)(output, {
2899
+ ConflictResolution: smithy_client_1._json,
2900
+ Consolidation: smithy_client_1._json,
2901
+ Enabled: smithy_client_1.expectBoolean,
2902
+ MinAllowedConfidenceScoreForMerging: smithy_client_1.limitedParseDouble,
2903
+ });
3510
2904
  };
3511
2905
  const de_DomainList = (output, context) => {
3512
2906
  const retVal = (output || [])
3513
2907
  .filter((e) => e != null)
3514
2908
  .map((entry) => {
3515
- if (entry === null) {
3516
- return null;
3517
- }
3518
2909
  return de_ListDomainItem(entry, context);
3519
2910
  });
3520
2911
  return retVal;
3521
2912
  };
3522
- const de_DomainStats = (output, context) => {
3523
- return {
3524
- MeteringProfileCount: (0, smithy_client_1.expectLong)(output.MeteringProfileCount),
3525
- ObjectCount: (0, smithy_client_1.expectLong)(output.ObjectCount),
3526
- ProfileCount: (0, smithy_client_1.expectLong)(output.ProfileCount),
3527
- TotalSize: (0, smithy_client_1.expectLong)(output.TotalSize),
3528
- };
3529
- };
3530
- const de_ExportingConfig = (output, context) => {
3531
- return {
3532
- S3Exporting: output.S3Exporting != null ? de_S3ExportingConfig(output.S3Exporting, context) : undefined,
3533
- };
3534
- };
3535
- const de_ExportingLocation = (output, context) => {
3536
- return {
3537
- S3Exporting: output.S3Exporting != null ? de_S3ExportingLocation(output.S3Exporting, context) : undefined,
3538
- };
3539
- };
3540
- const de_FieldMap = (output, context) => {
3541
- return Object.entries(output).reduce((acc, [key, value]) => {
3542
- if (value === null) {
3543
- return acc;
3544
- }
3545
- acc[key] = de_ObjectTypeField(value, context);
3546
- return acc;
3547
- }, {});
3548
- };
3549
- const de_FieldNameList = (output, context) => {
3550
- const retVal = (output || [])
3551
- .filter((e) => e != null)
3552
- .map((entry) => {
3553
- if (entry === null) {
3554
- return null;
3555
- }
3556
- return (0, smithy_client_1.expectString)(entry);
3557
- });
3558
- return retVal;
3559
- };
3560
- const de_FoundByKeyValue = (output, context) => {
3561
- return {
3562
- KeyName: (0, smithy_client_1.expectString)(output.KeyName),
3563
- Values: output.Values != null ? de_requestValueList(output.Values, context) : undefined,
3564
- };
3565
- };
3566
- const de_foundByList = (output, context) => {
3567
- const retVal = (output || [])
3568
- .filter((e) => e != null)
3569
- .map((entry) => {
3570
- if (entry === null) {
3571
- return null;
3572
- }
3573
- return de_FoundByKeyValue(entry, context);
3574
- });
3575
- return retVal;
3576
- };
3577
2913
  const de_IdentityResolutionJob = (output, context) => {
3578
- return {
3579
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
3580
- ExportingLocation: output.ExportingLocation != null ? de_ExportingLocation(output.ExportingLocation, context) : undefined,
3581
- JobEndTime: output.JobEndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.JobEndTime))) : undefined,
3582
- JobId: (0, smithy_client_1.expectString)(output.JobId),
3583
- JobStartTime: output.JobStartTime != null
3584
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.JobStartTime)))
3585
- : undefined,
3586
- JobStats: output.JobStats != null ? de_JobStats(output.JobStats, context) : undefined,
3587
- Message: (0, smithy_client_1.expectString)(output.Message),
3588
- Status: (0, smithy_client_1.expectString)(output.Status),
3589
- };
2914
+ return (0, smithy_client_1.take)(output, {
2915
+ DomainName: smithy_client_1.expectString,
2916
+ ExportingLocation: smithy_client_1._json,
2917
+ JobEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2918
+ JobId: smithy_client_1.expectString,
2919
+ JobStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2920
+ JobStats: smithy_client_1._json,
2921
+ Message: smithy_client_1.expectString,
2922
+ Status: smithy_client_1.expectString,
2923
+ });
3590
2924
  };
3591
2925
  const de_IdentityResolutionJobsList = (output, context) => {
3592
2926
  const retVal = (output || [])
3593
2927
  .filter((e) => e != null)
3594
2928
  .map((entry) => {
3595
- if (entry === null) {
3596
- return null;
3597
- }
3598
2929
  return de_IdentityResolutionJob(entry, context);
3599
2930
  });
3600
2931
  return retVal;
@@ -3603,344 +2934,98 @@ const de_IntegrationList = (output, context) => {
3603
2934
  const retVal = (output || [])
3604
2935
  .filter((e) => e != null)
3605
2936
  .map((entry) => {
3606
- if (entry === null) {
3607
- return null;
3608
- }
3609
2937
  return de_ListIntegrationItem(entry, context);
3610
2938
  });
3611
2939
  return retVal;
3612
2940
  };
3613
- const de_JobSchedule = (output, context) => {
3614
- return {
3615
- DayOfTheWeek: (0, smithy_client_1.expectString)(output.DayOfTheWeek),
3616
- Time: (0, smithy_client_1.expectString)(output.Time),
3617
- };
3618
- };
3619
- const de_JobStats = (output, context) => {
3620
- return {
3621
- NumberOfMatchesFound: (0, smithy_client_1.expectLong)(output.NumberOfMatchesFound),
3622
- NumberOfMergesDone: (0, smithy_client_1.expectLong)(output.NumberOfMergesDone),
3623
- NumberOfProfilesReviewed: (0, smithy_client_1.expectLong)(output.NumberOfProfilesReviewed),
3624
- };
3625
- };
3626
- const de_KeyMap = (output, context) => {
3627
- return Object.entries(output).reduce((acc, [key, value]) => {
3628
- if (value === null) {
3629
- return acc;
3630
- }
3631
- acc[key] = de_ObjectTypeKeyList(value, context);
3632
- return acc;
3633
- }, {});
3634
- };
3635
2941
  const de_ListDomainItem = (output, context) => {
3636
- return {
3637
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
3638
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
3639
- LastUpdatedAt: output.LastUpdatedAt != null
3640
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
3641
- : undefined,
3642
- Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined,
3643
- };
2942
+ return (0, smithy_client_1.take)(output, {
2943
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2944
+ DomainName: smithy_client_1.expectString,
2945
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2946
+ Tags: smithy_client_1._json,
2947
+ });
3644
2948
  };
3645
2949
  const de_ListIntegrationItem = (output, context) => {
3646
- return {
3647
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
3648
- DomainName: (0, smithy_client_1.expectString)(output.DomainName),
3649
- IsUnstructured: (0, smithy_client_1.expectBoolean)(output.IsUnstructured),
3650
- LastUpdatedAt: output.LastUpdatedAt != null
3651
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
3652
- : undefined,
3653
- ObjectTypeName: (0, smithy_client_1.expectString)(output.ObjectTypeName),
3654
- ObjectTypeNames: output.ObjectTypeNames != null ? de_ObjectTypeNames(output.ObjectTypeNames, context) : undefined,
3655
- Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined,
3656
- Uri: (0, smithy_client_1.expectString)(output.Uri),
3657
- WorkflowId: (0, smithy_client_1.expectString)(output.WorkflowId),
3658
- };
3659
- };
3660
- const de_ListProfileObjectsItem = (output, context) => {
3661
- return {
3662
- Object: (0, smithy_client_1.expectString)(output.Object),
3663
- ObjectTypeName: (0, smithy_client_1.expectString)(output.ObjectTypeName),
3664
- ProfileObjectUniqueKey: (0, smithy_client_1.expectString)(output.ProfileObjectUniqueKey),
3665
- };
2950
+ return (0, smithy_client_1.take)(output, {
2951
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2952
+ DomainName: smithy_client_1.expectString,
2953
+ IsUnstructured: smithy_client_1.expectBoolean,
2954
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2955
+ ObjectTypeName: smithy_client_1.expectString,
2956
+ ObjectTypeNames: smithy_client_1._json,
2957
+ Tags: smithy_client_1._json,
2958
+ Uri: smithy_client_1.expectString,
2959
+ WorkflowId: smithy_client_1.expectString,
2960
+ });
3666
2961
  };
3667
2962
  const de_ListProfileObjectTypeItem = (output, context) => {
3668
- return {
3669
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
3670
- Description: (0, smithy_client_1.expectString)(output.Description),
3671
- LastUpdatedAt: output.LastUpdatedAt != null
3672
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
3673
- : undefined,
3674
- ObjectTypeName: (0, smithy_client_1.expectString)(output.ObjectTypeName),
3675
- Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined,
3676
- };
3677
- };
3678
- const de_ListProfileObjectTypeTemplateItem = (output, context) => {
3679
- return {
3680
- SourceName: (0, smithy_client_1.expectString)(output.SourceName),
3681
- SourceObject: (0, smithy_client_1.expectString)(output.SourceObject),
3682
- TemplateId: (0, smithy_client_1.expectString)(output.TemplateId),
3683
- };
2963
+ return (0, smithy_client_1.take)(output, {
2964
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2965
+ Description: smithy_client_1.expectString,
2966
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2967
+ ObjectTypeName: smithy_client_1.expectString,
2968
+ Tags: smithy_client_1._json,
2969
+ });
3684
2970
  };
3685
2971
  const de_ListWorkflowsItem = (output, context) => {
3686
- return {
3687
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
3688
- LastUpdatedAt: output.LastUpdatedAt != null
3689
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
3690
- : undefined,
3691
- Status: (0, smithy_client_1.expectString)(output.Status),
3692
- StatusDescription: (0, smithy_client_1.expectString)(output.StatusDescription),
3693
- WorkflowId: (0, smithy_client_1.expectString)(output.WorkflowId),
3694
- WorkflowType: (0, smithy_client_1.expectString)(output.WorkflowType),
3695
- };
2972
+ return (0, smithy_client_1.take)(output, {
2973
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2974
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2975
+ Status: smithy_client_1.expectString,
2976
+ StatusDescription: smithy_client_1.expectString,
2977
+ WorkflowId: smithy_client_1.expectString,
2978
+ WorkflowType: smithy_client_1.expectString,
2979
+ });
3696
2980
  };
3697
2981
  const de_MatchesList = (output, context) => {
3698
2982
  const retVal = (output || [])
3699
2983
  .filter((e) => e != null)
3700
2984
  .map((entry) => {
3701
- if (entry === null) {
3702
- return null;
3703
- }
3704
2985
  return de_MatchItem(entry, context);
3705
2986
  });
3706
2987
  return retVal;
3707
2988
  };
3708
- const de_MatchingAttributes = (output, context) => {
3709
- const retVal = (output || [])
3710
- .filter((e) => e != null)
3711
- .map((entry) => {
3712
- if (entry === null) {
3713
- return null;
3714
- }
3715
- return (0, smithy_client_1.expectString)(entry);
3716
- });
3717
- return retVal;
3718
- };
3719
- const de_MatchingAttributesList = (output, context) => {
3720
- const retVal = (output || [])
3721
- .filter((e) => e != null)
3722
- .map((entry) => {
3723
- if (entry === null) {
3724
- return null;
3725
- }
3726
- return de_MatchingAttributes(entry, context);
3727
- });
3728
- return retVal;
3729
- };
3730
2989
  const de_MatchingResponse = (output, context) => {
3731
- return {
3732
- AutoMerging: output.AutoMerging != null ? de_AutoMerging(output.AutoMerging, context) : undefined,
3733
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
3734
- ExportingConfig: output.ExportingConfig != null ? de_ExportingConfig(output.ExportingConfig, context) : undefined,
3735
- JobSchedule: output.JobSchedule != null ? de_JobSchedule(output.JobSchedule, context) : undefined,
3736
- };
3737
- };
3738
- const de_MatchItem = (output, context) => {
3739
- return {
3740
- ConfidenceScore: (0, smithy_client_1.limitedParseDouble)(output.ConfidenceScore),
3741
- MatchId: (0, smithy_client_1.expectString)(output.MatchId),
3742
- ProfileIds: output.ProfileIds != null ? de_ProfileIdList(output.ProfileIds, context) : undefined,
3743
- };
3744
- };
3745
- const de_ObjectTypeField = (output, context) => {
3746
- return {
3747
- ContentType: (0, smithy_client_1.expectString)(output.ContentType),
3748
- Source: (0, smithy_client_1.expectString)(output.Source),
3749
- Target: (0, smithy_client_1.expectString)(output.Target),
3750
- };
3751
- };
3752
- const de_ObjectTypeKey = (output, context) => {
3753
- return {
3754
- FieldNames: output.FieldNames != null ? de_FieldNameList(output.FieldNames, context) : undefined,
3755
- StandardIdentifiers: output.StandardIdentifiers != null ? de_StandardIdentifierList(output.StandardIdentifiers, context) : undefined,
3756
- };
3757
- };
3758
- const de_ObjectTypeKeyList = (output, context) => {
3759
- const retVal = (output || [])
3760
- .filter((e) => e != null)
3761
- .map((entry) => {
3762
- if (entry === null) {
3763
- return null;
3764
- }
3765
- return de_ObjectTypeKey(entry, context);
3766
- });
3767
- return retVal;
3768
- };
3769
- const de_ObjectTypeNames = (output, context) => {
3770
- return Object.entries(output).reduce((acc, [key, value]) => {
3771
- if (value === null) {
3772
- return acc;
3773
- }
3774
- acc[key] = (0, smithy_client_1.expectString)(value);
3775
- return acc;
3776
- }, {});
3777
- };
3778
- const de_Profile = (output, context) => {
3779
- return {
3780
- AccountNumber: (0, smithy_client_1.expectString)(output.AccountNumber),
3781
- AdditionalInformation: (0, smithy_client_1.expectString)(output.AdditionalInformation),
3782
- Address: output.Address != null ? de_Address(output.Address, context) : undefined,
3783
- Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined,
3784
- BillingAddress: output.BillingAddress != null ? de_Address(output.BillingAddress, context) : undefined,
3785
- BirthDate: (0, smithy_client_1.expectString)(output.BirthDate),
3786
- BusinessEmailAddress: (0, smithy_client_1.expectString)(output.BusinessEmailAddress),
3787
- BusinessName: (0, smithy_client_1.expectString)(output.BusinessName),
3788
- BusinessPhoneNumber: (0, smithy_client_1.expectString)(output.BusinessPhoneNumber),
3789
- EmailAddress: (0, smithy_client_1.expectString)(output.EmailAddress),
3790
- FirstName: (0, smithy_client_1.expectString)(output.FirstName),
3791
- FoundByItems: output.FoundByItems != null ? de_foundByList(output.FoundByItems, context) : undefined,
3792
- Gender: (0, smithy_client_1.expectString)(output.Gender),
3793
- GenderString: (0, smithy_client_1.expectString)(output.GenderString),
3794
- HomePhoneNumber: (0, smithy_client_1.expectString)(output.HomePhoneNumber),
3795
- LastName: (0, smithy_client_1.expectString)(output.LastName),
3796
- MailingAddress: output.MailingAddress != null ? de_Address(output.MailingAddress, context) : undefined,
3797
- MiddleName: (0, smithy_client_1.expectString)(output.MiddleName),
3798
- MobilePhoneNumber: (0, smithy_client_1.expectString)(output.MobilePhoneNumber),
3799
- PartyType: (0, smithy_client_1.expectString)(output.PartyType),
3800
- PartyTypeString: (0, smithy_client_1.expectString)(output.PartyTypeString),
3801
- PersonalEmailAddress: (0, smithy_client_1.expectString)(output.PersonalEmailAddress),
3802
- PhoneNumber: (0, smithy_client_1.expectString)(output.PhoneNumber),
3803
- ProfileId: (0, smithy_client_1.expectString)(output.ProfileId),
3804
- ShippingAddress: output.ShippingAddress != null ? de_Address(output.ShippingAddress, context) : undefined,
3805
- };
3806
- };
3807
- const de_ProfileIdList = (output, context) => {
3808
- const retVal = (output || [])
3809
- .filter((e) => e != null)
3810
- .map((entry) => {
3811
- if (entry === null) {
3812
- return null;
3813
- }
3814
- return (0, smithy_client_1.expectString)(entry);
2990
+ return (0, smithy_client_1.take)(output, {
2991
+ AutoMerging: (_) => de_AutoMerging(_, context),
2992
+ Enabled: smithy_client_1.expectBoolean,
2993
+ ExportingConfig: smithy_client_1._json,
2994
+ JobSchedule: smithy_client_1._json,
3815
2995
  });
3816
- return retVal;
3817
2996
  };
3818
- const de_ProfileList = (output, context) => {
3819
- const retVal = (output || [])
3820
- .filter((e) => e != null)
3821
- .map((entry) => {
3822
- if (entry === null) {
3823
- return null;
3824
- }
3825
- return de_Profile(entry, context);
3826
- });
3827
- return retVal;
3828
- };
3829
- const de_ProfileObjectList = (output, context) => {
3830
- const retVal = (output || [])
3831
- .filter((e) => e != null)
3832
- .map((entry) => {
3833
- if (entry === null) {
3834
- return null;
3835
- }
3836
- return de_ListProfileObjectsItem(entry, context);
2997
+ const de_MatchItem = (output, context) => {
2998
+ return (0, smithy_client_1.take)(output, {
2999
+ ConfidenceScore: smithy_client_1.limitedParseDouble,
3000
+ MatchId: smithy_client_1.expectString,
3001
+ ProfileIds: smithy_client_1._json,
3837
3002
  });
3838
- return retVal;
3839
3003
  };
3840
3004
  const de_ProfileObjectTypeList = (output, context) => {
3841
3005
  const retVal = (output || [])
3842
3006
  .filter((e) => e != null)
3843
3007
  .map((entry) => {
3844
- if (entry === null) {
3845
- return null;
3846
- }
3847
3008
  return de_ListProfileObjectTypeItem(entry, context);
3848
3009
  });
3849
3010
  return retVal;
3850
3011
  };
3851
- const de_ProfileObjectTypeTemplateList = (output, context) => {
3852
- const retVal = (output || [])
3853
- .filter((e) => e != null)
3854
- .map((entry) => {
3855
- if (entry === null) {
3856
- return null;
3857
- }
3858
- return de_ListProfileObjectTypeTemplateItem(entry, context);
3859
- });
3860
- return retVal;
3861
- };
3862
- const de_requestValueList = (output, context) => {
3863
- const retVal = (output || [])
3864
- .filter((e) => e != null)
3865
- .map((entry) => {
3866
- if (entry === null) {
3867
- return null;
3868
- }
3869
- return (0, smithy_client_1.expectString)(entry);
3870
- });
3871
- return retVal;
3872
- };
3873
- const de_S3ExportingConfig = (output, context) => {
3874
- return {
3875
- S3BucketName: (0, smithy_client_1.expectString)(output.S3BucketName),
3876
- S3KeyName: (0, smithy_client_1.expectString)(output.S3KeyName),
3877
- };
3878
- };
3879
- const de_S3ExportingLocation = (output, context) => {
3880
- return {
3881
- S3BucketName: (0, smithy_client_1.expectString)(output.S3BucketName),
3882
- S3KeyName: (0, smithy_client_1.expectString)(output.S3KeyName),
3883
- };
3884
- };
3885
- const de_StandardIdentifierList = (output, context) => {
3886
- const retVal = (output || [])
3887
- .filter((e) => e != null)
3888
- .map((entry) => {
3889
- if (entry === null) {
3890
- return null;
3891
- }
3892
- return (0, smithy_client_1.expectString)(entry);
3893
- });
3894
- return retVal;
3895
- };
3896
- const de_TagMap = (output, context) => {
3897
- return Object.entries(output).reduce((acc, [key, value]) => {
3898
- if (value === null) {
3899
- return acc;
3900
- }
3901
- acc[key] = (0, smithy_client_1.expectString)(value);
3902
- return acc;
3903
- }, {});
3904
- };
3905
- const de_WorkflowAttributes = (output, context) => {
3906
- return {
3907
- AppflowIntegration: output.AppflowIntegration != null
3908
- ? de_AppflowIntegrationWorkflowAttributes(output.AppflowIntegration, context)
3909
- : undefined,
3910
- };
3911
- };
3912
3012
  const de_WorkflowList = (output, context) => {
3913
3013
  const retVal = (output || [])
3914
3014
  .filter((e) => e != null)
3915
3015
  .map((entry) => {
3916
- if (entry === null) {
3917
- return null;
3918
- }
3919
3016
  return de_ListWorkflowsItem(entry, context);
3920
3017
  });
3921
3018
  return retVal;
3922
3019
  };
3923
- const de_WorkflowMetrics = (output, context) => {
3924
- return {
3925
- AppflowIntegration: output.AppflowIntegration != null
3926
- ? de_AppflowIntegrationWorkflowMetrics(output.AppflowIntegration, context)
3927
- : undefined,
3928
- };
3929
- };
3930
3020
  const de_WorkflowStepItem = (output, context) => {
3931
- return {
3932
- AppflowIntegration: output.AppflowIntegration != null
3933
- ? de_AppflowIntegrationWorkflowStep(output.AppflowIntegration, context)
3934
- : undefined,
3935
- };
3021
+ return (0, smithy_client_1.take)(output, {
3022
+ AppflowIntegration: (_) => de_AppflowIntegrationWorkflowStep(_, context),
3023
+ });
3936
3024
  };
3937
3025
  const de_WorkflowStepsList = (output, context) => {
3938
3026
  const retVal = (output || [])
3939
3027
  .filter((e) => e != null)
3940
3028
  .map((entry) => {
3941
- if (entry === null) {
3942
- return null;
3943
- }
3944
3029
  return de_WorkflowStepItem(entry, context);
3945
3030
  });
3946
3031
  return retVal;