@aws-sdk/client-drs 3.312.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +32 -0
  2. package/dist-cjs/Drs.js +60 -0
  3. package/dist-cjs/commands/CreateLaunchConfigurationTemplateCommand.js +46 -0
  4. package/dist-cjs/commands/DeleteLaunchConfigurationTemplateCommand.js +45 -0
  5. package/dist-cjs/commands/DescribeLaunchConfigurationTemplatesCommand.js +46 -0
  6. package/dist-cjs/commands/UpdateLaunchConfigurationTemplateCommand.js +46 -0
  7. package/dist-cjs/commands/index.js +4 -0
  8. package/dist-cjs/models/models_0.js +39 -10
  9. package/dist-cjs/pagination/DescribeLaunchConfigurationTemplatesPaginator.js +29 -0
  10. package/dist-cjs/pagination/index.js +1 -0
  11. package/dist-cjs/protocols/Aws_restJson1.js +794 -1620
  12. package/dist-es/Drs.js +60 -0
  13. package/dist-es/commands/CreateLaunchConfigurationTemplateCommand.js +42 -0
  14. package/dist-es/commands/DeleteLaunchConfigurationTemplateCommand.js +41 -0
  15. package/dist-es/commands/DescribeLaunchConfigurationTemplatesCommand.js +42 -0
  16. package/dist-es/commands/UpdateLaunchConfigurationTemplateCommand.js +42 -0
  17. package/dist-es/commands/index.js +4 -0
  18. package/dist-es/models/models_0.js +32 -8
  19. package/dist-es/pagination/DescribeLaunchConfigurationTemplatesPaginator.js +25 -0
  20. package/dist-es/pagination/index.js +1 -0
  21. package/dist-es/protocols/Aws_restJson1.js +735 -1569
  22. package/dist-types/Drs.d.ts +32 -0
  23. package/dist-types/DrsClient.d.ts +6 -2
  24. package/dist-types/commands/CreateLaunchConfigurationTemplateCommand.d.ts +90 -0
  25. package/dist-types/commands/DeleteLaunchConfigurationTemplateCommand.d.ts +78 -0
  26. package/dist-types/commands/DescribeLaunchConfigurationTemplatesCommand.d.ts +82 -0
  27. package/dist-types/commands/UpdateLaunchConfigurationTemplateCommand.d.ts +88 -0
  28. package/dist-types/commands/index.d.ts +4 -0
  29. package/dist-types/models/models_0.d.ts +216 -34
  30. package/dist-types/pagination/DescribeLaunchConfigurationTemplatesPaginator.d.ts +7 -0
  31. package/dist-types/pagination/index.d.ts +1 -0
  32. package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
  33. package/dist-types/ts3.4/Drs.d.ts +92 -0
  34. package/dist-types/ts3.4/DrsClient.d.ts +24 -0
  35. package/dist-types/ts3.4/commands/CreateLaunchConfigurationTemplateCommand.d.ts +41 -0
  36. package/dist-types/ts3.4/commands/DeleteLaunchConfigurationTemplateCommand.d.ts +41 -0
  37. package/dist-types/ts3.4/commands/DescribeLaunchConfigurationTemplatesCommand.d.ts +41 -0
  38. package/dist-types/ts3.4/commands/UpdateLaunchConfigurationTemplateCommand.d.ts +41 -0
  39. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  40. package/dist-types/ts3.4/models/models_0.d.ts +82 -15
  41. package/dist-types/ts3.4/pagination/DescribeLaunchConfigurationTemplatesPaginator.d.ts +11 -0
  42. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  43. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
  44. package/package.json +6 -6
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetFailbackReplicationConfigurationCommand = exports.de_DisconnectSourceServerCommand = exports.de_DisconnectRecoveryInstanceCommand = exports.de_DescribeSourceServersCommand = exports.de_DescribeReplicationConfigurationTemplatesCommand = exports.de_DescribeRecoverySnapshotsCommand = exports.de_DescribeRecoveryInstancesCommand = exports.de_DescribeJobsCommand = exports.de_DescribeJobLogItemsCommand = exports.de_DeleteSourceServerCommand = exports.de_DeleteReplicationConfigurationTemplateCommand = exports.de_DeleteRecoveryInstanceCommand = exports.de_DeleteJobCommand = exports.de_CreateReplicationConfigurationTemplateCommand = exports.de_CreateExtendedSourceServerCommand = exports.se_UpdateReplicationConfigurationTemplateCommand = exports.se_UpdateReplicationConfigurationCommand = exports.se_UpdateLaunchConfigurationCommand = exports.se_UpdateFailbackReplicationConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TerminateRecoveryInstancesCommand = exports.se_TagResourceCommand = exports.se_StopReplicationCommand = exports.se_StopFailbackCommand = exports.se_StartReplicationCommand = exports.se_StartRecoveryCommand = exports.se_StartFailbackLaunchCommand = exports.se_ReverseReplicationCommand = exports.se_RetryDataReplicationCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStagingAccountsCommand = exports.se_ListExtensibleSourceServersCommand = exports.se_InitializeServiceCommand = exports.se_GetReplicationConfigurationCommand = exports.se_GetLaunchConfigurationCommand = exports.se_GetFailbackReplicationConfigurationCommand = exports.se_DisconnectSourceServerCommand = exports.se_DisconnectRecoveryInstanceCommand = exports.se_DescribeSourceServersCommand = exports.se_DescribeReplicationConfigurationTemplatesCommand = exports.se_DescribeRecoverySnapshotsCommand = exports.se_DescribeRecoveryInstancesCommand = exports.se_DescribeJobsCommand = exports.se_DescribeJobLogItemsCommand = exports.se_DeleteSourceServerCommand = exports.se_DeleteReplicationConfigurationTemplateCommand = exports.se_DeleteRecoveryInstanceCommand = exports.se_DeleteJobCommand = exports.se_CreateReplicationConfigurationTemplateCommand = exports.se_CreateExtendedSourceServerCommand = void 0;
4
- exports.de_UpdateReplicationConfigurationTemplateCommand = exports.de_UpdateReplicationConfigurationCommand = exports.de_UpdateLaunchConfigurationCommand = exports.de_UpdateFailbackReplicationConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TerminateRecoveryInstancesCommand = exports.de_TagResourceCommand = exports.de_StopReplicationCommand = exports.de_StopFailbackCommand = exports.de_StartReplicationCommand = exports.de_StartRecoveryCommand = exports.de_StartFailbackLaunchCommand = exports.de_ReverseReplicationCommand = exports.de_RetryDataReplicationCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStagingAccountsCommand = exports.de_ListExtensibleSourceServersCommand = exports.de_InitializeServiceCommand = exports.de_GetReplicationConfigurationCommand = exports.de_GetLaunchConfigurationCommand = void 0;
3
+ exports.de_DescribeLaunchConfigurationTemplatesCommand = exports.de_DescribeJobsCommand = exports.de_DescribeJobLogItemsCommand = exports.de_DeleteSourceServerCommand = exports.de_DeleteReplicationConfigurationTemplateCommand = exports.de_DeleteRecoveryInstanceCommand = exports.de_DeleteLaunchConfigurationTemplateCommand = exports.de_DeleteJobCommand = exports.de_CreateReplicationConfigurationTemplateCommand = exports.de_CreateLaunchConfigurationTemplateCommand = exports.de_CreateExtendedSourceServerCommand = exports.se_UpdateReplicationConfigurationTemplateCommand = exports.se_UpdateReplicationConfigurationCommand = exports.se_UpdateLaunchConfigurationTemplateCommand = exports.se_UpdateLaunchConfigurationCommand = exports.se_UpdateFailbackReplicationConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TerminateRecoveryInstancesCommand = exports.se_TagResourceCommand = exports.se_StopReplicationCommand = exports.se_StopFailbackCommand = exports.se_StartReplicationCommand = exports.se_StartRecoveryCommand = exports.se_StartFailbackLaunchCommand = exports.se_ReverseReplicationCommand = exports.se_RetryDataReplicationCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStagingAccountsCommand = exports.se_ListExtensibleSourceServersCommand = exports.se_InitializeServiceCommand = exports.se_GetReplicationConfigurationCommand = exports.se_GetLaunchConfigurationCommand = exports.se_GetFailbackReplicationConfigurationCommand = exports.se_DisconnectSourceServerCommand = exports.se_DisconnectRecoveryInstanceCommand = exports.se_DescribeSourceServersCommand = exports.se_DescribeReplicationConfigurationTemplatesCommand = exports.se_DescribeRecoverySnapshotsCommand = exports.se_DescribeRecoveryInstancesCommand = exports.se_DescribeLaunchConfigurationTemplatesCommand = exports.se_DescribeJobsCommand = exports.se_DescribeJobLogItemsCommand = exports.se_DeleteSourceServerCommand = exports.se_DeleteReplicationConfigurationTemplateCommand = exports.se_DeleteRecoveryInstanceCommand = exports.se_DeleteLaunchConfigurationTemplateCommand = exports.se_DeleteJobCommand = exports.se_CreateReplicationConfigurationTemplateCommand = exports.se_CreateLaunchConfigurationTemplateCommand = exports.se_CreateExtendedSourceServerCommand = void 0;
4
+ exports.de_UpdateReplicationConfigurationTemplateCommand = exports.de_UpdateReplicationConfigurationCommand = exports.de_UpdateLaunchConfigurationTemplateCommand = exports.de_UpdateLaunchConfigurationCommand = exports.de_UpdateFailbackReplicationConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TerminateRecoveryInstancesCommand = exports.de_TagResourceCommand = exports.de_StopReplicationCommand = exports.de_StopFailbackCommand = exports.de_StartReplicationCommand = exports.de_StartRecoveryCommand = exports.de_StartFailbackLaunchCommand = exports.de_ReverseReplicationCommand = exports.de_RetryDataReplicationCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStagingAccountsCommand = exports.de_ListExtensibleSourceServersCommand = exports.de_InitializeServiceCommand = exports.de_GetReplicationConfigurationCommand = exports.de_GetLaunchConfigurationCommand = exports.de_GetFailbackReplicationConfigurationCommand = exports.de_DisconnectSourceServerCommand = exports.de_DisconnectRecoveryInstanceCommand = exports.de_DescribeSourceServersCommand = exports.de_DescribeReplicationConfigurationTemplatesCommand = exports.de_DescribeRecoverySnapshotsCommand = exports.de_DescribeRecoveryInstancesCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const DrsServiceException_1 = require("../models/DrsServiceException");
@@ -13,10 +13,10 @@ const se_CreateExtendedSourceServerCommand = async (input, context) => {
13
13
  };
14
14
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateExtendedSourceServer";
15
15
  let body;
16
- body = JSON.stringify({
17
- ...(input.sourceServerArn != null && { sourceServerArn: input.sourceServerArn }),
18
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
19
- });
16
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
17
+ sourceServerArn: [],
18
+ tags: (_) => (0, smithy_client_1._json)(_),
19
+ }));
20
20
  return new protocol_http_1.HttpRequest({
21
21
  protocol,
22
22
  hostname,
@@ -28,6 +28,32 @@ const se_CreateExtendedSourceServerCommand = async (input, context) => {
28
28
  });
29
29
  };
30
30
  exports.se_CreateExtendedSourceServerCommand = se_CreateExtendedSourceServerCommand;
31
+ const se_CreateLaunchConfigurationTemplateCommand = async (input, context) => {
32
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
+ const headers = {
34
+ "content-type": "application/json",
35
+ };
36
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateLaunchConfigurationTemplate";
37
+ let body;
38
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
39
+ copyPrivateIp: [],
40
+ copyTags: [],
41
+ launchDisposition: [],
42
+ licensing: (_) => (0, smithy_client_1._json)(_),
43
+ tags: (_) => (0, smithy_client_1._json)(_),
44
+ targetInstanceTypeRightSizingMethod: [],
45
+ }));
46
+ return new protocol_http_1.HttpRequest({
47
+ protocol,
48
+ hostname,
49
+ port,
50
+ method: "POST",
51
+ headers,
52
+ path: resolvedPath,
53
+ body,
54
+ });
55
+ };
56
+ exports.se_CreateLaunchConfigurationTemplateCommand = se_CreateLaunchConfigurationTemplateCommand;
31
57
  const se_CreateReplicationConfigurationTemplateCommand = async (input, context) => {
32
58
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
59
  const headers = {
@@ -35,33 +61,23 @@ const se_CreateReplicationConfigurationTemplateCommand = async (input, context)
35
61
  };
36
62
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateReplicationConfigurationTemplate";
37
63
  let body;
38
- body = JSON.stringify({
39
- ...(input.associateDefaultSecurityGroup != null && {
40
- associateDefaultSecurityGroup: input.associateDefaultSecurityGroup,
41
- }),
42
- ...(input.autoReplicateNewDisks != null && { autoReplicateNewDisks: input.autoReplicateNewDisks }),
43
- ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }),
44
- ...(input.createPublicIP != null && { createPublicIP: input.createPublicIP }),
45
- ...(input.dataPlaneRouting != null && { dataPlaneRouting: input.dataPlaneRouting }),
46
- ...(input.defaultLargeStagingDiskType != null && {
47
- defaultLargeStagingDiskType: input.defaultLargeStagingDiskType,
48
- }),
49
- ...(input.ebsEncryption != null && { ebsEncryption: input.ebsEncryption }),
50
- ...(input.ebsEncryptionKeyArn != null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }),
51
- ...(input.pitPolicy != null && { pitPolicy: se_PITPolicy(input.pitPolicy, context) }),
52
- ...(input.replicationServerInstanceType != null && {
53
- replicationServerInstanceType: input.replicationServerInstanceType,
54
- }),
55
- ...(input.replicationServersSecurityGroupsIDs != null && {
56
- replicationServersSecurityGroupsIDs: se_ReplicationServersSecurityGroupsIDs(input.replicationServersSecurityGroupsIDs, context),
57
- }),
58
- ...(input.stagingAreaSubnetId != null && { stagingAreaSubnetId: input.stagingAreaSubnetId }),
59
- ...(input.stagingAreaTags != null && { stagingAreaTags: se_TagsMap(input.stagingAreaTags, context) }),
60
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
61
- ...(input.useDedicatedReplicationServer != null && {
62
- useDedicatedReplicationServer: input.useDedicatedReplicationServer,
63
- }),
64
- });
64
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
65
+ associateDefaultSecurityGroup: [],
66
+ autoReplicateNewDisks: [],
67
+ bandwidthThrottling: [],
68
+ createPublicIP: [],
69
+ dataPlaneRouting: [],
70
+ defaultLargeStagingDiskType: [],
71
+ ebsEncryption: [],
72
+ ebsEncryptionKeyArn: [],
73
+ pitPolicy: (_) => (0, smithy_client_1._json)(_),
74
+ replicationServerInstanceType: [],
75
+ replicationServersSecurityGroupsIDs: (_) => (0, smithy_client_1._json)(_),
76
+ stagingAreaSubnetId: [],
77
+ stagingAreaTags: (_) => (0, smithy_client_1._json)(_),
78
+ tags: (_) => (0, smithy_client_1._json)(_),
79
+ useDedicatedReplicationServer: [],
80
+ }));
65
81
  return new protocol_http_1.HttpRequest({
66
82
  protocol,
67
83
  hostname,
@@ -80,9 +96,9 @@ const se_DeleteJobCommand = async (input, context) => {
80
96
  };
81
97
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteJob";
82
98
  let body;
83
- body = JSON.stringify({
84
- ...(input.jobID != null && { jobID: input.jobID }),
85
- });
99
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
100
+ jobID: [],
101
+ }));
86
102
  return new protocol_http_1.HttpRequest({
87
103
  protocol,
88
104
  hostname,
@@ -94,6 +110,27 @@ const se_DeleteJobCommand = async (input, context) => {
94
110
  });
95
111
  };
96
112
  exports.se_DeleteJobCommand = se_DeleteJobCommand;
113
+ const se_DeleteLaunchConfigurationTemplateCommand = async (input, context) => {
114
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
115
+ const headers = {
116
+ "content-type": "application/json",
117
+ };
118
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteLaunchConfigurationTemplate";
119
+ let body;
120
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
121
+ launchConfigurationTemplateID: [],
122
+ }));
123
+ return new protocol_http_1.HttpRequest({
124
+ protocol,
125
+ hostname,
126
+ port,
127
+ method: "POST",
128
+ headers,
129
+ path: resolvedPath,
130
+ body,
131
+ });
132
+ };
133
+ exports.se_DeleteLaunchConfigurationTemplateCommand = se_DeleteLaunchConfigurationTemplateCommand;
97
134
  const se_DeleteRecoveryInstanceCommand = async (input, context) => {
98
135
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
136
  const headers = {
@@ -101,9 +138,9 @@ const se_DeleteRecoveryInstanceCommand = async (input, context) => {
101
138
  };
102
139
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteRecoveryInstance";
103
140
  let body;
104
- body = JSON.stringify({
105
- ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }),
106
- });
141
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
142
+ recoveryInstanceID: [],
143
+ }));
107
144
  return new protocol_http_1.HttpRequest({
108
145
  protocol,
109
146
  hostname,
@@ -122,11 +159,9 @@ const se_DeleteReplicationConfigurationTemplateCommand = async (input, context)
122
159
  };
123
160
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteReplicationConfigurationTemplate";
124
161
  let body;
125
- body = JSON.stringify({
126
- ...(input.replicationConfigurationTemplateID != null && {
127
- replicationConfigurationTemplateID: input.replicationConfigurationTemplateID,
128
- }),
129
- });
162
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
163
+ replicationConfigurationTemplateID: [],
164
+ }));
130
165
  return new protocol_http_1.HttpRequest({
131
166
  protocol,
132
167
  hostname,
@@ -145,9 +180,9 @@ const se_DeleteSourceServerCommand = async (input, context) => {
145
180
  };
146
181
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteSourceServer";
147
182
  let body;
148
- body = JSON.stringify({
149
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
150
- });
183
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
184
+ sourceServerID: [],
185
+ }));
151
186
  return new protocol_http_1.HttpRequest({
152
187
  protocol,
153
188
  hostname,
@@ -166,11 +201,11 @@ const se_DescribeJobLogItemsCommand = async (input, context) => {
166
201
  };
167
202
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeJobLogItems";
168
203
  let body;
169
- body = JSON.stringify({
170
- ...(input.jobID != null && { jobID: input.jobID }),
171
- ...(input.maxResults != null && { maxResults: input.maxResults }),
172
- ...(input.nextToken != null && { nextToken: input.nextToken }),
173
- });
204
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
205
+ jobID: [],
206
+ maxResults: [],
207
+ nextToken: [],
208
+ }));
174
209
  return new protocol_http_1.HttpRequest({
175
210
  protocol,
176
211
  hostname,
@@ -189,11 +224,11 @@ const se_DescribeJobsCommand = async (input, context) => {
189
224
  };
190
225
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeJobs";
191
226
  let body;
192
- body = JSON.stringify({
193
- ...(input.filters != null && { filters: se_DescribeJobsRequestFilters(input.filters, context) }),
194
- ...(input.maxResults != null && { maxResults: input.maxResults }),
195
- ...(input.nextToken != null && { nextToken: input.nextToken }),
196
- });
227
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
228
+ filters: (_) => (0, smithy_client_1._json)(_),
229
+ maxResults: [],
230
+ nextToken: [],
231
+ }));
197
232
  return new protocol_http_1.HttpRequest({
198
233
  protocol,
199
234
  hostname,
@@ -205,6 +240,29 @@ const se_DescribeJobsCommand = async (input, context) => {
205
240
  });
206
241
  };
207
242
  exports.se_DescribeJobsCommand = se_DescribeJobsCommand;
243
+ const se_DescribeLaunchConfigurationTemplatesCommand = async (input, context) => {
244
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
245
+ const headers = {
246
+ "content-type": "application/json",
247
+ };
248
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeLaunchConfigurationTemplates";
249
+ let body;
250
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
251
+ launchConfigurationTemplateIDs: (_) => (0, smithy_client_1._json)(_),
252
+ maxResults: [],
253
+ nextToken: [],
254
+ }));
255
+ return new protocol_http_1.HttpRequest({
256
+ protocol,
257
+ hostname,
258
+ port,
259
+ method: "POST",
260
+ headers,
261
+ path: resolvedPath,
262
+ body,
263
+ });
264
+ };
265
+ exports.se_DescribeLaunchConfigurationTemplatesCommand = se_DescribeLaunchConfigurationTemplatesCommand;
208
266
  const se_DescribeRecoveryInstancesCommand = async (input, context) => {
209
267
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
210
268
  const headers = {
@@ -212,11 +270,11 @@ const se_DescribeRecoveryInstancesCommand = async (input, context) => {
212
270
  };
213
271
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeRecoveryInstances";
214
272
  let body;
215
- body = JSON.stringify({
216
- ...(input.filters != null && { filters: se_DescribeRecoveryInstancesRequestFilters(input.filters, context) }),
217
- ...(input.maxResults != null && { maxResults: input.maxResults }),
218
- ...(input.nextToken != null && { nextToken: input.nextToken }),
219
- });
273
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
274
+ filters: (_) => (0, smithy_client_1._json)(_),
275
+ maxResults: [],
276
+ nextToken: [],
277
+ }));
220
278
  return new protocol_http_1.HttpRequest({
221
279
  protocol,
222
280
  hostname,
@@ -235,13 +293,13 @@ const se_DescribeRecoverySnapshotsCommand = async (input, context) => {
235
293
  };
236
294
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeRecoverySnapshots";
237
295
  let body;
238
- body = JSON.stringify({
239
- ...(input.filters != null && { filters: se_DescribeRecoverySnapshotsRequestFilters(input.filters, context) }),
240
- ...(input.maxResults != null && { maxResults: input.maxResults }),
241
- ...(input.nextToken != null && { nextToken: input.nextToken }),
242
- ...(input.order != null && { order: input.order }),
243
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
244
- });
296
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
297
+ filters: (_) => (0, smithy_client_1._json)(_),
298
+ maxResults: [],
299
+ nextToken: [],
300
+ order: [],
301
+ sourceServerID: [],
302
+ }));
245
303
  return new protocol_http_1.HttpRequest({
246
304
  protocol,
247
305
  hostname,
@@ -261,13 +319,11 @@ const se_DescribeReplicationConfigurationTemplatesCommand = async (input, contex
261
319
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
262
320
  "/DescribeReplicationConfigurationTemplates";
263
321
  let body;
264
- body = JSON.stringify({
265
- ...(input.maxResults != null && { maxResults: input.maxResults }),
266
- ...(input.nextToken != null && { nextToken: input.nextToken }),
267
- ...(input.replicationConfigurationTemplateIDs != null && {
268
- replicationConfigurationTemplateIDs: se_ReplicationConfigurationTemplateIDs(input.replicationConfigurationTemplateIDs, context),
269
- }),
270
- });
322
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
323
+ maxResults: [],
324
+ nextToken: [],
325
+ replicationConfigurationTemplateIDs: (_) => (0, smithy_client_1._json)(_),
326
+ }));
271
327
  return new protocol_http_1.HttpRequest({
272
328
  protocol,
273
329
  hostname,
@@ -286,11 +342,11 @@ const se_DescribeSourceServersCommand = async (input, context) => {
286
342
  };
287
343
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSourceServers";
288
344
  let body;
289
- body = JSON.stringify({
290
- ...(input.filters != null && { filters: se_DescribeSourceServersRequestFilters(input.filters, context) }),
291
- ...(input.maxResults != null && { maxResults: input.maxResults }),
292
- ...(input.nextToken != null && { nextToken: input.nextToken }),
293
- });
345
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
346
+ filters: (_) => (0, smithy_client_1._json)(_),
347
+ maxResults: [],
348
+ nextToken: [],
349
+ }));
294
350
  return new protocol_http_1.HttpRequest({
295
351
  protocol,
296
352
  hostname,
@@ -309,9 +365,9 @@ const se_DisconnectRecoveryInstanceCommand = async (input, context) => {
309
365
  };
310
366
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisconnectRecoveryInstance";
311
367
  let body;
312
- body = JSON.stringify({
313
- ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }),
314
- });
368
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
369
+ recoveryInstanceID: [],
370
+ }));
315
371
  return new protocol_http_1.HttpRequest({
316
372
  protocol,
317
373
  hostname,
@@ -330,9 +386,9 @@ const se_DisconnectSourceServerCommand = async (input, context) => {
330
386
  };
331
387
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisconnectSourceServer";
332
388
  let body;
333
- body = JSON.stringify({
334
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
335
- });
389
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
390
+ sourceServerID: [],
391
+ }));
336
392
  return new protocol_http_1.HttpRequest({
337
393
  protocol,
338
394
  hostname,
@@ -351,9 +407,9 @@ const se_GetFailbackReplicationConfigurationCommand = async (input, context) =>
351
407
  };
352
408
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetFailbackReplicationConfiguration";
353
409
  let body;
354
- body = JSON.stringify({
355
- ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }),
356
- });
410
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
411
+ recoveryInstanceID: [],
412
+ }));
357
413
  return new protocol_http_1.HttpRequest({
358
414
  protocol,
359
415
  hostname,
@@ -372,9 +428,9 @@ const se_GetLaunchConfigurationCommand = async (input, context) => {
372
428
  };
373
429
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetLaunchConfiguration";
374
430
  let body;
375
- body = JSON.stringify({
376
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
377
- });
431
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
432
+ sourceServerID: [],
433
+ }));
378
434
  return new protocol_http_1.HttpRequest({
379
435
  protocol,
380
436
  hostname,
@@ -393,9 +449,9 @@ const se_GetReplicationConfigurationCommand = async (input, context) => {
393
449
  };
394
450
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetReplicationConfiguration";
395
451
  let body;
396
- body = JSON.stringify({
397
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
398
- });
452
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
453
+ sourceServerID: [],
454
+ }));
399
455
  return new protocol_http_1.HttpRequest({
400
456
  protocol,
401
457
  hostname,
@@ -433,11 +489,11 @@ const se_ListExtensibleSourceServersCommand = async (input, context) => {
433
489
  };
434
490
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListExtensibleSourceServers";
435
491
  let body;
436
- body = JSON.stringify({
437
- ...(input.maxResults != null && { maxResults: input.maxResults }),
438
- ...(input.nextToken != null && { nextToken: input.nextToken }),
439
- ...(input.stagingAccountID != null && { stagingAccountID: input.stagingAccountID }),
440
- });
492
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
493
+ maxResults: [],
494
+ nextToken: [],
495
+ stagingAccountID: [],
496
+ }));
441
497
  return new protocol_http_1.HttpRequest({
442
498
  protocol,
443
499
  hostname,
@@ -453,7 +509,7 @@ const se_ListStagingAccountsCommand = async (input, context) => {
453
509
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
454
510
  const headers = {};
455
511
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStagingAccounts";
456
- const query = map({
512
+ const query = (0, smithy_client_1.map)({
457
513
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
458
514
  nextToken: [, input.nextToken],
459
515
  });
@@ -494,9 +550,9 @@ const se_RetryDataReplicationCommand = async (input, context) => {
494
550
  };
495
551
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RetryDataReplication";
496
552
  let body;
497
- body = JSON.stringify({
498
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
499
- });
553
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
554
+ sourceServerID: [],
555
+ }));
500
556
  return new protocol_http_1.HttpRequest({
501
557
  protocol,
502
558
  hostname,
@@ -515,9 +571,9 @@ const se_ReverseReplicationCommand = async (input, context) => {
515
571
  };
516
572
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ReverseReplication";
517
573
  let body;
518
- body = JSON.stringify({
519
- ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }),
520
- });
574
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
575
+ recoveryInstanceID: [],
576
+ }));
521
577
  return new protocol_http_1.HttpRequest({
522
578
  protocol,
523
579
  hostname,
@@ -536,12 +592,10 @@ const se_StartFailbackLaunchCommand = async (input, context) => {
536
592
  };
537
593
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartFailbackLaunch";
538
594
  let body;
539
- body = JSON.stringify({
540
- ...(input.recoveryInstanceIDs != null && {
541
- recoveryInstanceIDs: se_StartFailbackRequestRecoveryInstanceIDs(input.recoveryInstanceIDs, context),
542
- }),
543
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
544
- });
595
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
596
+ recoveryInstanceIDs: (_) => (0, smithy_client_1._json)(_),
597
+ tags: (_) => (0, smithy_client_1._json)(_),
598
+ }));
545
599
  return new protocol_http_1.HttpRequest({
546
600
  protocol,
547
601
  hostname,
@@ -560,13 +614,11 @@ const se_StartRecoveryCommand = async (input, context) => {
560
614
  };
561
615
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartRecovery";
562
616
  let body;
563
- body = JSON.stringify({
564
- ...(input.isDrill != null && { isDrill: input.isDrill }),
565
- ...(input.sourceServers != null && {
566
- sourceServers: se_StartRecoveryRequestSourceServers(input.sourceServers, context),
567
- }),
568
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
569
- });
617
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
618
+ isDrill: [],
619
+ sourceServers: (_) => (0, smithy_client_1._json)(_),
620
+ tags: (_) => (0, smithy_client_1._json)(_),
621
+ }));
570
622
  return new protocol_http_1.HttpRequest({
571
623
  protocol,
572
624
  hostname,
@@ -585,9 +637,9 @@ const se_StartReplicationCommand = async (input, context) => {
585
637
  };
586
638
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartReplication";
587
639
  let body;
588
- body = JSON.stringify({
589
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
590
- });
640
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
641
+ sourceServerID: [],
642
+ }));
591
643
  return new protocol_http_1.HttpRequest({
592
644
  protocol,
593
645
  hostname,
@@ -606,9 +658,9 @@ const se_StopFailbackCommand = async (input, context) => {
606
658
  };
607
659
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopFailback";
608
660
  let body;
609
- body = JSON.stringify({
610
- ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }),
611
- });
661
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
662
+ recoveryInstanceID: [],
663
+ }));
612
664
  return new protocol_http_1.HttpRequest({
613
665
  protocol,
614
666
  hostname,
@@ -627,9 +679,9 @@ const se_StopReplicationCommand = async (input, context) => {
627
679
  };
628
680
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopReplication";
629
681
  let body;
630
- body = JSON.stringify({
631
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
632
- });
682
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
683
+ sourceServerID: [],
684
+ }));
633
685
  return new protocol_http_1.HttpRequest({
634
686
  protocol,
635
687
  hostname,
@@ -649,9 +701,9 @@ const se_TagResourceCommand = async (input, context) => {
649
701
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
650
702
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
651
703
  let body;
652
- body = JSON.stringify({
653
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
654
- });
704
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
705
+ tags: (_) => (0, smithy_client_1._json)(_),
706
+ }));
655
707
  return new protocol_http_1.HttpRequest({
656
708
  protocol,
657
709
  hostname,
@@ -670,11 +722,9 @@ const se_TerminateRecoveryInstancesCommand = async (input, context) => {
670
722
  };
671
723
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TerminateRecoveryInstances";
672
724
  let body;
673
- body = JSON.stringify({
674
- ...(input.recoveryInstanceIDs != null && {
675
- recoveryInstanceIDs: se_RecoveryInstancesForTerminationRequest(input.recoveryInstanceIDs, context),
676
- }),
677
- });
725
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
726
+ recoveryInstanceIDs: (_) => (0, smithy_client_1._json)(_),
727
+ }));
678
728
  return new protocol_http_1.HttpRequest({
679
729
  protocol,
680
730
  hostname,
@@ -691,7 +741,7 @@ const se_UntagResourceCommand = async (input, context) => {
691
741
  const headers = {};
692
742
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
693
743
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
694
- const query = map({
744
+ const query = (0, smithy_client_1.map)({
695
745
  tagKeys: [
696
746
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
697
747
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -717,12 +767,12 @@ const se_UpdateFailbackReplicationConfigurationCommand = async (input, context)
717
767
  };
718
768
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateFailbackReplicationConfiguration";
719
769
  let body;
720
- body = JSON.stringify({
721
- ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }),
722
- ...(input.name != null && { name: input.name }),
723
- ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }),
724
- ...(input.usePrivateIP != null && { usePrivateIP: input.usePrivateIP }),
725
- });
770
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
771
+ bandwidthThrottling: [],
772
+ name: [],
773
+ recoveryInstanceID: [],
774
+ usePrivateIP: [],
775
+ }));
726
776
  return new protocol_http_1.HttpRequest({
727
777
  protocol,
728
778
  hostname,
@@ -741,17 +791,15 @@ const se_UpdateLaunchConfigurationCommand = async (input, context) => {
741
791
  };
742
792
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLaunchConfiguration";
743
793
  let body;
744
- body = JSON.stringify({
745
- ...(input.copyPrivateIp != null && { copyPrivateIp: input.copyPrivateIp }),
746
- ...(input.copyTags != null && { copyTags: input.copyTags }),
747
- ...(input.launchDisposition != null && { launchDisposition: input.launchDisposition }),
748
- ...(input.licensing != null && { licensing: se_Licensing(input.licensing, context) }),
749
- ...(input.name != null && { name: input.name }),
750
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
751
- ...(input.targetInstanceTypeRightSizingMethod != null && {
752
- targetInstanceTypeRightSizingMethod: input.targetInstanceTypeRightSizingMethod,
753
- }),
754
- });
794
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
795
+ copyPrivateIp: [],
796
+ copyTags: [],
797
+ launchDisposition: [],
798
+ licensing: (_) => (0, smithy_client_1._json)(_),
799
+ name: [],
800
+ sourceServerID: [],
801
+ targetInstanceTypeRightSizingMethod: [],
802
+ }));
755
803
  return new protocol_http_1.HttpRequest({
756
804
  protocol,
757
805
  hostname,
@@ -763,6 +811,32 @@ const se_UpdateLaunchConfigurationCommand = async (input, context) => {
763
811
  });
764
812
  };
765
813
  exports.se_UpdateLaunchConfigurationCommand = se_UpdateLaunchConfigurationCommand;
814
+ const se_UpdateLaunchConfigurationTemplateCommand = async (input, context) => {
815
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
816
+ const headers = {
817
+ "content-type": "application/json",
818
+ };
819
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLaunchConfigurationTemplate";
820
+ let body;
821
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
822
+ copyPrivateIp: [],
823
+ copyTags: [],
824
+ launchConfigurationTemplateID: [],
825
+ launchDisposition: [],
826
+ licensing: (_) => (0, smithy_client_1._json)(_),
827
+ targetInstanceTypeRightSizingMethod: [],
828
+ }));
829
+ return new protocol_http_1.HttpRequest({
830
+ protocol,
831
+ hostname,
832
+ port,
833
+ method: "POST",
834
+ headers,
835
+ path: resolvedPath,
836
+ body,
837
+ });
838
+ };
839
+ exports.se_UpdateLaunchConfigurationTemplateCommand = se_UpdateLaunchConfigurationTemplateCommand;
766
840
  const se_UpdateReplicationConfigurationCommand = async (input, context) => {
767
841
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
768
842
  const headers = {
@@ -770,37 +844,25 @@ const se_UpdateReplicationConfigurationCommand = async (input, context) => {
770
844
  };
771
845
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateReplicationConfiguration";
772
846
  let body;
773
- body = JSON.stringify({
774
- ...(input.associateDefaultSecurityGroup != null && {
775
- associateDefaultSecurityGroup: input.associateDefaultSecurityGroup,
776
- }),
777
- ...(input.autoReplicateNewDisks != null && { autoReplicateNewDisks: input.autoReplicateNewDisks }),
778
- ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }),
779
- ...(input.createPublicIP != null && { createPublicIP: input.createPublicIP }),
780
- ...(input.dataPlaneRouting != null && { dataPlaneRouting: input.dataPlaneRouting }),
781
- ...(input.defaultLargeStagingDiskType != null && {
782
- defaultLargeStagingDiskType: input.defaultLargeStagingDiskType,
783
- }),
784
- ...(input.ebsEncryption != null && { ebsEncryption: input.ebsEncryption }),
785
- ...(input.ebsEncryptionKeyArn != null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }),
786
- ...(input.name != null && { name: input.name }),
787
- ...(input.pitPolicy != null && { pitPolicy: se_PITPolicy(input.pitPolicy, context) }),
788
- ...(input.replicatedDisks != null && {
789
- replicatedDisks: se_ReplicationConfigurationReplicatedDisks(input.replicatedDisks, context),
790
- }),
791
- ...(input.replicationServerInstanceType != null && {
792
- replicationServerInstanceType: input.replicationServerInstanceType,
793
- }),
794
- ...(input.replicationServersSecurityGroupsIDs != null && {
795
- replicationServersSecurityGroupsIDs: se_ReplicationServersSecurityGroupsIDs(input.replicationServersSecurityGroupsIDs, context),
796
- }),
797
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
798
- ...(input.stagingAreaSubnetId != null && { stagingAreaSubnetId: input.stagingAreaSubnetId }),
799
- ...(input.stagingAreaTags != null && { stagingAreaTags: se_TagsMap(input.stagingAreaTags, context) }),
800
- ...(input.useDedicatedReplicationServer != null && {
801
- useDedicatedReplicationServer: input.useDedicatedReplicationServer,
802
- }),
803
- });
847
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
848
+ associateDefaultSecurityGroup: [],
849
+ autoReplicateNewDisks: [],
850
+ bandwidthThrottling: [],
851
+ createPublicIP: [],
852
+ dataPlaneRouting: [],
853
+ defaultLargeStagingDiskType: [],
854
+ ebsEncryption: [],
855
+ ebsEncryptionKeyArn: [],
856
+ name: [],
857
+ pitPolicy: (_) => (0, smithy_client_1._json)(_),
858
+ replicatedDisks: (_) => (0, smithy_client_1._json)(_),
859
+ replicationServerInstanceType: [],
860
+ replicationServersSecurityGroupsIDs: (_) => (0, smithy_client_1._json)(_),
861
+ sourceServerID: [],
862
+ stagingAreaSubnetId: [],
863
+ stagingAreaTags: (_) => (0, smithy_client_1._json)(_),
864
+ useDedicatedReplicationServer: [],
865
+ }));
804
866
  return new protocol_http_1.HttpRequest({
805
867
  protocol,
806
868
  hostname,
@@ -819,36 +881,24 @@ const se_UpdateReplicationConfigurationTemplateCommand = async (input, context)
819
881
  };
820
882
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateReplicationConfigurationTemplate";
821
883
  let body;
822
- body = JSON.stringify({
823
- ...(input.arn != null && { arn: input.arn }),
824
- ...(input.associateDefaultSecurityGroup != null && {
825
- associateDefaultSecurityGroup: input.associateDefaultSecurityGroup,
826
- }),
827
- ...(input.autoReplicateNewDisks != null && { autoReplicateNewDisks: input.autoReplicateNewDisks }),
828
- ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }),
829
- ...(input.createPublicIP != null && { createPublicIP: input.createPublicIP }),
830
- ...(input.dataPlaneRouting != null && { dataPlaneRouting: input.dataPlaneRouting }),
831
- ...(input.defaultLargeStagingDiskType != null && {
832
- defaultLargeStagingDiskType: input.defaultLargeStagingDiskType,
833
- }),
834
- ...(input.ebsEncryption != null && { ebsEncryption: input.ebsEncryption }),
835
- ...(input.ebsEncryptionKeyArn != null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }),
836
- ...(input.pitPolicy != null && { pitPolicy: se_PITPolicy(input.pitPolicy, context) }),
837
- ...(input.replicationConfigurationTemplateID != null && {
838
- replicationConfigurationTemplateID: input.replicationConfigurationTemplateID,
839
- }),
840
- ...(input.replicationServerInstanceType != null && {
841
- replicationServerInstanceType: input.replicationServerInstanceType,
842
- }),
843
- ...(input.replicationServersSecurityGroupsIDs != null && {
844
- replicationServersSecurityGroupsIDs: se_ReplicationServersSecurityGroupsIDs(input.replicationServersSecurityGroupsIDs, context),
845
- }),
846
- ...(input.stagingAreaSubnetId != null && { stagingAreaSubnetId: input.stagingAreaSubnetId }),
847
- ...(input.stagingAreaTags != null && { stagingAreaTags: se_TagsMap(input.stagingAreaTags, context) }),
848
- ...(input.useDedicatedReplicationServer != null && {
849
- useDedicatedReplicationServer: input.useDedicatedReplicationServer,
850
- }),
851
- });
884
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
885
+ arn: [],
886
+ associateDefaultSecurityGroup: [],
887
+ autoReplicateNewDisks: [],
888
+ bandwidthThrottling: [],
889
+ createPublicIP: [],
890
+ dataPlaneRouting: [],
891
+ defaultLargeStagingDiskType: [],
892
+ ebsEncryption: [],
893
+ ebsEncryptionKeyArn: [],
894
+ pitPolicy: (_) => (0, smithy_client_1._json)(_),
895
+ replicationConfigurationTemplateID: [],
896
+ replicationServerInstanceType: [],
897
+ replicationServersSecurityGroupsIDs: (_) => (0, smithy_client_1._json)(_),
898
+ stagingAreaSubnetId: [],
899
+ stagingAreaTags: (_) => (0, smithy_client_1._json)(_),
900
+ useDedicatedReplicationServer: [],
901
+ }));
852
902
  return new protocol_http_1.HttpRequest({
853
903
  protocol,
854
904
  hostname,
@@ -864,13 +914,14 @@ const de_CreateExtendedSourceServerCommand = async (output, context) => {
864
914
  if (output.statusCode !== 201 && output.statusCode >= 300) {
865
915
  return de_CreateExtendedSourceServerCommandError(output, context);
866
916
  }
867
- const contents = map({
917
+ const contents = (0, smithy_client_1.map)({
868
918
  $metadata: deserializeMetadata(output),
869
919
  });
870
920
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
871
- if (data.sourceServer != null) {
872
- contents.sourceServer = de_SourceServer(data.sourceServer, context);
873
- }
921
+ const doc = (0, smithy_client_1.take)(data, {
922
+ sourceServer: smithy_client_1._json,
923
+ });
924
+ Object.assign(contents, doc);
874
925
  return contents;
875
926
  };
876
927
  exports.de_CreateExtendedSourceServerCommand = de_CreateExtendedSourceServerCommand;
@@ -904,73 +955,90 @@ const de_CreateExtendedSourceServerCommandError = async (output, context) => {
904
955
  throw await de_ValidationExceptionRes(parsedOutput, context);
905
956
  default:
906
957
  const parsedBody = parsedOutput.body;
907
- (0, smithy_client_1.throwDefaultError)({
958
+ return throwDefaultError({
908
959
  output,
909
960
  parsedBody,
910
- exceptionCtor: DrsServiceException_1.DrsServiceException,
911
961
  errorCode,
912
962
  });
913
963
  }
914
964
  };
915
- const de_CreateReplicationConfigurationTemplateCommand = async (output, context) => {
965
+ const de_CreateLaunchConfigurationTemplateCommand = async (output, context) => {
916
966
  if (output.statusCode !== 201 && output.statusCode >= 300) {
917
- return de_CreateReplicationConfigurationTemplateCommandError(output, context);
967
+ return de_CreateLaunchConfigurationTemplateCommandError(output, context);
918
968
  }
919
- const contents = map({
969
+ const contents = (0, smithy_client_1.map)({
920
970
  $metadata: deserializeMetadata(output),
921
971
  });
922
972
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
923
- if (data.arn != null) {
924
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
925
- }
926
- if (data.associateDefaultSecurityGroup != null) {
927
- contents.associateDefaultSecurityGroup = (0, smithy_client_1.expectBoolean)(data.associateDefaultSecurityGroup);
928
- }
929
- if (data.autoReplicateNewDisks != null) {
930
- contents.autoReplicateNewDisks = (0, smithy_client_1.expectBoolean)(data.autoReplicateNewDisks);
931
- }
932
- if (data.bandwidthThrottling != null) {
933
- contents.bandwidthThrottling = (0, smithy_client_1.expectLong)(data.bandwidthThrottling);
934
- }
935
- if (data.createPublicIP != null) {
936
- contents.createPublicIP = (0, smithy_client_1.expectBoolean)(data.createPublicIP);
937
- }
938
- if (data.dataPlaneRouting != null) {
939
- contents.dataPlaneRouting = (0, smithy_client_1.expectString)(data.dataPlaneRouting);
940
- }
941
- if (data.defaultLargeStagingDiskType != null) {
942
- contents.defaultLargeStagingDiskType = (0, smithy_client_1.expectString)(data.defaultLargeStagingDiskType);
943
- }
944
- if (data.ebsEncryption != null) {
945
- contents.ebsEncryption = (0, smithy_client_1.expectString)(data.ebsEncryption);
946
- }
947
- if (data.ebsEncryptionKeyArn != null) {
948
- contents.ebsEncryptionKeyArn = (0, smithy_client_1.expectString)(data.ebsEncryptionKeyArn);
949
- }
950
- if (data.pitPolicy != null) {
951
- contents.pitPolicy = de_PITPolicy(data.pitPolicy, context);
952
- }
953
- if (data.replicationConfigurationTemplateID != null) {
954
- contents.replicationConfigurationTemplateID = (0, smithy_client_1.expectString)(data.replicationConfigurationTemplateID);
955
- }
956
- if (data.replicationServerInstanceType != null) {
957
- contents.replicationServerInstanceType = (0, smithy_client_1.expectString)(data.replicationServerInstanceType);
958
- }
959
- if (data.replicationServersSecurityGroupsIDs != null) {
960
- contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs(data.replicationServersSecurityGroupsIDs, context);
961
- }
962
- if (data.stagingAreaSubnetId != null) {
963
- contents.stagingAreaSubnetId = (0, smithy_client_1.expectString)(data.stagingAreaSubnetId);
964
- }
965
- if (data.stagingAreaTags != null) {
966
- contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context);
967
- }
968
- if (data.tags != null) {
969
- contents.tags = de_TagsMap(data.tags, context);
973
+ const doc = (0, smithy_client_1.take)(data, {
974
+ launchConfigurationTemplate: smithy_client_1._json,
975
+ });
976
+ Object.assign(contents, doc);
977
+ return contents;
978
+ };
979
+ exports.de_CreateLaunchConfigurationTemplateCommand = de_CreateLaunchConfigurationTemplateCommand;
980
+ const de_CreateLaunchConfigurationTemplateCommandError = async (output, context) => {
981
+ const parsedOutput = {
982
+ ...output,
983
+ body: await parseErrorBody(output.body, context),
984
+ };
985
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
986
+ switch (errorCode) {
987
+ case "AccessDeniedException":
988
+ case "com.amazonaws.drs#AccessDeniedException":
989
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
990
+ case "InternalServerException":
991
+ case "com.amazonaws.drs#InternalServerException":
992
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
993
+ case "ServiceQuotaExceededException":
994
+ case "com.amazonaws.drs#ServiceQuotaExceededException":
995
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
996
+ case "ThrottlingException":
997
+ case "com.amazonaws.drs#ThrottlingException":
998
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
999
+ case "UninitializedAccountException":
1000
+ case "com.amazonaws.drs#UninitializedAccountException":
1001
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1002
+ case "ValidationException":
1003
+ case "com.amazonaws.drs#ValidationException":
1004
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1005
+ default:
1006
+ const parsedBody = parsedOutput.body;
1007
+ return throwDefaultError({
1008
+ output,
1009
+ parsedBody,
1010
+ errorCode,
1011
+ });
970
1012
  }
971
- if (data.useDedicatedReplicationServer != null) {
972
- contents.useDedicatedReplicationServer = (0, smithy_client_1.expectBoolean)(data.useDedicatedReplicationServer);
1013
+ };
1014
+ const de_CreateReplicationConfigurationTemplateCommand = async (output, context) => {
1015
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
1016
+ return de_CreateReplicationConfigurationTemplateCommandError(output, context);
973
1017
  }
1018
+ const contents = (0, smithy_client_1.map)({
1019
+ $metadata: deserializeMetadata(output),
1020
+ });
1021
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1022
+ const doc = (0, smithy_client_1.take)(data, {
1023
+ arn: smithy_client_1.expectString,
1024
+ associateDefaultSecurityGroup: smithy_client_1.expectBoolean,
1025
+ autoReplicateNewDisks: smithy_client_1.expectBoolean,
1026
+ bandwidthThrottling: smithy_client_1.expectLong,
1027
+ createPublicIP: smithy_client_1.expectBoolean,
1028
+ dataPlaneRouting: smithy_client_1.expectString,
1029
+ defaultLargeStagingDiskType: smithy_client_1.expectString,
1030
+ ebsEncryption: smithy_client_1.expectString,
1031
+ ebsEncryptionKeyArn: smithy_client_1.expectString,
1032
+ pitPolicy: smithy_client_1._json,
1033
+ replicationConfigurationTemplateID: smithy_client_1.expectString,
1034
+ replicationServerInstanceType: smithy_client_1.expectString,
1035
+ replicationServersSecurityGroupsIDs: smithy_client_1._json,
1036
+ stagingAreaSubnetId: smithy_client_1.expectString,
1037
+ stagingAreaTags: smithy_client_1._json,
1038
+ tags: smithy_client_1._json,
1039
+ useDedicatedReplicationServer: smithy_client_1.expectBoolean,
1040
+ });
1041
+ Object.assign(contents, doc);
974
1042
  return contents;
975
1043
  };
976
1044
  exports.de_CreateReplicationConfigurationTemplateCommand = de_CreateReplicationConfigurationTemplateCommand;
@@ -1001,10 +1069,9 @@ const de_CreateReplicationConfigurationTemplateCommandError = async (output, con
1001
1069
  throw await de_ValidationExceptionRes(parsedOutput, context);
1002
1070
  default:
1003
1071
  const parsedBody = parsedOutput.body;
1004
- (0, smithy_client_1.throwDefaultError)({
1072
+ return throwDefaultError({
1005
1073
  output,
1006
1074
  parsedBody,
1007
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1008
1075
  errorCode,
1009
1076
  });
1010
1077
  }
@@ -1013,7 +1080,7 @@ const de_DeleteJobCommand = async (output, context) => {
1013
1080
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1014
1081
  return de_DeleteJobCommandError(output, context);
1015
1082
  }
1016
- const contents = map({
1083
+ const contents = (0, smithy_client_1.map)({
1017
1084
  $metadata: deserializeMetadata(output),
1018
1085
  });
1019
1086
  await collectBody(output.body, context);
@@ -1044,10 +1111,51 @@ const de_DeleteJobCommandError = async (output, context) => {
1044
1111
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1045
1112
  default:
1046
1113
  const parsedBody = parsedOutput.body;
1047
- (0, smithy_client_1.throwDefaultError)({
1114
+ return throwDefaultError({
1115
+ output,
1116
+ parsedBody,
1117
+ errorCode,
1118
+ });
1119
+ }
1120
+ };
1121
+ const de_DeleteLaunchConfigurationTemplateCommand = async (output, context) => {
1122
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1123
+ return de_DeleteLaunchConfigurationTemplateCommandError(output, context);
1124
+ }
1125
+ const contents = (0, smithy_client_1.map)({
1126
+ $metadata: deserializeMetadata(output),
1127
+ });
1128
+ await collectBody(output.body, context);
1129
+ return contents;
1130
+ };
1131
+ exports.de_DeleteLaunchConfigurationTemplateCommand = de_DeleteLaunchConfigurationTemplateCommand;
1132
+ const de_DeleteLaunchConfigurationTemplateCommandError = async (output, context) => {
1133
+ const parsedOutput = {
1134
+ ...output,
1135
+ body: await parseErrorBody(output.body, context),
1136
+ };
1137
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1138
+ switch (errorCode) {
1139
+ case "ConflictException":
1140
+ case "com.amazonaws.drs#ConflictException":
1141
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1142
+ case "InternalServerException":
1143
+ case "com.amazonaws.drs#InternalServerException":
1144
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1145
+ case "ResourceNotFoundException":
1146
+ case "com.amazonaws.drs#ResourceNotFoundException":
1147
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1148
+ case "ThrottlingException":
1149
+ case "com.amazonaws.drs#ThrottlingException":
1150
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1151
+ case "UninitializedAccountException":
1152
+ case "com.amazonaws.drs#UninitializedAccountException":
1153
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1154
+ default:
1155
+ const parsedBody = parsedOutput.body;
1156
+ return throwDefaultError({
1048
1157
  output,
1049
1158
  parsedBody,
1050
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1051
1159
  errorCode,
1052
1160
  });
1053
1161
  }
@@ -1056,7 +1164,7 @@ const de_DeleteRecoveryInstanceCommand = async (output, context) => {
1056
1164
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1057
1165
  return de_DeleteRecoveryInstanceCommandError(output, context);
1058
1166
  }
1059
- const contents = map({
1167
+ const contents = (0, smithy_client_1.map)({
1060
1168
  $metadata: deserializeMetadata(output),
1061
1169
  });
1062
1170
  await collectBody(output.body, context);
@@ -1087,10 +1195,9 @@ const de_DeleteRecoveryInstanceCommandError = async (output, context) => {
1087
1195
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1088
1196
  default:
1089
1197
  const parsedBody = parsedOutput.body;
1090
- (0, smithy_client_1.throwDefaultError)({
1198
+ return throwDefaultError({
1091
1199
  output,
1092
1200
  parsedBody,
1093
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1094
1201
  errorCode,
1095
1202
  });
1096
1203
  }
@@ -1099,7 +1206,7 @@ const de_DeleteReplicationConfigurationTemplateCommand = async (output, context)
1099
1206
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1100
1207
  return de_DeleteReplicationConfigurationTemplateCommandError(output, context);
1101
1208
  }
1102
- const contents = map({
1209
+ const contents = (0, smithy_client_1.map)({
1103
1210
  $metadata: deserializeMetadata(output),
1104
1211
  });
1105
1212
  await collectBody(output.body, context);
@@ -1130,10 +1237,9 @@ const de_DeleteReplicationConfigurationTemplateCommandError = async (output, con
1130
1237
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1131
1238
  default:
1132
1239
  const parsedBody = parsedOutput.body;
1133
- (0, smithy_client_1.throwDefaultError)({
1240
+ return throwDefaultError({
1134
1241
  output,
1135
1242
  parsedBody,
1136
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1137
1243
  errorCode,
1138
1244
  });
1139
1245
  }
@@ -1142,7 +1248,7 @@ const de_DeleteSourceServerCommand = async (output, context) => {
1142
1248
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1143
1249
  return de_DeleteSourceServerCommandError(output, context);
1144
1250
  }
1145
- const contents = map({
1251
+ const contents = (0, smithy_client_1.map)({
1146
1252
  $metadata: deserializeMetadata(output),
1147
1253
  });
1148
1254
  await collectBody(output.body, context);
@@ -1173,10 +1279,9 @@ const de_DeleteSourceServerCommandError = async (output, context) => {
1173
1279
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1174
1280
  default:
1175
1281
  const parsedBody = parsedOutput.body;
1176
- (0, smithy_client_1.throwDefaultError)({
1282
+ return throwDefaultError({
1177
1283
  output,
1178
1284
  parsedBody,
1179
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1180
1285
  errorCode,
1181
1286
  });
1182
1287
  }
@@ -1185,16 +1290,15 @@ const de_DescribeJobLogItemsCommand = async (output, context) => {
1185
1290
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1186
1291
  return de_DescribeJobLogItemsCommandError(output, context);
1187
1292
  }
1188
- const contents = map({
1293
+ const contents = (0, smithy_client_1.map)({
1189
1294
  $metadata: deserializeMetadata(output),
1190
1295
  });
1191
1296
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1192
- if (data.items != null) {
1193
- contents.items = de_JobLogs(data.items, context);
1194
- }
1195
- if (data.nextToken != null) {
1196
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1197
- }
1297
+ const doc = (0, smithy_client_1.take)(data, {
1298
+ items: smithy_client_1._json,
1299
+ nextToken: smithy_client_1.expectString,
1300
+ });
1301
+ Object.assign(contents, doc);
1198
1302
  return contents;
1199
1303
  };
1200
1304
  exports.de_DescribeJobLogItemsCommand = de_DescribeJobLogItemsCommand;
@@ -1219,10 +1323,9 @@ const de_DescribeJobLogItemsCommandError = async (output, context) => {
1219
1323
  throw await de_ValidationExceptionRes(parsedOutput, context);
1220
1324
  default:
1221
1325
  const parsedBody = parsedOutput.body;
1222
- (0, smithy_client_1.throwDefaultError)({
1326
+ return throwDefaultError({
1223
1327
  output,
1224
1328
  parsedBody,
1225
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1226
1329
  errorCode,
1227
1330
  });
1228
1331
  }
@@ -1231,16 +1334,15 @@ const de_DescribeJobsCommand = async (output, context) => {
1231
1334
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1232
1335
  return de_DescribeJobsCommandError(output, context);
1233
1336
  }
1234
- const contents = map({
1337
+ const contents = (0, smithy_client_1.map)({
1235
1338
  $metadata: deserializeMetadata(output),
1236
1339
  });
1237
1340
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1238
- if (data.items != null) {
1239
- contents.items = de_JobsList(data.items, context);
1240
- }
1241
- if (data.nextToken != null) {
1242
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1243
- }
1341
+ const doc = (0, smithy_client_1.take)(data, {
1342
+ items: smithy_client_1._json,
1343
+ nextToken: smithy_client_1.expectString,
1344
+ });
1345
+ Object.assign(contents, doc);
1244
1346
  return contents;
1245
1347
  };
1246
1348
  exports.de_DescribeJobsCommand = de_DescribeJobsCommand;
@@ -1265,28 +1367,73 @@ const de_DescribeJobsCommandError = async (output, context) => {
1265
1367
  throw await de_ValidationExceptionRes(parsedOutput, context);
1266
1368
  default:
1267
1369
  const parsedBody = parsedOutput.body;
1268
- (0, smithy_client_1.throwDefaultError)({
1370
+ return throwDefaultError({
1269
1371
  output,
1270
1372
  parsedBody,
1271
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1272
1373
  errorCode,
1273
1374
  });
1274
1375
  }
1275
1376
  };
1276
- const de_DescribeRecoveryInstancesCommand = async (output, context) => {
1377
+ const de_DescribeLaunchConfigurationTemplatesCommand = async (output, context) => {
1277
1378
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1278
- return de_DescribeRecoveryInstancesCommandError(output, context);
1379
+ return de_DescribeLaunchConfigurationTemplatesCommandError(output, context);
1279
1380
  }
1280
- const contents = map({
1381
+ const contents = (0, smithy_client_1.map)({
1281
1382
  $metadata: deserializeMetadata(output),
1282
1383
  });
1283
1384
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1284
- if (data.items != null) {
1285
- contents.items = de_DescribeRecoveryInstancesItems(data.items, context);
1385
+ const doc = (0, smithy_client_1.take)(data, {
1386
+ items: smithy_client_1._json,
1387
+ nextToken: smithy_client_1.expectString,
1388
+ });
1389
+ Object.assign(contents, doc);
1390
+ return contents;
1391
+ };
1392
+ exports.de_DescribeLaunchConfigurationTemplatesCommand = de_DescribeLaunchConfigurationTemplatesCommand;
1393
+ const de_DescribeLaunchConfigurationTemplatesCommandError = async (output, context) => {
1394
+ const parsedOutput = {
1395
+ ...output,
1396
+ body: await parseErrorBody(output.body, context),
1397
+ };
1398
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1399
+ switch (errorCode) {
1400
+ case "InternalServerException":
1401
+ case "com.amazonaws.drs#InternalServerException":
1402
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1403
+ case "ResourceNotFoundException":
1404
+ case "com.amazonaws.drs#ResourceNotFoundException":
1405
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1406
+ case "ThrottlingException":
1407
+ case "com.amazonaws.drs#ThrottlingException":
1408
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1409
+ case "UninitializedAccountException":
1410
+ case "com.amazonaws.drs#UninitializedAccountException":
1411
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1412
+ case "ValidationException":
1413
+ case "com.amazonaws.drs#ValidationException":
1414
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1415
+ default:
1416
+ const parsedBody = parsedOutput.body;
1417
+ return throwDefaultError({
1418
+ output,
1419
+ parsedBody,
1420
+ errorCode,
1421
+ });
1286
1422
  }
1287
- if (data.nextToken != null) {
1288
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1423
+ };
1424
+ const de_DescribeRecoveryInstancesCommand = async (output, context) => {
1425
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1426
+ return de_DescribeRecoveryInstancesCommandError(output, context);
1289
1427
  }
1428
+ const contents = (0, smithy_client_1.map)({
1429
+ $metadata: deserializeMetadata(output),
1430
+ });
1431
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1432
+ const doc = (0, smithy_client_1.take)(data, {
1433
+ items: smithy_client_1._json,
1434
+ nextToken: smithy_client_1.expectString,
1435
+ });
1436
+ Object.assign(contents, doc);
1290
1437
  return contents;
1291
1438
  };
1292
1439
  exports.de_DescribeRecoveryInstancesCommand = de_DescribeRecoveryInstancesCommand;
@@ -1311,10 +1458,9 @@ const de_DescribeRecoveryInstancesCommandError = async (output, context) => {
1311
1458
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1312
1459
  default:
1313
1460
  const parsedBody = parsedOutput.body;
1314
- (0, smithy_client_1.throwDefaultError)({
1461
+ return throwDefaultError({
1315
1462
  output,
1316
1463
  parsedBody,
1317
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1318
1464
  errorCode,
1319
1465
  });
1320
1466
  }
@@ -1323,16 +1469,15 @@ const de_DescribeRecoverySnapshotsCommand = async (output, context) => {
1323
1469
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1324
1470
  return de_DescribeRecoverySnapshotsCommandError(output, context);
1325
1471
  }
1326
- const contents = map({
1472
+ const contents = (0, smithy_client_1.map)({
1327
1473
  $metadata: deserializeMetadata(output),
1328
1474
  });
1329
1475
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1330
- if (data.items != null) {
1331
- contents.items = de_RecoverySnapshotsList(data.items, context);
1332
- }
1333
- if (data.nextToken != null) {
1334
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1335
- }
1476
+ const doc = (0, smithy_client_1.take)(data, {
1477
+ items: smithy_client_1._json,
1478
+ nextToken: smithy_client_1.expectString,
1479
+ });
1480
+ Object.assign(contents, doc);
1336
1481
  return contents;
1337
1482
  };
1338
1483
  exports.de_DescribeRecoverySnapshotsCommand = de_DescribeRecoverySnapshotsCommand;
@@ -1360,10 +1505,9 @@ const de_DescribeRecoverySnapshotsCommandError = async (output, context) => {
1360
1505
  throw await de_ValidationExceptionRes(parsedOutput, context);
1361
1506
  default:
1362
1507
  const parsedBody = parsedOutput.body;
1363
- (0, smithy_client_1.throwDefaultError)({
1508
+ return throwDefaultError({
1364
1509
  output,
1365
1510
  parsedBody,
1366
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1367
1511
  errorCode,
1368
1512
  });
1369
1513
  }
@@ -1372,16 +1516,15 @@ const de_DescribeReplicationConfigurationTemplatesCommand = async (output, conte
1372
1516
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1373
1517
  return de_DescribeReplicationConfigurationTemplatesCommandError(output, context);
1374
1518
  }
1375
- const contents = map({
1519
+ const contents = (0, smithy_client_1.map)({
1376
1520
  $metadata: deserializeMetadata(output),
1377
1521
  });
1378
1522
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1379
- if (data.items != null) {
1380
- contents.items = de_ReplicationConfigurationTemplates(data.items, context);
1381
- }
1382
- if (data.nextToken != null) {
1383
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1384
- }
1523
+ const doc = (0, smithy_client_1.take)(data, {
1524
+ items: smithy_client_1._json,
1525
+ nextToken: smithy_client_1.expectString,
1526
+ });
1527
+ Object.assign(contents, doc);
1385
1528
  return contents;
1386
1529
  };
1387
1530
  exports.de_DescribeReplicationConfigurationTemplatesCommand = de_DescribeReplicationConfigurationTemplatesCommand;
@@ -1409,10 +1552,9 @@ const de_DescribeReplicationConfigurationTemplatesCommandError = async (output,
1409
1552
  throw await de_ValidationExceptionRes(parsedOutput, context);
1410
1553
  default:
1411
1554
  const parsedBody = parsedOutput.body;
1412
- (0, smithy_client_1.throwDefaultError)({
1555
+ return throwDefaultError({
1413
1556
  output,
1414
1557
  parsedBody,
1415
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1416
1558
  errorCode,
1417
1559
  });
1418
1560
  }
@@ -1421,16 +1563,15 @@ const de_DescribeSourceServersCommand = async (output, context) => {
1421
1563
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1422
1564
  return de_DescribeSourceServersCommandError(output, context);
1423
1565
  }
1424
- const contents = map({
1566
+ const contents = (0, smithy_client_1.map)({
1425
1567
  $metadata: deserializeMetadata(output),
1426
1568
  });
1427
1569
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1428
- if (data.items != null) {
1429
- contents.items = de_SourceServersList(data.items, context);
1430
- }
1431
- if (data.nextToken != null) {
1432
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1433
- }
1570
+ const doc = (0, smithy_client_1.take)(data, {
1571
+ items: smithy_client_1._json,
1572
+ nextToken: smithy_client_1.expectString,
1573
+ });
1574
+ Object.assign(contents, doc);
1434
1575
  return contents;
1435
1576
  };
1436
1577
  exports.de_DescribeSourceServersCommand = de_DescribeSourceServersCommand;
@@ -1455,10 +1596,9 @@ const de_DescribeSourceServersCommandError = async (output, context) => {
1455
1596
  throw await de_ValidationExceptionRes(parsedOutput, context);
1456
1597
  default:
1457
1598
  const parsedBody = parsedOutput.body;
1458
- (0, smithy_client_1.throwDefaultError)({
1599
+ return throwDefaultError({
1459
1600
  output,
1460
1601
  parsedBody,
1461
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1462
1602
  errorCode,
1463
1603
  });
1464
1604
  }
@@ -1467,7 +1607,7 @@ const de_DisconnectRecoveryInstanceCommand = async (output, context) => {
1467
1607
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1468
1608
  return de_DisconnectRecoveryInstanceCommandError(output, context);
1469
1609
  }
1470
- const contents = map({
1610
+ const contents = (0, smithy_client_1.map)({
1471
1611
  $metadata: deserializeMetadata(output),
1472
1612
  });
1473
1613
  await collectBody(output.body, context);
@@ -1501,10 +1641,9 @@ const de_DisconnectRecoveryInstanceCommandError = async (output, context) => {
1501
1641
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1502
1642
  default:
1503
1643
  const parsedBody = parsedOutput.body;
1504
- (0, smithy_client_1.throwDefaultError)({
1644
+ return throwDefaultError({
1505
1645
  output,
1506
1646
  parsedBody,
1507
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1508
1647
  errorCode,
1509
1648
  });
1510
1649
  }
@@ -1513,46 +1652,25 @@ const de_DisconnectSourceServerCommand = async (output, context) => {
1513
1652
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1514
1653
  return de_DisconnectSourceServerCommandError(output, context);
1515
1654
  }
1516
- const contents = map({
1655
+ const contents = (0, smithy_client_1.map)({
1517
1656
  $metadata: deserializeMetadata(output),
1518
1657
  });
1519
1658
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1520
- if (data.arn != null) {
1521
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1522
- }
1523
- if (data.dataReplicationInfo != null) {
1524
- contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context);
1525
- }
1526
- if (data.lastLaunchResult != null) {
1527
- contents.lastLaunchResult = (0, smithy_client_1.expectString)(data.lastLaunchResult);
1528
- }
1529
- if (data.lifeCycle != null) {
1530
- contents.lifeCycle = de_LifeCycle(data.lifeCycle, context);
1531
- }
1532
- if (data.recoveryInstanceId != null) {
1533
- contents.recoveryInstanceId = (0, smithy_client_1.expectString)(data.recoveryInstanceId);
1534
- }
1535
- if (data.replicationDirection != null) {
1536
- contents.replicationDirection = (0, smithy_client_1.expectString)(data.replicationDirection);
1537
- }
1538
- if (data.reversedDirectionSourceServerArn != null) {
1539
- contents.reversedDirectionSourceServerArn = (0, smithy_client_1.expectString)(data.reversedDirectionSourceServerArn);
1540
- }
1541
- if (data.sourceCloudProperties != null) {
1542
- contents.sourceCloudProperties = de_SourceCloudProperties(data.sourceCloudProperties, context);
1543
- }
1544
- if (data.sourceProperties != null) {
1545
- contents.sourceProperties = de_SourceProperties(data.sourceProperties, context);
1546
- }
1547
- if (data.sourceServerID != null) {
1548
- contents.sourceServerID = (0, smithy_client_1.expectString)(data.sourceServerID);
1549
- }
1550
- if (data.stagingArea != null) {
1551
- contents.stagingArea = de_StagingArea(data.stagingArea, context);
1552
- }
1553
- if (data.tags != null) {
1554
- contents.tags = de_TagsMap(data.tags, context);
1555
- }
1659
+ const doc = (0, smithy_client_1.take)(data, {
1660
+ arn: smithy_client_1.expectString,
1661
+ dataReplicationInfo: smithy_client_1._json,
1662
+ lastLaunchResult: smithy_client_1.expectString,
1663
+ lifeCycle: smithy_client_1._json,
1664
+ recoveryInstanceId: smithy_client_1.expectString,
1665
+ replicationDirection: smithy_client_1.expectString,
1666
+ reversedDirectionSourceServerArn: smithy_client_1.expectString,
1667
+ sourceCloudProperties: smithy_client_1._json,
1668
+ sourceProperties: smithy_client_1._json,
1669
+ sourceServerID: smithy_client_1.expectString,
1670
+ stagingArea: smithy_client_1._json,
1671
+ tags: smithy_client_1._json,
1672
+ });
1673
+ Object.assign(contents, doc);
1556
1674
  return contents;
1557
1675
  };
1558
1676
  exports.de_DisconnectSourceServerCommand = de_DisconnectSourceServerCommand;
@@ -1580,10 +1698,9 @@ const de_DisconnectSourceServerCommandError = async (output, context) => {
1580
1698
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1581
1699
  default:
1582
1700
  const parsedBody = parsedOutput.body;
1583
- (0, smithy_client_1.throwDefaultError)({
1701
+ return throwDefaultError({
1584
1702
  output,
1585
1703
  parsedBody,
1586
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1587
1704
  errorCode,
1588
1705
  });
1589
1706
  }
@@ -1592,22 +1709,17 @@ const de_GetFailbackReplicationConfigurationCommand = async (output, context) =>
1592
1709
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1593
1710
  return de_GetFailbackReplicationConfigurationCommandError(output, context);
1594
1711
  }
1595
- const contents = map({
1712
+ const contents = (0, smithy_client_1.map)({
1596
1713
  $metadata: deserializeMetadata(output),
1597
1714
  });
1598
1715
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1599
- if (data.bandwidthThrottling != null) {
1600
- contents.bandwidthThrottling = (0, smithy_client_1.expectLong)(data.bandwidthThrottling);
1601
- }
1602
- if (data.name != null) {
1603
- contents.name = (0, smithy_client_1.expectString)(data.name);
1604
- }
1605
- if (data.recoveryInstanceID != null) {
1606
- contents.recoveryInstanceID = (0, smithy_client_1.expectString)(data.recoveryInstanceID);
1607
- }
1608
- if (data.usePrivateIP != null) {
1609
- contents.usePrivateIP = (0, smithy_client_1.expectBoolean)(data.usePrivateIP);
1610
- }
1716
+ const doc = (0, smithy_client_1.take)(data, {
1717
+ bandwidthThrottling: smithy_client_1.expectLong,
1718
+ name: smithy_client_1.expectString,
1719
+ recoveryInstanceID: smithy_client_1.expectString,
1720
+ usePrivateIP: smithy_client_1.expectBoolean,
1721
+ });
1722
+ Object.assign(contents, doc);
1611
1723
  return contents;
1612
1724
  };
1613
1725
  exports.de_GetFailbackReplicationConfigurationCommand = de_GetFailbackReplicationConfigurationCommand;
@@ -1632,10 +1744,9 @@ const de_GetFailbackReplicationConfigurationCommandError = async (output, contex
1632
1744
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1633
1745
  default:
1634
1746
  const parsedBody = parsedOutput.body;
1635
- (0, smithy_client_1.throwDefaultError)({
1747
+ return throwDefaultError({
1636
1748
  output,
1637
1749
  parsedBody,
1638
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1639
1750
  errorCode,
1640
1751
  });
1641
1752
  }
@@ -1644,34 +1755,21 @@ const de_GetLaunchConfigurationCommand = async (output, context) => {
1644
1755
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1645
1756
  return de_GetLaunchConfigurationCommandError(output, context);
1646
1757
  }
1647
- const contents = map({
1758
+ const contents = (0, smithy_client_1.map)({
1648
1759
  $metadata: deserializeMetadata(output),
1649
1760
  });
1650
1761
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1651
- if (data.copyPrivateIp != null) {
1652
- contents.copyPrivateIp = (0, smithy_client_1.expectBoolean)(data.copyPrivateIp);
1653
- }
1654
- if (data.copyTags != null) {
1655
- contents.copyTags = (0, smithy_client_1.expectBoolean)(data.copyTags);
1656
- }
1657
- if (data.ec2LaunchTemplateID != null) {
1658
- contents.ec2LaunchTemplateID = (0, smithy_client_1.expectString)(data.ec2LaunchTemplateID);
1659
- }
1660
- if (data.launchDisposition != null) {
1661
- contents.launchDisposition = (0, smithy_client_1.expectString)(data.launchDisposition);
1662
- }
1663
- if (data.licensing != null) {
1664
- contents.licensing = de_Licensing(data.licensing, context);
1665
- }
1666
- if (data.name != null) {
1667
- contents.name = (0, smithy_client_1.expectString)(data.name);
1668
- }
1669
- if (data.sourceServerID != null) {
1670
- contents.sourceServerID = (0, smithy_client_1.expectString)(data.sourceServerID);
1671
- }
1672
- if (data.targetInstanceTypeRightSizingMethod != null) {
1673
- contents.targetInstanceTypeRightSizingMethod = (0, smithy_client_1.expectString)(data.targetInstanceTypeRightSizingMethod);
1674
- }
1762
+ const doc = (0, smithy_client_1.take)(data, {
1763
+ copyPrivateIp: smithy_client_1.expectBoolean,
1764
+ copyTags: smithy_client_1.expectBoolean,
1765
+ ec2LaunchTemplateID: smithy_client_1.expectString,
1766
+ launchDisposition: smithy_client_1.expectString,
1767
+ licensing: smithy_client_1._json,
1768
+ name: smithy_client_1.expectString,
1769
+ sourceServerID: smithy_client_1.expectString,
1770
+ targetInstanceTypeRightSizingMethod: smithy_client_1.expectString,
1771
+ });
1772
+ Object.assign(contents, doc);
1675
1773
  return contents;
1676
1774
  };
1677
1775
  exports.de_GetLaunchConfigurationCommand = de_GetLaunchConfigurationCommand;
@@ -1696,10 +1794,9 @@ const de_GetLaunchConfigurationCommandError = async (output, context) => {
1696
1794
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1697
1795
  default:
1698
1796
  const parsedBody = parsedOutput.body;
1699
- (0, smithy_client_1.throwDefaultError)({
1797
+ return throwDefaultError({
1700
1798
  output,
1701
1799
  parsedBody,
1702
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1703
1800
  errorCode,
1704
1801
  });
1705
1802
  }
@@ -1708,61 +1805,30 @@ const de_GetReplicationConfigurationCommand = async (output, context) => {
1708
1805
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1709
1806
  return de_GetReplicationConfigurationCommandError(output, context);
1710
1807
  }
1711
- const contents = map({
1808
+ const contents = (0, smithy_client_1.map)({
1712
1809
  $metadata: deserializeMetadata(output),
1713
1810
  });
1714
1811
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1715
- if (data.associateDefaultSecurityGroup != null) {
1716
- contents.associateDefaultSecurityGroup = (0, smithy_client_1.expectBoolean)(data.associateDefaultSecurityGroup);
1717
- }
1718
- if (data.autoReplicateNewDisks != null) {
1719
- contents.autoReplicateNewDisks = (0, smithy_client_1.expectBoolean)(data.autoReplicateNewDisks);
1720
- }
1721
- if (data.bandwidthThrottling != null) {
1722
- contents.bandwidthThrottling = (0, smithy_client_1.expectLong)(data.bandwidthThrottling);
1723
- }
1724
- if (data.createPublicIP != null) {
1725
- contents.createPublicIP = (0, smithy_client_1.expectBoolean)(data.createPublicIP);
1726
- }
1727
- if (data.dataPlaneRouting != null) {
1728
- contents.dataPlaneRouting = (0, smithy_client_1.expectString)(data.dataPlaneRouting);
1729
- }
1730
- if (data.defaultLargeStagingDiskType != null) {
1731
- contents.defaultLargeStagingDiskType = (0, smithy_client_1.expectString)(data.defaultLargeStagingDiskType);
1732
- }
1733
- if (data.ebsEncryption != null) {
1734
- contents.ebsEncryption = (0, smithy_client_1.expectString)(data.ebsEncryption);
1735
- }
1736
- if (data.ebsEncryptionKeyArn != null) {
1737
- contents.ebsEncryptionKeyArn = (0, smithy_client_1.expectString)(data.ebsEncryptionKeyArn);
1738
- }
1739
- if (data.name != null) {
1740
- contents.name = (0, smithy_client_1.expectString)(data.name);
1741
- }
1742
- if (data.pitPolicy != null) {
1743
- contents.pitPolicy = de_PITPolicy(data.pitPolicy, context);
1744
- }
1745
- if (data.replicatedDisks != null) {
1746
- contents.replicatedDisks = de_ReplicationConfigurationReplicatedDisks(data.replicatedDisks, context);
1747
- }
1748
- if (data.replicationServerInstanceType != null) {
1749
- contents.replicationServerInstanceType = (0, smithy_client_1.expectString)(data.replicationServerInstanceType);
1750
- }
1751
- if (data.replicationServersSecurityGroupsIDs != null) {
1752
- contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs(data.replicationServersSecurityGroupsIDs, context);
1753
- }
1754
- if (data.sourceServerID != null) {
1755
- contents.sourceServerID = (0, smithy_client_1.expectString)(data.sourceServerID);
1756
- }
1757
- if (data.stagingAreaSubnetId != null) {
1758
- contents.stagingAreaSubnetId = (0, smithy_client_1.expectString)(data.stagingAreaSubnetId);
1759
- }
1760
- if (data.stagingAreaTags != null) {
1761
- contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context);
1762
- }
1763
- if (data.useDedicatedReplicationServer != null) {
1764
- contents.useDedicatedReplicationServer = (0, smithy_client_1.expectBoolean)(data.useDedicatedReplicationServer);
1765
- }
1812
+ const doc = (0, smithy_client_1.take)(data, {
1813
+ associateDefaultSecurityGroup: smithy_client_1.expectBoolean,
1814
+ autoReplicateNewDisks: smithy_client_1.expectBoolean,
1815
+ bandwidthThrottling: smithy_client_1.expectLong,
1816
+ createPublicIP: smithy_client_1.expectBoolean,
1817
+ dataPlaneRouting: smithy_client_1.expectString,
1818
+ defaultLargeStagingDiskType: smithy_client_1.expectString,
1819
+ ebsEncryption: smithy_client_1.expectString,
1820
+ ebsEncryptionKeyArn: smithy_client_1.expectString,
1821
+ name: smithy_client_1.expectString,
1822
+ pitPolicy: smithy_client_1._json,
1823
+ replicatedDisks: smithy_client_1._json,
1824
+ replicationServerInstanceType: smithy_client_1.expectString,
1825
+ replicationServersSecurityGroupsIDs: smithy_client_1._json,
1826
+ sourceServerID: smithy_client_1.expectString,
1827
+ stagingAreaSubnetId: smithy_client_1.expectString,
1828
+ stagingAreaTags: smithy_client_1._json,
1829
+ useDedicatedReplicationServer: smithy_client_1.expectBoolean,
1830
+ });
1831
+ Object.assign(contents, doc);
1766
1832
  return contents;
1767
1833
  };
1768
1834
  exports.de_GetReplicationConfigurationCommand = de_GetReplicationConfigurationCommand;
@@ -1790,10 +1856,9 @@ const de_GetReplicationConfigurationCommandError = async (output, context) => {
1790
1856
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
1791
1857
  default:
1792
1858
  const parsedBody = parsedOutput.body;
1793
- (0, smithy_client_1.throwDefaultError)({
1859
+ return throwDefaultError({
1794
1860
  output,
1795
1861
  parsedBody,
1796
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1797
1862
  errorCode,
1798
1863
  });
1799
1864
  }
@@ -1802,7 +1867,7 @@ const de_InitializeServiceCommand = async (output, context) => {
1802
1867
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1803
1868
  return de_InitializeServiceCommandError(output, context);
1804
1869
  }
1805
- const contents = map({
1870
+ const contents = (0, smithy_client_1.map)({
1806
1871
  $metadata: deserializeMetadata(output),
1807
1872
  });
1808
1873
  await collectBody(output.body, context);
@@ -1830,10 +1895,9 @@ const de_InitializeServiceCommandError = async (output, context) => {
1830
1895
  throw await de_ValidationExceptionRes(parsedOutput, context);
1831
1896
  default:
1832
1897
  const parsedBody = parsedOutput.body;
1833
- (0, smithy_client_1.throwDefaultError)({
1898
+ return throwDefaultError({
1834
1899
  output,
1835
1900
  parsedBody,
1836
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1837
1901
  errorCode,
1838
1902
  });
1839
1903
  }
@@ -1842,16 +1906,15 @@ const de_ListExtensibleSourceServersCommand = async (output, context) => {
1842
1906
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1843
1907
  return de_ListExtensibleSourceServersCommandError(output, context);
1844
1908
  }
1845
- const contents = map({
1909
+ const contents = (0, smithy_client_1.map)({
1846
1910
  $metadata: deserializeMetadata(output),
1847
1911
  });
1848
1912
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1849
- if (data.items != null) {
1850
- contents.items = de_StagingSourceServersList(data.items, context);
1851
- }
1852
- if (data.nextToken != null) {
1853
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1854
- }
1913
+ const doc = (0, smithy_client_1.take)(data, {
1914
+ items: smithy_client_1._json,
1915
+ nextToken: smithy_client_1.expectString,
1916
+ });
1917
+ Object.assign(contents, doc);
1855
1918
  return contents;
1856
1919
  };
1857
1920
  exports.de_ListExtensibleSourceServersCommand = de_ListExtensibleSourceServersCommand;
@@ -1879,10 +1942,9 @@ const de_ListExtensibleSourceServersCommandError = async (output, context) => {
1879
1942
  throw await de_ValidationExceptionRes(parsedOutput, context);
1880
1943
  default:
1881
1944
  const parsedBody = parsedOutput.body;
1882
- (0, smithy_client_1.throwDefaultError)({
1945
+ return throwDefaultError({
1883
1946
  output,
1884
1947
  parsedBody,
1885
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1886
1948
  errorCode,
1887
1949
  });
1888
1950
  }
@@ -1891,16 +1953,15 @@ const de_ListStagingAccountsCommand = async (output, context) => {
1891
1953
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1892
1954
  return de_ListStagingAccountsCommandError(output, context);
1893
1955
  }
1894
- const contents = map({
1956
+ const contents = (0, smithy_client_1.map)({
1895
1957
  $metadata: deserializeMetadata(output),
1896
1958
  });
1897
1959
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1898
- if (data.accounts != null) {
1899
- contents.accounts = de_Accounts(data.accounts, context);
1900
- }
1901
- if (data.nextToken != null) {
1902
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1903
- }
1960
+ const doc = (0, smithy_client_1.take)(data, {
1961
+ accounts: smithy_client_1._json,
1962
+ nextToken: smithy_client_1.expectString,
1963
+ });
1964
+ Object.assign(contents, doc);
1904
1965
  return contents;
1905
1966
  };
1906
1967
  exports.de_ListStagingAccountsCommand = de_ListStagingAccountsCommand;
@@ -1928,10 +1989,9 @@ const de_ListStagingAccountsCommandError = async (output, context) => {
1928
1989
  throw await de_ValidationExceptionRes(parsedOutput, context);
1929
1990
  default:
1930
1991
  const parsedBody = parsedOutput.body;
1931
- (0, smithy_client_1.throwDefaultError)({
1992
+ return throwDefaultError({
1932
1993
  output,
1933
1994
  parsedBody,
1934
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1935
1995
  errorCode,
1936
1996
  });
1937
1997
  }
@@ -1940,13 +2000,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1940
2000
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1941
2001
  return de_ListTagsForResourceCommandError(output, context);
1942
2002
  }
1943
- const contents = map({
2003
+ const contents = (0, smithy_client_1.map)({
1944
2004
  $metadata: deserializeMetadata(output),
1945
2005
  });
1946
2006
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1947
- if (data.tags != null) {
1948
- contents.tags = de_TagsMap(data.tags, context);
1949
- }
2007
+ const doc = (0, smithy_client_1.take)(data, {
2008
+ tags: smithy_client_1._json,
2009
+ });
2010
+ Object.assign(contents, doc);
1950
2011
  return contents;
1951
2012
  };
1952
2013
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1974,10 +2035,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1974
2035
  throw await de_ValidationExceptionRes(parsedOutput, context);
1975
2036
  default:
1976
2037
  const parsedBody = parsedOutput.body;
1977
- (0, smithy_client_1.throwDefaultError)({
2038
+ return throwDefaultError({
1978
2039
  output,
1979
2040
  parsedBody,
1980
- exceptionCtor: DrsServiceException_1.DrsServiceException,
1981
2041
  errorCode,
1982
2042
  });
1983
2043
  }
@@ -1986,46 +2046,25 @@ const de_RetryDataReplicationCommand = async (output, context) => {
1986
2046
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1987
2047
  return de_RetryDataReplicationCommandError(output, context);
1988
2048
  }
1989
- const contents = map({
2049
+ const contents = (0, smithy_client_1.map)({
1990
2050
  $metadata: deserializeMetadata(output),
1991
2051
  });
1992
2052
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1993
- if (data.arn != null) {
1994
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
1995
- }
1996
- if (data.dataReplicationInfo != null) {
1997
- contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context);
1998
- }
1999
- if (data.lastLaunchResult != null) {
2000
- contents.lastLaunchResult = (0, smithy_client_1.expectString)(data.lastLaunchResult);
2001
- }
2002
- if (data.lifeCycle != null) {
2003
- contents.lifeCycle = de_LifeCycle(data.lifeCycle, context);
2004
- }
2005
- if (data.recoveryInstanceId != null) {
2006
- contents.recoveryInstanceId = (0, smithy_client_1.expectString)(data.recoveryInstanceId);
2007
- }
2008
- if (data.replicationDirection != null) {
2009
- contents.replicationDirection = (0, smithy_client_1.expectString)(data.replicationDirection);
2010
- }
2011
- if (data.reversedDirectionSourceServerArn != null) {
2012
- contents.reversedDirectionSourceServerArn = (0, smithy_client_1.expectString)(data.reversedDirectionSourceServerArn);
2013
- }
2014
- if (data.sourceCloudProperties != null) {
2015
- contents.sourceCloudProperties = de_SourceCloudProperties(data.sourceCloudProperties, context);
2016
- }
2017
- if (data.sourceProperties != null) {
2018
- contents.sourceProperties = de_SourceProperties(data.sourceProperties, context);
2019
- }
2020
- if (data.sourceServerID != null) {
2021
- contents.sourceServerID = (0, smithy_client_1.expectString)(data.sourceServerID);
2022
- }
2023
- if (data.stagingArea != null) {
2024
- contents.stagingArea = de_StagingArea(data.stagingArea, context);
2025
- }
2026
- if (data.tags != null) {
2027
- contents.tags = de_TagsMap(data.tags, context);
2028
- }
2053
+ const doc = (0, smithy_client_1.take)(data, {
2054
+ arn: smithy_client_1.expectString,
2055
+ dataReplicationInfo: smithy_client_1._json,
2056
+ lastLaunchResult: smithy_client_1.expectString,
2057
+ lifeCycle: smithy_client_1._json,
2058
+ recoveryInstanceId: smithy_client_1.expectString,
2059
+ replicationDirection: smithy_client_1.expectString,
2060
+ reversedDirectionSourceServerArn: smithy_client_1.expectString,
2061
+ sourceCloudProperties: smithy_client_1._json,
2062
+ sourceProperties: smithy_client_1._json,
2063
+ sourceServerID: smithy_client_1.expectString,
2064
+ stagingArea: smithy_client_1._json,
2065
+ tags: smithy_client_1._json,
2066
+ });
2067
+ Object.assign(contents, doc);
2029
2068
  return contents;
2030
2069
  };
2031
2070
  exports.de_RetryDataReplicationCommand = de_RetryDataReplicationCommand;
@@ -2053,10 +2092,9 @@ const de_RetryDataReplicationCommandError = async (output, context) => {
2053
2092
  throw await de_ValidationExceptionRes(parsedOutput, context);
2054
2093
  default:
2055
2094
  const parsedBody = parsedOutput.body;
2056
- (0, smithy_client_1.throwDefaultError)({
2095
+ return throwDefaultError({
2057
2096
  output,
2058
2097
  parsedBody,
2059
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2060
2098
  errorCode,
2061
2099
  });
2062
2100
  }
@@ -2065,13 +2103,14 @@ const de_ReverseReplicationCommand = async (output, context) => {
2065
2103
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2066
2104
  return de_ReverseReplicationCommandError(output, context);
2067
2105
  }
2068
- const contents = map({
2106
+ const contents = (0, smithy_client_1.map)({
2069
2107
  $metadata: deserializeMetadata(output),
2070
2108
  });
2071
2109
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2072
- if (data.reversedDirectionSourceServerArn != null) {
2073
- contents.reversedDirectionSourceServerArn = (0, smithy_client_1.expectString)(data.reversedDirectionSourceServerArn);
2074
- }
2110
+ const doc = (0, smithy_client_1.take)(data, {
2111
+ reversedDirectionSourceServerArn: smithy_client_1.expectString,
2112
+ });
2113
+ Object.assign(contents, doc);
2075
2114
  return contents;
2076
2115
  };
2077
2116
  exports.de_ReverseReplicationCommand = de_ReverseReplicationCommand;
@@ -2105,10 +2144,9 @@ const de_ReverseReplicationCommandError = async (output, context) => {
2105
2144
  throw await de_ValidationExceptionRes(parsedOutput, context);
2106
2145
  default:
2107
2146
  const parsedBody = parsedOutput.body;
2108
- (0, smithy_client_1.throwDefaultError)({
2147
+ return throwDefaultError({
2109
2148
  output,
2110
2149
  parsedBody,
2111
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2112
2150
  errorCode,
2113
2151
  });
2114
2152
  }
@@ -2117,13 +2155,14 @@ const de_StartFailbackLaunchCommand = async (output, context) => {
2117
2155
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2118
2156
  return de_StartFailbackLaunchCommandError(output, context);
2119
2157
  }
2120
- const contents = map({
2158
+ const contents = (0, smithy_client_1.map)({
2121
2159
  $metadata: deserializeMetadata(output),
2122
2160
  });
2123
2161
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2124
- if (data.job != null) {
2125
- contents.job = de_Job(data.job, context);
2126
- }
2162
+ const doc = (0, smithy_client_1.take)(data, {
2163
+ job: smithy_client_1._json,
2164
+ });
2165
+ Object.assign(contents, doc);
2127
2166
  return contents;
2128
2167
  };
2129
2168
  exports.de_StartFailbackLaunchCommand = de_StartFailbackLaunchCommand;
@@ -2154,10 +2193,9 @@ const de_StartFailbackLaunchCommandError = async (output, context) => {
2154
2193
  throw await de_ValidationExceptionRes(parsedOutput, context);
2155
2194
  default:
2156
2195
  const parsedBody = parsedOutput.body;
2157
- (0, smithy_client_1.throwDefaultError)({
2196
+ return throwDefaultError({
2158
2197
  output,
2159
2198
  parsedBody,
2160
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2161
2199
  errorCode,
2162
2200
  });
2163
2201
  }
@@ -2166,13 +2204,14 @@ const de_StartRecoveryCommand = async (output, context) => {
2166
2204
  if (output.statusCode !== 202 && output.statusCode >= 300) {
2167
2205
  return de_StartRecoveryCommandError(output, context);
2168
2206
  }
2169
- const contents = map({
2207
+ const contents = (0, smithy_client_1.map)({
2170
2208
  $metadata: deserializeMetadata(output),
2171
2209
  });
2172
2210
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2173
- if (data.job != null) {
2174
- contents.job = de_Job(data.job, context);
2175
- }
2211
+ const doc = (0, smithy_client_1.take)(data, {
2212
+ job: smithy_client_1._json,
2213
+ });
2214
+ Object.assign(contents, doc);
2176
2215
  return contents;
2177
2216
  };
2178
2217
  exports.de_StartRecoveryCommand = de_StartRecoveryCommand;
@@ -2200,10 +2239,9 @@ const de_StartRecoveryCommandError = async (output, context) => {
2200
2239
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2201
2240
  default:
2202
2241
  const parsedBody = parsedOutput.body;
2203
- (0, smithy_client_1.throwDefaultError)({
2242
+ return throwDefaultError({
2204
2243
  output,
2205
2244
  parsedBody,
2206
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2207
2245
  errorCode,
2208
2246
  });
2209
2247
  }
@@ -2212,13 +2250,14 @@ const de_StartReplicationCommand = async (output, context) => {
2212
2250
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2213
2251
  return de_StartReplicationCommandError(output, context);
2214
2252
  }
2215
- const contents = map({
2253
+ const contents = (0, smithy_client_1.map)({
2216
2254
  $metadata: deserializeMetadata(output),
2217
2255
  });
2218
2256
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2219
- if (data.sourceServer != null) {
2220
- contents.sourceServer = de_SourceServer(data.sourceServer, context);
2221
- }
2257
+ const doc = (0, smithy_client_1.take)(data, {
2258
+ sourceServer: smithy_client_1._json,
2259
+ });
2260
+ Object.assign(contents, doc);
2222
2261
  return contents;
2223
2262
  };
2224
2263
  exports.de_StartReplicationCommand = de_StartReplicationCommand;
@@ -2246,10 +2285,9 @@ const de_StartReplicationCommandError = async (output, context) => {
2246
2285
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2247
2286
  default:
2248
2287
  const parsedBody = parsedOutput.body;
2249
- (0, smithy_client_1.throwDefaultError)({
2288
+ return throwDefaultError({
2250
2289
  output,
2251
2290
  parsedBody,
2252
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2253
2291
  errorCode,
2254
2292
  });
2255
2293
  }
@@ -2258,7 +2296,7 @@ const de_StopFailbackCommand = async (output, context) => {
2258
2296
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2259
2297
  return de_StopFailbackCommandError(output, context);
2260
2298
  }
2261
- const contents = map({
2299
+ const contents = (0, smithy_client_1.map)({
2262
2300
  $metadata: deserializeMetadata(output),
2263
2301
  });
2264
2302
  await collectBody(output.body, context);
@@ -2286,10 +2324,9 @@ const de_StopFailbackCommandError = async (output, context) => {
2286
2324
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2287
2325
  default:
2288
2326
  const parsedBody = parsedOutput.body;
2289
- (0, smithy_client_1.throwDefaultError)({
2327
+ return throwDefaultError({
2290
2328
  output,
2291
2329
  parsedBody,
2292
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2293
2330
  errorCode,
2294
2331
  });
2295
2332
  }
@@ -2298,13 +2335,14 @@ const de_StopReplicationCommand = async (output, context) => {
2298
2335
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2299
2336
  return de_StopReplicationCommandError(output, context);
2300
2337
  }
2301
- const contents = map({
2338
+ const contents = (0, smithy_client_1.map)({
2302
2339
  $metadata: deserializeMetadata(output),
2303
2340
  });
2304
2341
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2305
- if (data.sourceServer != null) {
2306
- contents.sourceServer = de_SourceServer(data.sourceServer, context);
2307
- }
2342
+ const doc = (0, smithy_client_1.take)(data, {
2343
+ sourceServer: smithy_client_1._json,
2344
+ });
2345
+ Object.assign(contents, doc);
2308
2346
  return contents;
2309
2347
  };
2310
2348
  exports.de_StopReplicationCommand = de_StopReplicationCommand;
@@ -2332,10 +2370,9 @@ const de_StopReplicationCommandError = async (output, context) => {
2332
2370
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2333
2371
  default:
2334
2372
  const parsedBody = parsedOutput.body;
2335
- (0, smithy_client_1.throwDefaultError)({
2373
+ return throwDefaultError({
2336
2374
  output,
2337
2375
  parsedBody,
2338
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2339
2376
  errorCode,
2340
2377
  });
2341
2378
  }
@@ -2344,7 +2381,7 @@ const de_TagResourceCommand = async (output, context) => {
2344
2381
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2345
2382
  return de_TagResourceCommandError(output, context);
2346
2383
  }
2347
- const contents = map({
2384
+ const contents = (0, smithy_client_1.map)({
2348
2385
  $metadata: deserializeMetadata(output),
2349
2386
  });
2350
2387
  await collectBody(output.body, context);
@@ -2375,10 +2412,9 @@ const de_TagResourceCommandError = async (output, context) => {
2375
2412
  throw await de_ValidationExceptionRes(parsedOutput, context);
2376
2413
  default:
2377
2414
  const parsedBody = parsedOutput.body;
2378
- (0, smithy_client_1.throwDefaultError)({
2415
+ return throwDefaultError({
2379
2416
  output,
2380
2417
  parsedBody,
2381
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2382
2418
  errorCode,
2383
2419
  });
2384
2420
  }
@@ -2387,13 +2423,14 @@ const de_TerminateRecoveryInstancesCommand = async (output, context) => {
2387
2423
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2388
2424
  return de_TerminateRecoveryInstancesCommandError(output, context);
2389
2425
  }
2390
- const contents = map({
2426
+ const contents = (0, smithy_client_1.map)({
2391
2427
  $metadata: deserializeMetadata(output),
2392
2428
  });
2393
2429
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2394
- if (data.job != null) {
2395
- contents.job = de_Job(data.job, context);
2396
- }
2430
+ const doc = (0, smithy_client_1.take)(data, {
2431
+ job: smithy_client_1._json,
2432
+ });
2433
+ Object.assign(contents, doc);
2397
2434
  return contents;
2398
2435
  };
2399
2436
  exports.de_TerminateRecoveryInstancesCommand = de_TerminateRecoveryInstancesCommand;
@@ -2421,10 +2458,9 @@ const de_TerminateRecoveryInstancesCommandError = async (output, context) => {
2421
2458
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2422
2459
  default:
2423
2460
  const parsedBody = parsedOutput.body;
2424
- (0, smithy_client_1.throwDefaultError)({
2461
+ return throwDefaultError({
2425
2462
  output,
2426
2463
  parsedBody,
2427
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2428
2464
  errorCode,
2429
2465
  });
2430
2466
  }
@@ -2433,7 +2469,7 @@ const de_UntagResourceCommand = async (output, context) => {
2433
2469
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2434
2470
  return de_UntagResourceCommandError(output, context);
2435
2471
  }
2436
- const contents = map({
2472
+ const contents = (0, smithy_client_1.map)({
2437
2473
  $metadata: deserializeMetadata(output),
2438
2474
  });
2439
2475
  await collectBody(output.body, context);
@@ -2464,10 +2500,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2464
2500
  throw await de_ValidationExceptionRes(parsedOutput, context);
2465
2501
  default:
2466
2502
  const parsedBody = parsedOutput.body;
2467
- (0, smithy_client_1.throwDefaultError)({
2503
+ return throwDefaultError({
2468
2504
  output,
2469
2505
  parsedBody,
2470
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2471
2506
  errorCode,
2472
2507
  });
2473
2508
  }
@@ -2476,7 +2511,7 @@ const de_UpdateFailbackReplicationConfigurationCommand = async (output, context)
2476
2511
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2477
2512
  return de_UpdateFailbackReplicationConfigurationCommandError(output, context);
2478
2513
  }
2479
- const contents = map({
2514
+ const contents = (0, smithy_client_1.map)({
2480
2515
  $metadata: deserializeMetadata(output),
2481
2516
  });
2482
2517
  await collectBody(output.body, context);
@@ -2507,10 +2542,9 @@ const de_UpdateFailbackReplicationConfigurationCommandError = async (output, con
2507
2542
  throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2508
2543
  default:
2509
2544
  const parsedBody = parsedOutput.body;
2510
- (0, smithy_client_1.throwDefaultError)({
2545
+ return throwDefaultError({
2511
2546
  output,
2512
2547
  parsedBody,
2513
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2514
2548
  errorCode,
2515
2549
  });
2516
2550
  }
@@ -2519,34 +2553,21 @@ const de_UpdateLaunchConfigurationCommand = async (output, context) => {
2519
2553
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2520
2554
  return de_UpdateLaunchConfigurationCommandError(output, context);
2521
2555
  }
2522
- const contents = map({
2556
+ const contents = (0, smithy_client_1.map)({
2523
2557
  $metadata: deserializeMetadata(output),
2524
2558
  });
2525
2559
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2526
- if (data.copyPrivateIp != null) {
2527
- contents.copyPrivateIp = (0, smithy_client_1.expectBoolean)(data.copyPrivateIp);
2528
- }
2529
- if (data.copyTags != null) {
2530
- contents.copyTags = (0, smithy_client_1.expectBoolean)(data.copyTags);
2531
- }
2532
- if (data.ec2LaunchTemplateID != null) {
2533
- contents.ec2LaunchTemplateID = (0, smithy_client_1.expectString)(data.ec2LaunchTemplateID);
2534
- }
2535
- if (data.launchDisposition != null) {
2536
- contents.launchDisposition = (0, smithy_client_1.expectString)(data.launchDisposition);
2537
- }
2538
- if (data.licensing != null) {
2539
- contents.licensing = de_Licensing(data.licensing, context);
2540
- }
2541
- if (data.name != null) {
2542
- contents.name = (0, smithy_client_1.expectString)(data.name);
2543
- }
2544
- if (data.sourceServerID != null) {
2545
- contents.sourceServerID = (0, smithy_client_1.expectString)(data.sourceServerID);
2546
- }
2547
- if (data.targetInstanceTypeRightSizingMethod != null) {
2548
- contents.targetInstanceTypeRightSizingMethod = (0, smithy_client_1.expectString)(data.targetInstanceTypeRightSizingMethod);
2549
- }
2560
+ const doc = (0, smithy_client_1.take)(data, {
2561
+ copyPrivateIp: smithy_client_1.expectBoolean,
2562
+ copyTags: smithy_client_1.expectBoolean,
2563
+ ec2LaunchTemplateID: smithy_client_1.expectString,
2564
+ launchDisposition: smithy_client_1.expectString,
2565
+ licensing: smithy_client_1._json,
2566
+ name: smithy_client_1.expectString,
2567
+ sourceServerID: smithy_client_1.expectString,
2568
+ targetInstanceTypeRightSizingMethod: smithy_client_1.expectString,
2569
+ });
2570
+ Object.assign(contents, doc);
2550
2571
  return contents;
2551
2572
  };
2552
2573
  exports.de_UpdateLaunchConfigurationCommand = de_UpdateLaunchConfigurationCommand;
@@ -2577,73 +2598,90 @@ const de_UpdateLaunchConfigurationCommandError = async (output, context) => {
2577
2598
  throw await de_ValidationExceptionRes(parsedOutput, context);
2578
2599
  default:
2579
2600
  const parsedBody = parsedOutput.body;
2580
- (0, smithy_client_1.throwDefaultError)({
2601
+ return throwDefaultError({
2581
2602
  output,
2582
2603
  parsedBody,
2583
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2584
2604
  errorCode,
2585
2605
  });
2586
2606
  }
2587
2607
  };
2588
- const de_UpdateReplicationConfigurationCommand = async (output, context) => {
2608
+ const de_UpdateLaunchConfigurationTemplateCommand = async (output, context) => {
2589
2609
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2590
- return de_UpdateReplicationConfigurationCommandError(output, context);
2610
+ return de_UpdateLaunchConfigurationTemplateCommandError(output, context);
2591
2611
  }
2592
- const contents = map({
2612
+ const contents = (0, smithy_client_1.map)({
2593
2613
  $metadata: deserializeMetadata(output),
2594
2614
  });
2595
2615
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2596
- if (data.associateDefaultSecurityGroup != null) {
2597
- contents.associateDefaultSecurityGroup = (0, smithy_client_1.expectBoolean)(data.associateDefaultSecurityGroup);
2598
- }
2599
- if (data.autoReplicateNewDisks != null) {
2600
- contents.autoReplicateNewDisks = (0, smithy_client_1.expectBoolean)(data.autoReplicateNewDisks);
2601
- }
2602
- if (data.bandwidthThrottling != null) {
2603
- contents.bandwidthThrottling = (0, smithy_client_1.expectLong)(data.bandwidthThrottling);
2604
- }
2605
- if (data.createPublicIP != null) {
2606
- contents.createPublicIP = (0, smithy_client_1.expectBoolean)(data.createPublicIP);
2607
- }
2608
- if (data.dataPlaneRouting != null) {
2609
- contents.dataPlaneRouting = (0, smithy_client_1.expectString)(data.dataPlaneRouting);
2610
- }
2611
- if (data.defaultLargeStagingDiskType != null) {
2612
- contents.defaultLargeStagingDiskType = (0, smithy_client_1.expectString)(data.defaultLargeStagingDiskType);
2613
- }
2614
- if (data.ebsEncryption != null) {
2615
- contents.ebsEncryption = (0, smithy_client_1.expectString)(data.ebsEncryption);
2616
- }
2617
- if (data.ebsEncryptionKeyArn != null) {
2618
- contents.ebsEncryptionKeyArn = (0, smithy_client_1.expectString)(data.ebsEncryptionKeyArn);
2619
- }
2620
- if (data.name != null) {
2621
- contents.name = (0, smithy_client_1.expectString)(data.name);
2622
- }
2623
- if (data.pitPolicy != null) {
2624
- contents.pitPolicy = de_PITPolicy(data.pitPolicy, context);
2625
- }
2626
- if (data.replicatedDisks != null) {
2627
- contents.replicatedDisks = de_ReplicationConfigurationReplicatedDisks(data.replicatedDisks, context);
2628
- }
2629
- if (data.replicationServerInstanceType != null) {
2630
- contents.replicationServerInstanceType = (0, smithy_client_1.expectString)(data.replicationServerInstanceType);
2631
- }
2632
- if (data.replicationServersSecurityGroupsIDs != null) {
2633
- contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs(data.replicationServersSecurityGroupsIDs, context);
2634
- }
2635
- if (data.sourceServerID != null) {
2636
- contents.sourceServerID = (0, smithy_client_1.expectString)(data.sourceServerID);
2637
- }
2638
- if (data.stagingAreaSubnetId != null) {
2639
- contents.stagingAreaSubnetId = (0, smithy_client_1.expectString)(data.stagingAreaSubnetId);
2640
- }
2641
- if (data.stagingAreaTags != null) {
2642
- contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context);
2616
+ const doc = (0, smithy_client_1.take)(data, {
2617
+ launchConfigurationTemplate: smithy_client_1._json,
2618
+ });
2619
+ Object.assign(contents, doc);
2620
+ return contents;
2621
+ };
2622
+ exports.de_UpdateLaunchConfigurationTemplateCommand = de_UpdateLaunchConfigurationTemplateCommand;
2623
+ const de_UpdateLaunchConfigurationTemplateCommandError = async (output, context) => {
2624
+ const parsedOutput = {
2625
+ ...output,
2626
+ body: await parseErrorBody(output.body, context),
2627
+ };
2628
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2629
+ switch (errorCode) {
2630
+ case "AccessDeniedException":
2631
+ case "com.amazonaws.drs#AccessDeniedException":
2632
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2633
+ case "InternalServerException":
2634
+ case "com.amazonaws.drs#InternalServerException":
2635
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
2636
+ case "ResourceNotFoundException":
2637
+ case "com.amazonaws.drs#ResourceNotFoundException":
2638
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2639
+ case "ThrottlingException":
2640
+ case "com.amazonaws.drs#ThrottlingException":
2641
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2642
+ case "UninitializedAccountException":
2643
+ case "com.amazonaws.drs#UninitializedAccountException":
2644
+ throw await de_UninitializedAccountExceptionRes(parsedOutput, context);
2645
+ case "ValidationException":
2646
+ case "com.amazonaws.drs#ValidationException":
2647
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2648
+ default:
2649
+ const parsedBody = parsedOutput.body;
2650
+ return throwDefaultError({
2651
+ output,
2652
+ parsedBody,
2653
+ errorCode,
2654
+ });
2643
2655
  }
2644
- if (data.useDedicatedReplicationServer != null) {
2645
- contents.useDedicatedReplicationServer = (0, smithy_client_1.expectBoolean)(data.useDedicatedReplicationServer);
2656
+ };
2657
+ const de_UpdateReplicationConfigurationCommand = async (output, context) => {
2658
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2659
+ return de_UpdateReplicationConfigurationCommandError(output, context);
2646
2660
  }
2661
+ const contents = (0, smithy_client_1.map)({
2662
+ $metadata: deserializeMetadata(output),
2663
+ });
2664
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2665
+ const doc = (0, smithy_client_1.take)(data, {
2666
+ associateDefaultSecurityGroup: smithy_client_1.expectBoolean,
2667
+ autoReplicateNewDisks: smithy_client_1.expectBoolean,
2668
+ bandwidthThrottling: smithy_client_1.expectLong,
2669
+ createPublicIP: smithy_client_1.expectBoolean,
2670
+ dataPlaneRouting: smithy_client_1.expectString,
2671
+ defaultLargeStagingDiskType: smithy_client_1.expectString,
2672
+ ebsEncryption: smithy_client_1.expectString,
2673
+ ebsEncryptionKeyArn: smithy_client_1.expectString,
2674
+ name: smithy_client_1.expectString,
2675
+ pitPolicy: smithy_client_1._json,
2676
+ replicatedDisks: smithy_client_1._json,
2677
+ replicationServerInstanceType: smithy_client_1.expectString,
2678
+ replicationServersSecurityGroupsIDs: smithy_client_1._json,
2679
+ sourceServerID: smithy_client_1.expectString,
2680
+ stagingAreaSubnetId: smithy_client_1.expectString,
2681
+ stagingAreaTags: smithy_client_1._json,
2682
+ useDedicatedReplicationServer: smithy_client_1.expectBoolean,
2683
+ });
2684
+ Object.assign(contents, doc);
2647
2685
  return contents;
2648
2686
  };
2649
2687
  exports.de_UpdateReplicationConfigurationCommand = de_UpdateReplicationConfigurationCommand;
@@ -2677,10 +2715,9 @@ const de_UpdateReplicationConfigurationCommandError = async (output, context) =>
2677
2715
  throw await de_ValidationExceptionRes(parsedOutput, context);
2678
2716
  default:
2679
2717
  const parsedBody = parsedOutput.body;
2680
- (0, smithy_client_1.throwDefaultError)({
2718
+ return throwDefaultError({
2681
2719
  output,
2682
2720
  parsedBody,
2683
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2684
2721
  errorCode,
2685
2722
  });
2686
2723
  }
@@ -2689,61 +2726,30 @@ const de_UpdateReplicationConfigurationTemplateCommand = async (output, context)
2689
2726
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2690
2727
  return de_UpdateReplicationConfigurationTemplateCommandError(output, context);
2691
2728
  }
2692
- const contents = map({
2729
+ const contents = (0, smithy_client_1.map)({
2693
2730
  $metadata: deserializeMetadata(output),
2694
2731
  });
2695
2732
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2696
- if (data.arn != null) {
2697
- contents.arn = (0, smithy_client_1.expectString)(data.arn);
2698
- }
2699
- if (data.associateDefaultSecurityGroup != null) {
2700
- contents.associateDefaultSecurityGroup = (0, smithy_client_1.expectBoolean)(data.associateDefaultSecurityGroup);
2701
- }
2702
- if (data.autoReplicateNewDisks != null) {
2703
- contents.autoReplicateNewDisks = (0, smithy_client_1.expectBoolean)(data.autoReplicateNewDisks);
2704
- }
2705
- if (data.bandwidthThrottling != null) {
2706
- contents.bandwidthThrottling = (0, smithy_client_1.expectLong)(data.bandwidthThrottling);
2707
- }
2708
- if (data.createPublicIP != null) {
2709
- contents.createPublicIP = (0, smithy_client_1.expectBoolean)(data.createPublicIP);
2710
- }
2711
- if (data.dataPlaneRouting != null) {
2712
- contents.dataPlaneRouting = (0, smithy_client_1.expectString)(data.dataPlaneRouting);
2713
- }
2714
- if (data.defaultLargeStagingDiskType != null) {
2715
- contents.defaultLargeStagingDiskType = (0, smithy_client_1.expectString)(data.defaultLargeStagingDiskType);
2716
- }
2717
- if (data.ebsEncryption != null) {
2718
- contents.ebsEncryption = (0, smithy_client_1.expectString)(data.ebsEncryption);
2719
- }
2720
- if (data.ebsEncryptionKeyArn != null) {
2721
- contents.ebsEncryptionKeyArn = (0, smithy_client_1.expectString)(data.ebsEncryptionKeyArn);
2722
- }
2723
- if (data.pitPolicy != null) {
2724
- contents.pitPolicy = de_PITPolicy(data.pitPolicy, context);
2725
- }
2726
- if (data.replicationConfigurationTemplateID != null) {
2727
- contents.replicationConfigurationTemplateID = (0, smithy_client_1.expectString)(data.replicationConfigurationTemplateID);
2728
- }
2729
- if (data.replicationServerInstanceType != null) {
2730
- contents.replicationServerInstanceType = (0, smithy_client_1.expectString)(data.replicationServerInstanceType);
2731
- }
2732
- if (data.replicationServersSecurityGroupsIDs != null) {
2733
- contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs(data.replicationServersSecurityGroupsIDs, context);
2734
- }
2735
- if (data.stagingAreaSubnetId != null) {
2736
- contents.stagingAreaSubnetId = (0, smithy_client_1.expectString)(data.stagingAreaSubnetId);
2737
- }
2738
- if (data.stagingAreaTags != null) {
2739
- contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context);
2740
- }
2741
- if (data.tags != null) {
2742
- contents.tags = de_TagsMap(data.tags, context);
2743
- }
2744
- if (data.useDedicatedReplicationServer != null) {
2745
- contents.useDedicatedReplicationServer = (0, smithy_client_1.expectBoolean)(data.useDedicatedReplicationServer);
2746
- }
2733
+ const doc = (0, smithy_client_1.take)(data, {
2734
+ arn: smithy_client_1.expectString,
2735
+ associateDefaultSecurityGroup: smithy_client_1.expectBoolean,
2736
+ autoReplicateNewDisks: smithy_client_1.expectBoolean,
2737
+ bandwidthThrottling: smithy_client_1.expectLong,
2738
+ createPublicIP: smithy_client_1.expectBoolean,
2739
+ dataPlaneRouting: smithy_client_1.expectString,
2740
+ defaultLargeStagingDiskType: smithy_client_1.expectString,
2741
+ ebsEncryption: smithy_client_1.expectString,
2742
+ ebsEncryptionKeyArn: smithy_client_1.expectString,
2743
+ pitPolicy: smithy_client_1._json,
2744
+ replicationConfigurationTemplateID: smithy_client_1.expectString,
2745
+ replicationServerInstanceType: smithy_client_1.expectString,
2746
+ replicationServersSecurityGroupsIDs: smithy_client_1._json,
2747
+ stagingAreaSubnetId: smithy_client_1.expectString,
2748
+ stagingAreaTags: smithy_client_1._json,
2749
+ tags: smithy_client_1._json,
2750
+ useDedicatedReplicationServer: smithy_client_1.expectBoolean,
2751
+ });
2752
+ Object.assign(contents, doc);
2747
2753
  return contents;
2748
2754
  };
2749
2755
  exports.de_UpdateReplicationConfigurationTemplateCommand = de_UpdateReplicationConfigurationTemplateCommand;
@@ -2774,24 +2780,22 @@ const de_UpdateReplicationConfigurationTemplateCommandError = async (output, con
2774
2780
  throw await de_ValidationExceptionRes(parsedOutput, context);
2775
2781
  default:
2776
2782
  const parsedBody = parsedOutput.body;
2777
- (0, smithy_client_1.throwDefaultError)({
2783
+ return throwDefaultError({
2778
2784
  output,
2779
2785
  parsedBody,
2780
- exceptionCtor: DrsServiceException_1.DrsServiceException,
2781
2786
  errorCode,
2782
2787
  });
2783
2788
  }
2784
2789
  };
2785
- const map = smithy_client_1.map;
2790
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(DrsServiceException_1.DrsServiceException);
2786
2791
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2787
- const contents = map({});
2792
+ const contents = (0, smithy_client_1.map)({});
2788
2793
  const data = parsedOutput.body;
2789
- if (data.code != null) {
2790
- contents.code = (0, smithy_client_1.expectString)(data.code);
2791
- }
2792
- if (data.message != null) {
2793
- contents.message = (0, smithy_client_1.expectString)(data.message);
2794
- }
2794
+ const doc = (0, smithy_client_1.take)(data, {
2795
+ code: smithy_client_1.expectString,
2796
+ message: smithy_client_1.expectString,
2797
+ });
2798
+ Object.assign(contents, doc);
2795
2799
  const exception = new models_0_1.AccessDeniedException({
2796
2800
  $metadata: deserializeMetadata(parsedOutput),
2797
2801
  ...contents,
@@ -2799,20 +2803,15 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2799
2803
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2800
2804
  };
2801
2805
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2802
- const contents = map({});
2806
+ const contents = (0, smithy_client_1.map)({});
2803
2807
  const data = parsedOutput.body;
2804
- if (data.code != null) {
2805
- contents.code = (0, smithy_client_1.expectString)(data.code);
2806
- }
2807
- if (data.message != null) {
2808
- contents.message = (0, smithy_client_1.expectString)(data.message);
2809
- }
2810
- if (data.resourceId != null) {
2811
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
2812
- }
2813
- if (data.resourceType != null) {
2814
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
2815
- }
2808
+ const doc = (0, smithy_client_1.take)(data, {
2809
+ code: smithy_client_1.expectString,
2810
+ message: smithy_client_1.expectString,
2811
+ resourceId: smithy_client_1.expectString,
2812
+ resourceType: smithy_client_1.expectString,
2813
+ });
2814
+ Object.assign(contents, doc);
2816
2815
  const exception = new models_0_1.ConflictException({
2817
2816
  $metadata: deserializeMetadata(parsedOutput),
2818
2817
  ...contents,
@@ -2820,16 +2819,17 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2820
2819
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2821
2820
  };
2822
2821
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2823
- const contents = map({
2822
+ const contents = (0, smithy_client_1.map)({
2824
2823
  retryAfterSeconds: [
2825
2824
  () => void 0 !== parsedOutput.headers["retry-after"],
2826
2825
  () => (0, smithy_client_1.strictParseLong)(parsedOutput.headers["retry-after"]),
2827
2826
  ],
2828
2827
  });
2829
2828
  const data = parsedOutput.body;
2830
- if (data.message != null) {
2831
- contents.message = (0, smithy_client_1.expectString)(data.message);
2832
- }
2829
+ const doc = (0, smithy_client_1.take)(data, {
2830
+ message: smithy_client_1.expectString,
2831
+ });
2832
+ Object.assign(contents, doc);
2833
2833
  const exception = new models_0_1.InternalServerException({
2834
2834
  $metadata: deserializeMetadata(parsedOutput),
2835
2835
  ...contents,
@@ -2837,20 +2837,15 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2837
2837
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2838
2838
  };
2839
2839
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2840
- const contents = map({});
2840
+ const contents = (0, smithy_client_1.map)({});
2841
2841
  const data = parsedOutput.body;
2842
- if (data.code != null) {
2843
- contents.code = (0, smithy_client_1.expectString)(data.code);
2844
- }
2845
- if (data.message != null) {
2846
- contents.message = (0, smithy_client_1.expectString)(data.message);
2847
- }
2848
- if (data.resourceId != null) {
2849
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
2850
- }
2851
- if (data.resourceType != null) {
2852
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
2853
- }
2842
+ const doc = (0, smithy_client_1.take)(data, {
2843
+ code: smithy_client_1.expectString,
2844
+ message: smithy_client_1.expectString,
2845
+ resourceId: smithy_client_1.expectString,
2846
+ resourceType: smithy_client_1.expectString,
2847
+ });
2848
+ Object.assign(contents, doc);
2854
2849
  const exception = new models_0_1.ResourceNotFoundException({
2855
2850
  $metadata: deserializeMetadata(parsedOutput),
2856
2851
  ...contents,
@@ -2858,26 +2853,17 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2858
2853
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2859
2854
  };
2860
2855
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2861
- const contents = map({});
2856
+ const contents = (0, smithy_client_1.map)({});
2862
2857
  const data = parsedOutput.body;
2863
- if (data.code != null) {
2864
- contents.code = (0, smithy_client_1.expectString)(data.code);
2865
- }
2866
- if (data.message != null) {
2867
- contents.message = (0, smithy_client_1.expectString)(data.message);
2868
- }
2869
- if (data.quotaCode != null) {
2870
- contents.quotaCode = (0, smithy_client_1.expectString)(data.quotaCode);
2871
- }
2872
- if (data.resourceId != null) {
2873
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
2874
- }
2875
- if (data.resourceType != null) {
2876
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
2877
- }
2878
- if (data.serviceCode != null) {
2879
- contents.serviceCode = (0, smithy_client_1.expectString)(data.serviceCode);
2880
- }
2858
+ const doc = (0, smithy_client_1.take)(data, {
2859
+ code: smithy_client_1.expectString,
2860
+ message: smithy_client_1.expectString,
2861
+ quotaCode: smithy_client_1.expectString,
2862
+ resourceId: smithy_client_1.expectString,
2863
+ resourceType: smithy_client_1.expectString,
2864
+ serviceCode: smithy_client_1.expectString,
2865
+ });
2866
+ Object.assign(contents, doc);
2881
2867
  const exception = new models_0_1.ServiceQuotaExceededException({
2882
2868
  $metadata: deserializeMetadata(parsedOutput),
2883
2869
  ...contents,
@@ -2885,19 +2871,16 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2885
2871
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2886
2872
  };
2887
2873
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2888
- const contents = map({
2874
+ const contents = (0, smithy_client_1.map)({
2889
2875
  retryAfterSeconds: [, parsedOutput.headers["retry-after"]],
2890
2876
  });
2891
2877
  const data = parsedOutput.body;
2892
- if (data.message != null) {
2893
- contents.message = (0, smithy_client_1.expectString)(data.message);
2894
- }
2895
- if (data.quotaCode != null) {
2896
- contents.quotaCode = (0, smithy_client_1.expectString)(data.quotaCode);
2897
- }
2898
- if (data.serviceCode != null) {
2899
- contents.serviceCode = (0, smithy_client_1.expectString)(data.serviceCode);
2900
- }
2878
+ const doc = (0, smithy_client_1.take)(data, {
2879
+ message: smithy_client_1.expectString,
2880
+ quotaCode: smithy_client_1.expectString,
2881
+ serviceCode: smithy_client_1.expectString,
2882
+ });
2883
+ Object.assign(contents, doc);
2901
2884
  const exception = new models_0_1.ThrottlingException({
2902
2885
  $metadata: deserializeMetadata(parsedOutput),
2903
2886
  ...contents,
@@ -2905,14 +2888,13 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2905
2888
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2906
2889
  };
2907
2890
  const de_UninitializedAccountExceptionRes = async (parsedOutput, context) => {
2908
- const contents = map({});
2891
+ const contents = (0, smithy_client_1.map)({});
2909
2892
  const data = parsedOutput.body;
2910
- if (data.code != null) {
2911
- contents.code = (0, smithy_client_1.expectString)(data.code);
2912
- }
2913
- if (data.message != null) {
2914
- contents.message = (0, smithy_client_1.expectString)(data.message);
2915
- }
2893
+ const doc = (0, smithy_client_1.take)(data, {
2894
+ code: smithy_client_1.expectString,
2895
+ message: smithy_client_1.expectString,
2896
+ });
2897
+ Object.assign(contents, doc);
2916
2898
  const exception = new models_0_1.UninitializedAccountException({
2917
2899
  $metadata: deserializeMetadata(parsedOutput),
2918
2900
  ...contents,
@@ -2920,829 +2902,21 @@ const de_UninitializedAccountExceptionRes = async (parsedOutput, context) => {
2920
2902
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2921
2903
  };
2922
2904
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2923
- const contents = map({});
2905
+ const contents = (0, smithy_client_1.map)({});
2924
2906
  const data = parsedOutput.body;
2925
- if (data.code != null) {
2926
- contents.code = (0, smithy_client_1.expectString)(data.code);
2927
- }
2928
- if (data.fieldList != null) {
2929
- contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context);
2930
- }
2931
- if (data.message != null) {
2932
- contents.message = (0, smithy_client_1.expectString)(data.message);
2933
- }
2934
- if (data.reason != null) {
2935
- contents.reason = (0, smithy_client_1.expectString)(data.reason);
2936
- }
2907
+ const doc = (0, smithy_client_1.take)(data, {
2908
+ code: smithy_client_1.expectString,
2909
+ fieldList: smithy_client_1._json,
2910
+ message: smithy_client_1.expectString,
2911
+ reason: smithy_client_1.expectString,
2912
+ });
2913
+ Object.assign(contents, doc);
2937
2914
  const exception = new models_0_1.ValidationException({
2938
2915
  $metadata: deserializeMetadata(parsedOutput),
2939
2916
  ...contents,
2940
2917
  });
2941
2918
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2942
2919
  };
2943
- const se_AccountIDs = (input, context) => {
2944
- return input
2945
- .filter((e) => e != null)
2946
- .map((entry) => {
2947
- return entry;
2948
- });
2949
- };
2950
- const se_DescribeJobsRequestFilters = (input, context) => {
2951
- return {
2952
- ...(input.fromDate != null && { fromDate: input.fromDate }),
2953
- ...(input.jobIDs != null && { jobIDs: se_DescribeJobsRequestFiltersJobIDs(input.jobIDs, context) }),
2954
- ...(input.toDate != null && { toDate: input.toDate }),
2955
- };
2956
- };
2957
- const se_DescribeJobsRequestFiltersJobIDs = (input, context) => {
2958
- return input
2959
- .filter((e) => e != null)
2960
- .map((entry) => {
2961
- return entry;
2962
- });
2963
- };
2964
- const se_DescribeRecoveryInstancesRequestFilters = (input, context) => {
2965
- return {
2966
- ...(input.recoveryInstanceIDs != null && {
2967
- recoveryInstanceIDs: se_RecoveryInstanceIDs(input.recoveryInstanceIDs, context),
2968
- }),
2969
- ...(input.sourceServerIDs != null && { sourceServerIDs: se_SourceServerIDs(input.sourceServerIDs, context) }),
2970
- };
2971
- };
2972
- const se_DescribeRecoverySnapshotsRequestFilters = (input, context) => {
2973
- return {
2974
- ...(input.fromDateTime != null && { fromDateTime: input.fromDateTime }),
2975
- ...(input.toDateTime != null && { toDateTime: input.toDateTime }),
2976
- };
2977
- };
2978
- const se_DescribeSourceServersRequestFilters = (input, context) => {
2979
- return {
2980
- ...(input.hardwareId != null && { hardwareId: input.hardwareId }),
2981
- ...(input.sourceServerIDs != null && {
2982
- sourceServerIDs: se_DescribeSourceServersRequestFiltersIDs(input.sourceServerIDs, context),
2983
- }),
2984
- ...(input.stagingAccountIDs != null && { stagingAccountIDs: se_AccountIDs(input.stagingAccountIDs, context) }),
2985
- };
2986
- };
2987
- const se_DescribeSourceServersRequestFiltersIDs = (input, context) => {
2988
- return input
2989
- .filter((e) => e != null)
2990
- .map((entry) => {
2991
- return entry;
2992
- });
2993
- };
2994
- const se_Licensing = (input, context) => {
2995
- return {
2996
- ...(input.osByol != null && { osByol: input.osByol }),
2997
- };
2998
- };
2999
- const se_PITPolicy = (input, context) => {
3000
- return input
3001
- .filter((e) => e != null)
3002
- .map((entry) => {
3003
- return se_PITPolicyRule(entry, context);
3004
- });
3005
- };
3006
- const se_PITPolicyRule = (input, context) => {
3007
- return {
3008
- ...(input.enabled != null && { enabled: input.enabled }),
3009
- ...(input.interval != null && { interval: input.interval }),
3010
- ...(input.retentionDuration != null && { retentionDuration: input.retentionDuration }),
3011
- ...(input.ruleID != null && { ruleID: input.ruleID }),
3012
- ...(input.units != null && { units: input.units }),
3013
- };
3014
- };
3015
- const se_RecoveryInstanceIDs = (input, context) => {
3016
- return input
3017
- .filter((e) => e != null)
3018
- .map((entry) => {
3019
- return entry;
3020
- });
3021
- };
3022
- const se_RecoveryInstancesForTerminationRequest = (input, context) => {
3023
- return input
3024
- .filter((e) => e != null)
3025
- .map((entry) => {
3026
- return entry;
3027
- });
3028
- };
3029
- const se_ReplicationConfigurationReplicatedDisk = (input, context) => {
3030
- return {
3031
- ...(input.deviceName != null && { deviceName: input.deviceName }),
3032
- ...(input.iops != null && { iops: input.iops }),
3033
- ...(input.isBootDisk != null && { isBootDisk: input.isBootDisk }),
3034
- ...(input.optimizedStagingDiskType != null && { optimizedStagingDiskType: input.optimizedStagingDiskType }),
3035
- ...(input.stagingDiskType != null && { stagingDiskType: input.stagingDiskType }),
3036
- ...(input.throughput != null && { throughput: input.throughput }),
3037
- };
3038
- };
3039
- const se_ReplicationConfigurationReplicatedDisks = (input, context) => {
3040
- return input
3041
- .filter((e) => e != null)
3042
- .map((entry) => {
3043
- return se_ReplicationConfigurationReplicatedDisk(entry, context);
3044
- });
3045
- };
3046
- const se_ReplicationConfigurationTemplateIDs = (input, context) => {
3047
- return input
3048
- .filter((e) => e != null)
3049
- .map((entry) => {
3050
- return entry;
3051
- });
3052
- };
3053
- const se_ReplicationServersSecurityGroupsIDs = (input, context) => {
3054
- return input
3055
- .filter((e) => e != null)
3056
- .map((entry) => {
3057
- return entry;
3058
- });
3059
- };
3060
- const se_SourceServerIDs = (input, context) => {
3061
- return input
3062
- .filter((e) => e != null)
3063
- .map((entry) => {
3064
- return entry;
3065
- });
3066
- };
3067
- const se_StartFailbackRequestRecoveryInstanceIDs = (input, context) => {
3068
- return input
3069
- .filter((e) => e != null)
3070
- .map((entry) => {
3071
- return entry;
3072
- });
3073
- };
3074
- const se_StartRecoveryRequestSourceServer = (input, context) => {
3075
- return {
3076
- ...(input.recoverySnapshotID != null && { recoverySnapshotID: input.recoverySnapshotID }),
3077
- ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }),
3078
- };
3079
- };
3080
- const se_StartRecoveryRequestSourceServers = (input, context) => {
3081
- return input
3082
- .filter((e) => e != null)
3083
- .map((entry) => {
3084
- return se_StartRecoveryRequestSourceServer(entry, context);
3085
- });
3086
- };
3087
- const se_TagsMap = (input, context) => {
3088
- return Object.entries(input).reduce((acc, [key, value]) => {
3089
- if (value === null) {
3090
- return acc;
3091
- }
3092
- acc[key] = value;
3093
- return acc;
3094
- }, {});
3095
- };
3096
- const de_Account = (output, context) => {
3097
- return {
3098
- accountID: (0, smithy_client_1.expectString)(output.accountID),
3099
- };
3100
- };
3101
- const de_Accounts = (output, context) => {
3102
- const retVal = (output || [])
3103
- .filter((e) => e != null)
3104
- .map((entry) => {
3105
- if (entry === null) {
3106
- return null;
3107
- }
3108
- return de_Account(entry, context);
3109
- });
3110
- return retVal;
3111
- };
3112
- const de_ConversionMap = (output, context) => {
3113
- return Object.entries(output).reduce((acc, [key, value]) => {
3114
- if (value === null) {
3115
- return acc;
3116
- }
3117
- acc[key] = (0, smithy_client_1.expectString)(value);
3118
- return acc;
3119
- }, {});
3120
- };
3121
- const de_ConversionProperties = (output, context) => {
3122
- return {
3123
- dataTimestamp: (0, smithy_client_1.expectString)(output.dataTimestamp),
3124
- forceUefi: (0, smithy_client_1.expectBoolean)(output.forceUefi),
3125
- rootVolumeName: (0, smithy_client_1.expectString)(output.rootVolumeName),
3126
- volumeToConversionMap: output.volumeToConversionMap != null
3127
- ? de_VolumeToConversionMap(output.volumeToConversionMap, context)
3128
- : undefined,
3129
- volumeToVolumeSize: output.volumeToVolumeSize != null ? de_VolumeToSizeMap(output.volumeToVolumeSize, context) : undefined,
3130
- };
3131
- };
3132
- const de_CPU = (output, context) => {
3133
- return {
3134
- cores: (0, smithy_client_1.expectLong)(output.cores),
3135
- modelName: (0, smithy_client_1.expectString)(output.modelName),
3136
- };
3137
- };
3138
- const de_Cpus = (output, context) => {
3139
- const retVal = (output || [])
3140
- .filter((e) => e != null)
3141
- .map((entry) => {
3142
- if (entry === null) {
3143
- return null;
3144
- }
3145
- return de_CPU(entry, context);
3146
- });
3147
- return retVal;
3148
- };
3149
- const de_DataReplicationError = (output, context) => {
3150
- return {
3151
- error: (0, smithy_client_1.expectString)(output.error),
3152
- rawError: (0, smithy_client_1.expectString)(output.rawError),
3153
- };
3154
- };
3155
- const de_DataReplicationInfo = (output, context) => {
3156
- return {
3157
- dataReplicationError: output.dataReplicationError != null ? de_DataReplicationError(output.dataReplicationError, context) : undefined,
3158
- dataReplicationInitiation: output.dataReplicationInitiation != null
3159
- ? de_DataReplicationInitiation(output.dataReplicationInitiation, context)
3160
- : undefined,
3161
- dataReplicationState: (0, smithy_client_1.expectString)(output.dataReplicationState),
3162
- etaDateTime: (0, smithy_client_1.expectString)(output.etaDateTime),
3163
- lagDuration: (0, smithy_client_1.expectString)(output.lagDuration),
3164
- replicatedDisks: output.replicatedDisks != null
3165
- ? de_DataReplicationInfoReplicatedDisks(output.replicatedDisks, context)
3166
- : undefined,
3167
- stagingAvailabilityZone: (0, smithy_client_1.expectString)(output.stagingAvailabilityZone),
3168
- };
3169
- };
3170
- const de_DataReplicationInfoReplicatedDisk = (output, context) => {
3171
- return {
3172
- backloggedStorageBytes: (0, smithy_client_1.expectLong)(output.backloggedStorageBytes),
3173
- deviceName: (0, smithy_client_1.expectString)(output.deviceName),
3174
- replicatedStorageBytes: (0, smithy_client_1.expectLong)(output.replicatedStorageBytes),
3175
- rescannedStorageBytes: (0, smithy_client_1.expectLong)(output.rescannedStorageBytes),
3176
- totalStorageBytes: (0, smithy_client_1.expectLong)(output.totalStorageBytes),
3177
- };
3178
- };
3179
- const de_DataReplicationInfoReplicatedDisks = (output, context) => {
3180
- const retVal = (output || [])
3181
- .filter((e) => e != null)
3182
- .map((entry) => {
3183
- if (entry === null) {
3184
- return null;
3185
- }
3186
- return de_DataReplicationInfoReplicatedDisk(entry, context);
3187
- });
3188
- return retVal;
3189
- };
3190
- const de_DataReplicationInitiation = (output, context) => {
3191
- return {
3192
- nextAttemptDateTime: (0, smithy_client_1.expectString)(output.nextAttemptDateTime),
3193
- startDateTime: (0, smithy_client_1.expectString)(output.startDateTime),
3194
- steps: output.steps != null ? de_DataReplicationInitiationSteps(output.steps, context) : undefined,
3195
- };
3196
- };
3197
- const de_DataReplicationInitiationStep = (output, context) => {
3198
- return {
3199
- name: (0, smithy_client_1.expectString)(output.name),
3200
- status: (0, smithy_client_1.expectString)(output.status),
3201
- };
3202
- };
3203
- const de_DataReplicationInitiationSteps = (output, context) => {
3204
- const retVal = (output || [])
3205
- .filter((e) => e != null)
3206
- .map((entry) => {
3207
- if (entry === null) {
3208
- return null;
3209
- }
3210
- return de_DataReplicationInitiationStep(entry, context);
3211
- });
3212
- return retVal;
3213
- };
3214
- const de_DescribeRecoveryInstancesItems = (output, context) => {
3215
- const retVal = (output || [])
3216
- .filter((e) => e != null)
3217
- .map((entry) => {
3218
- if (entry === null) {
3219
- return null;
3220
- }
3221
- return de_RecoveryInstance(entry, context);
3222
- });
3223
- return retVal;
3224
- };
3225
- const de_Disk = (output, context) => {
3226
- return {
3227
- bytes: (0, smithy_client_1.expectLong)(output.bytes),
3228
- deviceName: (0, smithy_client_1.expectString)(output.deviceName),
3229
- };
3230
- };
3231
- const de_Disks = (output, context) => {
3232
- const retVal = (output || [])
3233
- .filter((e) => e != null)
3234
- .map((entry) => {
3235
- if (entry === null) {
3236
- return null;
3237
- }
3238
- return de_Disk(entry, context);
3239
- });
3240
- return retVal;
3241
- };
3242
- const de_EbsSnapshotsList = (output, context) => {
3243
- const retVal = (output || [])
3244
- .filter((e) => e != null)
3245
- .map((entry) => {
3246
- if (entry === null) {
3247
- return null;
3248
- }
3249
- return (0, smithy_client_1.expectString)(entry);
3250
- });
3251
- return retVal;
3252
- };
3253
- const de_IdentificationHints = (output, context) => {
3254
- return {
3255
- awsInstanceID: (0, smithy_client_1.expectString)(output.awsInstanceID),
3256
- fqdn: (0, smithy_client_1.expectString)(output.fqdn),
3257
- hostname: (0, smithy_client_1.expectString)(output.hostname),
3258
- vmWareUuid: (0, smithy_client_1.expectString)(output.vmWareUuid),
3259
- };
3260
- };
3261
- const de_IPsList = (output, context) => {
3262
- const retVal = (output || [])
3263
- .filter((e) => e != null)
3264
- .map((entry) => {
3265
- if (entry === null) {
3266
- return null;
3267
- }
3268
- return (0, smithy_client_1.expectString)(entry);
3269
- });
3270
- return retVal;
3271
- };
3272
- const de_Job = (output, context) => {
3273
- return {
3274
- arn: (0, smithy_client_1.expectString)(output.arn),
3275
- creationDateTime: (0, smithy_client_1.expectString)(output.creationDateTime),
3276
- endDateTime: (0, smithy_client_1.expectString)(output.endDateTime),
3277
- initiatedBy: (0, smithy_client_1.expectString)(output.initiatedBy),
3278
- jobID: (0, smithy_client_1.expectString)(output.jobID),
3279
- participatingServers: output.participatingServers != null ? de_ParticipatingServers(output.participatingServers, context) : undefined,
3280
- status: (0, smithy_client_1.expectString)(output.status),
3281
- tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined,
3282
- type: (0, smithy_client_1.expectString)(output.type),
3283
- };
3284
- };
3285
- const de_JobLog = (output, context) => {
3286
- return {
3287
- event: (0, smithy_client_1.expectString)(output.event),
3288
- eventData: output.eventData != null ? de_JobLogEventData(output.eventData, context) : undefined,
3289
- logDateTime: (0, smithy_client_1.expectString)(output.logDateTime),
3290
- };
3291
- };
3292
- const de_JobLogEventData = (output, context) => {
3293
- return {
3294
- conversionProperties: output.conversionProperties != null ? de_ConversionProperties(output.conversionProperties, context) : undefined,
3295
- conversionServerID: (0, smithy_client_1.expectString)(output.conversionServerID),
3296
- rawError: (0, smithy_client_1.expectString)(output.rawError),
3297
- sourceServerID: (0, smithy_client_1.expectString)(output.sourceServerID),
3298
- targetInstanceID: (0, smithy_client_1.expectString)(output.targetInstanceID),
3299
- };
3300
- };
3301
- const de_JobLogs = (output, context) => {
3302
- const retVal = (output || [])
3303
- .filter((e) => e != null)
3304
- .map((entry) => {
3305
- if (entry === null) {
3306
- return null;
3307
- }
3308
- return de_JobLog(entry, context);
3309
- });
3310
- return retVal;
3311
- };
3312
- const de_JobsList = (output, context) => {
3313
- const retVal = (output || [])
3314
- .filter((e) => e != null)
3315
- .map((entry) => {
3316
- if (entry === null) {
3317
- return null;
3318
- }
3319
- return de_Job(entry, context);
3320
- });
3321
- return retVal;
3322
- };
3323
- const de_Licensing = (output, context) => {
3324
- return {
3325
- osByol: (0, smithy_client_1.expectBoolean)(output.osByol),
3326
- };
3327
- };
3328
- const de_LifeCycle = (output, context) => {
3329
- return {
3330
- addedToServiceDateTime: (0, smithy_client_1.expectString)(output.addedToServiceDateTime),
3331
- elapsedReplicationDuration: (0, smithy_client_1.expectString)(output.elapsedReplicationDuration),
3332
- firstByteDateTime: (0, smithy_client_1.expectString)(output.firstByteDateTime),
3333
- lastLaunch: output.lastLaunch != null ? de_LifeCycleLastLaunch(output.lastLaunch, context) : undefined,
3334
- lastSeenByServiceDateTime: (0, smithy_client_1.expectString)(output.lastSeenByServiceDateTime),
3335
- };
3336
- };
3337
- const de_LifeCycleLastLaunch = (output, context) => {
3338
- return {
3339
- initiated: output.initiated != null ? de_LifeCycleLastLaunchInitiated(output.initiated, context) : undefined,
3340
- status: (0, smithy_client_1.expectString)(output.status),
3341
- };
3342
- };
3343
- const de_LifeCycleLastLaunchInitiated = (output, context) => {
3344
- return {
3345
- apiCallDateTime: (0, smithy_client_1.expectString)(output.apiCallDateTime),
3346
- jobID: (0, smithy_client_1.expectString)(output.jobID),
3347
- type: (0, smithy_client_1.expectString)(output.type),
3348
- };
3349
- };
3350
- const de_NetworkInterface = (output, context) => {
3351
- return {
3352
- ips: output.ips != null ? de_IPsList(output.ips, context) : undefined,
3353
- isPrimary: (0, smithy_client_1.expectBoolean)(output.isPrimary),
3354
- macAddress: (0, smithy_client_1.expectString)(output.macAddress),
3355
- };
3356
- };
3357
- const de_NetworkInterfaces = (output, context) => {
3358
- const retVal = (output || [])
3359
- .filter((e) => e != null)
3360
- .map((entry) => {
3361
- if (entry === null) {
3362
- return null;
3363
- }
3364
- return de_NetworkInterface(entry, context);
3365
- });
3366
- return retVal;
3367
- };
3368
- const de_OS = (output, context) => {
3369
- return {
3370
- fullString: (0, smithy_client_1.expectString)(output.fullString),
3371
- };
3372
- };
3373
- const de_ParticipatingServer = (output, context) => {
3374
- return {
3375
- launchStatus: (0, smithy_client_1.expectString)(output.launchStatus),
3376
- recoveryInstanceID: (0, smithy_client_1.expectString)(output.recoveryInstanceID),
3377
- sourceServerID: (0, smithy_client_1.expectString)(output.sourceServerID),
3378
- };
3379
- };
3380
- const de_ParticipatingServers = (output, context) => {
3381
- const retVal = (output || [])
3382
- .filter((e) => e != null)
3383
- .map((entry) => {
3384
- if (entry === null) {
3385
- return null;
3386
- }
3387
- return de_ParticipatingServer(entry, context);
3388
- });
3389
- return retVal;
3390
- };
3391
- const de_PITPolicy = (output, context) => {
3392
- const retVal = (output || [])
3393
- .filter((e) => e != null)
3394
- .map((entry) => {
3395
- if (entry === null) {
3396
- return null;
3397
- }
3398
- return de_PITPolicyRule(entry, context);
3399
- });
3400
- return retVal;
3401
- };
3402
- const de_PITPolicyRule = (output, context) => {
3403
- return {
3404
- enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
3405
- interval: (0, smithy_client_1.expectInt32)(output.interval),
3406
- retentionDuration: (0, smithy_client_1.expectInt32)(output.retentionDuration),
3407
- ruleID: (0, smithy_client_1.expectLong)(output.ruleID),
3408
- units: (0, smithy_client_1.expectString)(output.units),
3409
- };
3410
- };
3411
- const de_RecoveryInstance = (output, context) => {
3412
- return {
3413
- arn: (0, smithy_client_1.expectString)(output.arn),
3414
- dataReplicationInfo: output.dataReplicationInfo != null
3415
- ? de_RecoveryInstanceDataReplicationInfo(output.dataReplicationInfo, context)
3416
- : undefined,
3417
- ec2InstanceID: (0, smithy_client_1.expectString)(output.ec2InstanceID),
3418
- ec2InstanceState: (0, smithy_client_1.expectString)(output.ec2InstanceState),
3419
- failback: output.failback != null ? de_RecoveryInstanceFailback(output.failback, context) : undefined,
3420
- isDrill: (0, smithy_client_1.expectBoolean)(output.isDrill),
3421
- jobID: (0, smithy_client_1.expectString)(output.jobID),
3422
- originAvailabilityZone: (0, smithy_client_1.expectString)(output.originAvailabilityZone),
3423
- originEnvironment: (0, smithy_client_1.expectString)(output.originEnvironment),
3424
- pointInTimeSnapshotDateTime: (0, smithy_client_1.expectString)(output.pointInTimeSnapshotDateTime),
3425
- recoveryInstanceID: (0, smithy_client_1.expectString)(output.recoveryInstanceID),
3426
- recoveryInstanceProperties: output.recoveryInstanceProperties != null
3427
- ? de_RecoveryInstanceProperties(output.recoveryInstanceProperties, context)
3428
- : undefined,
3429
- sourceServerID: (0, smithy_client_1.expectString)(output.sourceServerID),
3430
- tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined,
3431
- };
3432
- };
3433
- const de_RecoveryInstanceDataReplicationError = (output, context) => {
3434
- return {
3435
- error: (0, smithy_client_1.expectString)(output.error),
3436
- rawError: (0, smithy_client_1.expectString)(output.rawError),
3437
- };
3438
- };
3439
- const de_RecoveryInstanceDataReplicationInfo = (output, context) => {
3440
- return {
3441
- dataReplicationError: output.dataReplicationError != null
3442
- ? de_RecoveryInstanceDataReplicationError(output.dataReplicationError, context)
3443
- : undefined,
3444
- dataReplicationInitiation: output.dataReplicationInitiation != null
3445
- ? de_RecoveryInstanceDataReplicationInitiation(output.dataReplicationInitiation, context)
3446
- : undefined,
3447
- dataReplicationState: (0, smithy_client_1.expectString)(output.dataReplicationState),
3448
- etaDateTime: (0, smithy_client_1.expectString)(output.etaDateTime),
3449
- lagDuration: (0, smithy_client_1.expectString)(output.lagDuration),
3450
- replicatedDisks: output.replicatedDisks != null
3451
- ? de_RecoveryInstanceDataReplicationInfoReplicatedDisks(output.replicatedDisks, context)
3452
- : undefined,
3453
- stagingAvailabilityZone: (0, smithy_client_1.expectString)(output.stagingAvailabilityZone),
3454
- };
3455
- };
3456
- const de_RecoveryInstanceDataReplicationInfoReplicatedDisk = (output, context) => {
3457
- return {
3458
- backloggedStorageBytes: (0, smithy_client_1.expectLong)(output.backloggedStorageBytes),
3459
- deviceName: (0, smithy_client_1.expectString)(output.deviceName),
3460
- replicatedStorageBytes: (0, smithy_client_1.expectLong)(output.replicatedStorageBytes),
3461
- rescannedStorageBytes: (0, smithy_client_1.expectLong)(output.rescannedStorageBytes),
3462
- totalStorageBytes: (0, smithy_client_1.expectLong)(output.totalStorageBytes),
3463
- };
3464
- };
3465
- const de_RecoveryInstanceDataReplicationInfoReplicatedDisks = (output, context) => {
3466
- const retVal = (output || [])
3467
- .filter((e) => e != null)
3468
- .map((entry) => {
3469
- if (entry === null) {
3470
- return null;
3471
- }
3472
- return de_RecoveryInstanceDataReplicationInfoReplicatedDisk(entry, context);
3473
- });
3474
- return retVal;
3475
- };
3476
- const de_RecoveryInstanceDataReplicationInitiation = (output, context) => {
3477
- return {
3478
- startDateTime: (0, smithy_client_1.expectString)(output.startDateTime),
3479
- steps: output.steps != null ? de_RecoveryInstanceDataReplicationInitiationSteps(output.steps, context) : undefined,
3480
- };
3481
- };
3482
- const de_RecoveryInstanceDataReplicationInitiationStep = (output, context) => {
3483
- return {
3484
- name: (0, smithy_client_1.expectString)(output.name),
3485
- status: (0, smithy_client_1.expectString)(output.status),
3486
- };
3487
- };
3488
- const de_RecoveryInstanceDataReplicationInitiationSteps = (output, context) => {
3489
- const retVal = (output || [])
3490
- .filter((e) => e != null)
3491
- .map((entry) => {
3492
- if (entry === null) {
3493
- return null;
3494
- }
3495
- return de_RecoveryInstanceDataReplicationInitiationStep(entry, context);
3496
- });
3497
- return retVal;
3498
- };
3499
- const de_RecoveryInstanceDisk = (output, context) => {
3500
- return {
3501
- bytes: (0, smithy_client_1.expectLong)(output.bytes),
3502
- ebsVolumeID: (0, smithy_client_1.expectString)(output.ebsVolumeID),
3503
- internalDeviceName: (0, smithy_client_1.expectString)(output.internalDeviceName),
3504
- };
3505
- };
3506
- const de_RecoveryInstanceDisks = (output, context) => {
3507
- const retVal = (output || [])
3508
- .filter((e) => e != null)
3509
- .map((entry) => {
3510
- if (entry === null) {
3511
- return null;
3512
- }
3513
- return de_RecoveryInstanceDisk(entry, context);
3514
- });
3515
- return retVal;
3516
- };
3517
- const de_RecoveryInstanceFailback = (output, context) => {
3518
- return {
3519
- agentLastSeenByServiceDateTime: (0, smithy_client_1.expectString)(output.agentLastSeenByServiceDateTime),
3520
- elapsedReplicationDuration: (0, smithy_client_1.expectString)(output.elapsedReplicationDuration),
3521
- failbackClientID: (0, smithy_client_1.expectString)(output.failbackClientID),
3522
- failbackClientLastSeenByServiceDateTime: (0, smithy_client_1.expectString)(output.failbackClientLastSeenByServiceDateTime),
3523
- failbackInitiationTime: (0, smithy_client_1.expectString)(output.failbackInitiationTime),
3524
- failbackJobID: (0, smithy_client_1.expectString)(output.failbackJobID),
3525
- failbackLaunchType: (0, smithy_client_1.expectString)(output.failbackLaunchType),
3526
- failbackToOriginalServer: (0, smithy_client_1.expectBoolean)(output.failbackToOriginalServer),
3527
- firstByteDateTime: (0, smithy_client_1.expectString)(output.firstByteDateTime),
3528
- state: (0, smithy_client_1.expectString)(output.state),
3529
- };
3530
- };
3531
- const de_RecoveryInstanceProperties = (output, context) => {
3532
- return {
3533
- cpus: output.cpus != null ? de_Cpus(output.cpus, context) : undefined,
3534
- disks: output.disks != null ? de_RecoveryInstanceDisks(output.disks, context) : undefined,
3535
- identificationHints: output.identificationHints != null ? de_IdentificationHints(output.identificationHints, context) : undefined,
3536
- lastUpdatedDateTime: (0, smithy_client_1.expectString)(output.lastUpdatedDateTime),
3537
- networkInterfaces: output.networkInterfaces != null ? de_NetworkInterfaces(output.networkInterfaces, context) : undefined,
3538
- os: output.os != null ? de_OS(output.os, context) : undefined,
3539
- ramBytes: (0, smithy_client_1.expectLong)(output.ramBytes),
3540
- };
3541
- };
3542
- const de_RecoverySnapshot = (output, context) => {
3543
- return {
3544
- ebsSnapshots: output.ebsSnapshots != null ? de_EbsSnapshotsList(output.ebsSnapshots, context) : undefined,
3545
- expectedTimestamp: (0, smithy_client_1.expectString)(output.expectedTimestamp),
3546
- snapshotID: (0, smithy_client_1.expectString)(output.snapshotID),
3547
- sourceServerID: (0, smithy_client_1.expectString)(output.sourceServerID),
3548
- timestamp: (0, smithy_client_1.expectString)(output.timestamp),
3549
- };
3550
- };
3551
- const de_RecoverySnapshotsList = (output, context) => {
3552
- const retVal = (output || [])
3553
- .filter((e) => e != null)
3554
- .map((entry) => {
3555
- if (entry === null) {
3556
- return null;
3557
- }
3558
- return de_RecoverySnapshot(entry, context);
3559
- });
3560
- return retVal;
3561
- };
3562
- const de_ReplicationConfigurationReplicatedDisk = (output, context) => {
3563
- return {
3564
- deviceName: (0, smithy_client_1.expectString)(output.deviceName),
3565
- iops: (0, smithy_client_1.expectLong)(output.iops),
3566
- isBootDisk: (0, smithy_client_1.expectBoolean)(output.isBootDisk),
3567
- optimizedStagingDiskType: (0, smithy_client_1.expectString)(output.optimizedStagingDiskType),
3568
- stagingDiskType: (0, smithy_client_1.expectString)(output.stagingDiskType),
3569
- throughput: (0, smithy_client_1.expectLong)(output.throughput),
3570
- };
3571
- };
3572
- const de_ReplicationConfigurationReplicatedDisks = (output, context) => {
3573
- const retVal = (output || [])
3574
- .filter((e) => e != null)
3575
- .map((entry) => {
3576
- if (entry === null) {
3577
- return null;
3578
- }
3579
- return de_ReplicationConfigurationReplicatedDisk(entry, context);
3580
- });
3581
- return retVal;
3582
- };
3583
- const de_ReplicationConfigurationTemplate = (output, context) => {
3584
- return {
3585
- arn: (0, smithy_client_1.expectString)(output.arn),
3586
- associateDefaultSecurityGroup: (0, smithy_client_1.expectBoolean)(output.associateDefaultSecurityGroup),
3587
- autoReplicateNewDisks: (0, smithy_client_1.expectBoolean)(output.autoReplicateNewDisks),
3588
- bandwidthThrottling: (0, smithy_client_1.expectLong)(output.bandwidthThrottling),
3589
- createPublicIP: (0, smithy_client_1.expectBoolean)(output.createPublicIP),
3590
- dataPlaneRouting: (0, smithy_client_1.expectString)(output.dataPlaneRouting),
3591
- defaultLargeStagingDiskType: (0, smithy_client_1.expectString)(output.defaultLargeStagingDiskType),
3592
- ebsEncryption: (0, smithy_client_1.expectString)(output.ebsEncryption),
3593
- ebsEncryptionKeyArn: (0, smithy_client_1.expectString)(output.ebsEncryptionKeyArn),
3594
- pitPolicy: output.pitPolicy != null ? de_PITPolicy(output.pitPolicy, context) : undefined,
3595
- replicationConfigurationTemplateID: (0, smithy_client_1.expectString)(output.replicationConfigurationTemplateID),
3596
- replicationServerInstanceType: (0, smithy_client_1.expectString)(output.replicationServerInstanceType),
3597
- replicationServersSecurityGroupsIDs: output.replicationServersSecurityGroupsIDs != null
3598
- ? de_ReplicationServersSecurityGroupsIDs(output.replicationServersSecurityGroupsIDs, context)
3599
- : undefined,
3600
- stagingAreaSubnetId: (0, smithy_client_1.expectString)(output.stagingAreaSubnetId),
3601
- stagingAreaTags: output.stagingAreaTags != null ? de_TagsMap(output.stagingAreaTags, context) : undefined,
3602
- tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined,
3603
- useDedicatedReplicationServer: (0, smithy_client_1.expectBoolean)(output.useDedicatedReplicationServer),
3604
- };
3605
- };
3606
- const de_ReplicationConfigurationTemplates = (output, context) => {
3607
- const retVal = (output || [])
3608
- .filter((e) => e != null)
3609
- .map((entry) => {
3610
- if (entry === null) {
3611
- return null;
3612
- }
3613
- return de_ReplicationConfigurationTemplate(entry, context);
3614
- });
3615
- return retVal;
3616
- };
3617
- const de_ReplicationServersSecurityGroupsIDs = (output, context) => {
3618
- const retVal = (output || [])
3619
- .filter((e) => e != null)
3620
- .map((entry) => {
3621
- if (entry === null) {
3622
- return null;
3623
- }
3624
- return (0, smithy_client_1.expectString)(entry);
3625
- });
3626
- return retVal;
3627
- };
3628
- const de_SourceCloudProperties = (output, context) => {
3629
- return {
3630
- originAccountID: (0, smithy_client_1.expectString)(output.originAccountID),
3631
- originAvailabilityZone: (0, smithy_client_1.expectString)(output.originAvailabilityZone),
3632
- originRegion: (0, smithy_client_1.expectString)(output.originRegion),
3633
- };
3634
- };
3635
- const de_SourceProperties = (output, context) => {
3636
- return {
3637
- cpus: output.cpus != null ? de_Cpus(output.cpus, context) : undefined,
3638
- disks: output.disks != null ? de_Disks(output.disks, context) : undefined,
3639
- identificationHints: output.identificationHints != null ? de_IdentificationHints(output.identificationHints, context) : undefined,
3640
- lastUpdatedDateTime: (0, smithy_client_1.expectString)(output.lastUpdatedDateTime),
3641
- networkInterfaces: output.networkInterfaces != null ? de_NetworkInterfaces(output.networkInterfaces, context) : undefined,
3642
- os: output.os != null ? de_OS(output.os, context) : undefined,
3643
- ramBytes: (0, smithy_client_1.expectLong)(output.ramBytes),
3644
- recommendedInstanceType: (0, smithy_client_1.expectString)(output.recommendedInstanceType),
3645
- };
3646
- };
3647
- const de_SourceServer = (output, context) => {
3648
- return {
3649
- arn: (0, smithy_client_1.expectString)(output.arn),
3650
- dataReplicationInfo: output.dataReplicationInfo != null ? de_DataReplicationInfo(output.dataReplicationInfo, context) : undefined,
3651
- lastLaunchResult: (0, smithy_client_1.expectString)(output.lastLaunchResult),
3652
- lifeCycle: output.lifeCycle != null ? de_LifeCycle(output.lifeCycle, context) : undefined,
3653
- recoveryInstanceId: (0, smithy_client_1.expectString)(output.recoveryInstanceId),
3654
- replicationDirection: (0, smithy_client_1.expectString)(output.replicationDirection),
3655
- reversedDirectionSourceServerArn: (0, smithy_client_1.expectString)(output.reversedDirectionSourceServerArn),
3656
- sourceCloudProperties: output.sourceCloudProperties != null
3657
- ? de_SourceCloudProperties(output.sourceCloudProperties, context)
3658
- : undefined,
3659
- sourceProperties: output.sourceProperties != null ? de_SourceProperties(output.sourceProperties, context) : undefined,
3660
- sourceServerID: (0, smithy_client_1.expectString)(output.sourceServerID),
3661
- stagingArea: output.stagingArea != null ? de_StagingArea(output.stagingArea, context) : undefined,
3662
- tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined,
3663
- };
3664
- };
3665
- const de_SourceServersList = (output, context) => {
3666
- const retVal = (output || [])
3667
- .filter((e) => e != null)
3668
- .map((entry) => {
3669
- if (entry === null) {
3670
- return null;
3671
- }
3672
- return de_SourceServer(entry, context);
3673
- });
3674
- return retVal;
3675
- };
3676
- const de_StagingArea = (output, context) => {
3677
- return {
3678
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
3679
- stagingAccountID: (0, smithy_client_1.expectString)(output.stagingAccountID),
3680
- stagingSourceServerArn: (0, smithy_client_1.expectString)(output.stagingSourceServerArn),
3681
- status: (0, smithy_client_1.expectString)(output.status),
3682
- };
3683
- };
3684
- const de_StagingSourceServer = (output, context) => {
3685
- return {
3686
- arn: (0, smithy_client_1.expectString)(output.arn),
3687
- hostname: (0, smithy_client_1.expectString)(output.hostname),
3688
- tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined,
3689
- };
3690
- };
3691
- const de_StagingSourceServersList = (output, context) => {
3692
- const retVal = (output || [])
3693
- .filter((e) => e != null)
3694
- .map((entry) => {
3695
- if (entry === null) {
3696
- return null;
3697
- }
3698
- return de_StagingSourceServer(entry, context);
3699
- });
3700
- return retVal;
3701
- };
3702
- const de_TagsMap = (output, context) => {
3703
- return Object.entries(output).reduce((acc, [key, value]) => {
3704
- if (value === null) {
3705
- return acc;
3706
- }
3707
- acc[key] = (0, smithy_client_1.expectString)(value);
3708
- return acc;
3709
- }, {});
3710
- };
3711
- const de_ValidationExceptionField = (output, context) => {
3712
- return {
3713
- message: (0, smithy_client_1.expectString)(output.message),
3714
- name: (0, smithy_client_1.expectString)(output.name),
3715
- };
3716
- };
3717
- const de_ValidationExceptionFieldList = (output, context) => {
3718
- const retVal = (output || [])
3719
- .filter((e) => e != null)
3720
- .map((entry) => {
3721
- if (entry === null) {
3722
- return null;
3723
- }
3724
- return de_ValidationExceptionField(entry, context);
3725
- });
3726
- return retVal;
3727
- };
3728
- const de_VolumeToConversionMap = (output, context) => {
3729
- return Object.entries(output).reduce((acc, [key, value]) => {
3730
- if (value === null) {
3731
- return acc;
3732
- }
3733
- acc[key] = de_ConversionMap(value, context);
3734
- return acc;
3735
- }, {});
3736
- };
3737
- const de_VolumeToSizeMap = (output, context) => {
3738
- return Object.entries(output).reduce((acc, [key, value]) => {
3739
- if (value === null) {
3740
- return acc;
3741
- }
3742
- acc[key] = (0, smithy_client_1.expectLong)(value);
3743
- return acc;
3744
- }, {});
3745
- };
3746
2920
  const deserializeMetadata = (output) => ({
3747
2921
  httpStatusCode: output.statusCode,
3748
2922
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],