@aws-sdk/client-vpc-lattice 3.312.0 → 3.316.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.
@@ -18,9 +18,9 @@ const se_BatchUpdateRuleCommand = async (input, context) => {
18
18
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serviceIdentifier", () => input.serviceIdentifier, "{serviceIdentifier}", false);
19
19
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "listenerIdentifier", () => input.listenerIdentifier, "{listenerIdentifier}", false);
20
20
  let body;
21
- body = JSON.stringify({
22
- ...(input.rules != null && { rules: se_RuleUpdateList(input.rules, context) }),
23
- });
21
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
22
+ rules: (_) => (0, smithy_client_1._json)(_),
23
+ }));
24
24
  return new protocol_http_1.HttpRequest({
25
25
  protocol,
26
26
  hostname,
@@ -39,12 +39,12 @@ const se_CreateAccessLogSubscriptionCommand = async (input, context) => {
39
39
  };
40
40
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accesslogsubscriptions";
41
41
  let body;
42
- body = JSON.stringify({
43
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
44
- ...(input.destinationArn != null && { destinationArn: input.destinationArn }),
45
- ...(input.resourceIdentifier != null && { resourceIdentifier: input.resourceIdentifier }),
46
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
47
- });
42
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
43
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
44
+ destinationArn: [],
45
+ resourceIdentifier: [],
46
+ tags: (_) => (0, smithy_client_1._json)(_),
47
+ }));
48
48
  return new protocol_http_1.HttpRequest({
49
49
  protocol,
50
50
  hostname,
@@ -64,14 +64,14 @@ const se_CreateListenerCommand = async (input, context) => {
64
64
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/services/{serviceIdentifier}/listeners";
65
65
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serviceIdentifier", () => input.serviceIdentifier, "{serviceIdentifier}", false);
66
66
  let body;
67
- body = JSON.stringify({
68
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
69
- ...(input.defaultAction != null && { defaultAction: se_RuleAction(input.defaultAction, context) }),
70
- ...(input.name != null && { name: input.name }),
71
- ...(input.port != null && { port: input.port }),
72
- ...(input.protocol != null && { protocol: input.protocol }),
73
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
74
- });
67
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
68
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
69
+ defaultAction: (_) => (0, smithy_client_1._json)(_),
70
+ name: [],
71
+ port: [],
72
+ protocol: [],
73
+ tags: (_) => (0, smithy_client_1._json)(_),
74
+ }));
75
75
  return new protocol_http_1.HttpRequest({
76
76
  protocol,
77
77
  hostname,
@@ -93,14 +93,14 @@ const se_CreateRuleCommand = async (input, context) => {
93
93
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serviceIdentifier", () => input.serviceIdentifier, "{serviceIdentifier}", false);
94
94
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "listenerIdentifier", () => input.listenerIdentifier, "{listenerIdentifier}", false);
95
95
  let body;
96
- body = JSON.stringify({
97
- ...(input.action != null && { action: se_RuleAction(input.action, context) }),
98
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
99
- ...(input.match != null && { match: se_RuleMatch(input.match, context) }),
100
- ...(input.name != null && { name: input.name }),
101
- ...(input.priority != null && { priority: input.priority }),
102
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
103
- });
96
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
97
+ action: (_) => (0, smithy_client_1._json)(_),
98
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
99
+ match: (_) => (0, smithy_client_1._json)(_),
100
+ name: [],
101
+ priority: [],
102
+ tags: (_) => (0, smithy_client_1._json)(_),
103
+ }));
104
104
  return new protocol_http_1.HttpRequest({
105
105
  protocol,
106
106
  hostname,
@@ -119,14 +119,14 @@ const se_CreateServiceCommand = async (input, context) => {
119
119
  };
120
120
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/services";
121
121
  let body;
122
- body = JSON.stringify({
123
- ...(input.authType != null && { authType: input.authType }),
124
- ...(input.certificateArn != null && { certificateArn: input.certificateArn }),
125
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
126
- ...(input.customDomainName != null && { customDomainName: input.customDomainName }),
127
- ...(input.name != null && { name: input.name }),
128
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
129
- });
122
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
123
+ authType: [],
124
+ certificateArn: [],
125
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
126
+ customDomainName: [],
127
+ name: [],
128
+ tags: (_) => (0, smithy_client_1._json)(_),
129
+ }));
130
130
  return new protocol_http_1.HttpRequest({
131
131
  protocol,
132
132
  hostname,
@@ -145,12 +145,12 @@ const se_CreateServiceNetworkCommand = async (input, context) => {
145
145
  };
146
146
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/servicenetworks";
147
147
  let body;
148
- body = JSON.stringify({
149
- ...(input.authType != null && { authType: input.authType }),
150
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
151
- ...(input.name != null && { name: input.name }),
152
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
153
- });
148
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
149
+ authType: [],
150
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
151
+ name: [],
152
+ tags: (_) => (0, smithy_client_1._json)(_),
153
+ }));
154
154
  return new protocol_http_1.HttpRequest({
155
155
  protocol,
156
156
  hostname,
@@ -169,12 +169,12 @@ const se_CreateServiceNetworkServiceAssociationCommand = async (input, context)
169
169
  };
170
170
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/servicenetworkserviceassociations";
171
171
  let body;
172
- body = JSON.stringify({
173
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
174
- ...(input.serviceIdentifier != null && { serviceIdentifier: input.serviceIdentifier }),
175
- ...(input.serviceNetworkIdentifier != null && { serviceNetworkIdentifier: input.serviceNetworkIdentifier }),
176
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
177
- });
172
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
173
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
174
+ serviceIdentifier: [],
175
+ serviceNetworkIdentifier: [],
176
+ tags: (_) => (0, smithy_client_1._json)(_),
177
+ }));
178
178
  return new protocol_http_1.HttpRequest({
179
179
  protocol,
180
180
  hostname,
@@ -193,13 +193,13 @@ const se_CreateServiceNetworkVpcAssociationCommand = async (input, context) => {
193
193
  };
194
194
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/servicenetworkvpcassociations";
195
195
  let body;
196
- body = JSON.stringify({
197
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
198
- ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupList(input.securityGroupIds, context) }),
199
- ...(input.serviceNetworkIdentifier != null && { serviceNetworkIdentifier: input.serviceNetworkIdentifier }),
200
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
201
- ...(input.vpcIdentifier != null && { vpcIdentifier: input.vpcIdentifier }),
202
- });
196
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
197
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
198
+ securityGroupIds: (_) => (0, smithy_client_1._json)(_),
199
+ serviceNetworkIdentifier: [],
200
+ tags: (_) => (0, smithy_client_1._json)(_),
201
+ vpcIdentifier: [],
202
+ }));
203
203
  return new protocol_http_1.HttpRequest({
204
204
  protocol,
205
205
  hostname,
@@ -218,13 +218,13 @@ const se_CreateTargetGroupCommand = async (input, context) => {
218
218
  };
219
219
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/targetgroups";
220
220
  let body;
221
- body = JSON.stringify({
222
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
223
- ...(input.config != null && { config: se_TargetGroupConfig(input.config, context) }),
224
- ...(input.name != null && { name: input.name }),
225
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
226
- ...(input.type != null && { type: input.type }),
227
- });
221
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
222
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
223
+ config: (_) => (0, smithy_client_1._json)(_),
224
+ name: [],
225
+ tags: (_) => (0, smithy_client_1._json)(_),
226
+ type: [],
227
+ }));
228
228
  return new protocol_http_1.HttpRequest({
229
229
  protocol,
230
230
  hostname,
@@ -424,9 +424,9 @@ const se_DeregisterTargetsCommand = async (input, context) => {
424
424
  "/targetgroups/{targetGroupIdentifier}/deregistertargets";
425
425
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "targetGroupIdentifier", () => input.targetGroupIdentifier, "{targetGroupIdentifier}", false);
426
426
  let body;
427
- body = JSON.stringify({
428
- ...(input.targets != null && { targets: se_TargetList(input.targets, context) }),
429
- });
427
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
428
+ targets: (_) => (0, smithy_client_1._json)(_),
429
+ }));
430
430
  return new protocol_http_1.HttpRequest({
431
431
  protocol,
432
432
  hostname,
@@ -621,7 +621,7 @@ const se_ListAccessLogSubscriptionsCommand = async (input, context) => {
621
621
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
622
622
  const headers = {};
623
623
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accesslogsubscriptions";
624
- const query = map({
624
+ const query = (0, smithy_client_1.map)({
625
625
  resourceIdentifier: [, (0, smithy_client_1.expectNonNull)(input.resourceIdentifier, `resourceIdentifier`)],
626
626
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
627
627
  nextToken: [, input.nextToken],
@@ -644,7 +644,7 @@ const se_ListListenersCommand = async (input, context) => {
644
644
  const headers = {};
645
645
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/services/{serviceIdentifier}/listeners";
646
646
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serviceIdentifier", () => input.serviceIdentifier, "{serviceIdentifier}", false);
647
- const query = map({
647
+ const query = (0, smithy_client_1.map)({
648
648
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
649
649
  nextToken: [, input.nextToken],
650
650
  });
@@ -668,7 +668,7 @@ const se_ListRulesCommand = async (input, context) => {
668
668
  "/services/{serviceIdentifier}/listeners/{listenerIdentifier}/rules";
669
669
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serviceIdentifier", () => input.serviceIdentifier, "{serviceIdentifier}", false);
670
670
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "listenerIdentifier", () => input.listenerIdentifier, "{listenerIdentifier}", false);
671
- const query = map({
671
+ const query = (0, smithy_client_1.map)({
672
672
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
673
673
  nextToken: [, input.nextToken],
674
674
  });
@@ -689,7 +689,7 @@ const se_ListServiceNetworksCommand = async (input, context) => {
689
689
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
690
690
  const headers = {};
691
691
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/servicenetworks";
692
- const query = map({
692
+ const query = (0, smithy_client_1.map)({
693
693
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
694
694
  nextToken: [, input.nextToken],
695
695
  });
@@ -710,7 +710,7 @@ const se_ListServiceNetworkServiceAssociationsCommand = async (input, context) =
710
710
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
711
711
  const headers = {};
712
712
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/servicenetworkserviceassociations";
713
- const query = map({
713
+ const query = (0, smithy_client_1.map)({
714
714
  serviceNetworkIdentifier: [, input.serviceNetworkIdentifier],
715
715
  serviceIdentifier: [, input.serviceIdentifier],
716
716
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -733,7 +733,7 @@ const se_ListServiceNetworkVpcAssociationsCommand = async (input, context) => {
733
733
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
734
734
  const headers = {};
735
735
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/servicenetworkvpcassociations";
736
- const query = map({
736
+ const query = (0, smithy_client_1.map)({
737
737
  serviceNetworkIdentifier: [, input.serviceNetworkIdentifier],
738
738
  vpcIdentifier: [, input.vpcIdentifier],
739
739
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -756,7 +756,7 @@ const se_ListServicesCommand = async (input, context) => {
756
756
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
757
757
  const headers = {};
758
758
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/services";
759
- const query = map({
759
+ const query = (0, smithy_client_1.map)({
760
760
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
761
761
  nextToken: [, input.nextToken],
762
762
  });
@@ -794,7 +794,7 @@ const se_ListTargetGroupsCommand = async (input, context) => {
794
794
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
795
795
  const headers = {};
796
796
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/targetgroups";
797
- const query = map({
797
+ const query = (0, smithy_client_1.map)({
798
798
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
799
799
  nextToken: [, input.nextToken],
800
800
  vpcIdentifier: [, input.vpcIdentifier],
@@ -821,14 +821,14 @@ const se_ListTargetsCommand = async (input, context) => {
821
821
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
822
822
  "/targetgroups/{targetGroupIdentifier}/listtargets";
823
823
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "targetGroupIdentifier", () => input.targetGroupIdentifier, "{targetGroupIdentifier}", false);
824
- const query = map({
824
+ const query = (0, smithy_client_1.map)({
825
825
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
826
826
  nextToken: [, input.nextToken],
827
827
  });
828
828
  let body;
829
- body = JSON.stringify({
830
- ...(input.targets != null && { targets: se_TargetList(input.targets, context) }),
831
- });
829
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
830
+ targets: (_) => (0, smithy_client_1._json)(_),
831
+ }));
832
832
  return new protocol_http_1.HttpRequest({
833
833
  protocol,
834
834
  hostname,
@@ -849,9 +849,9 @@ const se_PutAuthPolicyCommand = async (input, context) => {
849
849
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/authpolicy/{resourceIdentifier}";
850
850
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceIdentifier", () => input.resourceIdentifier, "{resourceIdentifier}", false);
851
851
  let body;
852
- body = JSON.stringify({
853
- ...(input.policy != null && { policy: input.policy }),
854
- });
852
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
853
+ policy: [],
854
+ }));
855
855
  return new protocol_http_1.HttpRequest({
856
856
  protocol,
857
857
  hostname,
@@ -871,9 +871,9 @@ const se_PutResourcePolicyCommand = async (input, context) => {
871
871
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcepolicy/{resourceArn}";
872
872
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
873
873
  let body;
874
- body = JSON.stringify({
875
- ...(input.policy != null && { policy: input.policy }),
876
- });
874
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
875
+ policy: [],
876
+ }));
877
877
  return new protocol_http_1.HttpRequest({
878
878
  protocol,
879
879
  hostname,
@@ -894,9 +894,9 @@ const se_RegisterTargetsCommand = async (input, context) => {
894
894
  "/targetgroups/{targetGroupIdentifier}/registertargets";
895
895
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "targetGroupIdentifier", () => input.targetGroupIdentifier, "{targetGroupIdentifier}", false);
896
896
  let body;
897
- body = JSON.stringify({
898
- ...(input.targets != null && { targets: se_TargetList(input.targets, context) }),
899
- });
897
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
898
+ targets: (_) => (0, smithy_client_1._json)(_),
899
+ }));
900
900
  return new protocol_http_1.HttpRequest({
901
901
  protocol,
902
902
  hostname,
@@ -916,9 +916,9 @@ const se_TagResourceCommand = async (input, context) => {
916
916
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
917
917
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
918
918
  let body;
919
- body = JSON.stringify({
920
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
921
- });
919
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
920
+ tags: (_) => (0, smithy_client_1._json)(_),
921
+ }));
922
922
  return new protocol_http_1.HttpRequest({
923
923
  protocol,
924
924
  hostname,
@@ -935,7 +935,7 @@ const se_UntagResourceCommand = async (input, context) => {
935
935
  const headers = {};
936
936
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
937
937
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
938
- const query = map({
938
+ const query = (0, smithy_client_1.map)({
939
939
  tagKeys: [
940
940
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
941
941
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -963,9 +963,9 @@ const se_UpdateAccessLogSubscriptionCommand = async (input, context) => {
963
963
  "/accesslogsubscriptions/{accessLogSubscriptionIdentifier}";
964
964
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "accessLogSubscriptionIdentifier", () => input.accessLogSubscriptionIdentifier, "{accessLogSubscriptionIdentifier}", false);
965
965
  let body;
966
- body = JSON.stringify({
967
- ...(input.destinationArn != null && { destinationArn: input.destinationArn }),
968
- });
966
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
967
+ destinationArn: [],
968
+ }));
969
969
  return new protocol_http_1.HttpRequest({
970
970
  protocol,
971
971
  hostname,
@@ -987,9 +987,9 @@ const se_UpdateListenerCommand = async (input, context) => {
987
987
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serviceIdentifier", () => input.serviceIdentifier, "{serviceIdentifier}", false);
988
988
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "listenerIdentifier", () => input.listenerIdentifier, "{listenerIdentifier}", false);
989
989
  let body;
990
- body = JSON.stringify({
991
- ...(input.defaultAction != null && { defaultAction: se_RuleAction(input.defaultAction, context) }),
992
- });
990
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
991
+ defaultAction: (_) => (0, smithy_client_1._json)(_),
992
+ }));
993
993
  return new protocol_http_1.HttpRequest({
994
994
  protocol,
995
995
  hostname,
@@ -1012,11 +1012,11 @@ const se_UpdateRuleCommand = async (input, context) => {
1012
1012
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "listenerIdentifier", () => input.listenerIdentifier, "{listenerIdentifier}", false);
1013
1013
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ruleIdentifier", () => input.ruleIdentifier, "{ruleIdentifier}", false);
1014
1014
  let body;
1015
- body = JSON.stringify({
1016
- ...(input.action != null && { action: se_RuleAction(input.action, context) }),
1017
- ...(input.match != null && { match: se_RuleMatch(input.match, context) }),
1018
- ...(input.priority != null && { priority: input.priority }),
1019
- });
1015
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1016
+ action: (_) => (0, smithy_client_1._json)(_),
1017
+ match: (_) => (0, smithy_client_1._json)(_),
1018
+ priority: [],
1019
+ }));
1020
1020
  return new protocol_http_1.HttpRequest({
1021
1021
  protocol,
1022
1022
  hostname,
@@ -1036,10 +1036,10 @@ const se_UpdateServiceCommand = async (input, context) => {
1036
1036
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/services/{serviceIdentifier}";
1037
1037
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serviceIdentifier", () => input.serviceIdentifier, "{serviceIdentifier}", false);
1038
1038
  let body;
1039
- body = JSON.stringify({
1040
- ...(input.authType != null && { authType: input.authType }),
1041
- ...(input.certificateArn != null && { certificateArn: input.certificateArn }),
1042
- });
1039
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1040
+ authType: [],
1041
+ certificateArn: [],
1042
+ }));
1043
1043
  return new protocol_http_1.HttpRequest({
1044
1044
  protocol,
1045
1045
  hostname,
@@ -1060,9 +1060,9 @@ const se_UpdateServiceNetworkCommand = async (input, context) => {
1060
1060
  "/servicenetworks/{serviceNetworkIdentifier}";
1061
1061
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serviceNetworkIdentifier", () => input.serviceNetworkIdentifier, "{serviceNetworkIdentifier}", false);
1062
1062
  let body;
1063
- body = JSON.stringify({
1064
- ...(input.authType != null && { authType: input.authType }),
1065
- });
1063
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1064
+ authType: [],
1065
+ }));
1066
1066
  return new protocol_http_1.HttpRequest({
1067
1067
  protocol,
1068
1068
  hostname,
@@ -1083,9 +1083,9 @@ const se_UpdateServiceNetworkVpcAssociationCommand = async (input, context) => {
1083
1083
  "/servicenetworkvpcassociations/{serviceNetworkVpcAssociationIdentifier}";
1084
1084
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serviceNetworkVpcAssociationIdentifier", () => input.serviceNetworkVpcAssociationIdentifier, "{serviceNetworkVpcAssociationIdentifier}", false);
1085
1085
  let body;
1086
- body = JSON.stringify({
1087
- ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupList(input.securityGroupIds, context) }),
1088
- });
1086
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1087
+ securityGroupIds: (_) => (0, smithy_client_1._json)(_),
1088
+ }));
1089
1089
  return new protocol_http_1.HttpRequest({
1090
1090
  protocol,
1091
1091
  hostname,
@@ -1105,9 +1105,9 @@ const se_UpdateTargetGroupCommand = async (input, context) => {
1105
1105
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/targetgroups/{targetGroupIdentifier}";
1106
1106
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "targetGroupIdentifier", () => input.targetGroupIdentifier, "{targetGroupIdentifier}", false);
1107
1107
  let body;
1108
- body = JSON.stringify({
1109
- ...(input.healthCheck != null && { healthCheck: se_HealthCheckConfig(input.healthCheck, context) }),
1110
- });
1108
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1109
+ healthCheck: (_) => (0, smithy_client_1._json)(_),
1110
+ }));
1111
1111
  return new protocol_http_1.HttpRequest({
1112
1112
  protocol,
1113
1113
  hostname,
@@ -1123,16 +1123,15 @@ const de_BatchUpdateRuleCommand = async (output, context) => {
1123
1123
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1124
1124
  return de_BatchUpdateRuleCommandError(output, context);
1125
1125
  }
1126
- const contents = map({
1126
+ const contents = (0, smithy_client_1.map)({
1127
1127
  $metadata: deserializeMetadata(output),
1128
1128
  });
1129
1129
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1130
- if (data.successful != null) {
1131
- contents.successful = de_RuleUpdateSuccessList(data.successful, context);
1132
- }
1133
- if (data.unsuccessful != null) {
1134
- contents.unsuccessful = de_RuleUpdateFailureList(data.unsuccessful, context);
1135
- }
1130
+ const doc = (0, smithy_client_1.take)(data, {
1131
+ successful: smithy_client_1._json,
1132
+ unsuccessful: smithy_client_1._json,
1133
+ });
1134
+ Object.assign(contents, doc);
1136
1135
  return contents;
1137
1136
  };
1138
1137
  exports.de_BatchUpdateRuleCommand = de_BatchUpdateRuleCommand;
@@ -1163,10 +1162,9 @@ const de_BatchUpdateRuleCommandError = async (output, context) => {
1163
1162
  throw await de_ValidationExceptionRes(parsedOutput, context);
1164
1163
  default:
1165
1164
  const parsedBody = parsedOutput.body;
1166
- (0, smithy_client_1.throwDefaultError)({
1165
+ return throwDefaultError({
1167
1166
  output,
1168
1167
  parsedBody,
1169
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1170
1168
  errorCode,
1171
1169
  });
1172
1170
  }
@@ -1175,25 +1173,18 @@ const de_CreateAccessLogSubscriptionCommand = async (output, context) => {
1175
1173
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1176
1174
  return de_CreateAccessLogSubscriptionCommandError(output, context);
1177
1175
  }
1178
- const contents = map({
1176
+ const contents = (0, smithy_client_1.map)({
1179
1177
  $metadata: deserializeMetadata(output),
1180
1178
  });
1181
1179
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1182
- if (data.arn != null) {
1183
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1184
- }
1185
- if (data.destinationArn != null) {
1186
- contents.destinationArn = (0, smithy_client_1.expectString)(data.destinationArn);
1187
- }
1188
- if (data.id != null) {
1189
- contents.id = (0, smithy_client_1.expectString)(data.id);
1190
- }
1191
- if (data.resourceArn != null) {
1192
- contents.resourceArn = (0, smithy_client_1.expectString)(data.resourceArn);
1193
- }
1194
- if (data.resourceId != null) {
1195
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
1196
- }
1180
+ const doc = (0, smithy_client_1.take)(data, {
1181
+ arn: smithy_client_1.expectString,
1182
+ destinationArn: smithy_client_1.expectString,
1183
+ id: smithy_client_1.expectString,
1184
+ resourceArn: smithy_client_1.expectString,
1185
+ resourceId: smithy_client_1.expectString,
1186
+ });
1187
+ Object.assign(contents, doc);
1197
1188
  return contents;
1198
1189
  };
1199
1190
  exports.de_CreateAccessLogSubscriptionCommand = de_CreateAccessLogSubscriptionCommand;
@@ -1224,10 +1215,9 @@ const de_CreateAccessLogSubscriptionCommandError = async (output, context) => {
1224
1215
  throw await de_ValidationExceptionRes(parsedOutput, context);
1225
1216
  default:
1226
1217
  const parsedBody = parsedOutput.body;
1227
- (0, smithy_client_1.throwDefaultError)({
1218
+ return throwDefaultError({
1228
1219
  output,
1229
1220
  parsedBody,
1230
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1231
1221
  errorCode,
1232
1222
  });
1233
1223
  }
@@ -1236,34 +1226,21 @@ const de_CreateListenerCommand = async (output, context) => {
1236
1226
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1237
1227
  return de_CreateListenerCommandError(output, context);
1238
1228
  }
1239
- const contents = map({
1229
+ const contents = (0, smithy_client_1.map)({
1240
1230
  $metadata: deserializeMetadata(output),
1241
1231
  });
1242
1232
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1243
- if (data.arn != null) {
1244
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1245
- }
1246
- if (data.defaultAction != null) {
1247
- contents.defaultAction = de_RuleAction((0, smithy_client_1.expectUnion)(data.defaultAction), context);
1248
- }
1249
- if (data.id != null) {
1250
- contents.id = (0, smithy_client_1.expectString)(data.id);
1251
- }
1252
- if (data.name != null) {
1253
- contents.name = (0, smithy_client_1.expectString)(data.name);
1254
- }
1255
- if (data.port != null) {
1256
- contents.port = (0, smithy_client_1.expectInt32)(data.port);
1257
- }
1258
- if (data.protocol != null) {
1259
- contents.protocol = (0, smithy_client_1.expectString)(data.protocol);
1260
- }
1261
- if (data.serviceArn != null) {
1262
- contents.serviceArn = (0, smithy_client_1.expectString)(data.serviceArn);
1263
- }
1264
- if (data.serviceId != null) {
1265
- contents.serviceId = (0, smithy_client_1.expectString)(data.serviceId);
1266
- }
1233
+ const doc = (0, smithy_client_1.take)(data, {
1234
+ arn: smithy_client_1.expectString,
1235
+ defaultAction: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
1236
+ id: smithy_client_1.expectString,
1237
+ name: smithy_client_1.expectString,
1238
+ port: smithy_client_1.expectInt32,
1239
+ protocol: smithy_client_1.expectString,
1240
+ serviceArn: smithy_client_1.expectString,
1241
+ serviceId: smithy_client_1.expectString,
1242
+ });
1243
+ Object.assign(contents, doc);
1267
1244
  return contents;
1268
1245
  };
1269
1246
  exports.de_CreateListenerCommand = de_CreateListenerCommand;
@@ -1297,10 +1274,9 @@ const de_CreateListenerCommandError = async (output, context) => {
1297
1274
  throw await de_ValidationExceptionRes(parsedOutput, context);
1298
1275
  default:
1299
1276
  const parsedBody = parsedOutput.body;
1300
- (0, smithy_client_1.throwDefaultError)({
1277
+ return throwDefaultError({
1301
1278
  output,
1302
1279
  parsedBody,
1303
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1304
1280
  errorCode,
1305
1281
  });
1306
1282
  }
@@ -1309,28 +1285,19 @@ const de_CreateRuleCommand = async (output, context) => {
1309
1285
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1310
1286
  return de_CreateRuleCommandError(output, context);
1311
1287
  }
1312
- const contents = map({
1288
+ const contents = (0, smithy_client_1.map)({
1313
1289
  $metadata: deserializeMetadata(output),
1314
1290
  });
1315
1291
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1316
- if (data.action != null) {
1317
- contents.action = de_RuleAction((0, smithy_client_1.expectUnion)(data.action), context);
1318
- }
1319
- if (data.arn != null) {
1320
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1321
- }
1322
- if (data.id != null) {
1323
- contents.id = (0, smithy_client_1.expectString)(data.id);
1324
- }
1325
- if (data.match != null) {
1326
- contents.match = de_RuleMatch((0, smithy_client_1.expectUnion)(data.match), context);
1327
- }
1328
- if (data.name != null) {
1329
- contents.name = (0, smithy_client_1.expectString)(data.name);
1330
- }
1331
- if (data.priority != null) {
1332
- contents.priority = (0, smithy_client_1.expectInt32)(data.priority);
1333
- }
1292
+ const doc = (0, smithy_client_1.take)(data, {
1293
+ action: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
1294
+ arn: smithy_client_1.expectString,
1295
+ id: smithy_client_1.expectString,
1296
+ match: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
1297
+ name: smithy_client_1.expectString,
1298
+ priority: smithy_client_1.expectInt32,
1299
+ });
1300
+ Object.assign(contents, doc);
1334
1301
  return contents;
1335
1302
  };
1336
1303
  exports.de_CreateRuleCommand = de_CreateRuleCommand;
@@ -1364,10 +1331,9 @@ const de_CreateRuleCommandError = async (output, context) => {
1364
1331
  throw await de_ValidationExceptionRes(parsedOutput, context);
1365
1332
  default:
1366
1333
  const parsedBody = parsedOutput.body;
1367
- (0, smithy_client_1.throwDefaultError)({
1334
+ return throwDefaultError({
1368
1335
  output,
1369
1336
  parsedBody,
1370
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1371
1337
  errorCode,
1372
1338
  });
1373
1339
  }
@@ -1376,34 +1342,21 @@ const de_CreateServiceCommand = async (output, context) => {
1376
1342
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1377
1343
  return de_CreateServiceCommandError(output, context);
1378
1344
  }
1379
- const contents = map({
1345
+ const contents = (0, smithy_client_1.map)({
1380
1346
  $metadata: deserializeMetadata(output),
1381
1347
  });
1382
1348
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1383
- if (data.arn != null) {
1384
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1385
- }
1386
- if (data.authType != null) {
1387
- contents.authType = (0, smithy_client_1.expectString)(data.authType);
1388
- }
1389
- if (data.certificateArn != null) {
1390
- contents.certificateArn = (0, smithy_client_1.expectString)(data.certificateArn);
1391
- }
1392
- if (data.customDomainName != null) {
1393
- contents.customDomainName = (0, smithy_client_1.expectString)(data.customDomainName);
1394
- }
1395
- if (data.dnsEntry != null) {
1396
- contents.dnsEntry = de_DnsEntry(data.dnsEntry, context);
1397
- }
1398
- if (data.id != null) {
1399
- contents.id = (0, smithy_client_1.expectString)(data.id);
1400
- }
1401
- if (data.name != null) {
1402
- contents.name = (0, smithy_client_1.expectString)(data.name);
1403
- }
1404
- if (data.status != null) {
1405
- contents.status = (0, smithy_client_1.expectString)(data.status);
1406
- }
1349
+ const doc = (0, smithy_client_1.take)(data, {
1350
+ arn: smithy_client_1.expectString,
1351
+ authType: smithy_client_1.expectString,
1352
+ certificateArn: smithy_client_1.expectString,
1353
+ customDomainName: smithy_client_1.expectString,
1354
+ dnsEntry: smithy_client_1._json,
1355
+ id: smithy_client_1.expectString,
1356
+ name: smithy_client_1.expectString,
1357
+ status: smithy_client_1.expectString,
1358
+ });
1359
+ Object.assign(contents, doc);
1407
1360
  return contents;
1408
1361
  };
1409
1362
  exports.de_CreateServiceCommand = de_CreateServiceCommand;
@@ -1437,10 +1390,9 @@ const de_CreateServiceCommandError = async (output, context) => {
1437
1390
  throw await de_ValidationExceptionRes(parsedOutput, context);
1438
1391
  default:
1439
1392
  const parsedBody = parsedOutput.body;
1440
- (0, smithy_client_1.throwDefaultError)({
1393
+ return throwDefaultError({
1441
1394
  output,
1442
1395
  parsedBody,
1443
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1444
1396
  errorCode,
1445
1397
  });
1446
1398
  }
@@ -1449,22 +1401,17 @@ const de_CreateServiceNetworkCommand = async (output, context) => {
1449
1401
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1450
1402
  return de_CreateServiceNetworkCommandError(output, context);
1451
1403
  }
1452
- const contents = map({
1404
+ const contents = (0, smithy_client_1.map)({
1453
1405
  $metadata: deserializeMetadata(output),
1454
1406
  });
1455
1407
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1456
- if (data.arn != null) {
1457
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1458
- }
1459
- if (data.authType != null) {
1460
- contents.authType = (0, smithy_client_1.expectString)(data.authType);
1461
- }
1462
- if (data.id != null) {
1463
- contents.id = (0, smithy_client_1.expectString)(data.id);
1464
- }
1465
- if (data.name != null) {
1466
- contents.name = (0, smithy_client_1.expectString)(data.name);
1467
- }
1408
+ const doc = (0, smithy_client_1.take)(data, {
1409
+ arn: smithy_client_1.expectString,
1410
+ authType: smithy_client_1.expectString,
1411
+ id: smithy_client_1.expectString,
1412
+ name: smithy_client_1.expectString,
1413
+ });
1414
+ Object.assign(contents, doc);
1468
1415
  return contents;
1469
1416
  };
1470
1417
  exports.de_CreateServiceNetworkCommand = de_CreateServiceNetworkCommand;
@@ -1498,10 +1445,9 @@ const de_CreateServiceNetworkCommandError = async (output, context) => {
1498
1445
  throw await de_ValidationExceptionRes(parsedOutput, context);
1499
1446
  default:
1500
1447
  const parsedBody = parsedOutput.body;
1501
- (0, smithy_client_1.throwDefaultError)({
1448
+ return throwDefaultError({
1502
1449
  output,
1503
1450
  parsedBody,
1504
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1505
1451
  errorCode,
1506
1452
  });
1507
1453
  }
@@ -1510,28 +1456,19 @@ const de_CreateServiceNetworkServiceAssociationCommand = async (output, context)
1510
1456
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1511
1457
  return de_CreateServiceNetworkServiceAssociationCommandError(output, context);
1512
1458
  }
1513
- const contents = map({
1459
+ const contents = (0, smithy_client_1.map)({
1514
1460
  $metadata: deserializeMetadata(output),
1515
1461
  });
1516
1462
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1517
- if (data.arn != null) {
1518
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1519
- }
1520
- if (data.createdBy != null) {
1521
- contents.createdBy = (0, smithy_client_1.expectString)(data.createdBy);
1522
- }
1523
- if (data.customDomainName != null) {
1524
- contents.customDomainName = (0, smithy_client_1.expectString)(data.customDomainName);
1525
- }
1526
- if (data.dnsEntry != null) {
1527
- contents.dnsEntry = de_DnsEntry(data.dnsEntry, context);
1528
- }
1529
- if (data.id != null) {
1530
- contents.id = (0, smithy_client_1.expectString)(data.id);
1531
- }
1532
- if (data.status != null) {
1533
- contents.status = (0, smithy_client_1.expectString)(data.status);
1534
- }
1463
+ const doc = (0, smithy_client_1.take)(data, {
1464
+ arn: smithy_client_1.expectString,
1465
+ createdBy: smithy_client_1.expectString,
1466
+ customDomainName: smithy_client_1.expectString,
1467
+ dnsEntry: smithy_client_1._json,
1468
+ id: smithy_client_1.expectString,
1469
+ status: smithy_client_1.expectString,
1470
+ });
1471
+ Object.assign(contents, doc);
1535
1472
  return contents;
1536
1473
  };
1537
1474
  exports.de_CreateServiceNetworkServiceAssociationCommand = de_CreateServiceNetworkServiceAssociationCommand;
@@ -1562,10 +1499,9 @@ const de_CreateServiceNetworkServiceAssociationCommandError = async (output, con
1562
1499
  throw await de_ValidationExceptionRes(parsedOutput, context);
1563
1500
  default:
1564
1501
  const parsedBody = parsedOutput.body;
1565
- (0, smithy_client_1.throwDefaultError)({
1502
+ return throwDefaultError({
1566
1503
  output,
1567
1504
  parsedBody,
1568
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1569
1505
  errorCode,
1570
1506
  });
1571
1507
  }
@@ -1574,25 +1510,18 @@ const de_CreateServiceNetworkVpcAssociationCommand = async (output, context) =>
1574
1510
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1575
1511
  return de_CreateServiceNetworkVpcAssociationCommandError(output, context);
1576
1512
  }
1577
- const contents = map({
1513
+ const contents = (0, smithy_client_1.map)({
1578
1514
  $metadata: deserializeMetadata(output),
1579
1515
  });
1580
1516
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1581
- if (data.arn != null) {
1582
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1583
- }
1584
- if (data.createdBy != null) {
1585
- contents.createdBy = (0, smithy_client_1.expectString)(data.createdBy);
1586
- }
1587
- if (data.id != null) {
1588
- contents.id = (0, smithy_client_1.expectString)(data.id);
1589
- }
1590
- if (data.securityGroupIds != null) {
1591
- contents.securityGroupIds = de_SecurityGroupList(data.securityGroupIds, context);
1592
- }
1593
- if (data.status != null) {
1594
- contents.status = (0, smithy_client_1.expectString)(data.status);
1595
- }
1517
+ const doc = (0, smithy_client_1.take)(data, {
1518
+ arn: smithy_client_1.expectString,
1519
+ createdBy: smithy_client_1.expectString,
1520
+ id: smithy_client_1.expectString,
1521
+ securityGroupIds: smithy_client_1._json,
1522
+ status: smithy_client_1.expectString,
1523
+ });
1524
+ Object.assign(contents, doc);
1596
1525
  return contents;
1597
1526
  };
1598
1527
  exports.de_CreateServiceNetworkVpcAssociationCommand = de_CreateServiceNetworkVpcAssociationCommand;
@@ -1626,10 +1555,9 @@ const de_CreateServiceNetworkVpcAssociationCommandError = async (output, context
1626
1555
  throw await de_ValidationExceptionRes(parsedOutput, context);
1627
1556
  default:
1628
1557
  const parsedBody = parsedOutput.body;
1629
- (0, smithy_client_1.throwDefaultError)({
1558
+ return throwDefaultError({
1630
1559
  output,
1631
1560
  parsedBody,
1632
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1633
1561
  errorCode,
1634
1562
  });
1635
1563
  }
@@ -1638,28 +1566,19 @@ const de_CreateTargetGroupCommand = async (output, context) => {
1638
1566
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1639
1567
  return de_CreateTargetGroupCommandError(output, context);
1640
1568
  }
1641
- const contents = map({
1569
+ const contents = (0, smithy_client_1.map)({
1642
1570
  $metadata: deserializeMetadata(output),
1643
1571
  });
1644
1572
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1645
- if (data.arn != null) {
1646
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1647
- }
1648
- if (data.config != null) {
1649
- contents.config = de_TargetGroupConfig(data.config, context);
1650
- }
1651
- if (data.id != null) {
1652
- contents.id = (0, smithy_client_1.expectString)(data.id);
1653
- }
1654
- if (data.name != null) {
1655
- contents.name = (0, smithy_client_1.expectString)(data.name);
1656
- }
1657
- if (data.status != null) {
1658
- contents.status = (0, smithy_client_1.expectString)(data.status);
1659
- }
1660
- if (data.type != null) {
1661
- contents.type = (0, smithy_client_1.expectString)(data.type);
1662
- }
1573
+ const doc = (0, smithy_client_1.take)(data, {
1574
+ arn: smithy_client_1.expectString,
1575
+ config: smithy_client_1._json,
1576
+ id: smithy_client_1.expectString,
1577
+ name: smithy_client_1.expectString,
1578
+ status: smithy_client_1.expectString,
1579
+ type: smithy_client_1.expectString,
1580
+ });
1581
+ Object.assign(contents, doc);
1663
1582
  return contents;
1664
1583
  };
1665
1584
  exports.de_CreateTargetGroupCommand = de_CreateTargetGroupCommand;
@@ -1693,10 +1612,9 @@ const de_CreateTargetGroupCommandError = async (output, context) => {
1693
1612
  throw await de_ValidationExceptionRes(parsedOutput, context);
1694
1613
  default:
1695
1614
  const parsedBody = parsedOutput.body;
1696
- (0, smithy_client_1.throwDefaultError)({
1615
+ return throwDefaultError({
1697
1616
  output,
1698
1617
  parsedBody,
1699
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1700
1618
  errorCode,
1701
1619
  });
1702
1620
  }
@@ -1705,7 +1623,7 @@ const de_DeleteAccessLogSubscriptionCommand = async (output, context) => {
1705
1623
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1706
1624
  return de_DeleteAccessLogSubscriptionCommandError(output, context);
1707
1625
  }
1708
- const contents = map({
1626
+ const contents = (0, smithy_client_1.map)({
1709
1627
  $metadata: deserializeMetadata(output),
1710
1628
  });
1711
1629
  await collectBody(output.body, context);
@@ -1736,10 +1654,9 @@ const de_DeleteAccessLogSubscriptionCommandError = async (output, context) => {
1736
1654
  throw await de_ValidationExceptionRes(parsedOutput, context);
1737
1655
  default:
1738
1656
  const parsedBody = parsedOutput.body;
1739
- (0, smithy_client_1.throwDefaultError)({
1657
+ return throwDefaultError({
1740
1658
  output,
1741
1659
  parsedBody,
1742
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1743
1660
  errorCode,
1744
1661
  });
1745
1662
  }
@@ -1748,7 +1665,7 @@ const de_DeleteAuthPolicyCommand = async (output, context) => {
1748
1665
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1749
1666
  return de_DeleteAuthPolicyCommandError(output, context);
1750
1667
  }
1751
- const contents = map({
1668
+ const contents = (0, smithy_client_1.map)({
1752
1669
  $metadata: deserializeMetadata(output),
1753
1670
  });
1754
1671
  await collectBody(output.body, context);
@@ -1779,10 +1696,9 @@ const de_DeleteAuthPolicyCommandError = async (output, context) => {
1779
1696
  throw await de_ValidationExceptionRes(parsedOutput, context);
1780
1697
  default:
1781
1698
  const parsedBody = parsedOutput.body;
1782
- (0, smithy_client_1.throwDefaultError)({
1699
+ return throwDefaultError({
1783
1700
  output,
1784
1701
  parsedBody,
1785
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1786
1702
  errorCode,
1787
1703
  });
1788
1704
  }
@@ -1791,7 +1707,7 @@ const de_DeleteListenerCommand = async (output, context) => {
1791
1707
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1792
1708
  return de_DeleteListenerCommandError(output, context);
1793
1709
  }
1794
- const contents = map({
1710
+ const contents = (0, smithy_client_1.map)({
1795
1711
  $metadata: deserializeMetadata(output),
1796
1712
  });
1797
1713
  await collectBody(output.body, context);
@@ -1825,10 +1741,9 @@ const de_DeleteListenerCommandError = async (output, context) => {
1825
1741
  throw await de_ValidationExceptionRes(parsedOutput, context);
1826
1742
  default:
1827
1743
  const parsedBody = parsedOutput.body;
1828
- (0, smithy_client_1.throwDefaultError)({
1744
+ return throwDefaultError({
1829
1745
  output,
1830
1746
  parsedBody,
1831
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1832
1747
  errorCode,
1833
1748
  });
1834
1749
  }
@@ -1837,7 +1752,7 @@ const de_DeleteResourcePolicyCommand = async (output, context) => {
1837
1752
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1838
1753
  return de_DeleteResourcePolicyCommandError(output, context);
1839
1754
  }
1840
- const contents = map({
1755
+ const contents = (0, smithy_client_1.map)({
1841
1756
  $metadata: deserializeMetadata(output),
1842
1757
  });
1843
1758
  await collectBody(output.body, context);
@@ -1868,10 +1783,9 @@ const de_DeleteResourcePolicyCommandError = async (output, context) => {
1868
1783
  throw await de_ValidationExceptionRes(parsedOutput, context);
1869
1784
  default:
1870
1785
  const parsedBody = parsedOutput.body;
1871
- (0, smithy_client_1.throwDefaultError)({
1786
+ return throwDefaultError({
1872
1787
  output,
1873
1788
  parsedBody,
1874
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1875
1789
  errorCode,
1876
1790
  });
1877
1791
  }
@@ -1880,7 +1794,7 @@ const de_DeleteRuleCommand = async (output, context) => {
1880
1794
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1881
1795
  return de_DeleteRuleCommandError(output, context);
1882
1796
  }
1883
- const contents = map({
1797
+ const contents = (0, smithy_client_1.map)({
1884
1798
  $metadata: deserializeMetadata(output),
1885
1799
  });
1886
1800
  await collectBody(output.body, context);
@@ -1914,10 +1828,9 @@ const de_DeleteRuleCommandError = async (output, context) => {
1914
1828
  throw await de_ValidationExceptionRes(parsedOutput, context);
1915
1829
  default:
1916
1830
  const parsedBody = parsedOutput.body;
1917
- (0, smithy_client_1.throwDefaultError)({
1831
+ return throwDefaultError({
1918
1832
  output,
1919
1833
  parsedBody,
1920
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1921
1834
  errorCode,
1922
1835
  });
1923
1836
  }
@@ -1926,22 +1839,17 @@ const de_DeleteServiceCommand = async (output, context) => {
1926
1839
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1927
1840
  return de_DeleteServiceCommandError(output, context);
1928
1841
  }
1929
- const contents = map({
1842
+ const contents = (0, smithy_client_1.map)({
1930
1843
  $metadata: deserializeMetadata(output),
1931
1844
  });
1932
1845
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1933
- if (data.arn != null) {
1934
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1935
- }
1936
- if (data.id != null) {
1937
- contents.id = (0, smithy_client_1.expectString)(data.id);
1938
- }
1939
- if (data.name != null) {
1940
- contents.name = (0, smithy_client_1.expectString)(data.name);
1941
- }
1942
- if (data.status != null) {
1943
- contents.status = (0, smithy_client_1.expectString)(data.status);
1944
- }
1846
+ const doc = (0, smithy_client_1.take)(data, {
1847
+ arn: smithy_client_1.expectString,
1848
+ id: smithy_client_1.expectString,
1849
+ name: smithy_client_1.expectString,
1850
+ status: smithy_client_1.expectString,
1851
+ });
1852
+ Object.assign(contents, doc);
1945
1853
  return contents;
1946
1854
  };
1947
1855
  exports.de_DeleteServiceCommand = de_DeleteServiceCommand;
@@ -1972,10 +1880,9 @@ const de_DeleteServiceCommandError = async (output, context) => {
1972
1880
  throw await de_ValidationExceptionRes(parsedOutput, context);
1973
1881
  default:
1974
1882
  const parsedBody = parsedOutput.body;
1975
- (0, smithy_client_1.throwDefaultError)({
1883
+ return throwDefaultError({
1976
1884
  output,
1977
1885
  parsedBody,
1978
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
1979
1886
  errorCode,
1980
1887
  });
1981
1888
  }
@@ -1984,7 +1891,7 @@ const de_DeleteServiceNetworkCommand = async (output, context) => {
1984
1891
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1985
1892
  return de_DeleteServiceNetworkCommandError(output, context);
1986
1893
  }
1987
- const contents = map({
1894
+ const contents = (0, smithy_client_1.map)({
1988
1895
  $metadata: deserializeMetadata(output),
1989
1896
  });
1990
1897
  await collectBody(output.body, context);
@@ -2018,10 +1925,9 @@ const de_DeleteServiceNetworkCommandError = async (output, context) => {
2018
1925
  throw await de_ValidationExceptionRes(parsedOutput, context);
2019
1926
  default:
2020
1927
  const parsedBody = parsedOutput.body;
2021
- (0, smithy_client_1.throwDefaultError)({
1928
+ return throwDefaultError({
2022
1929
  output,
2023
1930
  parsedBody,
2024
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2025
1931
  errorCode,
2026
1932
  });
2027
1933
  }
@@ -2030,19 +1936,16 @@ const de_DeleteServiceNetworkServiceAssociationCommand = async (output, context)
2030
1936
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2031
1937
  return de_DeleteServiceNetworkServiceAssociationCommandError(output, context);
2032
1938
  }
2033
- const contents = map({
1939
+ const contents = (0, smithy_client_1.map)({
2034
1940
  $metadata: deserializeMetadata(output),
2035
1941
  });
2036
1942
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2037
- if (data.arn != null) {
2038
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2039
- }
2040
- if (data.id != null) {
2041
- contents.id = (0, smithy_client_1.expectString)(data.id);
2042
- }
2043
- if (data.status != null) {
2044
- contents.status = (0, smithy_client_1.expectString)(data.status);
2045
- }
1943
+ const doc = (0, smithy_client_1.take)(data, {
1944
+ arn: smithy_client_1.expectString,
1945
+ id: smithy_client_1.expectString,
1946
+ status: smithy_client_1.expectString,
1947
+ });
1948
+ Object.assign(contents, doc);
2046
1949
  return contents;
2047
1950
  };
2048
1951
  exports.de_DeleteServiceNetworkServiceAssociationCommand = de_DeleteServiceNetworkServiceAssociationCommand;
@@ -2073,10 +1976,9 @@ const de_DeleteServiceNetworkServiceAssociationCommandError = async (output, con
2073
1976
  throw await de_ValidationExceptionRes(parsedOutput, context);
2074
1977
  default:
2075
1978
  const parsedBody = parsedOutput.body;
2076
- (0, smithy_client_1.throwDefaultError)({
1979
+ return throwDefaultError({
2077
1980
  output,
2078
1981
  parsedBody,
2079
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2080
1982
  errorCode,
2081
1983
  });
2082
1984
  }
@@ -2085,19 +1987,16 @@ const de_DeleteServiceNetworkVpcAssociationCommand = async (output, context) =>
2085
1987
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2086
1988
  return de_DeleteServiceNetworkVpcAssociationCommandError(output, context);
2087
1989
  }
2088
- const contents = map({
1990
+ const contents = (0, smithy_client_1.map)({
2089
1991
  $metadata: deserializeMetadata(output),
2090
1992
  });
2091
1993
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2092
- if (data.arn != null) {
2093
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2094
- }
2095
- if (data.id != null) {
2096
- contents.id = (0, smithy_client_1.expectString)(data.id);
2097
- }
2098
- if (data.status != null) {
2099
- contents.status = (0, smithy_client_1.expectString)(data.status);
2100
- }
1994
+ const doc = (0, smithy_client_1.take)(data, {
1995
+ arn: smithy_client_1.expectString,
1996
+ id: smithy_client_1.expectString,
1997
+ status: smithy_client_1.expectString,
1998
+ });
1999
+ Object.assign(contents, doc);
2101
2000
  return contents;
2102
2001
  };
2103
2002
  exports.de_DeleteServiceNetworkVpcAssociationCommand = de_DeleteServiceNetworkVpcAssociationCommand;
@@ -2128,10 +2027,9 @@ const de_DeleteServiceNetworkVpcAssociationCommandError = async (output, context
2128
2027
  throw await de_ValidationExceptionRes(parsedOutput, context);
2129
2028
  default:
2130
2029
  const parsedBody = parsedOutput.body;
2131
- (0, smithy_client_1.throwDefaultError)({
2030
+ return throwDefaultError({
2132
2031
  output,
2133
2032
  parsedBody,
2134
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2135
2033
  errorCode,
2136
2034
  });
2137
2035
  }
@@ -2140,19 +2038,16 @@ const de_DeleteTargetGroupCommand = async (output, context) => {
2140
2038
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2141
2039
  return de_DeleteTargetGroupCommandError(output, context);
2142
2040
  }
2143
- const contents = map({
2041
+ const contents = (0, smithy_client_1.map)({
2144
2042
  $metadata: deserializeMetadata(output),
2145
2043
  });
2146
2044
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2147
- if (data.arn != null) {
2148
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2149
- }
2150
- if (data.id != null) {
2151
- contents.id = (0, smithy_client_1.expectString)(data.id);
2152
- }
2153
- if (data.status != null) {
2154
- contents.status = (0, smithy_client_1.expectString)(data.status);
2155
- }
2045
+ const doc = (0, smithy_client_1.take)(data, {
2046
+ arn: smithy_client_1.expectString,
2047
+ id: smithy_client_1.expectString,
2048
+ status: smithy_client_1.expectString,
2049
+ });
2050
+ Object.assign(contents, doc);
2156
2051
  return contents;
2157
2052
  };
2158
2053
  exports.de_DeleteTargetGroupCommand = de_DeleteTargetGroupCommand;
@@ -2180,10 +2075,9 @@ const de_DeleteTargetGroupCommandError = async (output, context) => {
2180
2075
  throw await de_ValidationExceptionRes(parsedOutput, context);
2181
2076
  default:
2182
2077
  const parsedBody = parsedOutput.body;
2183
- (0, smithy_client_1.throwDefaultError)({
2078
+ return throwDefaultError({
2184
2079
  output,
2185
2080
  parsedBody,
2186
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2187
2081
  errorCode,
2188
2082
  });
2189
2083
  }
@@ -2192,16 +2086,15 @@ const de_DeregisterTargetsCommand = async (output, context) => {
2192
2086
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2193
2087
  return de_DeregisterTargetsCommandError(output, context);
2194
2088
  }
2195
- const contents = map({
2089
+ const contents = (0, smithy_client_1.map)({
2196
2090
  $metadata: deserializeMetadata(output),
2197
2091
  });
2198
2092
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2199
- if (data.successful != null) {
2200
- contents.successful = de_TargetList(data.successful, context);
2201
- }
2202
- if (data.unsuccessful != null) {
2203
- contents.unsuccessful = de_TargetFailureList(data.unsuccessful, context);
2204
- }
2093
+ const doc = (0, smithy_client_1.take)(data, {
2094
+ successful: smithy_client_1._json,
2095
+ unsuccessful: smithy_client_1._json,
2096
+ });
2097
+ Object.assign(contents, doc);
2205
2098
  return contents;
2206
2099
  };
2207
2100
  exports.de_DeregisterTargetsCommand = de_DeregisterTargetsCommand;
@@ -2232,10 +2125,9 @@ const de_DeregisterTargetsCommandError = async (output, context) => {
2232
2125
  throw await de_ValidationExceptionRes(parsedOutput, context);
2233
2126
  default:
2234
2127
  const parsedBody = parsedOutput.body;
2235
- (0, smithy_client_1.throwDefaultError)({
2128
+ return throwDefaultError({
2236
2129
  output,
2237
2130
  parsedBody,
2238
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2239
2131
  errorCode,
2240
2132
  });
2241
2133
  }
@@ -2244,31 +2136,20 @@ const de_GetAccessLogSubscriptionCommand = async (output, context) => {
2244
2136
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2245
2137
  return de_GetAccessLogSubscriptionCommandError(output, context);
2246
2138
  }
2247
- const contents = map({
2139
+ const contents = (0, smithy_client_1.map)({
2248
2140
  $metadata: deserializeMetadata(output),
2249
2141
  });
2250
2142
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2251
- if (data.arn != null) {
2252
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2253
- }
2254
- if (data.createdAt != null) {
2255
- contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.createdAt));
2256
- }
2257
- if (data.destinationArn != null) {
2258
- contents.destinationArn = (0, smithy_client_1.expectString)(data.destinationArn);
2259
- }
2260
- if (data.id != null) {
2261
- contents.id = (0, smithy_client_1.expectString)(data.id);
2262
- }
2263
- if (data.lastUpdatedAt != null) {
2264
- contents.lastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedAt));
2265
- }
2266
- if (data.resourceArn != null) {
2267
- contents.resourceArn = (0, smithy_client_1.expectString)(data.resourceArn);
2268
- }
2269
- if (data.resourceId != null) {
2270
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
2271
- }
2143
+ const doc = (0, smithy_client_1.take)(data, {
2144
+ arn: smithy_client_1.expectString,
2145
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2146
+ destinationArn: smithy_client_1.expectString,
2147
+ id: smithy_client_1.expectString,
2148
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2149
+ resourceArn: smithy_client_1.expectString,
2150
+ resourceId: smithy_client_1.expectString,
2151
+ });
2152
+ Object.assign(contents, doc);
2272
2153
  return contents;
2273
2154
  };
2274
2155
  exports.de_GetAccessLogSubscriptionCommand = de_GetAccessLogSubscriptionCommand;
@@ -2296,10 +2177,9 @@ const de_GetAccessLogSubscriptionCommandError = async (output, context) => {
2296
2177
  throw await de_ValidationExceptionRes(parsedOutput, context);
2297
2178
  default:
2298
2179
  const parsedBody = parsedOutput.body;
2299
- (0, smithy_client_1.throwDefaultError)({
2180
+ return throwDefaultError({
2300
2181
  output,
2301
2182
  parsedBody,
2302
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2303
2183
  errorCode,
2304
2184
  });
2305
2185
  }
@@ -2308,22 +2188,17 @@ const de_GetAuthPolicyCommand = async (output, context) => {
2308
2188
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2309
2189
  return de_GetAuthPolicyCommandError(output, context);
2310
2190
  }
2311
- const contents = map({
2191
+ const contents = (0, smithy_client_1.map)({
2312
2192
  $metadata: deserializeMetadata(output),
2313
2193
  });
2314
2194
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2315
- if (data.createdAt != null) {
2316
- contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.createdAt));
2317
- }
2318
- if (data.lastUpdatedAt != null) {
2319
- contents.lastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedAt));
2320
- }
2321
- if (data.policy != null) {
2322
- contents.policy = (0, smithy_client_1.expectString)(data.policy);
2323
- }
2324
- if (data.state != null) {
2325
- contents.state = (0, smithy_client_1.expectString)(data.state);
2326
- }
2195
+ const doc = (0, smithy_client_1.take)(data, {
2196
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2197
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2198
+ policy: smithy_client_1.expectString,
2199
+ state: smithy_client_1.expectString,
2200
+ });
2201
+ Object.assign(contents, doc);
2327
2202
  return contents;
2328
2203
  };
2329
2204
  exports.de_GetAuthPolicyCommand = de_GetAuthPolicyCommand;
@@ -2351,10 +2226,9 @@ const de_GetAuthPolicyCommandError = async (output, context) => {
2351
2226
  throw await de_ValidationExceptionRes(parsedOutput, context);
2352
2227
  default:
2353
2228
  const parsedBody = parsedOutput.body;
2354
- (0, smithy_client_1.throwDefaultError)({
2229
+ return throwDefaultError({
2355
2230
  output,
2356
2231
  parsedBody,
2357
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2358
2232
  errorCode,
2359
2233
  });
2360
2234
  }
@@ -2363,40 +2237,23 @@ const de_GetListenerCommand = async (output, context) => {
2363
2237
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2364
2238
  return de_GetListenerCommandError(output, context);
2365
2239
  }
2366
- const contents = map({
2240
+ const contents = (0, smithy_client_1.map)({
2367
2241
  $metadata: deserializeMetadata(output),
2368
2242
  });
2369
2243
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2370
- if (data.arn != null) {
2371
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2372
- }
2373
- if (data.createdAt != null) {
2374
- contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.createdAt));
2375
- }
2376
- if (data.defaultAction != null) {
2377
- contents.defaultAction = de_RuleAction((0, smithy_client_1.expectUnion)(data.defaultAction), context);
2378
- }
2379
- if (data.id != null) {
2380
- contents.id = (0, smithy_client_1.expectString)(data.id);
2381
- }
2382
- if (data.lastUpdatedAt != null) {
2383
- contents.lastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedAt));
2384
- }
2385
- if (data.name != null) {
2386
- contents.name = (0, smithy_client_1.expectString)(data.name);
2387
- }
2388
- if (data.port != null) {
2389
- contents.port = (0, smithy_client_1.expectInt32)(data.port);
2390
- }
2391
- if (data.protocol != null) {
2392
- contents.protocol = (0, smithy_client_1.expectString)(data.protocol);
2393
- }
2394
- if (data.serviceArn != null) {
2395
- contents.serviceArn = (0, smithy_client_1.expectString)(data.serviceArn);
2396
- }
2397
- if (data.serviceId != null) {
2398
- contents.serviceId = (0, smithy_client_1.expectString)(data.serviceId);
2399
- }
2244
+ const doc = (0, smithy_client_1.take)(data, {
2245
+ arn: smithy_client_1.expectString,
2246
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2247
+ defaultAction: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
2248
+ id: smithy_client_1.expectString,
2249
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2250
+ name: smithy_client_1.expectString,
2251
+ port: smithy_client_1.expectInt32,
2252
+ protocol: smithy_client_1.expectString,
2253
+ serviceArn: smithy_client_1.expectString,
2254
+ serviceId: smithy_client_1.expectString,
2255
+ });
2256
+ Object.assign(contents, doc);
2400
2257
  return contents;
2401
2258
  };
2402
2259
  exports.de_GetListenerCommand = de_GetListenerCommand;
@@ -2424,10 +2281,9 @@ const de_GetListenerCommandError = async (output, context) => {
2424
2281
  throw await de_ValidationExceptionRes(parsedOutput, context);
2425
2282
  default:
2426
2283
  const parsedBody = parsedOutput.body;
2427
- (0, smithy_client_1.throwDefaultError)({
2284
+ return throwDefaultError({
2428
2285
  output,
2429
2286
  parsedBody,
2430
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2431
2287
  errorCode,
2432
2288
  });
2433
2289
  }
@@ -2436,13 +2292,14 @@ const de_GetResourcePolicyCommand = async (output, context) => {
2436
2292
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2437
2293
  return de_GetResourcePolicyCommandError(output, context);
2438
2294
  }
2439
- const contents = map({
2295
+ const contents = (0, smithy_client_1.map)({
2440
2296
  $metadata: deserializeMetadata(output),
2441
2297
  });
2442
2298
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2443
- if (data.policy != null) {
2444
- contents.policy = (0, smithy_client_1.expectString)(data.policy);
2445
- }
2299
+ const doc = (0, smithy_client_1.take)(data, {
2300
+ policy: smithy_client_1.expectString,
2301
+ });
2302
+ Object.assign(contents, doc);
2446
2303
  return contents;
2447
2304
  };
2448
2305
  exports.de_GetResourcePolicyCommand = de_GetResourcePolicyCommand;
@@ -2470,10 +2327,9 @@ const de_GetResourcePolicyCommandError = async (output, context) => {
2470
2327
  throw await de_ValidationExceptionRes(parsedOutput, context);
2471
2328
  default:
2472
2329
  const parsedBody = parsedOutput.body;
2473
- (0, smithy_client_1.throwDefaultError)({
2330
+ return throwDefaultError({
2474
2331
  output,
2475
2332
  parsedBody,
2476
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2477
2333
  errorCode,
2478
2334
  });
2479
2335
  }
@@ -2482,37 +2338,22 @@ const de_GetRuleCommand = async (output, context) => {
2482
2338
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2483
2339
  return de_GetRuleCommandError(output, context);
2484
2340
  }
2485
- const contents = map({
2341
+ const contents = (0, smithy_client_1.map)({
2486
2342
  $metadata: deserializeMetadata(output),
2487
2343
  });
2488
2344
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2489
- if (data.action != null) {
2490
- contents.action = de_RuleAction((0, smithy_client_1.expectUnion)(data.action), context);
2491
- }
2492
- if (data.arn != null) {
2493
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2494
- }
2495
- if (data.createdAt != null) {
2496
- contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.createdAt));
2497
- }
2498
- if (data.id != null) {
2499
- contents.id = (0, smithy_client_1.expectString)(data.id);
2500
- }
2501
- if (data.isDefault != null) {
2502
- contents.isDefault = (0, smithy_client_1.expectBoolean)(data.isDefault);
2503
- }
2504
- if (data.lastUpdatedAt != null) {
2505
- contents.lastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedAt));
2506
- }
2507
- if (data.match != null) {
2508
- contents.match = de_RuleMatch((0, smithy_client_1.expectUnion)(data.match), context);
2509
- }
2510
- if (data.name != null) {
2511
- contents.name = (0, smithy_client_1.expectString)(data.name);
2512
- }
2513
- if (data.priority != null) {
2514
- contents.priority = (0, smithy_client_1.expectInt32)(data.priority);
2515
- }
2345
+ const doc = (0, smithy_client_1.take)(data, {
2346
+ action: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
2347
+ arn: smithy_client_1.expectString,
2348
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2349
+ id: smithy_client_1.expectString,
2350
+ isDefault: smithy_client_1.expectBoolean,
2351
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2352
+ match: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
2353
+ name: smithy_client_1.expectString,
2354
+ priority: smithy_client_1.expectInt32,
2355
+ });
2356
+ Object.assign(contents, doc);
2516
2357
  return contents;
2517
2358
  };
2518
2359
  exports.de_GetRuleCommand = de_GetRuleCommand;
@@ -2540,10 +2381,9 @@ const de_GetRuleCommandError = async (output, context) => {
2540
2381
  throw await de_ValidationExceptionRes(parsedOutput, context);
2541
2382
  default:
2542
2383
  const parsedBody = parsedOutput.body;
2543
- (0, smithy_client_1.throwDefaultError)({
2384
+ return throwDefaultError({
2544
2385
  output,
2545
2386
  parsedBody,
2546
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2547
2387
  errorCode,
2548
2388
  });
2549
2389
  }
@@ -2552,46 +2392,25 @@ const de_GetServiceCommand = async (output, context) => {
2552
2392
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2553
2393
  return de_GetServiceCommandError(output, context);
2554
2394
  }
2555
- const contents = map({
2395
+ const contents = (0, smithy_client_1.map)({
2556
2396
  $metadata: deserializeMetadata(output),
2557
2397
  });
2558
2398
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2559
- if (data.arn != null) {
2560
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2561
- }
2562
- if (data.authType != null) {
2563
- contents.authType = (0, smithy_client_1.expectString)(data.authType);
2564
- }
2565
- if (data.certificateArn != null) {
2566
- contents.certificateArn = (0, smithy_client_1.expectString)(data.certificateArn);
2567
- }
2568
- if (data.createdAt != null) {
2569
- contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.createdAt));
2570
- }
2571
- if (data.customDomainName != null) {
2572
- contents.customDomainName = (0, smithy_client_1.expectString)(data.customDomainName);
2573
- }
2574
- if (data.dnsEntry != null) {
2575
- contents.dnsEntry = de_DnsEntry(data.dnsEntry, context);
2576
- }
2577
- if (data.failureCode != null) {
2578
- contents.failureCode = (0, smithy_client_1.expectString)(data.failureCode);
2579
- }
2580
- if (data.failureMessage != null) {
2581
- contents.failureMessage = (0, smithy_client_1.expectString)(data.failureMessage);
2582
- }
2583
- if (data.id != null) {
2584
- contents.id = (0, smithy_client_1.expectString)(data.id);
2585
- }
2586
- if (data.lastUpdatedAt != null) {
2587
- contents.lastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedAt));
2588
- }
2589
- if (data.name != null) {
2590
- contents.name = (0, smithy_client_1.expectString)(data.name);
2591
- }
2592
- if (data.status != null) {
2593
- contents.status = (0, smithy_client_1.expectString)(data.status);
2594
- }
2399
+ const doc = (0, smithy_client_1.take)(data, {
2400
+ arn: smithy_client_1.expectString,
2401
+ authType: smithy_client_1.expectString,
2402
+ certificateArn: smithy_client_1.expectString,
2403
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2404
+ customDomainName: smithy_client_1.expectString,
2405
+ dnsEntry: smithy_client_1._json,
2406
+ failureCode: smithy_client_1.expectString,
2407
+ failureMessage: smithy_client_1.expectString,
2408
+ id: smithy_client_1.expectString,
2409
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2410
+ name: smithy_client_1.expectString,
2411
+ status: smithy_client_1.expectString,
2412
+ });
2413
+ Object.assign(contents, doc);
2595
2414
  return contents;
2596
2415
  };
2597
2416
  exports.de_GetServiceCommand = de_GetServiceCommand;
@@ -2619,10 +2438,9 @@ const de_GetServiceCommandError = async (output, context) => {
2619
2438
  throw await de_ValidationExceptionRes(parsedOutput, context);
2620
2439
  default:
2621
2440
  const parsedBody = parsedOutput.body;
2622
- (0, smithy_client_1.throwDefaultError)({
2441
+ return throwDefaultError({
2623
2442
  output,
2624
2443
  parsedBody,
2625
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2626
2444
  errorCode,
2627
2445
  });
2628
2446
  }
@@ -2631,34 +2449,21 @@ const de_GetServiceNetworkCommand = async (output, context) => {
2631
2449
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2632
2450
  return de_GetServiceNetworkCommandError(output, context);
2633
2451
  }
2634
- const contents = map({
2452
+ const contents = (0, smithy_client_1.map)({
2635
2453
  $metadata: deserializeMetadata(output),
2636
2454
  });
2637
2455
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2638
- if (data.arn != null) {
2639
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2640
- }
2641
- if (data.authType != null) {
2642
- contents.authType = (0, smithy_client_1.expectString)(data.authType);
2643
- }
2644
- if (data.createdAt != null) {
2645
- contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.createdAt));
2646
- }
2647
- if (data.id != null) {
2648
- contents.id = (0, smithy_client_1.expectString)(data.id);
2649
- }
2650
- if (data.lastUpdatedAt != null) {
2651
- contents.lastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedAt));
2652
- }
2653
- if (data.name != null) {
2654
- contents.name = (0, smithy_client_1.expectString)(data.name);
2655
- }
2656
- if (data.numberOfAssociatedServices != null) {
2657
- contents.numberOfAssociatedServices = (0, smithy_client_1.expectLong)(data.numberOfAssociatedServices);
2658
- }
2659
- if (data.numberOfAssociatedVPCs != null) {
2660
- contents.numberOfAssociatedVPCs = (0, smithy_client_1.expectLong)(data.numberOfAssociatedVPCs);
2661
- }
2456
+ const doc = (0, smithy_client_1.take)(data, {
2457
+ arn: smithy_client_1.expectString,
2458
+ authType: smithy_client_1.expectString,
2459
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2460
+ id: smithy_client_1.expectString,
2461
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2462
+ name: smithy_client_1.expectString,
2463
+ numberOfAssociatedServices: smithy_client_1.expectLong,
2464
+ numberOfAssociatedVPCs: smithy_client_1.expectLong,
2465
+ });
2466
+ Object.assign(contents, doc);
2662
2467
  return contents;
2663
2468
  };
2664
2469
  exports.de_GetServiceNetworkCommand = de_GetServiceNetworkCommand;
@@ -2686,10 +2491,9 @@ const de_GetServiceNetworkCommandError = async (output, context) => {
2686
2491
  throw await de_ValidationExceptionRes(parsedOutput, context);
2687
2492
  default:
2688
2493
  const parsedBody = parsedOutput.body;
2689
- (0, smithy_client_1.throwDefaultError)({
2494
+ return throwDefaultError({
2690
2495
  output,
2691
2496
  parsedBody,
2692
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2693
2497
  errorCode,
2694
2498
  });
2695
2499
  }
@@ -2698,55 +2502,28 @@ const de_GetServiceNetworkServiceAssociationCommand = async (output, context) =>
2698
2502
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2699
2503
  return de_GetServiceNetworkServiceAssociationCommandError(output, context);
2700
2504
  }
2701
- const contents = map({
2505
+ const contents = (0, smithy_client_1.map)({
2702
2506
  $metadata: deserializeMetadata(output),
2703
2507
  });
2704
2508
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2705
- if (data.arn != null) {
2706
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2707
- }
2708
- if (data.createdAt != null) {
2709
- contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.createdAt));
2710
- }
2711
- if (data.createdBy != null) {
2712
- contents.createdBy = (0, smithy_client_1.expectString)(data.createdBy);
2713
- }
2714
- if (data.customDomainName != null) {
2715
- contents.customDomainName = (0, smithy_client_1.expectString)(data.customDomainName);
2716
- }
2717
- if (data.dnsEntry != null) {
2718
- contents.dnsEntry = de_DnsEntry(data.dnsEntry, context);
2719
- }
2720
- if (data.failureCode != null) {
2721
- contents.failureCode = (0, smithy_client_1.expectString)(data.failureCode);
2722
- }
2723
- if (data.failureMessage != null) {
2724
- contents.failureMessage = (0, smithy_client_1.expectString)(data.failureMessage);
2725
- }
2726
- if (data.id != null) {
2727
- contents.id = (0, smithy_client_1.expectString)(data.id);
2728
- }
2729
- if (data.serviceArn != null) {
2730
- contents.serviceArn = (0, smithy_client_1.expectString)(data.serviceArn);
2731
- }
2732
- if (data.serviceId != null) {
2733
- contents.serviceId = (0, smithy_client_1.expectString)(data.serviceId);
2734
- }
2735
- if (data.serviceName != null) {
2736
- contents.serviceName = (0, smithy_client_1.expectString)(data.serviceName);
2737
- }
2738
- if (data.serviceNetworkArn != null) {
2739
- contents.serviceNetworkArn = (0, smithy_client_1.expectString)(data.serviceNetworkArn);
2740
- }
2741
- if (data.serviceNetworkId != null) {
2742
- contents.serviceNetworkId = (0, smithy_client_1.expectString)(data.serviceNetworkId);
2743
- }
2744
- if (data.serviceNetworkName != null) {
2745
- contents.serviceNetworkName = (0, smithy_client_1.expectString)(data.serviceNetworkName);
2746
- }
2747
- if (data.status != null) {
2748
- contents.status = (0, smithy_client_1.expectString)(data.status);
2749
- }
2509
+ const doc = (0, smithy_client_1.take)(data, {
2510
+ arn: smithy_client_1.expectString,
2511
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2512
+ createdBy: smithy_client_1.expectString,
2513
+ customDomainName: smithy_client_1.expectString,
2514
+ dnsEntry: smithy_client_1._json,
2515
+ failureCode: smithy_client_1.expectString,
2516
+ failureMessage: smithy_client_1.expectString,
2517
+ id: smithy_client_1.expectString,
2518
+ serviceArn: smithy_client_1.expectString,
2519
+ serviceId: smithy_client_1.expectString,
2520
+ serviceName: smithy_client_1.expectString,
2521
+ serviceNetworkArn: smithy_client_1.expectString,
2522
+ serviceNetworkId: smithy_client_1.expectString,
2523
+ serviceNetworkName: smithy_client_1.expectString,
2524
+ status: smithy_client_1.expectString,
2525
+ });
2526
+ Object.assign(contents, doc);
2750
2527
  return contents;
2751
2528
  };
2752
2529
  exports.de_GetServiceNetworkServiceAssociationCommand = de_GetServiceNetworkServiceAssociationCommand;
@@ -2774,10 +2551,9 @@ const de_GetServiceNetworkServiceAssociationCommandError = async (output, contex
2774
2551
  throw await de_ValidationExceptionRes(parsedOutput, context);
2775
2552
  default:
2776
2553
  const parsedBody = parsedOutput.body;
2777
- (0, smithy_client_1.throwDefaultError)({
2554
+ return throwDefaultError({
2778
2555
  output,
2779
2556
  parsedBody,
2780
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2781
2557
  errorCode,
2782
2558
  });
2783
2559
  }
@@ -2786,49 +2562,26 @@ const de_GetServiceNetworkVpcAssociationCommand = async (output, context) => {
2786
2562
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2787
2563
  return de_GetServiceNetworkVpcAssociationCommandError(output, context);
2788
2564
  }
2789
- const contents = map({
2565
+ const contents = (0, smithy_client_1.map)({
2790
2566
  $metadata: deserializeMetadata(output),
2791
2567
  });
2792
2568
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2793
- if (data.arn != null) {
2794
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2795
- }
2796
- if (data.createdAt != null) {
2797
- contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.createdAt));
2798
- }
2799
- if (data.createdBy != null) {
2800
- contents.createdBy = (0, smithy_client_1.expectString)(data.createdBy);
2801
- }
2802
- if (data.failureCode != null) {
2803
- contents.failureCode = (0, smithy_client_1.expectString)(data.failureCode);
2804
- }
2805
- if (data.failureMessage != null) {
2806
- contents.failureMessage = (0, smithy_client_1.expectString)(data.failureMessage);
2807
- }
2808
- if (data.id != null) {
2809
- contents.id = (0, smithy_client_1.expectString)(data.id);
2810
- }
2811
- if (data.lastUpdatedAt != null) {
2812
- contents.lastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedAt));
2813
- }
2814
- if (data.securityGroupIds != null) {
2815
- contents.securityGroupIds = de_SecurityGroupList(data.securityGroupIds, context);
2816
- }
2817
- if (data.serviceNetworkArn != null) {
2818
- contents.serviceNetworkArn = (0, smithy_client_1.expectString)(data.serviceNetworkArn);
2819
- }
2820
- if (data.serviceNetworkId != null) {
2821
- contents.serviceNetworkId = (0, smithy_client_1.expectString)(data.serviceNetworkId);
2822
- }
2823
- if (data.serviceNetworkName != null) {
2824
- contents.serviceNetworkName = (0, smithy_client_1.expectString)(data.serviceNetworkName);
2825
- }
2826
- if (data.status != null) {
2827
- contents.status = (0, smithy_client_1.expectString)(data.status);
2828
- }
2829
- if (data.vpcId != null) {
2830
- contents.vpcId = (0, smithy_client_1.expectString)(data.vpcId);
2831
- }
2569
+ const doc = (0, smithy_client_1.take)(data, {
2570
+ arn: smithy_client_1.expectString,
2571
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2572
+ createdBy: smithy_client_1.expectString,
2573
+ failureCode: smithy_client_1.expectString,
2574
+ failureMessage: smithy_client_1.expectString,
2575
+ id: smithy_client_1.expectString,
2576
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2577
+ securityGroupIds: smithy_client_1._json,
2578
+ serviceNetworkArn: smithy_client_1.expectString,
2579
+ serviceNetworkId: smithy_client_1.expectString,
2580
+ serviceNetworkName: smithy_client_1.expectString,
2581
+ status: smithy_client_1.expectString,
2582
+ vpcId: smithy_client_1.expectString,
2583
+ });
2584
+ Object.assign(contents, doc);
2832
2585
  return contents;
2833
2586
  };
2834
2587
  exports.de_GetServiceNetworkVpcAssociationCommand = de_GetServiceNetworkVpcAssociationCommand;
@@ -2856,10 +2609,9 @@ const de_GetServiceNetworkVpcAssociationCommandError = async (output, context) =
2856
2609
  throw await de_ValidationExceptionRes(parsedOutput, context);
2857
2610
  default:
2858
2611
  const parsedBody = parsedOutput.body;
2859
- (0, smithy_client_1.throwDefaultError)({
2612
+ return throwDefaultError({
2860
2613
  output,
2861
2614
  parsedBody,
2862
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2863
2615
  errorCode,
2864
2616
  });
2865
2617
  }
@@ -2868,43 +2620,24 @@ const de_GetTargetGroupCommand = async (output, context) => {
2868
2620
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2869
2621
  return de_GetTargetGroupCommandError(output, context);
2870
2622
  }
2871
- const contents = map({
2623
+ const contents = (0, smithy_client_1.map)({
2872
2624
  $metadata: deserializeMetadata(output),
2873
2625
  });
2874
2626
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2875
- if (data.arn != null) {
2876
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2877
- }
2878
- if (data.config != null) {
2879
- contents.config = de_TargetGroupConfig(data.config, context);
2880
- }
2881
- if (data.createdAt != null) {
2882
- contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.createdAt));
2883
- }
2884
- if (data.failureCode != null) {
2885
- contents.failureCode = (0, smithy_client_1.expectString)(data.failureCode);
2886
- }
2887
- if (data.failureMessage != null) {
2888
- contents.failureMessage = (0, smithy_client_1.expectString)(data.failureMessage);
2889
- }
2890
- if (data.id != null) {
2891
- contents.id = (0, smithy_client_1.expectString)(data.id);
2892
- }
2893
- if (data.lastUpdatedAt != null) {
2894
- contents.lastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.lastUpdatedAt));
2895
- }
2896
- if (data.name != null) {
2897
- contents.name = (0, smithy_client_1.expectString)(data.name);
2898
- }
2899
- if (data.serviceArns != null) {
2900
- contents.serviceArns = de_ServiceArnList(data.serviceArns, context);
2901
- }
2902
- if (data.status != null) {
2903
- contents.status = (0, smithy_client_1.expectString)(data.status);
2904
- }
2905
- if (data.type != null) {
2906
- contents.type = (0, smithy_client_1.expectString)(data.type);
2907
- }
2627
+ const doc = (0, smithy_client_1.take)(data, {
2628
+ arn: smithy_client_1.expectString,
2629
+ config: smithy_client_1._json,
2630
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2631
+ failureCode: smithy_client_1.expectString,
2632
+ failureMessage: smithy_client_1.expectString,
2633
+ id: smithy_client_1.expectString,
2634
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2635
+ name: smithy_client_1.expectString,
2636
+ serviceArns: smithy_client_1._json,
2637
+ status: smithy_client_1.expectString,
2638
+ type: smithy_client_1.expectString,
2639
+ });
2640
+ Object.assign(contents, doc);
2908
2641
  return contents;
2909
2642
  };
2910
2643
  exports.de_GetTargetGroupCommand = de_GetTargetGroupCommand;
@@ -2929,10 +2662,9 @@ const de_GetTargetGroupCommandError = async (output, context) => {
2929
2662
  throw await de_ValidationExceptionRes(parsedOutput, context);
2930
2663
  default:
2931
2664
  const parsedBody = parsedOutput.body;
2932
- (0, smithy_client_1.throwDefaultError)({
2665
+ return throwDefaultError({
2933
2666
  output,
2934
2667
  parsedBody,
2935
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2936
2668
  errorCode,
2937
2669
  });
2938
2670
  }
@@ -2941,16 +2673,15 @@ const de_ListAccessLogSubscriptionsCommand = async (output, context) => {
2941
2673
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2942
2674
  return de_ListAccessLogSubscriptionsCommandError(output, context);
2943
2675
  }
2944
- const contents = map({
2676
+ const contents = (0, smithy_client_1.map)({
2945
2677
  $metadata: deserializeMetadata(output),
2946
2678
  });
2947
2679
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2948
- if (data.items != null) {
2949
- contents.items = de_AccessLogSubscriptionList(data.items, context);
2950
- }
2951
- if (data.nextToken != null) {
2952
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2953
- }
2680
+ const doc = (0, smithy_client_1.take)(data, {
2681
+ items: (_) => de_AccessLogSubscriptionList(_, context),
2682
+ nextToken: smithy_client_1.expectString,
2683
+ });
2684
+ Object.assign(contents, doc);
2954
2685
  return contents;
2955
2686
  };
2956
2687
  exports.de_ListAccessLogSubscriptionsCommand = de_ListAccessLogSubscriptionsCommand;
@@ -2972,10 +2703,9 @@ const de_ListAccessLogSubscriptionsCommandError = async (output, context) => {
2972
2703
  throw await de_ValidationExceptionRes(parsedOutput, context);
2973
2704
  default:
2974
2705
  const parsedBody = parsedOutput.body;
2975
- (0, smithy_client_1.throwDefaultError)({
2706
+ return throwDefaultError({
2976
2707
  output,
2977
2708
  parsedBody,
2978
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
2979
2709
  errorCode,
2980
2710
  });
2981
2711
  }
@@ -2984,16 +2714,15 @@ const de_ListListenersCommand = async (output, context) => {
2984
2714
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2985
2715
  return de_ListListenersCommandError(output, context);
2986
2716
  }
2987
- const contents = map({
2717
+ const contents = (0, smithy_client_1.map)({
2988
2718
  $metadata: deserializeMetadata(output),
2989
2719
  });
2990
2720
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2991
- if (data.items != null) {
2992
- contents.items = de_ListenerSummaryList(data.items, context);
2993
- }
2994
- if (data.nextToken != null) {
2995
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2996
- }
2721
+ const doc = (0, smithy_client_1.take)(data, {
2722
+ items: (_) => de_ListenerSummaryList(_, context),
2723
+ nextToken: smithy_client_1.expectString,
2724
+ });
2725
+ Object.assign(contents, doc);
2997
2726
  return contents;
2998
2727
  };
2999
2728
  exports.de_ListListenersCommand = de_ListListenersCommand;
@@ -3021,10 +2750,9 @@ const de_ListListenersCommandError = async (output, context) => {
3021
2750
  throw await de_ValidationExceptionRes(parsedOutput, context);
3022
2751
  default:
3023
2752
  const parsedBody = parsedOutput.body;
3024
- (0, smithy_client_1.throwDefaultError)({
2753
+ return throwDefaultError({
3025
2754
  output,
3026
2755
  parsedBody,
3027
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3028
2756
  errorCode,
3029
2757
  });
3030
2758
  }
@@ -3033,16 +2761,15 @@ const de_ListRulesCommand = async (output, context) => {
3033
2761
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3034
2762
  return de_ListRulesCommandError(output, context);
3035
2763
  }
3036
- const contents = map({
2764
+ const contents = (0, smithy_client_1.map)({
3037
2765
  $metadata: deserializeMetadata(output),
3038
2766
  });
3039
2767
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3040
- if (data.items != null) {
3041
- contents.items = de_RuleSummaryList(data.items, context);
3042
- }
3043
- if (data.nextToken != null) {
3044
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3045
- }
2768
+ const doc = (0, smithy_client_1.take)(data, {
2769
+ items: (_) => de_RuleSummaryList(_, context),
2770
+ nextToken: smithy_client_1.expectString,
2771
+ });
2772
+ Object.assign(contents, doc);
3046
2773
  return contents;
3047
2774
  };
3048
2775
  exports.de_ListRulesCommand = de_ListRulesCommand;
@@ -3070,10 +2797,9 @@ const de_ListRulesCommandError = async (output, context) => {
3070
2797
  throw await de_ValidationExceptionRes(parsedOutput, context);
3071
2798
  default:
3072
2799
  const parsedBody = parsedOutput.body;
3073
- (0, smithy_client_1.throwDefaultError)({
2800
+ return throwDefaultError({
3074
2801
  output,
3075
2802
  parsedBody,
3076
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3077
2803
  errorCode,
3078
2804
  });
3079
2805
  }
@@ -3082,16 +2808,15 @@ const de_ListServiceNetworksCommand = async (output, context) => {
3082
2808
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3083
2809
  return de_ListServiceNetworksCommandError(output, context);
3084
2810
  }
3085
- const contents = map({
2811
+ const contents = (0, smithy_client_1.map)({
3086
2812
  $metadata: deserializeMetadata(output),
3087
2813
  });
3088
2814
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3089
- if (data.items != null) {
3090
- contents.items = de_ServiceNetworkList(data.items, context);
3091
- }
3092
- if (data.nextToken != null) {
3093
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3094
- }
2815
+ const doc = (0, smithy_client_1.take)(data, {
2816
+ items: (_) => de_ServiceNetworkList(_, context),
2817
+ nextToken: smithy_client_1.expectString,
2818
+ });
2819
+ Object.assign(contents, doc);
3095
2820
  return contents;
3096
2821
  };
3097
2822
  exports.de_ListServiceNetworksCommand = de_ListServiceNetworksCommand;
@@ -3116,10 +2841,9 @@ const de_ListServiceNetworksCommandError = async (output, context) => {
3116
2841
  throw await de_ValidationExceptionRes(parsedOutput, context);
3117
2842
  default:
3118
2843
  const parsedBody = parsedOutput.body;
3119
- (0, smithy_client_1.throwDefaultError)({
2844
+ return throwDefaultError({
3120
2845
  output,
3121
2846
  parsedBody,
3122
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3123
2847
  errorCode,
3124
2848
  });
3125
2849
  }
@@ -3128,16 +2852,15 @@ const de_ListServiceNetworkServiceAssociationsCommand = async (output, context)
3128
2852
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3129
2853
  return de_ListServiceNetworkServiceAssociationsCommandError(output, context);
3130
2854
  }
3131
- const contents = map({
2855
+ const contents = (0, smithy_client_1.map)({
3132
2856
  $metadata: deserializeMetadata(output),
3133
2857
  });
3134
2858
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3135
- if (data.items != null) {
3136
- contents.items = de_ServiceNetworkServiceAssociationList(data.items, context);
3137
- }
3138
- if (data.nextToken != null) {
3139
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3140
- }
2859
+ const doc = (0, smithy_client_1.take)(data, {
2860
+ items: (_) => de_ServiceNetworkServiceAssociationList(_, context),
2861
+ nextToken: smithy_client_1.expectString,
2862
+ });
2863
+ Object.assign(contents, doc);
3141
2864
  return contents;
3142
2865
  };
3143
2866
  exports.de_ListServiceNetworkServiceAssociationsCommand = de_ListServiceNetworkServiceAssociationsCommand;
@@ -3162,10 +2885,9 @@ const de_ListServiceNetworkServiceAssociationsCommandError = async (output, cont
3162
2885
  throw await de_ValidationExceptionRes(parsedOutput, context);
3163
2886
  default:
3164
2887
  const parsedBody = parsedOutput.body;
3165
- (0, smithy_client_1.throwDefaultError)({
2888
+ return throwDefaultError({
3166
2889
  output,
3167
2890
  parsedBody,
3168
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3169
2891
  errorCode,
3170
2892
  });
3171
2893
  }
@@ -3174,16 +2896,15 @@ const de_ListServiceNetworkVpcAssociationsCommand = async (output, context) => {
3174
2896
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3175
2897
  return de_ListServiceNetworkVpcAssociationsCommandError(output, context);
3176
2898
  }
3177
- const contents = map({
2899
+ const contents = (0, smithy_client_1.map)({
3178
2900
  $metadata: deserializeMetadata(output),
3179
2901
  });
3180
2902
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3181
- if (data.items != null) {
3182
- contents.items = de_ServiceNetworkVpcAssociationList(data.items, context);
3183
- }
3184
- if (data.nextToken != null) {
3185
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3186
- }
2903
+ const doc = (0, smithy_client_1.take)(data, {
2904
+ items: (_) => de_ServiceNetworkVpcAssociationList(_, context),
2905
+ nextToken: smithy_client_1.expectString,
2906
+ });
2907
+ Object.assign(contents, doc);
3187
2908
  return contents;
3188
2909
  };
3189
2910
  exports.de_ListServiceNetworkVpcAssociationsCommand = de_ListServiceNetworkVpcAssociationsCommand;
@@ -3208,10 +2929,9 @@ const de_ListServiceNetworkVpcAssociationsCommandError = async (output, context)
3208
2929
  throw await de_ValidationExceptionRes(parsedOutput, context);
3209
2930
  default:
3210
2931
  const parsedBody = parsedOutput.body;
3211
- (0, smithy_client_1.throwDefaultError)({
2932
+ return throwDefaultError({
3212
2933
  output,
3213
2934
  parsedBody,
3214
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3215
2935
  errorCode,
3216
2936
  });
3217
2937
  }
@@ -3220,16 +2940,15 @@ const de_ListServicesCommand = async (output, context) => {
3220
2940
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3221
2941
  return de_ListServicesCommandError(output, context);
3222
2942
  }
3223
- const contents = map({
2943
+ const contents = (0, smithy_client_1.map)({
3224
2944
  $metadata: deserializeMetadata(output),
3225
2945
  });
3226
2946
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3227
- if (data.items != null) {
3228
- contents.items = de_ServiceList(data.items, context);
3229
- }
3230
- if (data.nextToken != null) {
3231
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3232
- }
2947
+ const doc = (0, smithy_client_1.take)(data, {
2948
+ items: (_) => de_ServiceList(_, context),
2949
+ nextToken: smithy_client_1.expectString,
2950
+ });
2951
+ Object.assign(contents, doc);
3233
2952
  return contents;
3234
2953
  };
3235
2954
  exports.de_ListServicesCommand = de_ListServicesCommand;
@@ -3254,10 +2973,9 @@ const de_ListServicesCommandError = async (output, context) => {
3254
2973
  throw await de_ValidationExceptionRes(parsedOutput, context);
3255
2974
  default:
3256
2975
  const parsedBody = parsedOutput.body;
3257
- (0, smithy_client_1.throwDefaultError)({
2976
+ return throwDefaultError({
3258
2977
  output,
3259
2978
  parsedBody,
3260
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3261
2979
  errorCode,
3262
2980
  });
3263
2981
  }
@@ -3266,13 +2984,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
3266
2984
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3267
2985
  return de_ListTagsForResourceCommandError(output, context);
3268
2986
  }
3269
- const contents = map({
2987
+ const contents = (0, smithy_client_1.map)({
3270
2988
  $metadata: deserializeMetadata(output),
3271
2989
  });
3272
2990
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3273
- if (data.tags != null) {
3274
- contents.tags = de_TagMap(data.tags, context);
3275
- }
2991
+ const doc = (0, smithy_client_1.take)(data, {
2992
+ tags: smithy_client_1._json,
2993
+ });
2994
+ Object.assign(contents, doc);
3276
2995
  return contents;
3277
2996
  };
3278
2997
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -3294,10 +3013,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
3294
3013
  throw await de_ValidationExceptionRes(parsedOutput, context);
3295
3014
  default:
3296
3015
  const parsedBody = parsedOutput.body;
3297
- (0, smithy_client_1.throwDefaultError)({
3016
+ return throwDefaultError({
3298
3017
  output,
3299
3018
  parsedBody,
3300
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3301
3019
  errorCode,
3302
3020
  });
3303
3021
  }
@@ -3306,16 +3024,15 @@ const de_ListTargetGroupsCommand = async (output, context) => {
3306
3024
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3307
3025
  return de_ListTargetGroupsCommandError(output, context);
3308
3026
  }
3309
- const contents = map({
3027
+ const contents = (0, smithy_client_1.map)({
3310
3028
  $metadata: deserializeMetadata(output),
3311
3029
  });
3312
3030
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3313
- if (data.items != null) {
3314
- contents.items = de_TargetGroupList(data.items, context);
3315
- }
3316
- if (data.nextToken != null) {
3317
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3318
- }
3031
+ const doc = (0, smithy_client_1.take)(data, {
3032
+ items: (_) => de_TargetGroupList(_, context),
3033
+ nextToken: smithy_client_1.expectString,
3034
+ });
3035
+ Object.assign(contents, doc);
3319
3036
  return contents;
3320
3037
  };
3321
3038
  exports.de_ListTargetGroupsCommand = de_ListTargetGroupsCommand;
@@ -3340,10 +3057,9 @@ const de_ListTargetGroupsCommandError = async (output, context) => {
3340
3057
  throw await de_ValidationExceptionRes(parsedOutput, context);
3341
3058
  default:
3342
3059
  const parsedBody = parsedOutput.body;
3343
- (0, smithy_client_1.throwDefaultError)({
3060
+ return throwDefaultError({
3344
3061
  output,
3345
3062
  parsedBody,
3346
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3347
3063
  errorCode,
3348
3064
  });
3349
3065
  }
@@ -3352,16 +3068,15 @@ const de_ListTargetsCommand = async (output, context) => {
3352
3068
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3353
3069
  return de_ListTargetsCommandError(output, context);
3354
3070
  }
3355
- const contents = map({
3071
+ const contents = (0, smithy_client_1.map)({
3356
3072
  $metadata: deserializeMetadata(output),
3357
3073
  });
3358
3074
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3359
- if (data.items != null) {
3360
- contents.items = de_TargetSummaryList(data.items, context);
3361
- }
3362
- if (data.nextToken != null) {
3363
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
3364
- }
3075
+ const doc = (0, smithy_client_1.take)(data, {
3076
+ items: smithy_client_1._json,
3077
+ nextToken: smithy_client_1.expectString,
3078
+ });
3079
+ Object.assign(contents, doc);
3365
3080
  return contents;
3366
3081
  };
3367
3082
  exports.de_ListTargetsCommand = de_ListTargetsCommand;
@@ -3389,10 +3104,9 @@ const de_ListTargetsCommandError = async (output, context) => {
3389
3104
  throw await de_ValidationExceptionRes(parsedOutput, context);
3390
3105
  default:
3391
3106
  const parsedBody = parsedOutput.body;
3392
- (0, smithy_client_1.throwDefaultError)({
3107
+ return throwDefaultError({
3393
3108
  output,
3394
3109
  parsedBody,
3395
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3396
3110
  errorCode,
3397
3111
  });
3398
3112
  }
@@ -3401,16 +3115,15 @@ const de_PutAuthPolicyCommand = async (output, context) => {
3401
3115
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3402
3116
  return de_PutAuthPolicyCommandError(output, context);
3403
3117
  }
3404
- const contents = map({
3118
+ const contents = (0, smithy_client_1.map)({
3405
3119
  $metadata: deserializeMetadata(output),
3406
3120
  });
3407
3121
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3408
- if (data.policy != null) {
3409
- contents.policy = (0, smithy_client_1.expectString)(data.policy);
3410
- }
3411
- if (data.state != null) {
3412
- contents.state = (0, smithy_client_1.expectString)(data.state);
3413
- }
3122
+ const doc = (0, smithy_client_1.take)(data, {
3123
+ policy: smithy_client_1.expectString,
3124
+ state: smithy_client_1.expectString,
3125
+ });
3126
+ Object.assign(contents, doc);
3414
3127
  return contents;
3415
3128
  };
3416
3129
  exports.de_PutAuthPolicyCommand = de_PutAuthPolicyCommand;
@@ -3438,10 +3151,9 @@ const de_PutAuthPolicyCommandError = async (output, context) => {
3438
3151
  throw await de_ValidationExceptionRes(parsedOutput, context);
3439
3152
  default:
3440
3153
  const parsedBody = parsedOutput.body;
3441
- (0, smithy_client_1.throwDefaultError)({
3154
+ return throwDefaultError({
3442
3155
  output,
3443
3156
  parsedBody,
3444
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3445
3157
  errorCode,
3446
3158
  });
3447
3159
  }
@@ -3450,7 +3162,7 @@ const de_PutResourcePolicyCommand = async (output, context) => {
3450
3162
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3451
3163
  return de_PutResourcePolicyCommandError(output, context);
3452
3164
  }
3453
- const contents = map({
3165
+ const contents = (0, smithy_client_1.map)({
3454
3166
  $metadata: deserializeMetadata(output),
3455
3167
  });
3456
3168
  await collectBody(output.body, context);
@@ -3481,10 +3193,9 @@ const de_PutResourcePolicyCommandError = async (output, context) => {
3481
3193
  throw await de_ValidationExceptionRes(parsedOutput, context);
3482
3194
  default:
3483
3195
  const parsedBody = parsedOutput.body;
3484
- (0, smithy_client_1.throwDefaultError)({
3196
+ return throwDefaultError({
3485
3197
  output,
3486
3198
  parsedBody,
3487
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3488
3199
  errorCode,
3489
3200
  });
3490
3201
  }
@@ -3493,16 +3204,15 @@ const de_RegisterTargetsCommand = async (output, context) => {
3493
3204
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3494
3205
  return de_RegisterTargetsCommandError(output, context);
3495
3206
  }
3496
- const contents = map({
3207
+ const contents = (0, smithy_client_1.map)({
3497
3208
  $metadata: deserializeMetadata(output),
3498
3209
  });
3499
3210
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3500
- if (data.successful != null) {
3501
- contents.successful = de_TargetList(data.successful, context);
3502
- }
3503
- if (data.unsuccessful != null) {
3504
- contents.unsuccessful = de_TargetFailureList(data.unsuccessful, context);
3505
- }
3211
+ const doc = (0, smithy_client_1.take)(data, {
3212
+ successful: smithy_client_1._json,
3213
+ unsuccessful: smithy_client_1._json,
3214
+ });
3215
+ Object.assign(contents, doc);
3506
3216
  return contents;
3507
3217
  };
3508
3218
  exports.de_RegisterTargetsCommand = de_RegisterTargetsCommand;
@@ -3536,10 +3246,9 @@ const de_RegisterTargetsCommandError = async (output, context) => {
3536
3246
  throw await de_ValidationExceptionRes(parsedOutput, context);
3537
3247
  default:
3538
3248
  const parsedBody = parsedOutput.body;
3539
- (0, smithy_client_1.throwDefaultError)({
3249
+ return throwDefaultError({
3540
3250
  output,
3541
3251
  parsedBody,
3542
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3543
3252
  errorCode,
3544
3253
  });
3545
3254
  }
@@ -3548,7 +3257,7 @@ const de_TagResourceCommand = async (output, context) => {
3548
3257
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3549
3258
  return de_TagResourceCommandError(output, context);
3550
3259
  }
3551
- const contents = map({
3260
+ const contents = (0, smithy_client_1.map)({
3552
3261
  $metadata: deserializeMetadata(output),
3553
3262
  });
3554
3263
  await collectBody(output.body, context);
@@ -3579,10 +3288,9 @@ const de_TagResourceCommandError = async (output, context) => {
3579
3288
  throw await de_ValidationExceptionRes(parsedOutput, context);
3580
3289
  default:
3581
3290
  const parsedBody = parsedOutput.body;
3582
- (0, smithy_client_1.throwDefaultError)({
3291
+ return throwDefaultError({
3583
3292
  output,
3584
3293
  parsedBody,
3585
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3586
3294
  errorCode,
3587
3295
  });
3588
3296
  }
@@ -3591,7 +3299,7 @@ const de_UntagResourceCommand = async (output, context) => {
3591
3299
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3592
3300
  return de_UntagResourceCommandError(output, context);
3593
3301
  }
3594
- const contents = map({
3302
+ const contents = (0, smithy_client_1.map)({
3595
3303
  $metadata: deserializeMetadata(output),
3596
3304
  });
3597
3305
  await collectBody(output.body, context);
@@ -3616,10 +3324,9 @@ const de_UntagResourceCommandError = async (output, context) => {
3616
3324
  throw await de_ValidationExceptionRes(parsedOutput, context);
3617
3325
  default:
3618
3326
  const parsedBody = parsedOutput.body;
3619
- (0, smithy_client_1.throwDefaultError)({
3327
+ return throwDefaultError({
3620
3328
  output,
3621
3329
  parsedBody,
3622
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3623
3330
  errorCode,
3624
3331
  });
3625
3332
  }
@@ -3628,25 +3335,18 @@ const de_UpdateAccessLogSubscriptionCommand = async (output, context) => {
3628
3335
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3629
3336
  return de_UpdateAccessLogSubscriptionCommandError(output, context);
3630
3337
  }
3631
- const contents = map({
3338
+ const contents = (0, smithy_client_1.map)({
3632
3339
  $metadata: deserializeMetadata(output),
3633
3340
  });
3634
3341
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3635
- if (data.arn != null) {
3636
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
3637
- }
3638
- if (data.destinationArn != null) {
3639
- contents.destinationArn = (0, smithy_client_1.expectString)(data.destinationArn);
3640
- }
3641
- if (data.id != null) {
3642
- contents.id = (0, smithy_client_1.expectString)(data.id);
3643
- }
3644
- if (data.resourceArn != null) {
3645
- contents.resourceArn = (0, smithy_client_1.expectString)(data.resourceArn);
3646
- }
3647
- if (data.resourceId != null) {
3648
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
3649
- }
3342
+ const doc = (0, smithy_client_1.take)(data, {
3343
+ arn: smithy_client_1.expectString,
3344
+ destinationArn: smithy_client_1.expectString,
3345
+ id: smithy_client_1.expectString,
3346
+ resourceArn: smithy_client_1.expectString,
3347
+ resourceId: smithy_client_1.expectString,
3348
+ });
3349
+ Object.assign(contents, doc);
3650
3350
  return contents;
3651
3351
  };
3652
3352
  exports.de_UpdateAccessLogSubscriptionCommand = de_UpdateAccessLogSubscriptionCommand;
@@ -3677,10 +3377,9 @@ const de_UpdateAccessLogSubscriptionCommandError = async (output, context) => {
3677
3377
  throw await de_ValidationExceptionRes(parsedOutput, context);
3678
3378
  default:
3679
3379
  const parsedBody = parsedOutput.body;
3680
- (0, smithy_client_1.throwDefaultError)({
3380
+ return throwDefaultError({
3681
3381
  output,
3682
3382
  parsedBody,
3683
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3684
3383
  errorCode,
3685
3384
  });
3686
3385
  }
@@ -3689,34 +3388,21 @@ const de_UpdateListenerCommand = async (output, context) => {
3689
3388
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3690
3389
  return de_UpdateListenerCommandError(output, context);
3691
3390
  }
3692
- const contents = map({
3391
+ const contents = (0, smithy_client_1.map)({
3693
3392
  $metadata: deserializeMetadata(output),
3694
3393
  });
3695
3394
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3696
- if (data.arn != null) {
3697
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
3698
- }
3699
- if (data.defaultAction != null) {
3700
- contents.defaultAction = de_RuleAction((0, smithy_client_1.expectUnion)(data.defaultAction), context);
3701
- }
3702
- if (data.id != null) {
3703
- contents.id = (0, smithy_client_1.expectString)(data.id);
3704
- }
3705
- if (data.name != null) {
3706
- contents.name = (0, smithy_client_1.expectString)(data.name);
3707
- }
3708
- if (data.port != null) {
3709
- contents.port = (0, smithy_client_1.expectInt32)(data.port);
3710
- }
3711
- if (data.protocol != null) {
3712
- contents.protocol = (0, smithy_client_1.expectString)(data.protocol);
3713
- }
3714
- if (data.serviceArn != null) {
3715
- contents.serviceArn = (0, smithy_client_1.expectString)(data.serviceArn);
3716
- }
3717
- if (data.serviceId != null) {
3718
- contents.serviceId = (0, smithy_client_1.expectString)(data.serviceId);
3719
- }
3395
+ const doc = (0, smithy_client_1.take)(data, {
3396
+ arn: smithy_client_1.expectString,
3397
+ defaultAction: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
3398
+ id: smithy_client_1.expectString,
3399
+ name: smithy_client_1.expectString,
3400
+ port: smithy_client_1.expectInt32,
3401
+ protocol: smithy_client_1.expectString,
3402
+ serviceArn: smithy_client_1.expectString,
3403
+ serviceId: smithy_client_1.expectString,
3404
+ });
3405
+ Object.assign(contents, doc);
3720
3406
  return contents;
3721
3407
  };
3722
3408
  exports.de_UpdateListenerCommand = de_UpdateListenerCommand;
@@ -3747,10 +3433,9 @@ const de_UpdateListenerCommandError = async (output, context) => {
3747
3433
  throw await de_ValidationExceptionRes(parsedOutput, context);
3748
3434
  default:
3749
3435
  const parsedBody = parsedOutput.body;
3750
- (0, smithy_client_1.throwDefaultError)({
3436
+ return throwDefaultError({
3751
3437
  output,
3752
3438
  parsedBody,
3753
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3754
3439
  errorCode,
3755
3440
  });
3756
3441
  }
@@ -3759,31 +3444,20 @@ const de_UpdateRuleCommand = async (output, context) => {
3759
3444
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3760
3445
  return de_UpdateRuleCommandError(output, context);
3761
3446
  }
3762
- const contents = map({
3447
+ const contents = (0, smithy_client_1.map)({
3763
3448
  $metadata: deserializeMetadata(output),
3764
3449
  });
3765
3450
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3766
- if (data.action != null) {
3767
- contents.action = de_RuleAction((0, smithy_client_1.expectUnion)(data.action), context);
3768
- }
3769
- if (data.arn != null) {
3770
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
3771
- }
3772
- if (data.id != null) {
3773
- contents.id = (0, smithy_client_1.expectString)(data.id);
3774
- }
3775
- if (data.isDefault != null) {
3776
- contents.isDefault = (0, smithy_client_1.expectBoolean)(data.isDefault);
3777
- }
3778
- if (data.match != null) {
3779
- contents.match = de_RuleMatch((0, smithy_client_1.expectUnion)(data.match), context);
3780
- }
3781
- if (data.name != null) {
3782
- contents.name = (0, smithy_client_1.expectString)(data.name);
3783
- }
3784
- if (data.priority != null) {
3785
- contents.priority = (0, smithy_client_1.expectInt32)(data.priority);
3786
- }
3451
+ const doc = (0, smithy_client_1.take)(data, {
3452
+ action: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
3453
+ arn: smithy_client_1.expectString,
3454
+ id: smithy_client_1.expectString,
3455
+ isDefault: smithy_client_1.expectBoolean,
3456
+ match: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
3457
+ name: smithy_client_1.expectString,
3458
+ priority: smithy_client_1.expectInt32,
3459
+ });
3460
+ Object.assign(contents, doc);
3787
3461
  return contents;
3788
3462
  };
3789
3463
  exports.de_UpdateRuleCommand = de_UpdateRuleCommand;
@@ -3814,10 +3488,9 @@ const de_UpdateRuleCommandError = async (output, context) => {
3814
3488
  throw await de_ValidationExceptionRes(parsedOutput, context);
3815
3489
  default:
3816
3490
  const parsedBody = parsedOutput.body;
3817
- (0, smithy_client_1.throwDefaultError)({
3491
+ return throwDefaultError({
3818
3492
  output,
3819
3493
  parsedBody,
3820
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3821
3494
  errorCode,
3822
3495
  });
3823
3496
  }
@@ -3826,28 +3499,19 @@ const de_UpdateServiceCommand = async (output, context) => {
3826
3499
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3827
3500
  return de_UpdateServiceCommandError(output, context);
3828
3501
  }
3829
- const contents = map({
3502
+ const contents = (0, smithy_client_1.map)({
3830
3503
  $metadata: deserializeMetadata(output),
3831
3504
  });
3832
3505
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3833
- if (data.arn != null) {
3834
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
3835
- }
3836
- if (data.authType != null) {
3837
- contents.authType = (0, smithy_client_1.expectString)(data.authType);
3838
- }
3839
- if (data.certificateArn != null) {
3840
- contents.certificateArn = (0, smithy_client_1.expectString)(data.certificateArn);
3841
- }
3842
- if (data.customDomainName != null) {
3843
- contents.customDomainName = (0, smithy_client_1.expectString)(data.customDomainName);
3844
- }
3845
- if (data.id != null) {
3846
- contents.id = (0, smithy_client_1.expectString)(data.id);
3847
- }
3848
- if (data.name != null) {
3849
- contents.name = (0, smithy_client_1.expectString)(data.name);
3850
- }
3506
+ const doc = (0, smithy_client_1.take)(data, {
3507
+ arn: smithy_client_1.expectString,
3508
+ authType: smithy_client_1.expectString,
3509
+ certificateArn: smithy_client_1.expectString,
3510
+ customDomainName: smithy_client_1.expectString,
3511
+ id: smithy_client_1.expectString,
3512
+ name: smithy_client_1.expectString,
3513
+ });
3514
+ Object.assign(contents, doc);
3851
3515
  return contents;
3852
3516
  };
3853
3517
  exports.de_UpdateServiceCommand = de_UpdateServiceCommand;
@@ -3878,10 +3542,9 @@ const de_UpdateServiceCommandError = async (output, context) => {
3878
3542
  throw await de_ValidationExceptionRes(parsedOutput, context);
3879
3543
  default:
3880
3544
  const parsedBody = parsedOutput.body;
3881
- (0, smithy_client_1.throwDefaultError)({
3545
+ return throwDefaultError({
3882
3546
  output,
3883
3547
  parsedBody,
3884
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3885
3548
  errorCode,
3886
3549
  });
3887
3550
  }
@@ -3890,22 +3553,17 @@ const de_UpdateServiceNetworkCommand = async (output, context) => {
3890
3553
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3891
3554
  return de_UpdateServiceNetworkCommandError(output, context);
3892
3555
  }
3893
- const contents = map({
3556
+ const contents = (0, smithy_client_1.map)({
3894
3557
  $metadata: deserializeMetadata(output),
3895
3558
  });
3896
3559
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3897
- if (data.arn != null) {
3898
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
3899
- }
3900
- if (data.authType != null) {
3901
- contents.authType = (0, smithy_client_1.expectString)(data.authType);
3902
- }
3903
- if (data.id != null) {
3904
- contents.id = (0, smithy_client_1.expectString)(data.id);
3905
- }
3906
- if (data.name != null) {
3907
- contents.name = (0, smithy_client_1.expectString)(data.name);
3908
- }
3560
+ const doc = (0, smithy_client_1.take)(data, {
3561
+ arn: smithy_client_1.expectString,
3562
+ authType: smithy_client_1.expectString,
3563
+ id: smithy_client_1.expectString,
3564
+ name: smithy_client_1.expectString,
3565
+ });
3566
+ Object.assign(contents, doc);
3909
3567
  return contents;
3910
3568
  };
3911
3569
  exports.de_UpdateServiceNetworkCommand = de_UpdateServiceNetworkCommand;
@@ -3936,10 +3594,9 @@ const de_UpdateServiceNetworkCommandError = async (output, context) => {
3936
3594
  throw await de_ValidationExceptionRes(parsedOutput, context);
3937
3595
  default:
3938
3596
  const parsedBody = parsedOutput.body;
3939
- (0, smithy_client_1.throwDefaultError)({
3597
+ return throwDefaultError({
3940
3598
  output,
3941
3599
  parsedBody,
3942
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
3943
3600
  errorCode,
3944
3601
  });
3945
3602
  }
@@ -3948,25 +3605,18 @@ const de_UpdateServiceNetworkVpcAssociationCommand = async (output, context) =>
3948
3605
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3949
3606
  return de_UpdateServiceNetworkVpcAssociationCommandError(output, context);
3950
3607
  }
3951
- const contents = map({
3608
+ const contents = (0, smithy_client_1.map)({
3952
3609
  $metadata: deserializeMetadata(output),
3953
3610
  });
3954
3611
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3955
- if (data.arn != null) {
3956
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
3957
- }
3958
- if (data.createdBy != null) {
3959
- contents.createdBy = (0, smithy_client_1.expectString)(data.createdBy);
3960
- }
3961
- if (data.id != null) {
3962
- contents.id = (0, smithy_client_1.expectString)(data.id);
3963
- }
3964
- if (data.securityGroupIds != null) {
3965
- contents.securityGroupIds = de_SecurityGroupList(data.securityGroupIds, context);
3966
- }
3967
- if (data.status != null) {
3968
- contents.status = (0, smithy_client_1.expectString)(data.status);
3969
- }
3612
+ const doc = (0, smithy_client_1.take)(data, {
3613
+ arn: smithy_client_1.expectString,
3614
+ createdBy: smithy_client_1.expectString,
3615
+ id: smithy_client_1.expectString,
3616
+ securityGroupIds: smithy_client_1._json,
3617
+ status: smithy_client_1.expectString,
3618
+ });
3619
+ Object.assign(contents, doc);
3970
3620
  return contents;
3971
3621
  };
3972
3622
  exports.de_UpdateServiceNetworkVpcAssociationCommand = de_UpdateServiceNetworkVpcAssociationCommand;
@@ -3997,10 +3647,9 @@ const de_UpdateServiceNetworkVpcAssociationCommandError = async (output, context
3997
3647
  throw await de_ValidationExceptionRes(parsedOutput, context);
3998
3648
  default:
3999
3649
  const parsedBody = parsedOutput.body;
4000
- (0, smithy_client_1.throwDefaultError)({
3650
+ return throwDefaultError({
4001
3651
  output,
4002
3652
  parsedBody,
4003
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
4004
3653
  errorCode,
4005
3654
  });
4006
3655
  }
@@ -4009,28 +3658,19 @@ const de_UpdateTargetGroupCommand = async (output, context) => {
4009
3658
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4010
3659
  return de_UpdateTargetGroupCommandError(output, context);
4011
3660
  }
4012
- const contents = map({
3661
+ const contents = (0, smithy_client_1.map)({
4013
3662
  $metadata: deserializeMetadata(output),
4014
3663
  });
4015
3664
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4016
- if (data.arn != null) {
4017
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
4018
- }
4019
- if (data.config != null) {
4020
- contents.config = de_TargetGroupConfig(data.config, context);
4021
- }
4022
- if (data.id != null) {
4023
- contents.id = (0, smithy_client_1.expectString)(data.id);
4024
- }
4025
- if (data.name != null) {
4026
- contents.name = (0, smithy_client_1.expectString)(data.name);
4027
- }
4028
- if (data.status != null) {
4029
- contents.status = (0, smithy_client_1.expectString)(data.status);
4030
- }
4031
- if (data.type != null) {
4032
- contents.type = (0, smithy_client_1.expectString)(data.type);
4033
- }
3665
+ const doc = (0, smithy_client_1.take)(data, {
3666
+ arn: smithy_client_1.expectString,
3667
+ config: smithy_client_1._json,
3668
+ id: smithy_client_1.expectString,
3669
+ name: smithy_client_1.expectString,
3670
+ status: smithy_client_1.expectString,
3671
+ type: smithy_client_1.expectString,
3672
+ });
3673
+ Object.assign(contents, doc);
4034
3674
  return contents;
4035
3675
  };
4036
3676
  exports.de_UpdateTargetGroupCommand = de_UpdateTargetGroupCommand;
@@ -4058,21 +3698,21 @@ const de_UpdateTargetGroupCommandError = async (output, context) => {
4058
3698
  throw await de_ValidationExceptionRes(parsedOutput, context);
4059
3699
  default:
4060
3700
  const parsedBody = parsedOutput.body;
4061
- (0, smithy_client_1.throwDefaultError)({
3701
+ return throwDefaultError({
4062
3702
  output,
4063
3703
  parsedBody,
4064
- exceptionCtor: VPCLatticeServiceException_1.VPCLatticeServiceException,
4065
3704
  errorCode,
4066
3705
  });
4067
3706
  }
4068
3707
  };
4069
- const map = smithy_client_1.map;
3708
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(VPCLatticeServiceException_1.VPCLatticeServiceException);
4070
3709
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
4071
- const contents = map({});
3710
+ const contents = (0, smithy_client_1.map)({});
4072
3711
  const data = parsedOutput.body;
4073
- if (data.message != null) {
4074
- contents.message = (0, smithy_client_1.expectString)(data.message);
4075
- }
3712
+ const doc = (0, smithy_client_1.take)(data, {
3713
+ message: smithy_client_1.expectString,
3714
+ });
3715
+ Object.assign(contents, doc);
4076
3716
  const exception = new models_0_1.AccessDeniedException({
4077
3717
  $metadata: deserializeMetadata(parsedOutput),
4078
3718
  ...contents,
@@ -4080,17 +3720,14 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
4080
3720
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4081
3721
  };
4082
3722
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
4083
- const contents = map({});
3723
+ const contents = (0, smithy_client_1.map)({});
4084
3724
  const data = parsedOutput.body;
4085
- if (data.message != null) {
4086
- contents.message = (0, smithy_client_1.expectString)(data.message);
4087
- }
4088
- if (data.resourceId != null) {
4089
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
4090
- }
4091
- if (data.resourceType != null) {
4092
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
4093
- }
3725
+ const doc = (0, smithy_client_1.take)(data, {
3726
+ message: smithy_client_1.expectString,
3727
+ resourceId: smithy_client_1.expectString,
3728
+ resourceType: smithy_client_1.expectString,
3729
+ });
3730
+ Object.assign(contents, doc);
4094
3731
  const exception = new models_0_1.ConflictException({
4095
3732
  $metadata: deserializeMetadata(parsedOutput),
4096
3733
  ...contents,
@@ -4098,16 +3735,17 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
4098
3735
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4099
3736
  };
4100
3737
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
4101
- const contents = map({
3738
+ const contents = (0, smithy_client_1.map)({
4102
3739
  retryAfterSeconds: [
4103
3740
  () => void 0 !== parsedOutput.headers["retry-after"],
4104
3741
  () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
4105
3742
  ],
4106
3743
  });
4107
3744
  const data = parsedOutput.body;
4108
- if (data.message != null) {
4109
- contents.message = (0, smithy_client_1.expectString)(data.message);
4110
- }
3745
+ const doc = (0, smithy_client_1.take)(data, {
3746
+ message: smithy_client_1.expectString,
3747
+ });
3748
+ Object.assign(contents, doc);
4111
3749
  const exception = new models_0_1.InternalServerException({
4112
3750
  $metadata: deserializeMetadata(parsedOutput),
4113
3751
  ...contents,
@@ -4115,17 +3753,14 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
4115
3753
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4116
3754
  };
4117
3755
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
4118
- const contents = map({});
3756
+ const contents = (0, smithy_client_1.map)({});
4119
3757
  const data = parsedOutput.body;
4120
- if (data.message != null) {
4121
- contents.message = (0, smithy_client_1.expectString)(data.message);
4122
- }
4123
- if (data.resourceId != null) {
4124
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
4125
- }
4126
- if (data.resourceType != null) {
4127
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
4128
- }
3758
+ const doc = (0, smithy_client_1.take)(data, {
3759
+ message: smithy_client_1.expectString,
3760
+ resourceId: smithy_client_1.expectString,
3761
+ resourceType: smithy_client_1.expectString,
3762
+ });
3763
+ Object.assign(contents, doc);
4129
3764
  const exception = new models_0_1.ResourceNotFoundException({
4130
3765
  $metadata: deserializeMetadata(parsedOutput),
4131
3766
  ...contents,
@@ -4133,23 +3768,16 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
4133
3768
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4134
3769
  };
4135
3770
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
4136
- const contents = map({});
3771
+ const contents = (0, smithy_client_1.map)({});
4137
3772
  const data = parsedOutput.body;
4138
- if (data.message != null) {
4139
- contents.message = (0, smithy_client_1.expectString)(data.message);
4140
- }
4141
- if (data.quotaCode != null) {
4142
- contents.quotaCode = (0, smithy_client_1.expectString)(data.quotaCode);
4143
- }
4144
- if (data.resourceId != null) {
4145
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
4146
- }
4147
- if (data.resourceType != null) {
4148
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
4149
- }
4150
- if (data.serviceCode != null) {
4151
- contents.serviceCode = (0, smithy_client_1.expectString)(data.serviceCode);
4152
- }
3773
+ const doc = (0, smithy_client_1.take)(data, {
3774
+ message: smithy_client_1.expectString,
3775
+ quotaCode: smithy_client_1.expectString,
3776
+ resourceId: smithy_client_1.expectString,
3777
+ resourceType: smithy_client_1.expectString,
3778
+ serviceCode: smithy_client_1.expectString,
3779
+ });
3780
+ Object.assign(contents, doc);
4153
3781
  const exception = new models_0_1.ServiceQuotaExceededException({
4154
3782
  $metadata: deserializeMetadata(parsedOutput),
4155
3783
  ...contents,
@@ -4157,22 +3785,19 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
4157
3785
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4158
3786
  };
4159
3787
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
4160
- const contents = map({
3788
+ const contents = (0, smithy_client_1.map)({
4161
3789
  retryAfterSeconds: [
4162
3790
  () => void 0 !== parsedOutput.headers["retry-after"],
4163
3791
  () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
4164
3792
  ],
4165
3793
  });
4166
3794
  const data = parsedOutput.body;
4167
- if (data.message != null) {
4168
- contents.message = (0, smithy_client_1.expectString)(data.message);
4169
- }
4170
- if (data.quotaCode != null) {
4171
- contents.quotaCode = (0, smithy_client_1.expectString)(data.quotaCode);
4172
- }
4173
- if (data.serviceCode != null) {
4174
- contents.serviceCode = (0, smithy_client_1.expectString)(data.serviceCode);
4175
- }
3795
+ const doc = (0, smithy_client_1.take)(data, {
3796
+ message: smithy_client_1.expectString,
3797
+ quotaCode: smithy_client_1.expectString,
3798
+ serviceCode: smithy_client_1.expectString,
3799
+ });
3800
+ Object.assign(contents, doc);
4176
3801
  const exception = new models_0_1.ThrottlingException({
4177
3802
  $metadata: deserializeMetadata(parsedOutput),
4178
3803
  ...contents,
@@ -4180,425 +3805,81 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
4180
3805
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4181
3806
  };
4182
3807
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
4183
- const contents = map({});
3808
+ const contents = (0, smithy_client_1.map)({});
4184
3809
  const data = parsedOutput.body;
4185
- if (data.fieldList != null) {
4186
- contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context);
4187
- }
4188
- if (data.message != null) {
4189
- contents.message = (0, smithy_client_1.expectString)(data.message);
4190
- }
4191
- if (data.reason != null) {
4192
- contents.reason = (0, smithy_client_1.expectString)(data.reason);
4193
- }
3810
+ const doc = (0, smithy_client_1.take)(data, {
3811
+ fieldList: smithy_client_1._json,
3812
+ message: smithy_client_1.expectString,
3813
+ reason: smithy_client_1.expectString,
3814
+ });
3815
+ Object.assign(contents, doc);
4194
3816
  const exception = new models_0_1.ValidationException({
4195
3817
  $metadata: deserializeMetadata(parsedOutput),
4196
3818
  ...contents,
4197
3819
  });
4198
3820
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4199
3821
  };
4200
- const se_FixedResponseAction = (input, context) => {
4201
- return {
4202
- ...(input.statusCode != null && { statusCode: input.statusCode }),
4203
- };
4204
- };
4205
- const se_ForwardAction = (input, context) => {
4206
- return {
4207
- ...(input.targetGroups != null && { targetGroups: se_WeightedTargetGroupList(input.targetGroups, context) }),
4208
- };
4209
- };
4210
- const se_HeaderMatch = (input, context) => {
4211
- return {
4212
- ...(input.caseSensitive != null && { caseSensitive: input.caseSensitive }),
4213
- ...(input.match != null && { match: se_HeaderMatchType(input.match, context) }),
4214
- ...(input.name != null && { name: input.name }),
4215
- };
4216
- };
4217
- const se_HeaderMatchList = (input, context) => {
4218
- return input
4219
- .filter((e) => e != null)
4220
- .map((entry) => {
4221
- return se_HeaderMatch(entry, context);
4222
- });
4223
- };
4224
- const se_HeaderMatchType = (input, context) => {
4225
- return models_0_1.HeaderMatchType.visit(input, {
4226
- contains: (value) => ({ contains: value }),
4227
- exact: (value) => ({ exact: value }),
4228
- prefix: (value) => ({ prefix: value }),
4229
- _: (name, value) => ({ name: value }),
4230
- });
4231
- };
4232
- const se_HealthCheckConfig = (input, context) => {
4233
- return {
4234
- ...(input.enabled != null && { enabled: input.enabled }),
4235
- ...(input.healthCheckIntervalSeconds != null && { healthCheckIntervalSeconds: input.healthCheckIntervalSeconds }),
4236
- ...(input.healthCheckTimeoutSeconds != null && { healthCheckTimeoutSeconds: input.healthCheckTimeoutSeconds }),
4237
- ...(input.healthyThresholdCount != null && { healthyThresholdCount: input.healthyThresholdCount }),
4238
- ...(input.matcher != null && { matcher: se_Matcher(input.matcher, context) }),
4239
- ...(input.path != null && { path: input.path }),
4240
- ...(input.port != null && { port: input.port }),
4241
- ...(input.protocol != null && { protocol: input.protocol }),
4242
- ...(input.protocolVersion != null && { protocolVersion: input.protocolVersion }),
4243
- ...(input.unhealthyThresholdCount != null && { unhealthyThresholdCount: input.unhealthyThresholdCount }),
4244
- };
4245
- };
4246
- const se_HttpMatch = (input, context) => {
4247
- return {
4248
- ...(input.headerMatches != null && { headerMatches: se_HeaderMatchList(input.headerMatches, context) }),
4249
- ...(input.method != null && { method: input.method }),
4250
- ...(input.pathMatch != null && { pathMatch: se_PathMatch(input.pathMatch, context) }),
4251
- };
4252
- };
4253
- const se_Matcher = (input, context) => {
4254
- return models_0_1.Matcher.visit(input, {
4255
- httpCode: (value) => ({ httpCode: value }),
4256
- _: (name, value) => ({ name: value }),
4257
- });
4258
- };
4259
- const se_PathMatch = (input, context) => {
4260
- return {
4261
- ...(input.caseSensitive != null && { caseSensitive: input.caseSensitive }),
4262
- ...(input.match != null && { match: se_PathMatchType(input.match, context) }),
4263
- };
4264
- };
4265
- const se_PathMatchType = (input, context) => {
4266
- return models_0_1.PathMatchType.visit(input, {
4267
- exact: (value) => ({ exact: value }),
4268
- prefix: (value) => ({ prefix: value }),
4269
- _: (name, value) => ({ name: value }),
4270
- });
4271
- };
4272
- const se_RuleAction = (input, context) => {
4273
- return models_0_1.RuleAction.visit(input, {
4274
- fixedResponse: (value) => ({ fixedResponse: se_FixedResponseAction(value, context) }),
4275
- forward: (value) => ({ forward: se_ForwardAction(value, context) }),
4276
- _: (name, value) => ({ name: value }),
4277
- });
4278
- };
4279
- const se_RuleMatch = (input, context) => {
4280
- return models_0_1.RuleMatch.visit(input, {
4281
- httpMatch: (value) => ({ httpMatch: se_HttpMatch(value, context) }),
4282
- _: (name, value) => ({ name: value }),
4283
- });
4284
- };
4285
- const se_RuleUpdate = (input, context) => {
4286
- return {
4287
- ...(input.action != null && { action: se_RuleAction(input.action, context) }),
4288
- ...(input.match != null && { match: se_RuleMatch(input.match, context) }),
4289
- ...(input.priority != null && { priority: input.priority }),
4290
- ...(input.ruleIdentifier != null && { ruleIdentifier: input.ruleIdentifier }),
4291
- };
4292
- };
4293
- const se_RuleUpdateList = (input, context) => {
4294
- return input
4295
- .filter((e) => e != null)
4296
- .map((entry) => {
4297
- return se_RuleUpdate(entry, context);
4298
- });
4299
- };
4300
- const se_SecurityGroupList = (input, context) => {
4301
- return input
4302
- .filter((e) => e != null)
4303
- .map((entry) => {
4304
- return entry;
4305
- });
4306
- };
4307
- const se_TagMap = (input, context) => {
4308
- return Object.entries(input).reduce((acc, [key, value]) => {
4309
- if (value === null) {
4310
- return acc;
4311
- }
4312
- acc[key] = value;
4313
- return acc;
4314
- }, {});
4315
- };
4316
- const se_Target = (input, context) => {
4317
- return {
4318
- ...(input.id != null && { id: input.id }),
4319
- ...(input.port != null && { port: input.port }),
4320
- };
4321
- };
4322
- const se_TargetGroupConfig = (input, context) => {
4323
- return {
4324
- ...(input.healthCheck != null && { healthCheck: se_HealthCheckConfig(input.healthCheck, context) }),
4325
- ...(input.ipAddressType != null && { ipAddressType: input.ipAddressType }),
4326
- ...(input.port != null && { port: input.port }),
4327
- ...(input.protocol != null && { protocol: input.protocol }),
4328
- ...(input.protocolVersion != null && { protocolVersion: input.protocolVersion }),
4329
- ...(input.vpcIdentifier != null && { vpcIdentifier: input.vpcIdentifier }),
4330
- };
4331
- };
4332
- const se_TargetList = (input, context) => {
4333
- return input
4334
- .filter((e) => e != null)
4335
- .map((entry) => {
4336
- return se_Target(entry, context);
4337
- });
4338
- };
4339
- const se_WeightedTargetGroup = (input, context) => {
4340
- return {
4341
- ...(input.targetGroupIdentifier != null && { targetGroupIdentifier: input.targetGroupIdentifier }),
4342
- ...(input.weight != null && { weight: input.weight }),
4343
- };
4344
- };
4345
- const se_WeightedTargetGroupList = (input, context) => {
4346
- return input
4347
- .filter((e) => e != null)
4348
- .map((entry) => {
4349
- return se_WeightedTargetGroup(entry, context);
4350
- });
4351
- };
4352
3822
  const de_AccessLogSubscriptionList = (output, context) => {
4353
3823
  const retVal = (output || [])
4354
3824
  .filter((e) => e != null)
4355
3825
  .map((entry) => {
4356
- if (entry === null) {
4357
- return null;
4358
- }
4359
3826
  return de_AccessLogSubscriptionSummary(entry, context);
4360
3827
  });
4361
3828
  return retVal;
4362
3829
  };
4363
3830
  const de_AccessLogSubscriptionSummary = (output, context) => {
4364
- return {
4365
- arn: (0, smithy_client_1.expectString)(output.arn),
4366
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
4367
- destinationArn: (0, smithy_client_1.expectString)(output.destinationArn),
4368
- id: (0, smithy_client_1.expectString)(output.id),
4369
- lastUpdatedAt: output.lastUpdatedAt != null
4370
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedAt))
4371
- : undefined,
4372
- resourceArn: (0, smithy_client_1.expectString)(output.resourceArn),
4373
- resourceId: (0, smithy_client_1.expectString)(output.resourceId),
4374
- };
4375
- };
4376
- const de_DnsEntry = (output, context) => {
4377
- return {
4378
- domainName: (0, smithy_client_1.expectString)(output.domainName),
4379
- hostedZoneId: (0, smithy_client_1.expectString)(output.hostedZoneId),
4380
- };
4381
- };
4382
- const de_FixedResponseAction = (output, context) => {
4383
- return {
4384
- statusCode: (0, smithy_client_1.expectInt32)(output.statusCode),
4385
- };
4386
- };
4387
- const de_ForwardAction = (output, context) => {
4388
- return {
4389
- targetGroups: output.targetGroups != null ? de_WeightedTargetGroupList(output.targetGroups, context) : undefined,
4390
- };
4391
- };
4392
- const de_HeaderMatch = (output, context) => {
4393
- return {
4394
- caseSensitive: (0, smithy_client_1.expectBoolean)(output.caseSensitive),
4395
- match: output.match != null ? de_HeaderMatchType((0, smithy_client_1.expectUnion)(output.match), context) : undefined,
4396
- name: (0, smithy_client_1.expectString)(output.name),
4397
- };
4398
- };
4399
- const de_HeaderMatchList = (output, context) => {
4400
- const retVal = (output || [])
4401
- .filter((e) => e != null)
4402
- .map((entry) => {
4403
- if (entry === null) {
4404
- return null;
4405
- }
4406
- return de_HeaderMatch(entry, context);
3831
+ return (0, smithy_client_1.take)(output, {
3832
+ arn: smithy_client_1.expectString,
3833
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3834
+ destinationArn: smithy_client_1.expectString,
3835
+ id: smithy_client_1.expectString,
3836
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3837
+ resourceArn: smithy_client_1.expectString,
3838
+ resourceId: smithy_client_1.expectString,
4407
3839
  });
4408
- return retVal;
4409
- };
4410
- const de_HeaderMatchType = (output, context) => {
4411
- if ((0, smithy_client_1.expectString)(output.contains) !== undefined) {
4412
- return { contains: (0, smithy_client_1.expectString)(output.contains) };
4413
- }
4414
- if ((0, smithy_client_1.expectString)(output.exact) !== undefined) {
4415
- return { exact: (0, smithy_client_1.expectString)(output.exact) };
4416
- }
4417
- if ((0, smithy_client_1.expectString)(output.prefix) !== undefined) {
4418
- return { prefix: (0, smithy_client_1.expectString)(output.prefix) };
4419
- }
4420
- return { $unknown: Object.entries(output)[0] };
4421
- };
4422
- const de_HealthCheckConfig = (output, context) => {
4423
- return {
4424
- enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
4425
- healthCheckIntervalSeconds: (0, smithy_client_1.expectInt32)(output.healthCheckIntervalSeconds),
4426
- healthCheckTimeoutSeconds: (0, smithy_client_1.expectInt32)(output.healthCheckTimeoutSeconds),
4427
- healthyThresholdCount: (0, smithy_client_1.expectInt32)(output.healthyThresholdCount),
4428
- matcher: output.matcher != null ? de_Matcher((0, smithy_client_1.expectUnion)(output.matcher), context) : undefined,
4429
- path: (0, smithy_client_1.expectString)(output.path),
4430
- port: (0, smithy_client_1.expectInt32)(output.port),
4431
- protocol: (0, smithy_client_1.expectString)(output.protocol),
4432
- protocolVersion: (0, smithy_client_1.expectString)(output.protocolVersion),
4433
- unhealthyThresholdCount: (0, smithy_client_1.expectInt32)(output.unhealthyThresholdCount),
4434
- };
4435
- };
4436
- const de_HttpMatch = (output, context) => {
4437
- return {
4438
- headerMatches: output.headerMatches != null ? de_HeaderMatchList(output.headerMatches, context) : undefined,
4439
- method: (0, smithy_client_1.expectString)(output.method),
4440
- pathMatch: output.pathMatch != null ? de_PathMatch(output.pathMatch, context) : undefined,
4441
- };
4442
3840
  };
4443
3841
  const de_ListenerSummary = (output, context) => {
4444
- return {
4445
- arn: (0, smithy_client_1.expectString)(output.arn),
4446
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
4447
- id: (0, smithy_client_1.expectString)(output.id),
4448
- lastUpdatedAt: output.lastUpdatedAt != null
4449
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedAt))
4450
- : undefined,
4451
- name: (0, smithy_client_1.expectString)(output.name),
4452
- port: (0, smithy_client_1.expectInt32)(output.port),
4453
- protocol: (0, smithy_client_1.expectString)(output.protocol),
4454
- };
3842
+ return (0, smithy_client_1.take)(output, {
3843
+ arn: smithy_client_1.expectString,
3844
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3845
+ id: smithy_client_1.expectString,
3846
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3847
+ name: smithy_client_1.expectString,
3848
+ port: smithy_client_1.expectInt32,
3849
+ protocol: smithy_client_1.expectString,
3850
+ });
4455
3851
  };
4456
3852
  const de_ListenerSummaryList = (output, context) => {
4457
3853
  const retVal = (output || [])
4458
3854
  .filter((e) => e != null)
4459
3855
  .map((entry) => {
4460
- if (entry === null) {
4461
- return null;
4462
- }
4463
3856
  return de_ListenerSummary(entry, context);
4464
3857
  });
4465
3858
  return retVal;
4466
3859
  };
4467
- const de_Matcher = (output, context) => {
4468
- if ((0, smithy_client_1.expectString)(output.httpCode) !== undefined) {
4469
- return { httpCode: (0, smithy_client_1.expectString)(output.httpCode) };
4470
- }
4471
- return { $unknown: Object.entries(output)[0] };
4472
- };
4473
- const de_PathMatch = (output, context) => {
4474
- return {
4475
- caseSensitive: (0, smithy_client_1.expectBoolean)(output.caseSensitive),
4476
- match: output.match != null ? de_PathMatchType((0, smithy_client_1.expectUnion)(output.match), context) : undefined,
4477
- };
4478
- };
4479
- const de_PathMatchType = (output, context) => {
4480
- if ((0, smithy_client_1.expectString)(output.exact) !== undefined) {
4481
- return { exact: (0, smithy_client_1.expectString)(output.exact) };
4482
- }
4483
- if ((0, smithy_client_1.expectString)(output.prefix) !== undefined) {
4484
- return { prefix: (0, smithy_client_1.expectString)(output.prefix) };
4485
- }
4486
- return { $unknown: Object.entries(output)[0] };
4487
- };
4488
- const de_RuleAction = (output, context) => {
4489
- if (output.fixedResponse != null) {
4490
- return {
4491
- fixedResponse: de_FixedResponseAction(output.fixedResponse, context),
4492
- };
4493
- }
4494
- if (output.forward != null) {
4495
- return {
4496
- forward: de_ForwardAction(output.forward, context),
4497
- };
4498
- }
4499
- return { $unknown: Object.entries(output)[0] };
4500
- };
4501
- const de_RuleMatch = (output, context) => {
4502
- if (output.httpMatch != null) {
4503
- return {
4504
- httpMatch: de_HttpMatch(output.httpMatch, context),
4505
- };
4506
- }
4507
- return { $unknown: Object.entries(output)[0] };
4508
- };
4509
3860
  const de_RuleSummary = (output, context) => {
4510
- return {
4511
- arn: (0, smithy_client_1.expectString)(output.arn),
4512
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
4513
- id: (0, smithy_client_1.expectString)(output.id),
4514
- isDefault: (0, smithy_client_1.expectBoolean)(output.isDefault),
4515
- lastUpdatedAt: output.lastUpdatedAt != null
4516
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedAt))
4517
- : undefined,
4518
- name: (0, smithy_client_1.expectString)(output.name),
4519
- priority: (0, smithy_client_1.expectInt32)(output.priority),
4520
- };
3861
+ return (0, smithy_client_1.take)(output, {
3862
+ arn: smithy_client_1.expectString,
3863
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3864
+ id: smithy_client_1.expectString,
3865
+ isDefault: smithy_client_1.expectBoolean,
3866
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3867
+ name: smithy_client_1.expectString,
3868
+ priority: smithy_client_1.expectInt32,
3869
+ });
4521
3870
  };
4522
3871
  const de_RuleSummaryList = (output, context) => {
4523
3872
  const retVal = (output || [])
4524
3873
  .filter((e) => e != null)
4525
3874
  .map((entry) => {
4526
- if (entry === null) {
4527
- return null;
4528
- }
4529
3875
  return de_RuleSummary(entry, context);
4530
3876
  });
4531
3877
  return retVal;
4532
3878
  };
4533
- const de_RuleUpdateFailure = (output, context) => {
4534
- return {
4535
- failureCode: (0, smithy_client_1.expectString)(output.failureCode),
4536
- failureMessage: (0, smithy_client_1.expectString)(output.failureMessage),
4537
- ruleIdentifier: (0, smithy_client_1.expectString)(output.ruleIdentifier),
4538
- };
4539
- };
4540
- const de_RuleUpdateFailureList = (output, context) => {
4541
- const retVal = (output || [])
4542
- .filter((e) => e != null)
4543
- .map((entry) => {
4544
- if (entry === null) {
4545
- return null;
4546
- }
4547
- return de_RuleUpdateFailure(entry, context);
4548
- });
4549
- return retVal;
4550
- };
4551
- const de_RuleUpdateSuccess = (output, context) => {
4552
- return {
4553
- action: output.action != null ? de_RuleAction((0, smithy_client_1.expectUnion)(output.action), context) : undefined,
4554
- arn: (0, smithy_client_1.expectString)(output.arn),
4555
- id: (0, smithy_client_1.expectString)(output.id),
4556
- isDefault: (0, smithy_client_1.expectBoolean)(output.isDefault),
4557
- match: output.match != null ? de_RuleMatch((0, smithy_client_1.expectUnion)(output.match), context) : undefined,
4558
- name: (0, smithy_client_1.expectString)(output.name),
4559
- priority: (0, smithy_client_1.expectInt32)(output.priority),
4560
- };
4561
- };
4562
- const de_RuleUpdateSuccessList = (output, context) => {
4563
- const retVal = (output || [])
4564
- .filter((e) => e != null)
4565
- .map((entry) => {
4566
- if (entry === null) {
4567
- return null;
4568
- }
4569
- return de_RuleUpdateSuccess(entry, context);
4570
- });
4571
- return retVal;
4572
- };
4573
- const de_SecurityGroupList = (output, context) => {
4574
- const retVal = (output || [])
4575
- .filter((e) => e != null)
4576
- .map((entry) => {
4577
- if (entry === null) {
4578
- return null;
4579
- }
4580
- return (0, smithy_client_1.expectString)(entry);
4581
- });
4582
- return retVal;
4583
- };
4584
- const de_ServiceArnList = (output, context) => {
4585
- const retVal = (output || [])
4586
- .filter((e) => e != null)
4587
- .map((entry) => {
4588
- if (entry === null) {
4589
- return null;
4590
- }
4591
- return (0, smithy_client_1.expectString)(entry);
4592
- });
4593
- return retVal;
4594
- };
4595
3879
  const de_ServiceList = (output, context) => {
4596
3880
  const retVal = (output || [])
4597
3881
  .filter((e) => e != null)
4598
3882
  .map((entry) => {
4599
- if (entry === null) {
4600
- return null;
4601
- }
4602
3883
  return de_ServiceSummary(entry, context);
4603
3884
  });
4604
3885
  return retVal;
@@ -4607,9 +3888,6 @@ const de_ServiceNetworkList = (output, context) => {
4607
3888
  const retVal = (output || [])
4608
3889
  .filter((e) => e != null)
4609
3890
  .map((entry) => {
4610
- if (entry === null) {
4611
- return null;
4612
- }
4613
3891
  return de_ServiceNetworkSummary(entry, context);
4614
3892
  });
4615
3893
  return retVal;
@@ -4618,220 +3896,95 @@ const de_ServiceNetworkServiceAssociationList = (output, context) => {
4618
3896
  const retVal = (output || [])
4619
3897
  .filter((e) => e != null)
4620
3898
  .map((entry) => {
4621
- if (entry === null) {
4622
- return null;
4623
- }
4624
3899
  return de_ServiceNetworkServiceAssociationSummary(entry, context);
4625
3900
  });
4626
3901
  return retVal;
4627
3902
  };
4628
3903
  const de_ServiceNetworkServiceAssociationSummary = (output, context) => {
4629
- return {
4630
- arn: (0, smithy_client_1.expectString)(output.arn),
4631
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
4632
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
4633
- customDomainName: (0, smithy_client_1.expectString)(output.customDomainName),
4634
- dnsEntry: output.dnsEntry != null ? de_DnsEntry(output.dnsEntry, context) : undefined,
4635
- id: (0, smithy_client_1.expectString)(output.id),
4636
- serviceArn: (0, smithy_client_1.expectString)(output.serviceArn),
4637
- serviceId: (0, smithy_client_1.expectString)(output.serviceId),
4638
- serviceName: (0, smithy_client_1.expectString)(output.serviceName),
4639
- serviceNetworkArn: (0, smithy_client_1.expectString)(output.serviceNetworkArn),
4640
- serviceNetworkId: (0, smithy_client_1.expectString)(output.serviceNetworkId),
4641
- serviceNetworkName: (0, smithy_client_1.expectString)(output.serviceNetworkName),
4642
- status: (0, smithy_client_1.expectString)(output.status),
4643
- };
3904
+ return (0, smithy_client_1.take)(output, {
3905
+ arn: smithy_client_1.expectString,
3906
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3907
+ createdBy: smithy_client_1.expectString,
3908
+ customDomainName: smithy_client_1.expectString,
3909
+ dnsEntry: smithy_client_1._json,
3910
+ id: smithy_client_1.expectString,
3911
+ serviceArn: smithy_client_1.expectString,
3912
+ serviceId: smithy_client_1.expectString,
3913
+ serviceName: smithy_client_1.expectString,
3914
+ serviceNetworkArn: smithy_client_1.expectString,
3915
+ serviceNetworkId: smithy_client_1.expectString,
3916
+ serviceNetworkName: smithy_client_1.expectString,
3917
+ status: smithy_client_1.expectString,
3918
+ });
4644
3919
  };
4645
3920
  const de_ServiceNetworkSummary = (output, context) => {
4646
- return {
4647
- arn: (0, smithy_client_1.expectString)(output.arn),
4648
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
4649
- id: (0, smithy_client_1.expectString)(output.id),
4650
- lastUpdatedAt: output.lastUpdatedAt != null
4651
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedAt))
4652
- : undefined,
4653
- name: (0, smithy_client_1.expectString)(output.name),
4654
- numberOfAssociatedServices: (0, smithy_client_1.expectLong)(output.numberOfAssociatedServices),
4655
- numberOfAssociatedVPCs: (0, smithy_client_1.expectLong)(output.numberOfAssociatedVPCs),
4656
- };
3921
+ return (0, smithy_client_1.take)(output, {
3922
+ arn: smithy_client_1.expectString,
3923
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3924
+ id: smithy_client_1.expectString,
3925
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3926
+ name: smithy_client_1.expectString,
3927
+ numberOfAssociatedServices: smithy_client_1.expectLong,
3928
+ numberOfAssociatedVPCs: smithy_client_1.expectLong,
3929
+ });
4657
3930
  };
4658
3931
  const de_ServiceNetworkVpcAssociationList = (output, context) => {
4659
3932
  const retVal = (output || [])
4660
3933
  .filter((e) => e != null)
4661
3934
  .map((entry) => {
4662
- if (entry === null) {
4663
- return null;
4664
- }
4665
3935
  return de_ServiceNetworkVpcAssociationSummary(entry, context);
4666
3936
  });
4667
3937
  return retVal;
4668
3938
  };
4669
3939
  const de_ServiceNetworkVpcAssociationSummary = (output, context) => {
4670
- return {
4671
- arn: (0, smithy_client_1.expectString)(output.arn),
4672
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
4673
- createdBy: (0, smithy_client_1.expectString)(output.createdBy),
4674
- id: (0, smithy_client_1.expectString)(output.id),
4675
- lastUpdatedAt: output.lastUpdatedAt != null
4676
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedAt))
4677
- : undefined,
4678
- serviceNetworkArn: (0, smithy_client_1.expectString)(output.serviceNetworkArn),
4679
- serviceNetworkId: (0, smithy_client_1.expectString)(output.serviceNetworkId),
4680
- serviceNetworkName: (0, smithy_client_1.expectString)(output.serviceNetworkName),
4681
- status: (0, smithy_client_1.expectString)(output.status),
4682
- vpcId: (0, smithy_client_1.expectString)(output.vpcId),
4683
- };
3940
+ return (0, smithy_client_1.take)(output, {
3941
+ arn: smithy_client_1.expectString,
3942
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3943
+ createdBy: smithy_client_1.expectString,
3944
+ id: smithy_client_1.expectString,
3945
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3946
+ serviceNetworkArn: smithy_client_1.expectString,
3947
+ serviceNetworkId: smithy_client_1.expectString,
3948
+ serviceNetworkName: smithy_client_1.expectString,
3949
+ status: smithy_client_1.expectString,
3950
+ vpcId: smithy_client_1.expectString,
3951
+ });
4684
3952
  };
4685
3953
  const de_ServiceSummary = (output, context) => {
4686
- return {
4687
- arn: (0, smithy_client_1.expectString)(output.arn),
4688
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
4689
- customDomainName: (0, smithy_client_1.expectString)(output.customDomainName),
4690
- dnsEntry: output.dnsEntry != null ? de_DnsEntry(output.dnsEntry, context) : undefined,
4691
- id: (0, smithy_client_1.expectString)(output.id),
4692
- lastUpdatedAt: output.lastUpdatedAt != null
4693
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedAt))
4694
- : undefined,
4695
- name: (0, smithy_client_1.expectString)(output.name),
4696
- status: (0, smithy_client_1.expectString)(output.status),
4697
- };
4698
- };
4699
- const de_TagMap = (output, context) => {
4700
- return Object.entries(output).reduce((acc, [key, value]) => {
4701
- if (value === null) {
4702
- return acc;
4703
- }
4704
- acc[key] = (0, smithy_client_1.expectString)(value);
4705
- return acc;
4706
- }, {});
4707
- };
4708
- const de_Target = (output, context) => {
4709
- return {
4710
- id: (0, smithy_client_1.expectString)(output.id),
4711
- port: (0, smithy_client_1.expectInt32)(output.port),
4712
- };
4713
- };
4714
- const de_TargetFailure = (output, context) => {
4715
- return {
4716
- failureCode: (0, smithy_client_1.expectString)(output.failureCode),
4717
- failureMessage: (0, smithy_client_1.expectString)(output.failureMessage),
4718
- id: (0, smithy_client_1.expectString)(output.id),
4719
- port: (0, smithy_client_1.expectInt32)(output.port),
4720
- };
4721
- };
4722
- const de_TargetFailureList = (output, context) => {
4723
- const retVal = (output || [])
4724
- .filter((e) => e != null)
4725
- .map((entry) => {
4726
- if (entry === null) {
4727
- return null;
4728
- }
4729
- return de_TargetFailure(entry, context);
3954
+ return (0, smithy_client_1.take)(output, {
3955
+ arn: smithy_client_1.expectString,
3956
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3957
+ customDomainName: smithy_client_1.expectString,
3958
+ dnsEntry: smithy_client_1._json,
3959
+ id: smithy_client_1.expectString,
3960
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3961
+ name: smithy_client_1.expectString,
3962
+ status: smithy_client_1.expectString,
4730
3963
  });
4731
- return retVal;
4732
- };
4733
- const de_TargetGroupConfig = (output, context) => {
4734
- return {
4735
- healthCheck: output.healthCheck != null ? de_HealthCheckConfig(output.healthCheck, context) : undefined,
4736
- ipAddressType: (0, smithy_client_1.expectString)(output.ipAddressType),
4737
- port: (0, smithy_client_1.expectInt32)(output.port),
4738
- protocol: (0, smithy_client_1.expectString)(output.protocol),
4739
- protocolVersion: (0, smithy_client_1.expectString)(output.protocolVersion),
4740
- vpcIdentifier: (0, smithy_client_1.expectString)(output.vpcIdentifier),
4741
- };
4742
3964
  };
4743
3965
  const de_TargetGroupList = (output, context) => {
4744
3966
  const retVal = (output || [])
4745
3967
  .filter((e) => e != null)
4746
3968
  .map((entry) => {
4747
- if (entry === null) {
4748
- return null;
4749
- }
4750
3969
  return de_TargetGroupSummary(entry, context);
4751
3970
  });
4752
3971
  return retVal;
4753
3972
  };
4754
3973
  const de_TargetGroupSummary = (output, context) => {
4755
- return {
4756
- arn: (0, smithy_client_1.expectString)(output.arn),
4757
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
4758
- id: (0, smithy_client_1.expectString)(output.id),
4759
- ipAddressType: (0, smithy_client_1.expectString)(output.ipAddressType),
4760
- lastUpdatedAt: output.lastUpdatedAt != null
4761
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.lastUpdatedAt))
4762
- : undefined,
4763
- name: (0, smithy_client_1.expectString)(output.name),
4764
- port: (0, smithy_client_1.expectInt32)(output.port),
4765
- protocol: (0, smithy_client_1.expectString)(output.protocol),
4766
- serviceArns: output.serviceArns != null ? de_ServiceArnList(output.serviceArns, context) : undefined,
4767
- status: (0, smithy_client_1.expectString)(output.status),
4768
- type: (0, smithy_client_1.expectString)(output.type),
4769
- vpcIdentifier: (0, smithy_client_1.expectString)(output.vpcIdentifier),
4770
- };
4771
- };
4772
- const de_TargetList = (output, context) => {
4773
- const retVal = (output || [])
4774
- .filter((e) => e != null)
4775
- .map((entry) => {
4776
- if (entry === null) {
4777
- return null;
4778
- }
4779
- return de_Target(entry, context);
3974
+ return (0, smithy_client_1.take)(output, {
3975
+ arn: smithy_client_1.expectString,
3976
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3977
+ id: smithy_client_1.expectString,
3978
+ ipAddressType: smithy_client_1.expectString,
3979
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3980
+ name: smithy_client_1.expectString,
3981
+ port: smithy_client_1.expectInt32,
3982
+ protocol: smithy_client_1.expectString,
3983
+ serviceArns: smithy_client_1._json,
3984
+ status: smithy_client_1.expectString,
3985
+ type: smithy_client_1.expectString,
3986
+ vpcIdentifier: smithy_client_1.expectString,
4780
3987
  });
4781
- return retVal;
4782
- };
4783
- const de_TargetSummary = (output, context) => {
4784
- return {
4785
- id: (0, smithy_client_1.expectString)(output.id),
4786
- port: (0, smithy_client_1.expectInt32)(output.port),
4787
- reasonCode: (0, smithy_client_1.expectString)(output.reasonCode),
4788
- status: (0, smithy_client_1.expectString)(output.status),
4789
- };
4790
- };
4791
- const de_TargetSummaryList = (output, context) => {
4792
- const retVal = (output || [])
4793
- .filter((e) => e != null)
4794
- .map((entry) => {
4795
- if (entry === null) {
4796
- return null;
4797
- }
4798
- return de_TargetSummary(entry, context);
4799
- });
4800
- return retVal;
4801
- };
4802
- const de_ValidationExceptionField = (output, context) => {
4803
- return {
4804
- message: (0, smithy_client_1.expectString)(output.message),
4805
- name: (0, smithy_client_1.expectString)(output.name),
4806
- };
4807
- };
4808
- const de_ValidationExceptionFieldList = (output, context) => {
4809
- const retVal = (output || [])
4810
- .filter((e) => e != null)
4811
- .map((entry) => {
4812
- if (entry === null) {
4813
- return null;
4814
- }
4815
- return de_ValidationExceptionField(entry, context);
4816
- });
4817
- return retVal;
4818
- };
4819
- const de_WeightedTargetGroup = (output, context) => {
4820
- return {
4821
- targetGroupIdentifier: (0, smithy_client_1.expectString)(output.targetGroupIdentifier),
4822
- weight: (0, smithy_client_1.expectInt32)(output.weight),
4823
- };
4824
- };
4825
- const de_WeightedTargetGroupList = (output, context) => {
4826
- const retVal = (output || [])
4827
- .filter((e) => e != null)
4828
- .map((entry) => {
4829
- if (entry === null) {
4830
- return null;
4831
- }
4832
- return de_WeightedTargetGroup(entry, context);
4833
- });
4834
- return retVal;
4835
3988
  };
4836
3989
  const deserializeMetadata = (output) => ({
4837
3990
  httpStatusCode: output.statusCode,