@aws-sdk/client-organizations 3.312.0 → 3.316.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,65 +1,65 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { AccessDeniedException, AccessDeniedForDependencyException, AccountAlreadyClosedException, AccountAlreadyRegisteredException, AccountNotFoundException, AccountNotRegisteredException, AccountOwnerNotVerifiedException, AlreadyInOrganizationException, AWSOrganizationsNotInUseException, ChildNotFoundException, ConcurrentModificationException, ConflictException, ConstraintViolationException, CreateAccountStatusNotFoundException, DestinationParentNotFoundException, DuplicateAccountException, DuplicateHandshakeException, DuplicateOrganizationalUnitException, DuplicatePolicyAttachmentException, DuplicatePolicyException, EffectivePolicyNotFoundException, FinalizingOrganizationException, HandshakeAlreadyInStateException, HandshakeConstraintViolationException, HandshakeNotFoundException, InvalidHandshakeTransitionException, InvalidInputException, MalformedPolicyDocumentException, MasterCannotLeaveOrganizationException, OrganizationalUnitNotEmptyException, OrganizationalUnitNotFoundException, OrganizationNotEmptyException, ParentNotFoundException, PolicyChangesInProgressException, PolicyInUseException, PolicyNotAttachedException, PolicyNotFoundException, PolicyTypeAlreadyEnabledException, PolicyTypeNotAvailableForOrganizationException, PolicyTypeNotEnabledException, ResourcePolicyNotFoundException, RootNotFoundException, ServiceException, SourceParentNotFoundException, TargetNotFoundException, TooManyRequestsException, UnsupportedAPIEndpointException, } from "../models/models_0";
4
4
  import { OrganizationsServiceException as __BaseException } from "../models/OrganizationsServiceException";
5
5
  export const se_AcceptHandshakeCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("AcceptHandshake");
7
7
  let body;
8
- body = JSON.stringify(se_AcceptHandshakeRequest(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_AttachPolicyCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("AttachPolicy");
13
13
  let body;
14
- body = JSON.stringify(se_AttachPolicyRequest(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_CancelHandshakeCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("CancelHandshake");
19
19
  let body;
20
- body = JSON.stringify(se_CancelHandshakeRequest(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_CloseAccountCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("CloseAccount");
25
25
  let body;
26
- body = JSON.stringify(se_CloseAccountRequest(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_CreateAccountCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("CreateAccount");
31
31
  let body;
32
- body = JSON.stringify(se_CreateAccountRequest(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_CreateGovCloudAccountCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("CreateGovCloudAccount");
37
37
  let body;
38
- body = JSON.stringify(se_CreateGovCloudAccountRequest(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_CreateOrganizationCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("CreateOrganization");
43
43
  let body;
44
- body = JSON.stringify(se_CreateOrganizationRequest(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_CreateOrganizationalUnitCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("CreateOrganizationalUnit");
49
49
  let body;
50
- body = JSON.stringify(se_CreateOrganizationalUnitRequest(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const se_CreatePolicyCommand = async (input, context) => {
54
54
  const headers = sharedHeaders("CreatePolicy");
55
55
  let body;
56
- body = JSON.stringify(se_CreatePolicyRequest(input, context));
56
+ body = JSON.stringify(_json(input));
57
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
58
  };
59
59
  export const se_DeclineHandshakeCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("DeclineHandshake");
61
61
  let body;
62
- body = JSON.stringify(se_DeclineHandshakeRequest(input, context));
62
+ body = JSON.stringify(_json(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  export const se_DeleteOrganizationCommand = async (input, context) => {
@@ -70,13 +70,13 @@ export const se_DeleteOrganizationCommand = async (input, context) => {
70
70
  export const se_DeleteOrganizationalUnitCommand = async (input, context) => {
71
71
  const headers = sharedHeaders("DeleteOrganizationalUnit");
72
72
  let body;
73
- body = JSON.stringify(se_DeleteOrganizationalUnitRequest(input, context));
73
+ body = JSON.stringify(_json(input));
74
74
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
75
75
  };
76
76
  export const se_DeletePolicyCommand = async (input, context) => {
77
77
  const headers = sharedHeaders("DeletePolicy");
78
78
  let body;
79
- body = JSON.stringify(se_DeletePolicyRequest(input, context));
79
+ body = JSON.stringify(_json(input));
80
80
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
81
81
  };
82
82
  export const se_DeleteResourcePolicyCommand = async (input, context) => {
@@ -87,31 +87,31 @@ export const se_DeleteResourcePolicyCommand = async (input, context) => {
87
87
  export const se_DeregisterDelegatedAdministratorCommand = async (input, context) => {
88
88
  const headers = sharedHeaders("DeregisterDelegatedAdministrator");
89
89
  let body;
90
- body = JSON.stringify(se_DeregisterDelegatedAdministratorRequest(input, context));
90
+ body = JSON.stringify(_json(input));
91
91
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
92
92
  };
93
93
  export const se_DescribeAccountCommand = async (input, context) => {
94
94
  const headers = sharedHeaders("DescribeAccount");
95
95
  let body;
96
- body = JSON.stringify(se_DescribeAccountRequest(input, context));
96
+ body = JSON.stringify(_json(input));
97
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
98
  };
99
99
  export const se_DescribeCreateAccountStatusCommand = async (input, context) => {
100
100
  const headers = sharedHeaders("DescribeCreateAccountStatus");
101
101
  let body;
102
- body = JSON.stringify(se_DescribeCreateAccountStatusRequest(input, context));
102
+ body = JSON.stringify(_json(input));
103
103
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
104
  };
105
105
  export const se_DescribeEffectivePolicyCommand = async (input, context) => {
106
106
  const headers = sharedHeaders("DescribeEffectivePolicy");
107
107
  let body;
108
- body = JSON.stringify(se_DescribeEffectivePolicyRequest(input, context));
108
+ body = JSON.stringify(_json(input));
109
109
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
110
110
  };
111
111
  export const se_DescribeHandshakeCommand = async (input, context) => {
112
112
  const headers = sharedHeaders("DescribeHandshake");
113
113
  let body;
114
- body = JSON.stringify(se_DescribeHandshakeRequest(input, context));
114
+ body = JSON.stringify(_json(input));
115
115
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
116
116
  };
117
117
  export const se_DescribeOrganizationCommand = async (input, context) => {
@@ -122,13 +122,13 @@ export const se_DescribeOrganizationCommand = async (input, context) => {
122
122
  export const se_DescribeOrganizationalUnitCommand = async (input, context) => {
123
123
  const headers = sharedHeaders("DescribeOrganizationalUnit");
124
124
  let body;
125
- body = JSON.stringify(se_DescribeOrganizationalUnitRequest(input, context));
125
+ body = JSON.stringify(_json(input));
126
126
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
127
  };
128
128
  export const se_DescribePolicyCommand = async (input, context) => {
129
129
  const headers = sharedHeaders("DescribePolicy");
130
130
  let body;
131
- body = JSON.stringify(se_DescribePolicyRequest(input, context));
131
+ body = JSON.stringify(_json(input));
132
132
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
133
  };
134
134
  export const se_DescribeResourcePolicyCommand = async (input, context) => {
@@ -139,43 +139,43 @@ export const se_DescribeResourcePolicyCommand = async (input, context) => {
139
139
  export const se_DetachPolicyCommand = async (input, context) => {
140
140
  const headers = sharedHeaders("DetachPolicy");
141
141
  let body;
142
- body = JSON.stringify(se_DetachPolicyRequest(input, context));
142
+ body = JSON.stringify(_json(input));
143
143
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
144
144
  };
145
145
  export const se_DisableAWSServiceAccessCommand = async (input, context) => {
146
146
  const headers = sharedHeaders("DisableAWSServiceAccess");
147
147
  let body;
148
- body = JSON.stringify(se_DisableAWSServiceAccessRequest(input, context));
148
+ body = JSON.stringify(_json(input));
149
149
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
150
150
  };
151
151
  export const se_DisablePolicyTypeCommand = async (input, context) => {
152
152
  const headers = sharedHeaders("DisablePolicyType");
153
153
  let body;
154
- body = JSON.stringify(se_DisablePolicyTypeRequest(input, context));
154
+ body = JSON.stringify(_json(input));
155
155
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
156
  };
157
157
  export const se_EnableAllFeaturesCommand = async (input, context) => {
158
158
  const headers = sharedHeaders("EnableAllFeatures");
159
159
  let body;
160
- body = JSON.stringify(se_EnableAllFeaturesRequest(input, context));
160
+ body = JSON.stringify(_json(input));
161
161
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
162
162
  };
163
163
  export const se_EnableAWSServiceAccessCommand = async (input, context) => {
164
164
  const headers = sharedHeaders("EnableAWSServiceAccess");
165
165
  let body;
166
- body = JSON.stringify(se_EnableAWSServiceAccessRequest(input, context));
166
+ body = JSON.stringify(_json(input));
167
167
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
168
  };
169
169
  export const se_EnablePolicyTypeCommand = async (input, context) => {
170
170
  const headers = sharedHeaders("EnablePolicyType");
171
171
  let body;
172
- body = JSON.stringify(se_EnablePolicyTypeRequest(input, context));
172
+ body = JSON.stringify(_json(input));
173
173
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
174
174
  };
175
175
  export const se_InviteAccountToOrganizationCommand = async (input, context) => {
176
176
  const headers = sharedHeaders("InviteAccountToOrganization");
177
177
  let body;
178
- body = JSON.stringify(se_InviteAccountToOrganizationRequest(input, context));
178
+ body = JSON.stringify(_json(input));
179
179
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
180
180
  };
181
181
  export const se_LeaveOrganizationCommand = async (input, context) => {
@@ -186,145 +186,145 @@ export const se_LeaveOrganizationCommand = async (input, context) => {
186
186
  export const se_ListAccountsCommand = async (input, context) => {
187
187
  const headers = sharedHeaders("ListAccounts");
188
188
  let body;
189
- body = JSON.stringify(se_ListAccountsRequest(input, context));
189
+ body = JSON.stringify(_json(input));
190
190
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
191
  };
192
192
  export const se_ListAccountsForParentCommand = async (input, context) => {
193
193
  const headers = sharedHeaders("ListAccountsForParent");
194
194
  let body;
195
- body = JSON.stringify(se_ListAccountsForParentRequest(input, context));
195
+ body = JSON.stringify(_json(input));
196
196
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
197
  };
198
198
  export const se_ListAWSServiceAccessForOrganizationCommand = async (input, context) => {
199
199
  const headers = sharedHeaders("ListAWSServiceAccessForOrganization");
200
200
  let body;
201
- body = JSON.stringify(se_ListAWSServiceAccessForOrganizationRequest(input, context));
201
+ body = JSON.stringify(_json(input));
202
202
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
203
  };
204
204
  export const se_ListChildrenCommand = async (input, context) => {
205
205
  const headers = sharedHeaders("ListChildren");
206
206
  let body;
207
- body = JSON.stringify(se_ListChildrenRequest(input, context));
207
+ body = JSON.stringify(_json(input));
208
208
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
209
  };
210
210
  export const se_ListCreateAccountStatusCommand = async (input, context) => {
211
211
  const headers = sharedHeaders("ListCreateAccountStatus");
212
212
  let body;
213
- body = JSON.stringify(se_ListCreateAccountStatusRequest(input, context));
213
+ body = JSON.stringify(_json(input));
214
214
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
215
215
  };
216
216
  export const se_ListDelegatedAdministratorsCommand = async (input, context) => {
217
217
  const headers = sharedHeaders("ListDelegatedAdministrators");
218
218
  let body;
219
- body = JSON.stringify(se_ListDelegatedAdministratorsRequest(input, context));
219
+ body = JSON.stringify(_json(input));
220
220
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
221
  };
222
222
  export const se_ListDelegatedServicesForAccountCommand = async (input, context) => {
223
223
  const headers = sharedHeaders("ListDelegatedServicesForAccount");
224
224
  let body;
225
- body = JSON.stringify(se_ListDelegatedServicesForAccountRequest(input, context));
225
+ body = JSON.stringify(_json(input));
226
226
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
227
227
  };
228
228
  export const se_ListHandshakesForAccountCommand = async (input, context) => {
229
229
  const headers = sharedHeaders("ListHandshakesForAccount");
230
230
  let body;
231
- body = JSON.stringify(se_ListHandshakesForAccountRequest(input, context));
231
+ body = JSON.stringify(_json(input));
232
232
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
233
233
  };
234
234
  export const se_ListHandshakesForOrganizationCommand = async (input, context) => {
235
235
  const headers = sharedHeaders("ListHandshakesForOrganization");
236
236
  let body;
237
- body = JSON.stringify(se_ListHandshakesForOrganizationRequest(input, context));
237
+ body = JSON.stringify(_json(input));
238
238
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
239
  };
240
240
  export const se_ListOrganizationalUnitsForParentCommand = async (input, context) => {
241
241
  const headers = sharedHeaders("ListOrganizationalUnitsForParent");
242
242
  let body;
243
- body = JSON.stringify(se_ListOrganizationalUnitsForParentRequest(input, context));
243
+ body = JSON.stringify(_json(input));
244
244
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
245
  };
246
246
  export const se_ListParentsCommand = async (input, context) => {
247
247
  const headers = sharedHeaders("ListParents");
248
248
  let body;
249
- body = JSON.stringify(se_ListParentsRequest(input, context));
249
+ body = JSON.stringify(_json(input));
250
250
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
251
251
  };
252
252
  export const se_ListPoliciesCommand = async (input, context) => {
253
253
  const headers = sharedHeaders("ListPolicies");
254
254
  let body;
255
- body = JSON.stringify(se_ListPoliciesRequest(input, context));
255
+ body = JSON.stringify(_json(input));
256
256
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
257
257
  };
258
258
  export const se_ListPoliciesForTargetCommand = async (input, context) => {
259
259
  const headers = sharedHeaders("ListPoliciesForTarget");
260
260
  let body;
261
- body = JSON.stringify(se_ListPoliciesForTargetRequest(input, context));
261
+ body = JSON.stringify(_json(input));
262
262
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
263
263
  };
264
264
  export const se_ListRootsCommand = async (input, context) => {
265
265
  const headers = sharedHeaders("ListRoots");
266
266
  let body;
267
- body = JSON.stringify(se_ListRootsRequest(input, context));
267
+ body = JSON.stringify(_json(input));
268
268
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
269
269
  };
270
270
  export const se_ListTagsForResourceCommand = async (input, context) => {
271
271
  const headers = sharedHeaders("ListTagsForResource");
272
272
  let body;
273
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
273
+ body = JSON.stringify(_json(input));
274
274
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
275
275
  };
276
276
  export const se_ListTargetsForPolicyCommand = async (input, context) => {
277
277
  const headers = sharedHeaders("ListTargetsForPolicy");
278
278
  let body;
279
- body = JSON.stringify(se_ListTargetsForPolicyRequest(input, context));
279
+ body = JSON.stringify(_json(input));
280
280
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
281
281
  };
282
282
  export const se_MoveAccountCommand = async (input, context) => {
283
283
  const headers = sharedHeaders("MoveAccount");
284
284
  let body;
285
- body = JSON.stringify(se_MoveAccountRequest(input, context));
285
+ body = JSON.stringify(_json(input));
286
286
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
287
287
  };
288
288
  export const se_PutResourcePolicyCommand = async (input, context) => {
289
289
  const headers = sharedHeaders("PutResourcePolicy");
290
290
  let body;
291
- body = JSON.stringify(se_PutResourcePolicyRequest(input, context));
291
+ body = JSON.stringify(_json(input));
292
292
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
293
293
  };
294
294
  export const se_RegisterDelegatedAdministratorCommand = async (input, context) => {
295
295
  const headers = sharedHeaders("RegisterDelegatedAdministrator");
296
296
  let body;
297
- body = JSON.stringify(se_RegisterDelegatedAdministratorRequest(input, context));
297
+ body = JSON.stringify(_json(input));
298
298
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
299
299
  };
300
300
  export const se_RemoveAccountFromOrganizationCommand = async (input, context) => {
301
301
  const headers = sharedHeaders("RemoveAccountFromOrganization");
302
302
  let body;
303
- body = JSON.stringify(se_RemoveAccountFromOrganizationRequest(input, context));
303
+ body = JSON.stringify(_json(input));
304
304
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
305
305
  };
306
306
  export const se_TagResourceCommand = async (input, context) => {
307
307
  const headers = sharedHeaders("TagResource");
308
308
  let body;
309
- body = JSON.stringify(se_TagResourceRequest(input, context));
309
+ body = JSON.stringify(_json(input));
310
310
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
311
311
  };
312
312
  export const se_UntagResourceCommand = async (input, context) => {
313
313
  const headers = sharedHeaders("UntagResource");
314
314
  let body;
315
- body = JSON.stringify(se_UntagResourceRequest(input, context));
315
+ body = JSON.stringify(_json(input));
316
316
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
317
317
  };
318
318
  export const se_UpdateOrganizationalUnitCommand = async (input, context) => {
319
319
  const headers = sharedHeaders("UpdateOrganizationalUnit");
320
320
  let body;
321
- body = JSON.stringify(se_UpdateOrganizationalUnitRequest(input, context));
321
+ body = JSON.stringify(_json(input));
322
322
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
323
323
  };
324
324
  export const se_UpdatePolicyCommand = async (input, context) => {
325
325
  const headers = sharedHeaders("UpdatePolicy");
326
326
  let body;
327
- body = JSON.stringify(se_UpdatePolicyRequest(input, context));
327
+ body = JSON.stringify(_json(input));
328
328
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
329
329
  };
330
330
  export const de_AcceptHandshakeCommand = async (output, context) => {
@@ -338,7 +338,7 @@ export const de_AcceptHandshakeCommand = async (output, context) => {
338
338
  $metadata: deserializeMetadata(output),
339
339
  ...contents,
340
340
  };
341
- return Promise.resolve(response);
341
+ return response;
342
342
  };
343
343
  const de_AcceptHandshakeCommandError = async (output, context) => {
344
344
  const parsedOutput = {
@@ -382,10 +382,9 @@ const de_AcceptHandshakeCommandError = async (output, context) => {
382
382
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
383
383
  default:
384
384
  const parsedBody = parsedOutput.body;
385
- throwDefaultError({
385
+ return throwDefaultError({
386
386
  output,
387
387
  parsedBody,
388
- exceptionCtor: __BaseException,
389
388
  errorCode,
390
389
  });
391
390
  }
@@ -398,7 +397,7 @@ export const de_AttachPolicyCommand = async (output, context) => {
398
397
  const response = {
399
398
  $metadata: deserializeMetadata(output),
400
399
  };
401
- return Promise.resolve(response);
400
+ return response;
402
401
  };
403
402
  const de_AttachPolicyCommandError = async (output, context) => {
404
403
  const parsedOutput = {
@@ -448,10 +447,9 @@ const de_AttachPolicyCommandError = async (output, context) => {
448
447
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
449
448
  default:
450
449
  const parsedBody = parsedOutput.body;
451
- throwDefaultError({
450
+ return throwDefaultError({
452
451
  output,
453
452
  parsedBody,
454
- exceptionCtor: __BaseException,
455
453
  errorCode,
456
454
  });
457
455
  }
@@ -467,7 +465,7 @@ export const de_CancelHandshakeCommand = async (output, context) => {
467
465
  $metadata: deserializeMetadata(output),
468
466
  ...contents,
469
467
  };
470
- return Promise.resolve(response);
468
+ return response;
471
469
  };
472
470
  const de_CancelHandshakeCommandError = async (output, context) => {
473
471
  const parsedOutput = {
@@ -502,10 +500,9 @@ const de_CancelHandshakeCommandError = async (output, context) => {
502
500
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
503
501
  default:
504
502
  const parsedBody = parsedOutput.body;
505
- throwDefaultError({
503
+ return throwDefaultError({
506
504
  output,
507
505
  parsedBody,
508
- exceptionCtor: __BaseException,
509
506
  errorCode,
510
507
  });
511
508
  }
@@ -518,7 +515,7 @@ export const de_CloseAccountCommand = async (output, context) => {
518
515
  const response = {
519
516
  $metadata: deserializeMetadata(output),
520
517
  };
521
- return Promise.resolve(response);
518
+ return response;
522
519
  };
523
520
  const de_CloseAccountCommandError = async (output, context) => {
524
521
  const parsedOutput = {
@@ -562,10 +559,9 @@ const de_CloseAccountCommandError = async (output, context) => {
562
559
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
563
560
  default:
564
561
  const parsedBody = parsedOutput.body;
565
- throwDefaultError({
562
+ return throwDefaultError({
566
563
  output,
567
564
  parsedBody,
568
- exceptionCtor: __BaseException,
569
565
  errorCode,
570
566
  });
571
567
  }
@@ -581,7 +577,7 @@ export const de_CreateAccountCommand = async (output, context) => {
581
577
  $metadata: deserializeMetadata(output),
582
578
  ...contents,
583
579
  };
584
- return Promise.resolve(response);
580
+ return response;
585
581
  };
586
582
  const de_CreateAccountCommandError = async (output, context) => {
587
583
  const parsedOutput = {
@@ -619,10 +615,9 @@ const de_CreateAccountCommandError = async (output, context) => {
619
615
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
620
616
  default:
621
617
  const parsedBody = parsedOutput.body;
622
- throwDefaultError({
618
+ return throwDefaultError({
623
619
  output,
624
620
  parsedBody,
625
- exceptionCtor: __BaseException,
626
621
  errorCode,
627
622
  });
628
623
  }
@@ -638,7 +633,7 @@ export const de_CreateGovCloudAccountCommand = async (output, context) => {
638
633
  $metadata: deserializeMetadata(output),
639
634
  ...contents,
640
635
  };
641
- return Promise.resolve(response);
636
+ return response;
642
637
  };
643
638
  const de_CreateGovCloudAccountCommandError = async (output, context) => {
644
639
  const parsedOutput = {
@@ -676,10 +671,9 @@ const de_CreateGovCloudAccountCommandError = async (output, context) => {
676
671
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
677
672
  default:
678
673
  const parsedBody = parsedOutput.body;
679
- throwDefaultError({
674
+ return throwDefaultError({
680
675
  output,
681
676
  parsedBody,
682
- exceptionCtor: __BaseException,
683
677
  errorCode,
684
678
  });
685
679
  }
@@ -690,12 +684,12 @@ export const de_CreateOrganizationCommand = async (output, context) => {
690
684
  }
691
685
  const data = await parseBody(output.body, context);
692
686
  let contents = {};
693
- contents = de_CreateOrganizationResponse(data, context);
687
+ contents = _json(data);
694
688
  const response = {
695
689
  $metadata: deserializeMetadata(output),
696
690
  ...contents,
697
691
  };
698
- return Promise.resolve(response);
692
+ return response;
699
693
  };
700
694
  const de_CreateOrganizationCommandError = async (output, context) => {
701
695
  const parsedOutput = {
@@ -730,10 +724,9 @@ const de_CreateOrganizationCommandError = async (output, context) => {
730
724
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
731
725
  default:
732
726
  const parsedBody = parsedOutput.body;
733
- throwDefaultError({
727
+ return throwDefaultError({
734
728
  output,
735
729
  parsedBody,
736
- exceptionCtor: __BaseException,
737
730
  errorCode,
738
731
  });
739
732
  }
@@ -744,12 +737,12 @@ export const de_CreateOrganizationalUnitCommand = async (output, context) => {
744
737
  }
745
738
  const data = await parseBody(output.body, context);
746
739
  let contents = {};
747
- contents = de_CreateOrganizationalUnitResponse(data, context);
740
+ contents = _json(data);
748
741
  const response = {
749
742
  $metadata: deserializeMetadata(output),
750
743
  ...contents,
751
744
  };
752
- return Promise.resolve(response);
745
+ return response;
753
746
  };
754
747
  const de_CreateOrganizationalUnitCommandError = async (output, context) => {
755
748
  const parsedOutput = {
@@ -787,10 +780,9 @@ const de_CreateOrganizationalUnitCommandError = async (output, context) => {
787
780
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
788
781
  default:
789
782
  const parsedBody = parsedOutput.body;
790
- throwDefaultError({
783
+ return throwDefaultError({
791
784
  output,
792
785
  parsedBody,
793
- exceptionCtor: __BaseException,
794
786
  errorCode,
795
787
  });
796
788
  }
@@ -801,12 +793,12 @@ export const de_CreatePolicyCommand = async (output, context) => {
801
793
  }
802
794
  const data = await parseBody(output.body, context);
803
795
  let contents = {};
804
- contents = de_CreatePolicyResponse(data, context);
796
+ contents = _json(data);
805
797
  const response = {
806
798
  $metadata: deserializeMetadata(output),
807
799
  ...contents,
808
800
  };
809
- return Promise.resolve(response);
801
+ return response;
810
802
  };
811
803
  const de_CreatePolicyCommandError = async (output, context) => {
812
804
  const parsedOutput = {
@@ -850,10 +842,9 @@ const de_CreatePolicyCommandError = async (output, context) => {
850
842
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
851
843
  default:
852
844
  const parsedBody = parsedOutput.body;
853
- throwDefaultError({
845
+ return throwDefaultError({
854
846
  output,
855
847
  parsedBody,
856
- exceptionCtor: __BaseException,
857
848
  errorCode,
858
849
  });
859
850
  }
@@ -869,7 +860,7 @@ export const de_DeclineHandshakeCommand = async (output, context) => {
869
860
  $metadata: deserializeMetadata(output),
870
861
  ...contents,
871
862
  };
872
- return Promise.resolve(response);
863
+ return response;
873
864
  };
874
865
  const de_DeclineHandshakeCommandError = async (output, context) => {
875
866
  const parsedOutput = {
@@ -904,10 +895,9 @@ const de_DeclineHandshakeCommandError = async (output, context) => {
904
895
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
905
896
  default:
906
897
  const parsedBody = parsedOutput.body;
907
- throwDefaultError({
898
+ return throwDefaultError({
908
899
  output,
909
900
  parsedBody,
910
- exceptionCtor: __BaseException,
911
901
  errorCode,
912
902
  });
913
903
  }
@@ -920,7 +910,7 @@ export const de_DeleteOrganizationCommand = async (output, context) => {
920
910
  const response = {
921
911
  $metadata: deserializeMetadata(output),
922
912
  };
923
- return Promise.resolve(response);
913
+ return response;
924
914
  };
925
915
  const de_DeleteOrganizationCommandError = async (output, context) => {
926
916
  const parsedOutput = {
@@ -952,10 +942,9 @@ const de_DeleteOrganizationCommandError = async (output, context) => {
952
942
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
953
943
  default:
954
944
  const parsedBody = parsedOutput.body;
955
- throwDefaultError({
945
+ return throwDefaultError({
956
946
  output,
957
947
  parsedBody,
958
- exceptionCtor: __BaseException,
959
948
  errorCode,
960
949
  });
961
950
  }
@@ -968,7 +957,7 @@ export const de_DeleteOrganizationalUnitCommand = async (output, context) => {
968
957
  const response = {
969
958
  $metadata: deserializeMetadata(output),
970
959
  };
971
- return Promise.resolve(response);
960
+ return response;
972
961
  };
973
962
  const de_DeleteOrganizationalUnitCommandError = async (output, context) => {
974
963
  const parsedOutput = {
@@ -1003,10 +992,9 @@ const de_DeleteOrganizationalUnitCommandError = async (output, context) => {
1003
992
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1004
993
  default:
1005
994
  const parsedBody = parsedOutput.body;
1006
- throwDefaultError({
995
+ return throwDefaultError({
1007
996
  output,
1008
997
  parsedBody,
1009
- exceptionCtor: __BaseException,
1010
998
  errorCode,
1011
999
  });
1012
1000
  }
@@ -1019,7 +1007,7 @@ export const de_DeletePolicyCommand = async (output, context) => {
1019
1007
  const response = {
1020
1008
  $metadata: deserializeMetadata(output),
1021
1009
  };
1022
- return Promise.resolve(response);
1010
+ return response;
1023
1011
  };
1024
1012
  const de_DeletePolicyCommandError = async (output, context) => {
1025
1013
  const parsedOutput = {
@@ -1057,10 +1045,9 @@ const de_DeletePolicyCommandError = async (output, context) => {
1057
1045
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1058
1046
  default:
1059
1047
  const parsedBody = parsedOutput.body;
1060
- throwDefaultError({
1048
+ return throwDefaultError({
1061
1049
  output,
1062
1050
  parsedBody,
1063
- exceptionCtor: __BaseException,
1064
1051
  errorCode,
1065
1052
  });
1066
1053
  }
@@ -1073,7 +1060,7 @@ export const de_DeleteResourcePolicyCommand = async (output, context) => {
1073
1060
  const response = {
1074
1061
  $metadata: deserializeMetadata(output),
1075
1062
  };
1076
- return Promise.resolve(response);
1063
+ return response;
1077
1064
  };
1078
1065
  const de_DeleteResourcePolicyCommandError = async (output, context) => {
1079
1066
  const parsedOutput = {
@@ -1108,10 +1095,9 @@ const de_DeleteResourcePolicyCommandError = async (output, context) => {
1108
1095
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1109
1096
  default:
1110
1097
  const parsedBody = parsedOutput.body;
1111
- throwDefaultError({
1098
+ return throwDefaultError({
1112
1099
  output,
1113
1100
  parsedBody,
1114
- exceptionCtor: __BaseException,
1115
1101
  errorCode,
1116
1102
  });
1117
1103
  }
@@ -1124,7 +1110,7 @@ export const de_DeregisterDelegatedAdministratorCommand = async (output, context
1124
1110
  const response = {
1125
1111
  $metadata: deserializeMetadata(output),
1126
1112
  };
1127
- return Promise.resolve(response);
1113
+ return response;
1128
1114
  };
1129
1115
  const de_DeregisterDelegatedAdministratorCommandError = async (output, context) => {
1130
1116
  const parsedOutput = {
@@ -1165,10 +1151,9 @@ const de_DeregisterDelegatedAdministratorCommandError = async (output, context)
1165
1151
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1166
1152
  default:
1167
1153
  const parsedBody = parsedOutput.body;
1168
- throwDefaultError({
1154
+ return throwDefaultError({
1169
1155
  output,
1170
1156
  parsedBody,
1171
- exceptionCtor: __BaseException,
1172
1157
  errorCode,
1173
1158
  });
1174
1159
  }
@@ -1184,7 +1169,7 @@ export const de_DescribeAccountCommand = async (output, context) => {
1184
1169
  $metadata: deserializeMetadata(output),
1185
1170
  ...contents,
1186
1171
  };
1187
- return Promise.resolve(response);
1172
+ return response;
1188
1173
  };
1189
1174
  const de_DescribeAccountCommandError = async (output, context) => {
1190
1175
  const parsedOutput = {
@@ -1213,10 +1198,9 @@ const de_DescribeAccountCommandError = async (output, context) => {
1213
1198
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1214
1199
  default:
1215
1200
  const parsedBody = parsedOutput.body;
1216
- throwDefaultError({
1201
+ return throwDefaultError({
1217
1202
  output,
1218
1203
  parsedBody,
1219
- exceptionCtor: __BaseException,
1220
1204
  errorCode,
1221
1205
  });
1222
1206
  }
@@ -1232,7 +1216,7 @@ export const de_DescribeCreateAccountStatusCommand = async (output, context) =>
1232
1216
  $metadata: deserializeMetadata(output),
1233
1217
  ...contents,
1234
1218
  };
1235
- return Promise.resolve(response);
1219
+ return response;
1236
1220
  };
1237
1221
  const de_DescribeCreateAccountStatusCommandError = async (output, context) => {
1238
1222
  const parsedOutput = {
@@ -1264,10 +1248,9 @@ const de_DescribeCreateAccountStatusCommandError = async (output, context) => {
1264
1248
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1265
1249
  default:
1266
1250
  const parsedBody = parsedOutput.body;
1267
- throwDefaultError({
1251
+ return throwDefaultError({
1268
1252
  output,
1269
1253
  parsedBody,
1270
- exceptionCtor: __BaseException,
1271
1254
  errorCode,
1272
1255
  });
1273
1256
  }
@@ -1283,7 +1266,7 @@ export const de_DescribeEffectivePolicyCommand = async (output, context) => {
1283
1266
  $metadata: deserializeMetadata(output),
1284
1267
  ...contents,
1285
1268
  };
1286
- return Promise.resolve(response);
1269
+ return response;
1287
1270
  };
1288
1271
  const de_DescribeEffectivePolicyCommandError = async (output, context) => {
1289
1272
  const parsedOutput = {
@@ -1321,10 +1304,9 @@ const de_DescribeEffectivePolicyCommandError = async (output, context) => {
1321
1304
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1322
1305
  default:
1323
1306
  const parsedBody = parsedOutput.body;
1324
- throwDefaultError({
1307
+ return throwDefaultError({
1325
1308
  output,
1326
1309
  parsedBody,
1327
- exceptionCtor: __BaseException,
1328
1310
  errorCode,
1329
1311
  });
1330
1312
  }
@@ -1340,7 +1322,7 @@ export const de_DescribeHandshakeCommand = async (output, context) => {
1340
1322
  $metadata: deserializeMetadata(output),
1341
1323
  ...contents,
1342
1324
  };
1343
- return Promise.resolve(response);
1325
+ return response;
1344
1326
  };
1345
1327
  const de_DescribeHandshakeCommandError = async (output, context) => {
1346
1328
  const parsedOutput = {
@@ -1369,10 +1351,9 @@ const de_DescribeHandshakeCommandError = async (output, context) => {
1369
1351
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1370
1352
  default:
1371
1353
  const parsedBody = parsedOutput.body;
1372
- throwDefaultError({
1354
+ return throwDefaultError({
1373
1355
  output,
1374
1356
  parsedBody,
1375
- exceptionCtor: __BaseException,
1376
1357
  errorCode,
1377
1358
  });
1378
1359
  }
@@ -1383,12 +1364,12 @@ export const de_DescribeOrganizationCommand = async (output, context) => {
1383
1364
  }
1384
1365
  const data = await parseBody(output.body, context);
1385
1366
  let contents = {};
1386
- contents = de_DescribeOrganizationResponse(data, context);
1367
+ contents = _json(data);
1387
1368
  const response = {
1388
1369
  $metadata: deserializeMetadata(output),
1389
1370
  ...contents,
1390
1371
  };
1391
- return Promise.resolve(response);
1372
+ return response;
1392
1373
  };
1393
1374
  const de_DescribeOrganizationCommandError = async (output, context) => {
1394
1375
  const parsedOutput = {
@@ -1414,10 +1395,9 @@ const de_DescribeOrganizationCommandError = async (output, context) => {
1414
1395
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1415
1396
  default:
1416
1397
  const parsedBody = parsedOutput.body;
1417
- throwDefaultError({
1398
+ return throwDefaultError({
1418
1399
  output,
1419
1400
  parsedBody,
1420
- exceptionCtor: __BaseException,
1421
1401
  errorCode,
1422
1402
  });
1423
1403
  }
@@ -1428,12 +1408,12 @@ export const de_DescribeOrganizationalUnitCommand = async (output, context) => {
1428
1408
  }
1429
1409
  const data = await parseBody(output.body, context);
1430
1410
  let contents = {};
1431
- contents = de_DescribeOrganizationalUnitResponse(data, context);
1411
+ contents = _json(data);
1432
1412
  const response = {
1433
1413
  $metadata: deserializeMetadata(output),
1434
1414
  ...contents,
1435
1415
  };
1436
- return Promise.resolve(response);
1416
+ return response;
1437
1417
  };
1438
1418
  const de_DescribeOrganizationalUnitCommandError = async (output, context) => {
1439
1419
  const parsedOutput = {
@@ -1462,10 +1442,9 @@ const de_DescribeOrganizationalUnitCommandError = async (output, context) => {
1462
1442
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1463
1443
  default:
1464
1444
  const parsedBody = parsedOutput.body;
1465
- throwDefaultError({
1445
+ return throwDefaultError({
1466
1446
  output,
1467
1447
  parsedBody,
1468
- exceptionCtor: __BaseException,
1469
1448
  errorCode,
1470
1449
  });
1471
1450
  }
@@ -1476,12 +1455,12 @@ export const de_DescribePolicyCommand = async (output, context) => {
1476
1455
  }
1477
1456
  const data = await parseBody(output.body, context);
1478
1457
  let contents = {};
1479
- contents = de_DescribePolicyResponse(data, context);
1458
+ contents = _json(data);
1480
1459
  const response = {
1481
1460
  $metadata: deserializeMetadata(output),
1482
1461
  ...contents,
1483
1462
  };
1484
- return Promise.resolve(response);
1463
+ return response;
1485
1464
  };
1486
1465
  const de_DescribePolicyCommandError = async (output, context) => {
1487
1466
  const parsedOutput = {
@@ -1513,10 +1492,9 @@ const de_DescribePolicyCommandError = async (output, context) => {
1513
1492
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1514
1493
  default:
1515
1494
  const parsedBody = parsedOutput.body;
1516
- throwDefaultError({
1495
+ return throwDefaultError({
1517
1496
  output,
1518
1497
  parsedBody,
1519
- exceptionCtor: __BaseException,
1520
1498
  errorCode,
1521
1499
  });
1522
1500
  }
@@ -1527,12 +1505,12 @@ export const de_DescribeResourcePolicyCommand = async (output, context) => {
1527
1505
  }
1528
1506
  const data = await parseBody(output.body, context);
1529
1507
  let contents = {};
1530
- contents = de_DescribeResourcePolicyResponse(data, context);
1508
+ contents = _json(data);
1531
1509
  const response = {
1532
1510
  $metadata: deserializeMetadata(output),
1533
1511
  ...contents,
1534
1512
  };
1535
- return Promise.resolve(response);
1513
+ return response;
1536
1514
  };
1537
1515
  const de_DescribeResourcePolicyCommandError = async (output, context) => {
1538
1516
  const parsedOutput = {
@@ -1564,10 +1542,9 @@ const de_DescribeResourcePolicyCommandError = async (output, context) => {
1564
1542
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1565
1543
  default:
1566
1544
  const parsedBody = parsedOutput.body;
1567
- throwDefaultError({
1545
+ return throwDefaultError({
1568
1546
  output,
1569
1547
  parsedBody,
1570
- exceptionCtor: __BaseException,
1571
1548
  errorCode,
1572
1549
  });
1573
1550
  }
@@ -1580,7 +1557,7 @@ export const de_DetachPolicyCommand = async (output, context) => {
1580
1557
  const response = {
1581
1558
  $metadata: deserializeMetadata(output),
1582
1559
  };
1583
- return Promise.resolve(response);
1560
+ return response;
1584
1561
  };
1585
1562
  const de_DetachPolicyCommandError = async (output, context) => {
1586
1563
  const parsedOutput = {
@@ -1627,10 +1604,9 @@ const de_DetachPolicyCommandError = async (output, context) => {
1627
1604
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1628
1605
  default:
1629
1606
  const parsedBody = parsedOutput.body;
1630
- throwDefaultError({
1607
+ return throwDefaultError({
1631
1608
  output,
1632
1609
  parsedBody,
1633
- exceptionCtor: __BaseException,
1634
1610
  errorCode,
1635
1611
  });
1636
1612
  }
@@ -1643,7 +1619,7 @@ export const de_DisableAWSServiceAccessCommand = async (output, context) => {
1643
1619
  const response = {
1644
1620
  $metadata: deserializeMetadata(output),
1645
1621
  };
1646
- return Promise.resolve(response);
1622
+ return response;
1647
1623
  };
1648
1624
  const de_DisableAWSServiceAccessCommandError = async (output, context) => {
1649
1625
  const parsedOutput = {
@@ -1678,10 +1654,9 @@ const de_DisableAWSServiceAccessCommandError = async (output, context) => {
1678
1654
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1679
1655
  default:
1680
1656
  const parsedBody = parsedOutput.body;
1681
- throwDefaultError({
1657
+ return throwDefaultError({
1682
1658
  output,
1683
1659
  parsedBody,
1684
- exceptionCtor: __BaseException,
1685
1660
  errorCode,
1686
1661
  });
1687
1662
  }
@@ -1692,12 +1667,12 @@ export const de_DisablePolicyTypeCommand = async (output, context) => {
1692
1667
  }
1693
1668
  const data = await parseBody(output.body, context);
1694
1669
  let contents = {};
1695
- contents = de_DisablePolicyTypeResponse(data, context);
1670
+ contents = _json(data);
1696
1671
  const response = {
1697
1672
  $metadata: deserializeMetadata(output),
1698
1673
  ...contents,
1699
1674
  };
1700
- return Promise.resolve(response);
1675
+ return response;
1701
1676
  };
1702
1677
  const de_DisablePolicyTypeCommandError = async (output, context) => {
1703
1678
  const parsedOutput = {
@@ -1741,10 +1716,9 @@ const de_DisablePolicyTypeCommandError = async (output, context) => {
1741
1716
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1742
1717
  default:
1743
1718
  const parsedBody = parsedOutput.body;
1744
- throwDefaultError({
1719
+ return throwDefaultError({
1745
1720
  output,
1746
1721
  parsedBody,
1747
- exceptionCtor: __BaseException,
1748
1722
  errorCode,
1749
1723
  });
1750
1724
  }
@@ -1760,7 +1734,7 @@ export const de_EnableAllFeaturesCommand = async (output, context) => {
1760
1734
  $metadata: deserializeMetadata(output),
1761
1735
  ...contents,
1762
1736
  };
1763
- return Promise.resolve(response);
1737
+ return response;
1764
1738
  };
1765
1739
  const de_EnableAllFeaturesCommandError = async (output, context) => {
1766
1740
  const parsedOutput = {
@@ -1792,10 +1766,9 @@ const de_EnableAllFeaturesCommandError = async (output, context) => {
1792
1766
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1793
1767
  default:
1794
1768
  const parsedBody = parsedOutput.body;
1795
- throwDefaultError({
1769
+ return throwDefaultError({
1796
1770
  output,
1797
1771
  parsedBody,
1798
- exceptionCtor: __BaseException,
1799
1772
  errorCode,
1800
1773
  });
1801
1774
  }
@@ -1808,7 +1781,7 @@ export const de_EnableAWSServiceAccessCommand = async (output, context) => {
1808
1781
  const response = {
1809
1782
  $metadata: deserializeMetadata(output),
1810
1783
  };
1811
- return Promise.resolve(response);
1784
+ return response;
1812
1785
  };
1813
1786
  const de_EnableAWSServiceAccessCommandError = async (output, context) => {
1814
1787
  const parsedOutput = {
@@ -1843,10 +1816,9 @@ const de_EnableAWSServiceAccessCommandError = async (output, context) => {
1843
1816
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1844
1817
  default:
1845
1818
  const parsedBody = parsedOutput.body;
1846
- throwDefaultError({
1819
+ return throwDefaultError({
1847
1820
  output,
1848
1821
  parsedBody,
1849
- exceptionCtor: __BaseException,
1850
1822
  errorCode,
1851
1823
  });
1852
1824
  }
@@ -1857,12 +1829,12 @@ export const de_EnablePolicyTypeCommand = async (output, context) => {
1857
1829
  }
1858
1830
  const data = await parseBody(output.body, context);
1859
1831
  let contents = {};
1860
- contents = de_EnablePolicyTypeResponse(data, context);
1832
+ contents = _json(data);
1861
1833
  const response = {
1862
1834
  $metadata: deserializeMetadata(output),
1863
1835
  ...contents,
1864
1836
  };
1865
- return Promise.resolve(response);
1837
+ return response;
1866
1838
  };
1867
1839
  const de_EnablePolicyTypeCommandError = async (output, context) => {
1868
1840
  const parsedOutput = {
@@ -1909,10 +1881,9 @@ const de_EnablePolicyTypeCommandError = async (output, context) => {
1909
1881
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1910
1882
  default:
1911
1883
  const parsedBody = parsedOutput.body;
1912
- throwDefaultError({
1884
+ return throwDefaultError({
1913
1885
  output,
1914
1886
  parsedBody,
1915
- exceptionCtor: __BaseException,
1916
1887
  errorCode,
1917
1888
  });
1918
1889
  }
@@ -1928,7 +1899,7 @@ export const de_InviteAccountToOrganizationCommand = async (output, context) =>
1928
1899
  $metadata: deserializeMetadata(output),
1929
1900
  ...contents,
1930
1901
  };
1931
- return Promise.resolve(response);
1902
+ return response;
1932
1903
  };
1933
1904
  const de_InviteAccountToOrganizationCommandError = async (output, context) => {
1934
1905
  const parsedOutput = {
@@ -1972,10 +1943,9 @@ const de_InviteAccountToOrganizationCommandError = async (output, context) => {
1972
1943
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1973
1944
  default:
1974
1945
  const parsedBody = parsedOutput.body;
1975
- throwDefaultError({
1946
+ return throwDefaultError({
1976
1947
  output,
1977
1948
  parsedBody,
1978
- exceptionCtor: __BaseException,
1979
1949
  errorCode,
1980
1950
  });
1981
1951
  }
@@ -1988,7 +1958,7 @@ export const de_LeaveOrganizationCommand = async (output, context) => {
1988
1958
  const response = {
1989
1959
  $metadata: deserializeMetadata(output),
1990
1960
  };
1991
- return Promise.resolve(response);
1961
+ return response;
1992
1962
  };
1993
1963
  const de_LeaveOrganizationCommandError = async (output, context) => {
1994
1964
  const parsedOutput = {
@@ -2026,10 +1996,9 @@ const de_LeaveOrganizationCommandError = async (output, context) => {
2026
1996
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2027
1997
  default:
2028
1998
  const parsedBody = parsedOutput.body;
2029
- throwDefaultError({
1999
+ return throwDefaultError({
2030
2000
  output,
2031
2001
  parsedBody,
2032
- exceptionCtor: __BaseException,
2033
2002
  errorCode,
2034
2003
  });
2035
2004
  }
@@ -2045,7 +2014,7 @@ export const de_ListAccountsCommand = async (output, context) => {
2045
2014
  $metadata: deserializeMetadata(output),
2046
2015
  ...contents,
2047
2016
  };
2048
- return Promise.resolve(response);
2017
+ return response;
2049
2018
  };
2050
2019
  const de_ListAccountsCommandError = async (output, context) => {
2051
2020
  const parsedOutput = {
@@ -2071,10 +2040,9 @@ const de_ListAccountsCommandError = async (output, context) => {
2071
2040
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2072
2041
  default:
2073
2042
  const parsedBody = parsedOutput.body;
2074
- throwDefaultError({
2043
+ return throwDefaultError({
2075
2044
  output,
2076
2045
  parsedBody,
2077
- exceptionCtor: __BaseException,
2078
2046
  errorCode,
2079
2047
  });
2080
2048
  }
@@ -2090,7 +2058,7 @@ export const de_ListAccountsForParentCommand = async (output, context) => {
2090
2058
  $metadata: deserializeMetadata(output),
2091
2059
  ...contents,
2092
2060
  };
2093
- return Promise.resolve(response);
2061
+ return response;
2094
2062
  };
2095
2063
  const de_ListAccountsForParentCommandError = async (output, context) => {
2096
2064
  const parsedOutput = {
@@ -2119,10 +2087,9 @@ const de_ListAccountsForParentCommandError = async (output, context) => {
2119
2087
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2120
2088
  default:
2121
2089
  const parsedBody = parsedOutput.body;
2122
- throwDefaultError({
2090
+ return throwDefaultError({
2123
2091
  output,
2124
2092
  parsedBody,
2125
- exceptionCtor: __BaseException,
2126
2093
  errorCode,
2127
2094
  });
2128
2095
  }
@@ -2138,7 +2105,7 @@ export const de_ListAWSServiceAccessForOrganizationCommand = async (output, cont
2138
2105
  $metadata: deserializeMetadata(output),
2139
2106
  ...contents,
2140
2107
  };
2141
- return Promise.resolve(response);
2108
+ return response;
2142
2109
  };
2143
2110
  const de_ListAWSServiceAccessForOrganizationCommandError = async (output, context) => {
2144
2111
  const parsedOutput = {
@@ -2170,10 +2137,9 @@ const de_ListAWSServiceAccessForOrganizationCommandError = async (output, contex
2170
2137
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2171
2138
  default:
2172
2139
  const parsedBody = parsedOutput.body;
2173
- throwDefaultError({
2140
+ return throwDefaultError({
2174
2141
  output,
2175
2142
  parsedBody,
2176
- exceptionCtor: __BaseException,
2177
2143
  errorCode,
2178
2144
  });
2179
2145
  }
@@ -2184,12 +2150,12 @@ export const de_ListChildrenCommand = async (output, context) => {
2184
2150
  }
2185
2151
  const data = await parseBody(output.body, context);
2186
2152
  let contents = {};
2187
- contents = de_ListChildrenResponse(data, context);
2153
+ contents = _json(data);
2188
2154
  const response = {
2189
2155
  $metadata: deserializeMetadata(output),
2190
2156
  ...contents,
2191
2157
  };
2192
- return Promise.resolve(response);
2158
+ return response;
2193
2159
  };
2194
2160
  const de_ListChildrenCommandError = async (output, context) => {
2195
2161
  const parsedOutput = {
@@ -2218,10 +2184,9 @@ const de_ListChildrenCommandError = async (output, context) => {
2218
2184
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2219
2185
  default:
2220
2186
  const parsedBody = parsedOutput.body;
2221
- throwDefaultError({
2187
+ return throwDefaultError({
2222
2188
  output,
2223
2189
  parsedBody,
2224
- exceptionCtor: __BaseException,
2225
2190
  errorCode,
2226
2191
  });
2227
2192
  }
@@ -2237,7 +2202,7 @@ export const de_ListCreateAccountStatusCommand = async (output, context) => {
2237
2202
  $metadata: deserializeMetadata(output),
2238
2203
  ...contents,
2239
2204
  };
2240
- return Promise.resolve(response);
2205
+ return response;
2241
2206
  };
2242
2207
  const de_ListCreateAccountStatusCommandError = async (output, context) => {
2243
2208
  const parsedOutput = {
@@ -2266,10 +2231,9 @@ const de_ListCreateAccountStatusCommandError = async (output, context) => {
2266
2231
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2267
2232
  default:
2268
2233
  const parsedBody = parsedOutput.body;
2269
- throwDefaultError({
2234
+ return throwDefaultError({
2270
2235
  output,
2271
2236
  parsedBody,
2272
- exceptionCtor: __BaseException,
2273
2237
  errorCode,
2274
2238
  });
2275
2239
  }
@@ -2285,7 +2249,7 @@ export const de_ListDelegatedAdministratorsCommand = async (output, context) =>
2285
2249
  $metadata: deserializeMetadata(output),
2286
2250
  ...contents,
2287
2251
  };
2288
- return Promise.resolve(response);
2252
+ return response;
2289
2253
  };
2290
2254
  const de_ListDelegatedAdministratorsCommandError = async (output, context) => {
2291
2255
  const parsedOutput = {
@@ -2317,10 +2281,9 @@ const de_ListDelegatedAdministratorsCommandError = async (output, context) => {
2317
2281
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2318
2282
  default:
2319
2283
  const parsedBody = parsedOutput.body;
2320
- throwDefaultError({
2284
+ return throwDefaultError({
2321
2285
  output,
2322
2286
  parsedBody,
2323
- exceptionCtor: __BaseException,
2324
2287
  errorCode,
2325
2288
  });
2326
2289
  }
@@ -2336,7 +2299,7 @@ export const de_ListDelegatedServicesForAccountCommand = async (output, context)
2336
2299
  $metadata: deserializeMetadata(output),
2337
2300
  ...contents,
2338
2301
  };
2339
- return Promise.resolve(response);
2302
+ return response;
2340
2303
  };
2341
2304
  const de_ListDelegatedServicesForAccountCommandError = async (output, context) => {
2342
2305
  const parsedOutput = {
@@ -2374,10 +2337,9 @@ const de_ListDelegatedServicesForAccountCommandError = async (output, context) =
2374
2337
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2375
2338
  default:
2376
2339
  const parsedBody = parsedOutput.body;
2377
- throwDefaultError({
2340
+ return throwDefaultError({
2378
2341
  output,
2379
2342
  parsedBody,
2380
- exceptionCtor: __BaseException,
2381
2343
  errorCode,
2382
2344
  });
2383
2345
  }
@@ -2393,7 +2355,7 @@ export const de_ListHandshakesForAccountCommand = async (output, context) => {
2393
2355
  $metadata: deserializeMetadata(output),
2394
2356
  ...contents,
2395
2357
  };
2396
- return Promise.resolve(response);
2358
+ return response;
2397
2359
  };
2398
2360
  const de_ListHandshakesForAccountCommandError = async (output, context) => {
2399
2361
  const parsedOutput = {
@@ -2419,10 +2381,9 @@ const de_ListHandshakesForAccountCommandError = async (output, context) => {
2419
2381
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2420
2382
  default:
2421
2383
  const parsedBody = parsedOutput.body;
2422
- throwDefaultError({
2384
+ return throwDefaultError({
2423
2385
  output,
2424
2386
  parsedBody,
2425
- exceptionCtor: __BaseException,
2426
2387
  errorCode,
2427
2388
  });
2428
2389
  }
@@ -2438,7 +2399,7 @@ export const de_ListHandshakesForOrganizationCommand = async (output, context) =
2438
2399
  $metadata: deserializeMetadata(output),
2439
2400
  ...contents,
2440
2401
  };
2441
- return Promise.resolve(response);
2402
+ return response;
2442
2403
  };
2443
2404
  const de_ListHandshakesForOrganizationCommandError = async (output, context) => {
2444
2405
  const parsedOutput = {
@@ -2467,10 +2428,9 @@ const de_ListHandshakesForOrganizationCommandError = async (output, context) =>
2467
2428
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2468
2429
  default:
2469
2430
  const parsedBody = parsedOutput.body;
2470
- throwDefaultError({
2431
+ return throwDefaultError({
2471
2432
  output,
2472
2433
  parsedBody,
2473
- exceptionCtor: __BaseException,
2474
2434
  errorCode,
2475
2435
  });
2476
2436
  }
@@ -2481,12 +2441,12 @@ export const de_ListOrganizationalUnitsForParentCommand = async (output, context
2481
2441
  }
2482
2442
  const data = await parseBody(output.body, context);
2483
2443
  let contents = {};
2484
- contents = de_ListOrganizationalUnitsForParentResponse(data, context);
2444
+ contents = _json(data);
2485
2445
  const response = {
2486
2446
  $metadata: deserializeMetadata(output),
2487
2447
  ...contents,
2488
2448
  };
2489
- return Promise.resolve(response);
2449
+ return response;
2490
2450
  };
2491
2451
  const de_ListOrganizationalUnitsForParentCommandError = async (output, context) => {
2492
2452
  const parsedOutput = {
@@ -2515,10 +2475,9 @@ const de_ListOrganizationalUnitsForParentCommandError = async (output, context)
2515
2475
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2516
2476
  default:
2517
2477
  const parsedBody = parsedOutput.body;
2518
- throwDefaultError({
2478
+ return throwDefaultError({
2519
2479
  output,
2520
2480
  parsedBody,
2521
- exceptionCtor: __BaseException,
2522
2481
  errorCode,
2523
2482
  });
2524
2483
  }
@@ -2529,12 +2488,12 @@ export const de_ListParentsCommand = async (output, context) => {
2529
2488
  }
2530
2489
  const data = await parseBody(output.body, context);
2531
2490
  let contents = {};
2532
- contents = de_ListParentsResponse(data, context);
2491
+ contents = _json(data);
2533
2492
  const response = {
2534
2493
  $metadata: deserializeMetadata(output),
2535
2494
  ...contents,
2536
2495
  };
2537
- return Promise.resolve(response);
2496
+ return response;
2538
2497
  };
2539
2498
  const de_ListParentsCommandError = async (output, context) => {
2540
2499
  const parsedOutput = {
@@ -2563,10 +2522,9 @@ const de_ListParentsCommandError = async (output, context) => {
2563
2522
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2564
2523
  default:
2565
2524
  const parsedBody = parsedOutput.body;
2566
- throwDefaultError({
2525
+ return throwDefaultError({
2567
2526
  output,
2568
2527
  parsedBody,
2569
- exceptionCtor: __BaseException,
2570
2528
  errorCode,
2571
2529
  });
2572
2530
  }
@@ -2577,12 +2535,12 @@ export const de_ListPoliciesCommand = async (output, context) => {
2577
2535
  }
2578
2536
  const data = await parseBody(output.body, context);
2579
2537
  let contents = {};
2580
- contents = de_ListPoliciesResponse(data, context);
2538
+ contents = _json(data);
2581
2539
  const response = {
2582
2540
  $metadata: deserializeMetadata(output),
2583
2541
  ...contents,
2584
2542
  };
2585
- return Promise.resolve(response);
2543
+ return response;
2586
2544
  };
2587
2545
  const de_ListPoliciesCommandError = async (output, context) => {
2588
2546
  const parsedOutput = {
@@ -2611,10 +2569,9 @@ const de_ListPoliciesCommandError = async (output, context) => {
2611
2569
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2612
2570
  default:
2613
2571
  const parsedBody = parsedOutput.body;
2614
- throwDefaultError({
2572
+ return throwDefaultError({
2615
2573
  output,
2616
2574
  parsedBody,
2617
- exceptionCtor: __BaseException,
2618
2575
  errorCode,
2619
2576
  });
2620
2577
  }
@@ -2625,12 +2582,12 @@ export const de_ListPoliciesForTargetCommand = async (output, context) => {
2625
2582
  }
2626
2583
  const data = await parseBody(output.body, context);
2627
2584
  let contents = {};
2628
- contents = de_ListPoliciesForTargetResponse(data, context);
2585
+ contents = _json(data);
2629
2586
  const response = {
2630
2587
  $metadata: deserializeMetadata(output),
2631
2588
  ...contents,
2632
2589
  };
2633
- return Promise.resolve(response);
2590
+ return response;
2634
2591
  };
2635
2592
  const de_ListPoliciesForTargetCommandError = async (output, context) => {
2636
2593
  const parsedOutput = {
@@ -2662,10 +2619,9 @@ const de_ListPoliciesForTargetCommandError = async (output, context) => {
2662
2619
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2663
2620
  default:
2664
2621
  const parsedBody = parsedOutput.body;
2665
- throwDefaultError({
2622
+ return throwDefaultError({
2666
2623
  output,
2667
2624
  parsedBody,
2668
- exceptionCtor: __BaseException,
2669
2625
  errorCode,
2670
2626
  });
2671
2627
  }
@@ -2676,12 +2632,12 @@ export const de_ListRootsCommand = async (output, context) => {
2676
2632
  }
2677
2633
  const data = await parseBody(output.body, context);
2678
2634
  let contents = {};
2679
- contents = de_ListRootsResponse(data, context);
2635
+ contents = _json(data);
2680
2636
  const response = {
2681
2637
  $metadata: deserializeMetadata(output),
2682
2638
  ...contents,
2683
2639
  };
2684
- return Promise.resolve(response);
2640
+ return response;
2685
2641
  };
2686
2642
  const de_ListRootsCommandError = async (output, context) => {
2687
2643
  const parsedOutput = {
@@ -2707,10 +2663,9 @@ const de_ListRootsCommandError = async (output, context) => {
2707
2663
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2708
2664
  default:
2709
2665
  const parsedBody = parsedOutput.body;
2710
- throwDefaultError({
2666
+ return throwDefaultError({
2711
2667
  output,
2712
2668
  parsedBody,
2713
- exceptionCtor: __BaseException,
2714
2669
  errorCode,
2715
2670
  });
2716
2671
  }
@@ -2721,12 +2676,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2721
2676
  }
2722
2677
  const data = await parseBody(output.body, context);
2723
2678
  let contents = {};
2724
- contents = de_ListTagsForResourceResponse(data, context);
2679
+ contents = _json(data);
2725
2680
  const response = {
2726
2681
  $metadata: deserializeMetadata(output),
2727
2682
  ...contents,
2728
2683
  };
2729
- return Promise.resolve(response);
2684
+ return response;
2730
2685
  };
2731
2686
  const de_ListTagsForResourceCommandError = async (output, context) => {
2732
2687
  const parsedOutput = {
@@ -2755,10 +2710,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2755
2710
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2756
2711
  default:
2757
2712
  const parsedBody = parsedOutput.body;
2758
- throwDefaultError({
2713
+ return throwDefaultError({
2759
2714
  output,
2760
2715
  parsedBody,
2761
- exceptionCtor: __BaseException,
2762
2716
  errorCode,
2763
2717
  });
2764
2718
  }
@@ -2769,12 +2723,12 @@ export const de_ListTargetsForPolicyCommand = async (output, context) => {
2769
2723
  }
2770
2724
  const data = await parseBody(output.body, context);
2771
2725
  let contents = {};
2772
- contents = de_ListTargetsForPolicyResponse(data, context);
2726
+ contents = _json(data);
2773
2727
  const response = {
2774
2728
  $metadata: deserializeMetadata(output),
2775
2729
  ...contents,
2776
2730
  };
2777
- return Promise.resolve(response);
2731
+ return response;
2778
2732
  };
2779
2733
  const de_ListTargetsForPolicyCommandError = async (output, context) => {
2780
2734
  const parsedOutput = {
@@ -2806,10 +2760,9 @@ const de_ListTargetsForPolicyCommandError = async (output, context) => {
2806
2760
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2807
2761
  default:
2808
2762
  const parsedBody = parsedOutput.body;
2809
- throwDefaultError({
2763
+ return throwDefaultError({
2810
2764
  output,
2811
2765
  parsedBody,
2812
- exceptionCtor: __BaseException,
2813
2766
  errorCode,
2814
2767
  });
2815
2768
  }
@@ -2822,7 +2775,7 @@ export const de_MoveAccountCommand = async (output, context) => {
2822
2775
  const response = {
2823
2776
  $metadata: deserializeMetadata(output),
2824
2777
  };
2825
- return Promise.resolve(response);
2778
+ return response;
2826
2779
  };
2827
2780
  const de_MoveAccountCommandError = async (output, context) => {
2828
2781
  const parsedOutput = {
@@ -2863,10 +2816,9 @@ const de_MoveAccountCommandError = async (output, context) => {
2863
2816
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2864
2817
  default:
2865
2818
  const parsedBody = parsedOutput.body;
2866
- throwDefaultError({
2819
+ return throwDefaultError({
2867
2820
  output,
2868
2821
  parsedBody,
2869
- exceptionCtor: __BaseException,
2870
2822
  errorCode,
2871
2823
  });
2872
2824
  }
@@ -2877,12 +2829,12 @@ export const de_PutResourcePolicyCommand = async (output, context) => {
2877
2829
  }
2878
2830
  const data = await parseBody(output.body, context);
2879
2831
  let contents = {};
2880
- contents = de_PutResourcePolicyResponse(data, context);
2832
+ contents = _json(data);
2881
2833
  const response = {
2882
2834
  $metadata: deserializeMetadata(output),
2883
2835
  ...contents,
2884
2836
  };
2885
- return Promise.resolve(response);
2837
+ return response;
2886
2838
  };
2887
2839
  const de_PutResourcePolicyCommandError = async (output, context) => {
2888
2840
  const parsedOutput = {
@@ -2917,10 +2869,9 @@ const de_PutResourcePolicyCommandError = async (output, context) => {
2917
2869
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2918
2870
  default:
2919
2871
  const parsedBody = parsedOutput.body;
2920
- throwDefaultError({
2872
+ return throwDefaultError({
2921
2873
  output,
2922
2874
  parsedBody,
2923
- exceptionCtor: __BaseException,
2924
2875
  errorCode,
2925
2876
  });
2926
2877
  }
@@ -2933,7 +2884,7 @@ export const de_RegisterDelegatedAdministratorCommand = async (output, context)
2933
2884
  const response = {
2934
2885
  $metadata: deserializeMetadata(output),
2935
2886
  };
2936
- return Promise.resolve(response);
2887
+ return response;
2937
2888
  };
2938
2889
  const de_RegisterDelegatedAdministratorCommandError = async (output, context) => {
2939
2890
  const parsedOutput = {
@@ -2974,10 +2925,9 @@ const de_RegisterDelegatedAdministratorCommandError = async (output, context) =>
2974
2925
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2975
2926
  default:
2976
2927
  const parsedBody = parsedOutput.body;
2977
- throwDefaultError({
2928
+ return throwDefaultError({
2978
2929
  output,
2979
2930
  parsedBody,
2980
- exceptionCtor: __BaseException,
2981
2931
  errorCode,
2982
2932
  });
2983
2933
  }
@@ -2990,7 +2940,7 @@ export const de_RemoveAccountFromOrganizationCommand = async (output, context) =
2990
2940
  const response = {
2991
2941
  $metadata: deserializeMetadata(output),
2992
2942
  };
2993
- return Promise.resolve(response);
2943
+ return response;
2994
2944
  };
2995
2945
  const de_RemoveAccountFromOrganizationCommandError = async (output, context) => {
2996
2946
  const parsedOutput = {
@@ -3028,10 +2978,9 @@ const de_RemoveAccountFromOrganizationCommandError = async (output, context) =>
3028
2978
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3029
2979
  default:
3030
2980
  const parsedBody = parsedOutput.body;
3031
- throwDefaultError({
2981
+ return throwDefaultError({
3032
2982
  output,
3033
2983
  parsedBody,
3034
- exceptionCtor: __BaseException,
3035
2984
  errorCode,
3036
2985
  });
3037
2986
  }
@@ -3044,7 +2993,7 @@ export const de_TagResourceCommand = async (output, context) => {
3044
2993
  const response = {
3045
2994
  $metadata: deserializeMetadata(output),
3046
2995
  };
3047
- return Promise.resolve(response);
2996
+ return response;
3048
2997
  };
3049
2998
  const de_TagResourceCommandError = async (output, context) => {
3050
2999
  const parsedOutput = {
@@ -3079,10 +3028,9 @@ const de_TagResourceCommandError = async (output, context) => {
3079
3028
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3080
3029
  default:
3081
3030
  const parsedBody = parsedOutput.body;
3082
- throwDefaultError({
3031
+ return throwDefaultError({
3083
3032
  output,
3084
3033
  parsedBody,
3085
- exceptionCtor: __BaseException,
3086
3034
  errorCode,
3087
3035
  });
3088
3036
  }
@@ -3095,7 +3043,7 @@ export const de_UntagResourceCommand = async (output, context) => {
3095
3043
  const response = {
3096
3044
  $metadata: deserializeMetadata(output),
3097
3045
  };
3098
- return Promise.resolve(response);
3046
+ return response;
3099
3047
  };
3100
3048
  const de_UntagResourceCommandError = async (output, context) => {
3101
3049
  const parsedOutput = {
@@ -3130,10 +3078,9 @@ const de_UntagResourceCommandError = async (output, context) => {
3130
3078
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3131
3079
  default:
3132
3080
  const parsedBody = parsedOutput.body;
3133
- throwDefaultError({
3081
+ return throwDefaultError({
3134
3082
  output,
3135
3083
  parsedBody,
3136
- exceptionCtor: __BaseException,
3137
3084
  errorCode,
3138
3085
  });
3139
3086
  }
@@ -3144,12 +3091,12 @@ export const de_UpdateOrganizationalUnitCommand = async (output, context) => {
3144
3091
  }
3145
3092
  const data = await parseBody(output.body, context);
3146
3093
  let contents = {};
3147
- contents = de_UpdateOrganizationalUnitResponse(data, context);
3094
+ contents = _json(data);
3148
3095
  const response = {
3149
3096
  $metadata: deserializeMetadata(output),
3150
3097
  ...contents,
3151
3098
  };
3152
- return Promise.resolve(response);
3099
+ return response;
3153
3100
  };
3154
3101
  const de_UpdateOrganizationalUnitCommandError = async (output, context) => {
3155
3102
  const parsedOutput = {
@@ -3184,10 +3131,9 @@ const de_UpdateOrganizationalUnitCommandError = async (output, context) => {
3184
3131
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3185
3132
  default:
3186
3133
  const parsedBody = parsedOutput.body;
3187
- throwDefaultError({
3134
+ return throwDefaultError({
3188
3135
  output,
3189
3136
  parsedBody,
3190
- exceptionCtor: __BaseException,
3191
3137
  errorCode,
3192
3138
  });
3193
3139
  }
@@ -3198,12 +3144,12 @@ export const de_UpdatePolicyCommand = async (output, context) => {
3198
3144
  }
3199
3145
  const data = await parseBody(output.body, context);
3200
3146
  let contents = {};
3201
- contents = de_UpdatePolicyResponse(data, context);
3147
+ contents = _json(data);
3202
3148
  const response = {
3203
3149
  $metadata: deserializeMetadata(output),
3204
3150
  ...contents,
3205
3151
  };
3206
- return Promise.resolve(response);
3152
+ return response;
3207
3153
  };
3208
3154
  const de_UpdatePolicyCommandError = async (output, context) => {
3209
3155
  const parsedOutput = {
@@ -3250,17 +3196,16 @@ const de_UpdatePolicyCommandError = async (output, context) => {
3250
3196
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
3251
3197
  default:
3252
3198
  const parsedBody = parsedOutput.body;
3253
- throwDefaultError({
3199
+ return throwDefaultError({
3254
3200
  output,
3255
3201
  parsedBody,
3256
- exceptionCtor: __BaseException,
3257
3202
  errorCode,
3258
3203
  });
3259
3204
  }
3260
3205
  };
3261
3206
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3262
3207
  const body = parsedOutput.body;
3263
- const deserialized = de_AccessDeniedException(body, context);
3208
+ const deserialized = _json(body);
3264
3209
  const exception = new AccessDeniedException({
3265
3210
  $metadata: deserializeMetadata(parsedOutput),
3266
3211
  ...deserialized,
@@ -3269,7 +3214,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3269
3214
  };
3270
3215
  const de_AccessDeniedForDependencyExceptionRes = async (parsedOutput, context) => {
3271
3216
  const body = parsedOutput.body;
3272
- const deserialized = de_AccessDeniedForDependencyException(body, context);
3217
+ const deserialized = _json(body);
3273
3218
  const exception = new AccessDeniedForDependencyException({
3274
3219
  $metadata: deserializeMetadata(parsedOutput),
3275
3220
  ...deserialized,
@@ -3278,7 +3223,7 @@ const de_AccessDeniedForDependencyExceptionRes = async (parsedOutput, context) =
3278
3223
  };
3279
3224
  const de_AccountAlreadyClosedExceptionRes = async (parsedOutput, context) => {
3280
3225
  const body = parsedOutput.body;
3281
- const deserialized = de_AccountAlreadyClosedException(body, context);
3226
+ const deserialized = _json(body);
3282
3227
  const exception = new AccountAlreadyClosedException({
3283
3228
  $metadata: deserializeMetadata(parsedOutput),
3284
3229
  ...deserialized,
@@ -3287,7 +3232,7 @@ const de_AccountAlreadyClosedExceptionRes = async (parsedOutput, context) => {
3287
3232
  };
3288
3233
  const de_AccountAlreadyRegisteredExceptionRes = async (parsedOutput, context) => {
3289
3234
  const body = parsedOutput.body;
3290
- const deserialized = de_AccountAlreadyRegisteredException(body, context);
3235
+ const deserialized = _json(body);
3291
3236
  const exception = new AccountAlreadyRegisteredException({
3292
3237
  $metadata: deserializeMetadata(parsedOutput),
3293
3238
  ...deserialized,
@@ -3296,7 +3241,7 @@ const de_AccountAlreadyRegisteredExceptionRes = async (parsedOutput, context) =>
3296
3241
  };
3297
3242
  const de_AccountNotFoundExceptionRes = async (parsedOutput, context) => {
3298
3243
  const body = parsedOutput.body;
3299
- const deserialized = de_AccountNotFoundException(body, context);
3244
+ const deserialized = _json(body);
3300
3245
  const exception = new AccountNotFoundException({
3301
3246
  $metadata: deserializeMetadata(parsedOutput),
3302
3247
  ...deserialized,
@@ -3305,7 +3250,7 @@ const de_AccountNotFoundExceptionRes = async (parsedOutput, context) => {
3305
3250
  };
3306
3251
  const de_AccountNotRegisteredExceptionRes = async (parsedOutput, context) => {
3307
3252
  const body = parsedOutput.body;
3308
- const deserialized = de_AccountNotRegisteredException(body, context);
3253
+ const deserialized = _json(body);
3309
3254
  const exception = new AccountNotRegisteredException({
3310
3255
  $metadata: deserializeMetadata(parsedOutput),
3311
3256
  ...deserialized,
@@ -3314,7 +3259,7 @@ const de_AccountNotRegisteredExceptionRes = async (parsedOutput, context) => {
3314
3259
  };
3315
3260
  const de_AccountOwnerNotVerifiedExceptionRes = async (parsedOutput, context) => {
3316
3261
  const body = parsedOutput.body;
3317
- const deserialized = de_AccountOwnerNotVerifiedException(body, context);
3262
+ const deserialized = _json(body);
3318
3263
  const exception = new AccountOwnerNotVerifiedException({
3319
3264
  $metadata: deserializeMetadata(parsedOutput),
3320
3265
  ...deserialized,
@@ -3323,7 +3268,7 @@ const de_AccountOwnerNotVerifiedExceptionRes = async (parsedOutput, context) =>
3323
3268
  };
3324
3269
  const de_AlreadyInOrganizationExceptionRes = async (parsedOutput, context) => {
3325
3270
  const body = parsedOutput.body;
3326
- const deserialized = de_AlreadyInOrganizationException(body, context);
3271
+ const deserialized = _json(body);
3327
3272
  const exception = new AlreadyInOrganizationException({
3328
3273
  $metadata: deserializeMetadata(parsedOutput),
3329
3274
  ...deserialized,
@@ -3332,7 +3277,7 @@ const de_AlreadyInOrganizationExceptionRes = async (parsedOutput, context) => {
3332
3277
  };
3333
3278
  const de_AWSOrganizationsNotInUseExceptionRes = async (parsedOutput, context) => {
3334
3279
  const body = parsedOutput.body;
3335
- const deserialized = de_AWSOrganizationsNotInUseException(body, context);
3280
+ const deserialized = _json(body);
3336
3281
  const exception = new AWSOrganizationsNotInUseException({
3337
3282
  $metadata: deserializeMetadata(parsedOutput),
3338
3283
  ...deserialized,
@@ -3341,7 +3286,7 @@ const de_AWSOrganizationsNotInUseExceptionRes = async (parsedOutput, context) =>
3341
3286
  };
3342
3287
  const de_ChildNotFoundExceptionRes = async (parsedOutput, context) => {
3343
3288
  const body = parsedOutput.body;
3344
- const deserialized = de_ChildNotFoundException(body, context);
3289
+ const deserialized = _json(body);
3345
3290
  const exception = new ChildNotFoundException({
3346
3291
  $metadata: deserializeMetadata(parsedOutput),
3347
3292
  ...deserialized,
@@ -3350,7 +3295,7 @@ const de_ChildNotFoundExceptionRes = async (parsedOutput, context) => {
3350
3295
  };
3351
3296
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
3352
3297
  const body = parsedOutput.body;
3353
- const deserialized = de_ConcurrentModificationException(body, context);
3298
+ const deserialized = _json(body);
3354
3299
  const exception = new ConcurrentModificationException({
3355
3300
  $metadata: deserializeMetadata(parsedOutput),
3356
3301
  ...deserialized,
@@ -3359,7 +3304,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
3359
3304
  };
3360
3305
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
3361
3306
  const body = parsedOutput.body;
3362
- const deserialized = de_ConflictException(body, context);
3307
+ const deserialized = _json(body);
3363
3308
  const exception = new ConflictException({
3364
3309
  $metadata: deserializeMetadata(parsedOutput),
3365
3310
  ...deserialized,
@@ -3368,7 +3313,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
3368
3313
  };
3369
3314
  const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
3370
3315
  const body = parsedOutput.body;
3371
- const deserialized = de_ConstraintViolationException(body, context);
3316
+ const deserialized = _json(body);
3372
3317
  const exception = new ConstraintViolationException({
3373
3318
  $metadata: deserializeMetadata(parsedOutput),
3374
3319
  ...deserialized,
@@ -3377,7 +3322,7 @@ const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
3377
3322
  };
3378
3323
  const de_CreateAccountStatusNotFoundExceptionRes = async (parsedOutput, context) => {
3379
3324
  const body = parsedOutput.body;
3380
- const deserialized = de_CreateAccountStatusNotFoundException(body, context);
3325
+ const deserialized = _json(body);
3381
3326
  const exception = new CreateAccountStatusNotFoundException({
3382
3327
  $metadata: deserializeMetadata(parsedOutput),
3383
3328
  ...deserialized,
@@ -3386,7 +3331,7 @@ const de_CreateAccountStatusNotFoundExceptionRes = async (parsedOutput, context)
3386
3331
  };
3387
3332
  const de_DestinationParentNotFoundExceptionRes = async (parsedOutput, context) => {
3388
3333
  const body = parsedOutput.body;
3389
- const deserialized = de_DestinationParentNotFoundException(body, context);
3334
+ const deserialized = _json(body);
3390
3335
  const exception = new DestinationParentNotFoundException({
3391
3336
  $metadata: deserializeMetadata(parsedOutput),
3392
3337
  ...deserialized,
@@ -3395,7 +3340,7 @@ const de_DestinationParentNotFoundExceptionRes = async (parsedOutput, context) =
3395
3340
  };
3396
3341
  const de_DuplicateAccountExceptionRes = async (parsedOutput, context) => {
3397
3342
  const body = parsedOutput.body;
3398
- const deserialized = de_DuplicateAccountException(body, context);
3343
+ const deserialized = _json(body);
3399
3344
  const exception = new DuplicateAccountException({
3400
3345
  $metadata: deserializeMetadata(parsedOutput),
3401
3346
  ...deserialized,
@@ -3404,7 +3349,7 @@ const de_DuplicateAccountExceptionRes = async (parsedOutput, context) => {
3404
3349
  };
3405
3350
  const de_DuplicateHandshakeExceptionRes = async (parsedOutput, context) => {
3406
3351
  const body = parsedOutput.body;
3407
- const deserialized = de_DuplicateHandshakeException(body, context);
3352
+ const deserialized = _json(body);
3408
3353
  const exception = new DuplicateHandshakeException({
3409
3354
  $metadata: deserializeMetadata(parsedOutput),
3410
3355
  ...deserialized,
@@ -3413,7 +3358,7 @@ const de_DuplicateHandshakeExceptionRes = async (parsedOutput, context) => {
3413
3358
  };
3414
3359
  const de_DuplicateOrganizationalUnitExceptionRes = async (parsedOutput, context) => {
3415
3360
  const body = parsedOutput.body;
3416
- const deserialized = de_DuplicateOrganizationalUnitException(body, context);
3361
+ const deserialized = _json(body);
3417
3362
  const exception = new DuplicateOrganizationalUnitException({
3418
3363
  $metadata: deserializeMetadata(parsedOutput),
3419
3364
  ...deserialized,
@@ -3422,7 +3367,7 @@ const de_DuplicateOrganizationalUnitExceptionRes = async (parsedOutput, context)
3422
3367
  };
3423
3368
  const de_DuplicatePolicyAttachmentExceptionRes = async (parsedOutput, context) => {
3424
3369
  const body = parsedOutput.body;
3425
- const deserialized = de_DuplicatePolicyAttachmentException(body, context);
3370
+ const deserialized = _json(body);
3426
3371
  const exception = new DuplicatePolicyAttachmentException({
3427
3372
  $metadata: deserializeMetadata(parsedOutput),
3428
3373
  ...deserialized,
@@ -3431,7 +3376,7 @@ const de_DuplicatePolicyAttachmentExceptionRes = async (parsedOutput, context) =
3431
3376
  };
3432
3377
  const de_DuplicatePolicyExceptionRes = async (parsedOutput, context) => {
3433
3378
  const body = parsedOutput.body;
3434
- const deserialized = de_DuplicatePolicyException(body, context);
3379
+ const deserialized = _json(body);
3435
3380
  const exception = new DuplicatePolicyException({
3436
3381
  $metadata: deserializeMetadata(parsedOutput),
3437
3382
  ...deserialized,
@@ -3440,7 +3385,7 @@ const de_DuplicatePolicyExceptionRes = async (parsedOutput, context) => {
3440
3385
  };
3441
3386
  const de_EffectivePolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3442
3387
  const body = parsedOutput.body;
3443
- const deserialized = de_EffectivePolicyNotFoundException(body, context);
3388
+ const deserialized = _json(body);
3444
3389
  const exception = new EffectivePolicyNotFoundException({
3445
3390
  $metadata: deserializeMetadata(parsedOutput),
3446
3391
  ...deserialized,
@@ -3449,7 +3394,7 @@ const de_EffectivePolicyNotFoundExceptionRes = async (parsedOutput, context) =>
3449
3394
  };
3450
3395
  const de_FinalizingOrganizationExceptionRes = async (parsedOutput, context) => {
3451
3396
  const body = parsedOutput.body;
3452
- const deserialized = de_FinalizingOrganizationException(body, context);
3397
+ const deserialized = _json(body);
3453
3398
  const exception = new FinalizingOrganizationException({
3454
3399
  $metadata: deserializeMetadata(parsedOutput),
3455
3400
  ...deserialized,
@@ -3458,7 +3403,7 @@ const de_FinalizingOrganizationExceptionRes = async (parsedOutput, context) => {
3458
3403
  };
3459
3404
  const de_HandshakeAlreadyInStateExceptionRes = async (parsedOutput, context) => {
3460
3405
  const body = parsedOutput.body;
3461
- const deserialized = de_HandshakeAlreadyInStateException(body, context);
3406
+ const deserialized = _json(body);
3462
3407
  const exception = new HandshakeAlreadyInStateException({
3463
3408
  $metadata: deserializeMetadata(parsedOutput),
3464
3409
  ...deserialized,
@@ -3467,7 +3412,7 @@ const de_HandshakeAlreadyInStateExceptionRes = async (parsedOutput, context) =>
3467
3412
  };
3468
3413
  const de_HandshakeConstraintViolationExceptionRes = async (parsedOutput, context) => {
3469
3414
  const body = parsedOutput.body;
3470
- const deserialized = de_HandshakeConstraintViolationException(body, context);
3415
+ const deserialized = _json(body);
3471
3416
  const exception = new HandshakeConstraintViolationException({
3472
3417
  $metadata: deserializeMetadata(parsedOutput),
3473
3418
  ...deserialized,
@@ -3476,7 +3421,7 @@ const de_HandshakeConstraintViolationExceptionRes = async (parsedOutput, context
3476
3421
  };
3477
3422
  const de_HandshakeNotFoundExceptionRes = async (parsedOutput, context) => {
3478
3423
  const body = parsedOutput.body;
3479
- const deserialized = de_HandshakeNotFoundException(body, context);
3424
+ const deserialized = _json(body);
3480
3425
  const exception = new HandshakeNotFoundException({
3481
3426
  $metadata: deserializeMetadata(parsedOutput),
3482
3427
  ...deserialized,
@@ -3485,7 +3430,7 @@ const de_HandshakeNotFoundExceptionRes = async (parsedOutput, context) => {
3485
3430
  };
3486
3431
  const de_InvalidHandshakeTransitionExceptionRes = async (parsedOutput, context) => {
3487
3432
  const body = parsedOutput.body;
3488
- const deserialized = de_InvalidHandshakeTransitionException(body, context);
3433
+ const deserialized = _json(body);
3489
3434
  const exception = new InvalidHandshakeTransitionException({
3490
3435
  $metadata: deserializeMetadata(parsedOutput),
3491
3436
  ...deserialized,
@@ -3494,7 +3439,7 @@ const de_InvalidHandshakeTransitionExceptionRes = async (parsedOutput, context)
3494
3439
  };
3495
3440
  const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
3496
3441
  const body = parsedOutput.body;
3497
- const deserialized = de_InvalidInputException(body, context);
3442
+ const deserialized = _json(body);
3498
3443
  const exception = new InvalidInputException({
3499
3444
  $metadata: deserializeMetadata(parsedOutput),
3500
3445
  ...deserialized,
@@ -3503,7 +3448,7 @@ const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
3503
3448
  };
3504
3449
  const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
3505
3450
  const body = parsedOutput.body;
3506
- const deserialized = de_MalformedPolicyDocumentException(body, context);
3451
+ const deserialized = _json(body);
3507
3452
  const exception = new MalformedPolicyDocumentException({
3508
3453
  $metadata: deserializeMetadata(parsedOutput),
3509
3454
  ...deserialized,
@@ -3512,7 +3457,7 @@ const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) =>
3512
3457
  };
3513
3458
  const de_MasterCannotLeaveOrganizationExceptionRes = async (parsedOutput, context) => {
3514
3459
  const body = parsedOutput.body;
3515
- const deserialized = de_MasterCannotLeaveOrganizationException(body, context);
3460
+ const deserialized = _json(body);
3516
3461
  const exception = new MasterCannotLeaveOrganizationException({
3517
3462
  $metadata: deserializeMetadata(parsedOutput),
3518
3463
  ...deserialized,
@@ -3521,7 +3466,7 @@ const de_MasterCannotLeaveOrganizationExceptionRes = async (parsedOutput, contex
3521
3466
  };
3522
3467
  const de_OrganizationalUnitNotEmptyExceptionRes = async (parsedOutput, context) => {
3523
3468
  const body = parsedOutput.body;
3524
- const deserialized = de_OrganizationalUnitNotEmptyException(body, context);
3469
+ const deserialized = _json(body);
3525
3470
  const exception = new OrganizationalUnitNotEmptyException({
3526
3471
  $metadata: deserializeMetadata(parsedOutput),
3527
3472
  ...deserialized,
@@ -3530,7 +3475,7 @@ const de_OrganizationalUnitNotEmptyExceptionRes = async (parsedOutput, context)
3530
3475
  };
3531
3476
  const de_OrganizationalUnitNotFoundExceptionRes = async (parsedOutput, context) => {
3532
3477
  const body = parsedOutput.body;
3533
- const deserialized = de_OrganizationalUnitNotFoundException(body, context);
3478
+ const deserialized = _json(body);
3534
3479
  const exception = new OrganizationalUnitNotFoundException({
3535
3480
  $metadata: deserializeMetadata(parsedOutput),
3536
3481
  ...deserialized,
@@ -3539,7 +3484,7 @@ const de_OrganizationalUnitNotFoundExceptionRes = async (parsedOutput, context)
3539
3484
  };
3540
3485
  const de_OrganizationNotEmptyExceptionRes = async (parsedOutput, context) => {
3541
3486
  const body = parsedOutput.body;
3542
- const deserialized = de_OrganizationNotEmptyException(body, context);
3487
+ const deserialized = _json(body);
3543
3488
  const exception = new OrganizationNotEmptyException({
3544
3489
  $metadata: deserializeMetadata(parsedOutput),
3545
3490
  ...deserialized,
@@ -3548,7 +3493,7 @@ const de_OrganizationNotEmptyExceptionRes = async (parsedOutput, context) => {
3548
3493
  };
3549
3494
  const de_ParentNotFoundExceptionRes = async (parsedOutput, context) => {
3550
3495
  const body = parsedOutput.body;
3551
- const deserialized = de_ParentNotFoundException(body, context);
3496
+ const deserialized = _json(body);
3552
3497
  const exception = new ParentNotFoundException({
3553
3498
  $metadata: deserializeMetadata(parsedOutput),
3554
3499
  ...deserialized,
@@ -3557,7 +3502,7 @@ const de_ParentNotFoundExceptionRes = async (parsedOutput, context) => {
3557
3502
  };
3558
3503
  const de_PolicyChangesInProgressExceptionRes = async (parsedOutput, context) => {
3559
3504
  const body = parsedOutput.body;
3560
- const deserialized = de_PolicyChangesInProgressException(body, context);
3505
+ const deserialized = _json(body);
3561
3506
  const exception = new PolicyChangesInProgressException({
3562
3507
  $metadata: deserializeMetadata(parsedOutput),
3563
3508
  ...deserialized,
@@ -3566,7 +3511,7 @@ const de_PolicyChangesInProgressExceptionRes = async (parsedOutput, context) =>
3566
3511
  };
3567
3512
  const de_PolicyInUseExceptionRes = async (parsedOutput, context) => {
3568
3513
  const body = parsedOutput.body;
3569
- const deserialized = de_PolicyInUseException(body, context);
3514
+ const deserialized = _json(body);
3570
3515
  const exception = new PolicyInUseException({
3571
3516
  $metadata: deserializeMetadata(parsedOutput),
3572
3517
  ...deserialized,
@@ -3575,7 +3520,7 @@ const de_PolicyInUseExceptionRes = async (parsedOutput, context) => {
3575
3520
  };
3576
3521
  const de_PolicyNotAttachedExceptionRes = async (parsedOutput, context) => {
3577
3522
  const body = parsedOutput.body;
3578
- const deserialized = de_PolicyNotAttachedException(body, context);
3523
+ const deserialized = _json(body);
3579
3524
  const exception = new PolicyNotAttachedException({
3580
3525
  $metadata: deserializeMetadata(parsedOutput),
3581
3526
  ...deserialized,
@@ -3584,7 +3529,7 @@ const de_PolicyNotAttachedExceptionRes = async (parsedOutput, context) => {
3584
3529
  };
3585
3530
  const de_PolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3586
3531
  const body = parsedOutput.body;
3587
- const deserialized = de_PolicyNotFoundException(body, context);
3532
+ const deserialized = _json(body);
3588
3533
  const exception = new PolicyNotFoundException({
3589
3534
  $metadata: deserializeMetadata(parsedOutput),
3590
3535
  ...deserialized,
@@ -3593,7 +3538,7 @@ const de_PolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3593
3538
  };
3594
3539
  const de_PolicyTypeAlreadyEnabledExceptionRes = async (parsedOutput, context) => {
3595
3540
  const body = parsedOutput.body;
3596
- const deserialized = de_PolicyTypeAlreadyEnabledException(body, context);
3541
+ const deserialized = _json(body);
3597
3542
  const exception = new PolicyTypeAlreadyEnabledException({
3598
3543
  $metadata: deserializeMetadata(parsedOutput),
3599
3544
  ...deserialized,
@@ -3602,7 +3547,7 @@ const de_PolicyTypeAlreadyEnabledExceptionRes = async (parsedOutput, context) =>
3602
3547
  };
3603
3548
  const de_PolicyTypeNotAvailableForOrganizationExceptionRes = async (parsedOutput, context) => {
3604
3549
  const body = parsedOutput.body;
3605
- const deserialized = de_PolicyTypeNotAvailableForOrganizationException(body, context);
3550
+ const deserialized = _json(body);
3606
3551
  const exception = new PolicyTypeNotAvailableForOrganizationException({
3607
3552
  $metadata: deserializeMetadata(parsedOutput),
3608
3553
  ...deserialized,
@@ -3611,7 +3556,7 @@ const de_PolicyTypeNotAvailableForOrganizationExceptionRes = async (parsedOutput
3611
3556
  };
3612
3557
  const de_PolicyTypeNotEnabledExceptionRes = async (parsedOutput, context) => {
3613
3558
  const body = parsedOutput.body;
3614
- const deserialized = de_PolicyTypeNotEnabledException(body, context);
3559
+ const deserialized = _json(body);
3615
3560
  const exception = new PolicyTypeNotEnabledException({
3616
3561
  $metadata: deserializeMetadata(parsedOutput),
3617
3562
  ...deserialized,
@@ -3620,7 +3565,7 @@ const de_PolicyTypeNotEnabledExceptionRes = async (parsedOutput, context) => {
3620
3565
  };
3621
3566
  const de_ResourcePolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3622
3567
  const body = parsedOutput.body;
3623
- const deserialized = de_ResourcePolicyNotFoundException(body, context);
3568
+ const deserialized = _json(body);
3624
3569
  const exception = new ResourcePolicyNotFoundException({
3625
3570
  $metadata: deserializeMetadata(parsedOutput),
3626
3571
  ...deserialized,
@@ -3629,7 +3574,7 @@ const de_ResourcePolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3629
3574
  };
3630
3575
  const de_RootNotFoundExceptionRes = async (parsedOutput, context) => {
3631
3576
  const body = parsedOutput.body;
3632
- const deserialized = de_RootNotFoundException(body, context);
3577
+ const deserialized = _json(body);
3633
3578
  const exception = new RootNotFoundException({
3634
3579
  $metadata: deserializeMetadata(parsedOutput),
3635
3580
  ...deserialized,
@@ -3638,7 +3583,7 @@ const de_RootNotFoundExceptionRes = async (parsedOutput, context) => {
3638
3583
  };
3639
3584
  const de_ServiceExceptionRes = async (parsedOutput, context) => {
3640
3585
  const body = parsedOutput.body;
3641
- const deserialized = de_ServiceException(body, context);
3586
+ const deserialized = _json(body);
3642
3587
  const exception = new ServiceException({
3643
3588
  $metadata: deserializeMetadata(parsedOutput),
3644
3589
  ...deserialized,
@@ -3647,7 +3592,7 @@ const de_ServiceExceptionRes = async (parsedOutput, context) => {
3647
3592
  };
3648
3593
  const de_SourceParentNotFoundExceptionRes = async (parsedOutput, context) => {
3649
3594
  const body = parsedOutput.body;
3650
- const deserialized = de_SourceParentNotFoundException(body, context);
3595
+ const deserialized = _json(body);
3651
3596
  const exception = new SourceParentNotFoundException({
3652
3597
  $metadata: deserializeMetadata(parsedOutput),
3653
3598
  ...deserialized,
@@ -3656,7 +3601,7 @@ const de_SourceParentNotFoundExceptionRes = async (parsedOutput, context) => {
3656
3601
  };
3657
3602
  const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
3658
3603
  const body = parsedOutput.body;
3659
- const deserialized = de_TargetNotFoundException(body, context);
3604
+ const deserialized = _json(body);
3660
3605
  const exception = new TargetNotFoundException({
3661
3606
  $metadata: deserializeMetadata(parsedOutput),
3662
3607
  ...deserialized,
@@ -3665,7 +3610,7 @@ const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
3665
3610
  };
3666
3611
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
3667
3612
  const body = parsedOutput.body;
3668
- const deserialized = de_TooManyRequestsException(body, context);
3613
+ const deserialized = _json(body);
3669
3614
  const exception = new TooManyRequestsException({
3670
3615
  $metadata: deserializeMetadata(parsedOutput),
3671
3616
  ...deserialized,
@@ -3674,1182 +3619,245 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
3674
3619
  };
3675
3620
  const de_UnsupportedAPIEndpointExceptionRes = async (parsedOutput, context) => {
3676
3621
  const body = parsedOutput.body;
3677
- const deserialized = de_UnsupportedAPIEndpointException(body, context);
3622
+ const deserialized = _json(body);
3678
3623
  const exception = new UnsupportedAPIEndpointException({
3679
3624
  $metadata: deserializeMetadata(parsedOutput),
3680
3625
  ...deserialized,
3681
3626
  });
3682
3627
  return __decorateServiceException(exception, body);
3683
3628
  };
3684
- const se_AcceptHandshakeRequest = (input, context) => {
3685
- return {
3686
- ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }),
3687
- };
3688
- };
3689
- const se_AttachPolicyRequest = (input, context) => {
3690
- return {
3691
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
3692
- ...(input.TargetId != null && { TargetId: input.TargetId }),
3693
- };
3694
- };
3695
- const se_CancelHandshakeRequest = (input, context) => {
3696
- return {
3697
- ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }),
3698
- };
3699
- };
3700
- const se_CloseAccountRequest = (input, context) => {
3701
- return {
3702
- ...(input.AccountId != null && { AccountId: input.AccountId }),
3703
- };
3704
- };
3705
- const se_CreateAccountRequest = (input, context) => {
3706
- return {
3707
- ...(input.AccountName != null && { AccountName: input.AccountName }),
3708
- ...(input.Email != null && { Email: input.Email }),
3709
- ...(input.IamUserAccessToBilling != null && { IamUserAccessToBilling: input.IamUserAccessToBilling }),
3710
- ...(input.RoleName != null && { RoleName: input.RoleName }),
3711
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
3712
- };
3713
- };
3714
- const se_CreateAccountStates = (input, context) => {
3715
- return input
3716
- .filter((e) => e != null)
3717
- .map((entry) => {
3718
- return entry;
3719
- });
3720
- };
3721
- const se_CreateGovCloudAccountRequest = (input, context) => {
3722
- return {
3723
- ...(input.AccountName != null && { AccountName: input.AccountName }),
3724
- ...(input.Email != null && { Email: input.Email }),
3725
- ...(input.IamUserAccessToBilling != null && { IamUserAccessToBilling: input.IamUserAccessToBilling }),
3726
- ...(input.RoleName != null && { RoleName: input.RoleName }),
3727
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
3728
- };
3729
- };
3730
- const se_CreateOrganizationalUnitRequest = (input, context) => {
3731
- return {
3732
- ...(input.Name != null && { Name: input.Name }),
3733
- ...(input.ParentId != null && { ParentId: input.ParentId }),
3734
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
3735
- };
3736
- };
3737
- const se_CreateOrganizationRequest = (input, context) => {
3738
- return {
3739
- ...(input.FeatureSet != null && { FeatureSet: input.FeatureSet }),
3740
- };
3741
- };
3742
- const se_CreatePolicyRequest = (input, context) => {
3743
- return {
3744
- ...(input.Content != null && { Content: input.Content }),
3745
- ...(input.Description != null && { Description: input.Description }),
3746
- ...(input.Name != null && { Name: input.Name }),
3747
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
3748
- ...(input.Type != null && { Type: input.Type }),
3749
- };
3750
- };
3751
- const se_DeclineHandshakeRequest = (input, context) => {
3752
- return {
3753
- ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }),
3754
- };
3755
- };
3756
- const se_DeleteOrganizationalUnitRequest = (input, context) => {
3757
- return {
3758
- ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }),
3759
- };
3760
- };
3761
- const se_DeletePolicyRequest = (input, context) => {
3762
- return {
3763
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
3764
- };
3765
- };
3766
- const se_DeregisterDelegatedAdministratorRequest = (input, context) => {
3767
- return {
3768
- ...(input.AccountId != null && { AccountId: input.AccountId }),
3769
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
3770
- };
3771
- };
3772
- const se_DescribeAccountRequest = (input, context) => {
3773
- return {
3774
- ...(input.AccountId != null && { AccountId: input.AccountId }),
3775
- };
3776
- };
3777
- const se_DescribeCreateAccountStatusRequest = (input, context) => {
3778
- return {
3779
- ...(input.CreateAccountRequestId != null && { CreateAccountRequestId: input.CreateAccountRequestId }),
3780
- };
3781
- };
3782
- const se_DescribeEffectivePolicyRequest = (input, context) => {
3783
- return {
3784
- ...(input.PolicyType != null && { PolicyType: input.PolicyType }),
3785
- ...(input.TargetId != null && { TargetId: input.TargetId }),
3786
- };
3787
- };
3788
- const se_DescribeHandshakeRequest = (input, context) => {
3789
- return {
3790
- ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }),
3791
- };
3792
- };
3793
- const se_DescribeOrganizationalUnitRequest = (input, context) => {
3794
- return {
3795
- ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }),
3796
- };
3797
- };
3798
- const se_DescribePolicyRequest = (input, context) => {
3799
- return {
3800
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
3801
- };
3802
- };
3803
- const se_DetachPolicyRequest = (input, context) => {
3804
- return {
3805
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
3806
- ...(input.TargetId != null && { TargetId: input.TargetId }),
3807
- };
3808
- };
3809
- const se_DisableAWSServiceAccessRequest = (input, context) => {
3810
- return {
3811
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
3812
- };
3813
- };
3814
- const se_DisablePolicyTypeRequest = (input, context) => {
3815
- return {
3816
- ...(input.PolicyType != null && { PolicyType: input.PolicyType }),
3817
- ...(input.RootId != null && { RootId: input.RootId }),
3818
- };
3819
- };
3820
- const se_EnableAllFeaturesRequest = (input, context) => {
3821
- return {};
3822
- };
3823
- const se_EnableAWSServiceAccessRequest = (input, context) => {
3824
- return {
3825
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
3826
- };
3827
- };
3828
- const se_EnablePolicyTypeRequest = (input, context) => {
3829
- return {
3830
- ...(input.PolicyType != null && { PolicyType: input.PolicyType }),
3831
- ...(input.RootId != null && { RootId: input.RootId }),
3832
- };
3833
- };
3834
- const se_HandshakeFilter = (input, context) => {
3835
- return {
3836
- ...(input.ActionType != null && { ActionType: input.ActionType }),
3837
- ...(input.ParentHandshakeId != null && { ParentHandshakeId: input.ParentHandshakeId }),
3838
- };
3839
- };
3840
- const se_HandshakeParty = (input, context) => {
3841
- return {
3842
- ...(input.Id != null && { Id: input.Id }),
3843
- ...(input.Type != null && { Type: input.Type }),
3844
- };
3845
- };
3846
- const se_InviteAccountToOrganizationRequest = (input, context) => {
3847
- return {
3848
- ...(input.Notes != null && { Notes: input.Notes }),
3849
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
3850
- ...(input.Target != null && { Target: se_HandshakeParty(input.Target, context) }),
3851
- };
3852
- };
3853
- const se_ListAccountsForParentRequest = (input, context) => {
3854
- return {
3855
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3856
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3857
- ...(input.ParentId != null && { ParentId: input.ParentId }),
3858
- };
3859
- };
3860
- const se_ListAccountsRequest = (input, context) => {
3861
- return {
3862
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3863
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3864
- };
3865
- };
3866
- const se_ListAWSServiceAccessForOrganizationRequest = (input, context) => {
3867
- return {
3868
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3869
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3870
- };
3871
- };
3872
- const se_ListChildrenRequest = (input, context) => {
3873
- return {
3874
- ...(input.ChildType != null && { ChildType: input.ChildType }),
3875
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3876
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3877
- ...(input.ParentId != null && { ParentId: input.ParentId }),
3878
- };
3879
- };
3880
- const se_ListCreateAccountStatusRequest = (input, context) => {
3881
- return {
3882
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3883
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3884
- ...(input.States != null && { States: se_CreateAccountStates(input.States, context) }),
3885
- };
3886
- };
3887
- const se_ListDelegatedAdministratorsRequest = (input, context) => {
3888
- return {
3889
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3890
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3891
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
3892
- };
3893
- };
3894
- const se_ListDelegatedServicesForAccountRequest = (input, context) => {
3895
- return {
3896
- ...(input.AccountId != null && { AccountId: input.AccountId }),
3897
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3898
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3899
- };
3900
- };
3901
- const se_ListHandshakesForAccountRequest = (input, context) => {
3902
- return {
3903
- ...(input.Filter != null && { Filter: se_HandshakeFilter(input.Filter, context) }),
3904
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3905
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3906
- };
3907
- };
3908
- const se_ListHandshakesForOrganizationRequest = (input, context) => {
3909
- return {
3910
- ...(input.Filter != null && { Filter: se_HandshakeFilter(input.Filter, context) }),
3911
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3912
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3913
- };
3914
- };
3915
- const se_ListOrganizationalUnitsForParentRequest = (input, context) => {
3916
- return {
3917
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3918
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3919
- ...(input.ParentId != null && { ParentId: input.ParentId }),
3920
- };
3921
- };
3922
- const se_ListParentsRequest = (input, context) => {
3923
- return {
3924
- ...(input.ChildId != null && { ChildId: input.ChildId }),
3925
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3926
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3927
- };
3928
- };
3929
- const se_ListPoliciesForTargetRequest = (input, context) => {
3930
- return {
3931
- ...(input.Filter != null && { Filter: input.Filter }),
3932
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3933
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3934
- ...(input.TargetId != null && { TargetId: input.TargetId }),
3935
- };
3936
- };
3937
- const se_ListPoliciesRequest = (input, context) => {
3938
- return {
3939
- ...(input.Filter != null && { Filter: input.Filter }),
3940
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3941
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3942
- };
3943
- };
3944
- const se_ListRootsRequest = (input, context) => {
3945
- return {
3946
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3947
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3948
- };
3949
- };
3950
- const se_ListTagsForResourceRequest = (input, context) => {
3951
- return {
3952
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3953
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
3954
- };
3955
- };
3956
- const se_ListTargetsForPolicyRequest = (input, context) => {
3957
- return {
3958
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
3959
- ...(input.NextToken != null && { NextToken: input.NextToken }),
3960
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
3961
- };
3962
- };
3963
- const se_MoveAccountRequest = (input, context) => {
3964
- return {
3965
- ...(input.AccountId != null && { AccountId: input.AccountId }),
3966
- ...(input.DestinationParentId != null && { DestinationParentId: input.DestinationParentId }),
3967
- ...(input.SourceParentId != null && { SourceParentId: input.SourceParentId }),
3968
- };
3969
- };
3970
- const se_PutResourcePolicyRequest = (input, context) => {
3971
- return {
3972
- ...(input.Content != null && { Content: input.Content }),
3973
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
3974
- };
3975
- };
3976
- const se_RegisterDelegatedAdministratorRequest = (input, context) => {
3977
- return {
3978
- ...(input.AccountId != null && { AccountId: input.AccountId }),
3979
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
3980
- };
3981
- };
3982
- const se_RemoveAccountFromOrganizationRequest = (input, context) => {
3983
- return {
3984
- ...(input.AccountId != null && { AccountId: input.AccountId }),
3985
- };
3986
- };
3987
- const se_Tag = (input, context) => {
3988
- return {
3989
- ...(input.Key != null && { Key: input.Key }),
3990
- ...(input.Value != null && { Value: input.Value }),
3991
- };
3992
- };
3993
- const se_TagKeys = (input, context) => {
3994
- return input
3995
- .filter((e) => e != null)
3996
- .map((entry) => {
3997
- return entry;
3998
- });
3999
- };
4000
- const se_TagResourceRequest = (input, context) => {
4001
- return {
4002
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
4003
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
4004
- };
4005
- };
4006
- const se_Tags = (input, context) => {
4007
- return input
4008
- .filter((e) => e != null)
4009
- .map((entry) => {
4010
- return se_Tag(entry, context);
4011
- });
4012
- };
4013
- const se_UntagResourceRequest = (input, context) => {
4014
- return {
4015
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
4016
- ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }),
4017
- };
4018
- };
4019
- const se_UpdateOrganizationalUnitRequest = (input, context) => {
4020
- return {
4021
- ...(input.Name != null && { Name: input.Name }),
4022
- ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }),
4023
- };
4024
- };
4025
- const se_UpdatePolicyRequest = (input, context) => {
4026
- return {
4027
- ...(input.Content != null && { Content: input.Content }),
4028
- ...(input.Description != null && { Description: input.Description }),
4029
- ...(input.Name != null && { Name: input.Name }),
4030
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
4031
- };
4032
- };
4033
- const de_AcceptHandshakeResponse = (output, context) => {
4034
- return {
4035
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4036
- };
4037
- };
4038
- const de_AccessDeniedException = (output, context) => {
4039
- return {
4040
- Message: __expectString(output.Message),
4041
- };
4042
- };
4043
- const de_AccessDeniedForDependencyException = (output, context) => {
4044
- return {
4045
- Message: __expectString(output.Message),
4046
- Reason: __expectString(output.Reason),
4047
- };
4048
- };
4049
- const de_Account = (output, context) => {
4050
- return {
4051
- Arn: __expectString(output.Arn),
4052
- Email: __expectString(output.Email),
4053
- Id: __expectString(output.Id),
4054
- JoinedMethod: __expectString(output.JoinedMethod),
4055
- JoinedTimestamp: output.JoinedTimestamp != null
4056
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.JoinedTimestamp)))
4057
- : undefined,
4058
- Name: __expectString(output.Name),
4059
- Status: __expectString(output.Status),
4060
- };
4061
- };
4062
- const de_AccountAlreadyClosedException = (output, context) => {
4063
- return {
4064
- Message: __expectString(output.Message),
4065
- };
4066
- };
4067
- const de_AccountAlreadyRegisteredException = (output, context) => {
4068
- return {
4069
- Message: __expectString(output.Message),
4070
- };
4071
- };
4072
- const de_AccountNotFoundException = (output, context) => {
4073
- return {
4074
- Message: __expectString(output.Message),
4075
- };
4076
- };
4077
- const de_AccountNotRegisteredException = (output, context) => {
4078
- return {
4079
- Message: __expectString(output.Message),
4080
- };
4081
- };
4082
- const de_AccountOwnerNotVerifiedException = (output, context) => {
4083
- return {
4084
- Message: __expectString(output.Message),
4085
- };
4086
- };
4087
- const de_Accounts = (output, context) => {
4088
- const retVal = (output || [])
4089
- .filter((e) => e != null)
4090
- .map((entry) => {
4091
- if (entry === null) {
4092
- return null;
4093
- }
4094
- return de_Account(entry, context);
4095
- });
4096
- return retVal;
4097
- };
4098
- const de_AlreadyInOrganizationException = (output, context) => {
4099
- return {
4100
- Message: __expectString(output.Message),
4101
- };
4102
- };
4103
- const de_AWSOrganizationsNotInUseException = (output, context) => {
4104
- return {
4105
- Message: __expectString(output.Message),
4106
- };
4107
- };
4108
- const de_CancelHandshakeResponse = (output, context) => {
4109
- return {
4110
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4111
- };
4112
- };
4113
- const de_Child = (output, context) => {
4114
- return {
4115
- Id: __expectString(output.Id),
4116
- Type: __expectString(output.Type),
4117
- };
4118
- };
4119
- const de_ChildNotFoundException = (output, context) => {
4120
- return {
4121
- Message: __expectString(output.Message),
4122
- };
4123
- };
4124
- const de_Children = (output, context) => {
4125
- const retVal = (output || [])
4126
- .filter((e) => e != null)
4127
- .map((entry) => {
4128
- if (entry === null) {
4129
- return null;
4130
- }
4131
- return de_Child(entry, context);
4132
- });
4133
- return retVal;
4134
- };
4135
- const de_ConcurrentModificationException = (output, context) => {
4136
- return {
4137
- Message: __expectString(output.Message),
4138
- };
4139
- };
4140
- const de_ConflictException = (output, context) => {
4141
- return {
4142
- Message: __expectString(output.Message),
4143
- };
4144
- };
4145
- const de_ConstraintViolationException = (output, context) => {
4146
- return {
4147
- Message: __expectString(output.Message),
4148
- Reason: __expectString(output.Reason),
4149
- };
4150
- };
4151
- const de_CreateAccountResponse = (output, context) => {
4152
- return {
4153
- CreateAccountStatus: output.CreateAccountStatus != null ? de_CreateAccountStatus(output.CreateAccountStatus, context) : undefined,
4154
- };
4155
- };
4156
- const de_CreateAccountStatus = (output, context) => {
4157
- return {
4158
- AccountId: __expectString(output.AccountId),
4159
- AccountName: __expectString(output.AccountName),
4160
- CompletedTimestamp: output.CompletedTimestamp != null
4161
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedTimestamp)))
4162
- : undefined,
4163
- FailureReason: __expectString(output.FailureReason),
4164
- GovCloudAccountId: __expectString(output.GovCloudAccountId),
4165
- Id: __expectString(output.Id),
4166
- RequestedTimestamp: output.RequestedTimestamp != null
4167
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RequestedTimestamp)))
4168
- : undefined,
4169
- State: __expectString(output.State),
4170
- };
4171
- };
4172
- const de_CreateAccountStatuses = (output, context) => {
4173
- const retVal = (output || [])
4174
- .filter((e) => e != null)
4175
- .map((entry) => {
4176
- if (entry === null) {
4177
- return null;
4178
- }
4179
- return de_CreateAccountStatus(entry, context);
4180
- });
4181
- return retVal;
4182
- };
4183
- const de_CreateAccountStatusNotFoundException = (output, context) => {
4184
- return {
4185
- Message: __expectString(output.Message),
4186
- };
4187
- };
4188
- const de_CreateGovCloudAccountResponse = (output, context) => {
4189
- return {
4190
- CreateAccountStatus: output.CreateAccountStatus != null ? de_CreateAccountStatus(output.CreateAccountStatus, context) : undefined,
4191
- };
4192
- };
4193
- const de_CreateOrganizationalUnitResponse = (output, context) => {
4194
- return {
4195
- OrganizationalUnit: output.OrganizationalUnit != null ? de_OrganizationalUnit(output.OrganizationalUnit, context) : undefined,
4196
- };
4197
- };
4198
- const de_CreateOrganizationResponse = (output, context) => {
4199
- return {
4200
- Organization: output.Organization != null ? de_Organization(output.Organization, context) : undefined,
4201
- };
4202
- };
4203
- const de_CreatePolicyResponse = (output, context) => {
4204
- return {
4205
- Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined,
4206
- };
4207
- };
4208
- const de_DeclineHandshakeResponse = (output, context) => {
4209
- return {
4210
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4211
- };
4212
- };
4213
- const de_DelegatedAdministrator = (output, context) => {
4214
- return {
4215
- Arn: __expectString(output.Arn),
4216
- DelegationEnabledDate: output.DelegationEnabledDate != null
4217
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DelegationEnabledDate)))
4218
- : undefined,
4219
- Email: __expectString(output.Email),
4220
- Id: __expectString(output.Id),
4221
- JoinedMethod: __expectString(output.JoinedMethod),
4222
- JoinedTimestamp: output.JoinedTimestamp != null
4223
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.JoinedTimestamp)))
4224
- : undefined,
4225
- Name: __expectString(output.Name),
4226
- Status: __expectString(output.Status),
4227
- };
4228
- };
4229
- const de_DelegatedAdministrators = (output, context) => {
4230
- const retVal = (output || [])
4231
- .filter((e) => e != null)
4232
- .map((entry) => {
4233
- if (entry === null) {
4234
- return null;
4235
- }
4236
- return de_DelegatedAdministrator(entry, context);
4237
- });
4238
- return retVal;
4239
- };
4240
- const de_DelegatedService = (output, context) => {
4241
- return {
4242
- DelegationEnabledDate: output.DelegationEnabledDate != null
4243
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DelegationEnabledDate)))
4244
- : undefined,
4245
- ServicePrincipal: __expectString(output.ServicePrincipal),
4246
- };
4247
- };
4248
- const de_DelegatedServices = (output, context) => {
4249
- const retVal = (output || [])
4250
- .filter((e) => e != null)
4251
- .map((entry) => {
4252
- if (entry === null) {
4253
- return null;
4254
- }
4255
- return de_DelegatedService(entry, context);
4256
- });
4257
- return retVal;
4258
- };
4259
- const de_DescribeAccountResponse = (output, context) => {
4260
- return {
4261
- Account: output.Account != null ? de_Account(output.Account, context) : undefined,
4262
- };
4263
- };
4264
- const de_DescribeCreateAccountStatusResponse = (output, context) => {
4265
- return {
4266
- CreateAccountStatus: output.CreateAccountStatus != null ? de_CreateAccountStatus(output.CreateAccountStatus, context) : undefined,
4267
- };
4268
- };
4269
- const de_DescribeEffectivePolicyResponse = (output, context) => {
4270
- return {
4271
- EffectivePolicy: output.EffectivePolicy != null ? de_EffectivePolicy(output.EffectivePolicy, context) : undefined,
4272
- };
4273
- };
4274
- const de_DescribeHandshakeResponse = (output, context) => {
4275
- return {
4276
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4277
- };
4278
- };
4279
- const de_DescribeOrganizationalUnitResponse = (output, context) => {
4280
- return {
4281
- OrganizationalUnit: output.OrganizationalUnit != null ? de_OrganizationalUnit(output.OrganizationalUnit, context) : undefined,
4282
- };
4283
- };
4284
- const de_DescribeOrganizationResponse = (output, context) => {
4285
- return {
4286
- Organization: output.Organization != null ? de_Organization(output.Organization, context) : undefined,
4287
- };
4288
- };
4289
- const de_DescribePolicyResponse = (output, context) => {
4290
- return {
4291
- Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined,
4292
- };
4293
- };
4294
- const de_DescribeResourcePolicyResponse = (output, context) => {
4295
- return {
4296
- ResourcePolicy: output.ResourcePolicy != null ? de_ResourcePolicy(output.ResourcePolicy, context) : undefined,
4297
- };
4298
- };
4299
- const de_DestinationParentNotFoundException = (output, context) => {
4300
- return {
4301
- Message: __expectString(output.Message),
4302
- };
4303
- };
4304
- const de_DisablePolicyTypeResponse = (output, context) => {
4305
- return {
4306
- Root: output.Root != null ? de_Root(output.Root, context) : undefined,
4307
- };
4308
- };
4309
- const de_DuplicateAccountException = (output, context) => {
4310
- return {
4311
- Message: __expectString(output.Message),
4312
- };
4313
- };
4314
- const de_DuplicateHandshakeException = (output, context) => {
4315
- return {
4316
- Message: __expectString(output.Message),
4317
- };
4318
- };
4319
- const de_DuplicateOrganizationalUnitException = (output, context) => {
4320
- return {
4321
- Message: __expectString(output.Message),
4322
- };
4323
- };
4324
- const de_DuplicatePolicyAttachmentException = (output, context) => {
4325
- return {
4326
- Message: __expectString(output.Message),
4327
- };
4328
- };
4329
- const de_DuplicatePolicyException = (output, context) => {
4330
- return {
4331
- Message: __expectString(output.Message),
4332
- };
4333
- };
4334
- const de_EffectivePolicy = (output, context) => {
4335
- return {
4336
- LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
4337
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp)))
4338
- : undefined,
4339
- PolicyContent: __expectString(output.PolicyContent),
4340
- PolicyType: __expectString(output.PolicyType),
4341
- TargetId: __expectString(output.TargetId),
4342
- };
4343
- };
4344
- const de_EffectivePolicyNotFoundException = (output, context) => {
4345
- return {
4346
- Message: __expectString(output.Message),
4347
- };
4348
- };
4349
- const de_EnableAllFeaturesResponse = (output, context) => {
4350
- return {
4351
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4352
- };
4353
- };
4354
- const de_EnabledServicePrincipal = (output, context) => {
4355
- return {
4356
- DateEnabled: output.DateEnabled != null
4357
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateEnabled)))
4358
- : undefined,
4359
- ServicePrincipal: __expectString(output.ServicePrincipal),
4360
- };
4361
- };
4362
- const de_EnabledServicePrincipals = (output, context) => {
4363
- const retVal = (output || [])
4364
- .filter((e) => e != null)
4365
- .map((entry) => {
4366
- if (entry === null) {
4367
- return null;
4368
- }
4369
- return de_EnabledServicePrincipal(entry, context);
4370
- });
4371
- return retVal;
4372
- };
4373
- const de_EnablePolicyTypeResponse = (output, context) => {
4374
- return {
4375
- Root: output.Root != null ? de_Root(output.Root, context) : undefined,
4376
- };
4377
- };
4378
- const de_FinalizingOrganizationException = (output, context) => {
4379
- return {
4380
- Message: __expectString(output.Message),
4381
- };
4382
- };
4383
- const de_Handshake = (output, context) => {
4384
- return {
4385
- Action: __expectString(output.Action),
4386
- Arn: __expectString(output.Arn),
4387
- ExpirationTimestamp: output.ExpirationTimestamp != null
4388
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTimestamp)))
4389
- : undefined,
4390
- Id: __expectString(output.Id),
4391
- Parties: output.Parties != null ? de_HandshakeParties(output.Parties, context) : undefined,
4392
- RequestedTimestamp: output.RequestedTimestamp != null
4393
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RequestedTimestamp)))
4394
- : undefined,
4395
- Resources: output.Resources != null ? de_HandshakeResources(output.Resources, context) : undefined,
4396
- State: __expectString(output.State),
4397
- };
4398
- };
4399
- const de_HandshakeAlreadyInStateException = (output, context) => {
4400
- return {
4401
- Message: __expectString(output.Message),
4402
- };
4403
- };
4404
- const de_HandshakeConstraintViolationException = (output, context) => {
4405
- return {
4406
- Message: __expectString(output.Message),
4407
- Reason: __expectString(output.Reason),
4408
- };
3629
+ const de_AcceptHandshakeResponse = (output, context) => {
3630
+ return take(output, {
3631
+ Handshake: (_) => de_Handshake(_, context),
3632
+ });
4409
3633
  };
4410
- const de_HandshakeNotFoundException = (output, context) => {
4411
- return {
4412
- Message: __expectString(output.Message),
4413
- };
3634
+ const de_Account = (output, context) => {
3635
+ return take(output, {
3636
+ Arn: __expectString,
3637
+ Email: __expectString,
3638
+ Id: __expectString,
3639
+ JoinedMethod: __expectString,
3640
+ JoinedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3641
+ Name: __expectString,
3642
+ Status: __expectString,
3643
+ });
4414
3644
  };
4415
- const de_HandshakeParties = (output, context) => {
3645
+ const de_Accounts = (output, context) => {
4416
3646
  const retVal = (output || [])
4417
3647
  .filter((e) => e != null)
4418
3648
  .map((entry) => {
4419
- if (entry === null) {
4420
- return null;
4421
- }
4422
- return de_HandshakeParty(entry, context);
3649
+ return de_Account(entry, context);
4423
3650
  });
4424
3651
  return retVal;
4425
3652
  };
4426
- const de_HandshakeParty = (output, context) => {
4427
- return {
4428
- Id: __expectString(output.Id),
4429
- Type: __expectString(output.Type),
4430
- };
3653
+ const de_CancelHandshakeResponse = (output, context) => {
3654
+ return take(output, {
3655
+ Handshake: (_) => de_Handshake(_, context),
3656
+ });
4431
3657
  };
4432
- const de_HandshakeResource = (output, context) => {
4433
- return {
4434
- Resources: output.Resources != null ? de_HandshakeResources(output.Resources, context) : undefined,
4435
- Type: __expectString(output.Type),
4436
- Value: __expectString(output.Value),
4437
- };
3658
+ const de_CreateAccountResponse = (output, context) => {
3659
+ return take(output, {
3660
+ CreateAccountStatus: (_) => de_CreateAccountStatus(_, context),
3661
+ });
4438
3662
  };
4439
- const de_HandshakeResources = (output, context) => {
4440
- const retVal = (output || [])
4441
- .filter((e) => e != null)
4442
- .map((entry) => {
4443
- if (entry === null) {
4444
- return null;
4445
- }
4446
- return de_HandshakeResource(entry, context);
3663
+ const de_CreateAccountStatus = (output, context) => {
3664
+ return take(output, {
3665
+ AccountId: __expectString,
3666
+ AccountName: __expectString,
3667
+ CompletedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3668
+ FailureReason: __expectString,
3669
+ GovCloudAccountId: __expectString,
3670
+ Id: __expectString,
3671
+ RequestedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3672
+ State: __expectString,
4447
3673
  });
4448
- return retVal;
4449
3674
  };
4450
- const de_Handshakes = (output, context) => {
3675
+ const de_CreateAccountStatuses = (output, context) => {
4451
3676
  const retVal = (output || [])
4452
3677
  .filter((e) => e != null)
4453
3678
  .map((entry) => {
4454
- if (entry === null) {
4455
- return null;
4456
- }
4457
- return de_Handshake(entry, context);
3679
+ return de_CreateAccountStatus(entry, context);
4458
3680
  });
4459
3681
  return retVal;
4460
3682
  };
4461
- const de_InvalidHandshakeTransitionException = (output, context) => {
4462
- return {
4463
- Message: __expectString(output.Message),
4464
- };
4465
- };
4466
- const de_InvalidInputException = (output, context) => {
4467
- return {
4468
- Message: __expectString(output.Message),
4469
- Reason: __expectString(output.Reason),
4470
- };
4471
- };
4472
- const de_InviteAccountToOrganizationResponse = (output, context) => {
4473
- return {
4474
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4475
- };
4476
- };
4477
- const de_ListAccountsForParentResponse = (output, context) => {
4478
- return {
4479
- Accounts: output.Accounts != null ? de_Accounts(output.Accounts, context) : undefined,
4480
- NextToken: __expectString(output.NextToken),
4481
- };
4482
- };
4483
- const de_ListAccountsResponse = (output, context) => {
4484
- return {
4485
- Accounts: output.Accounts != null ? de_Accounts(output.Accounts, context) : undefined,
4486
- NextToken: __expectString(output.NextToken),
4487
- };
4488
- };
4489
- const de_ListAWSServiceAccessForOrganizationResponse = (output, context) => {
4490
- return {
4491
- EnabledServicePrincipals: output.EnabledServicePrincipals != null
4492
- ? de_EnabledServicePrincipals(output.EnabledServicePrincipals, context)
4493
- : undefined,
4494
- NextToken: __expectString(output.NextToken),
4495
- };
4496
- };
4497
- const de_ListChildrenResponse = (output, context) => {
4498
- return {
4499
- Children: output.Children != null ? de_Children(output.Children, context) : undefined,
4500
- NextToken: __expectString(output.NextToken),
4501
- };
4502
- };
4503
- const de_ListCreateAccountStatusResponse = (output, context) => {
4504
- return {
4505
- CreateAccountStatuses: output.CreateAccountStatuses != null
4506
- ? de_CreateAccountStatuses(output.CreateAccountStatuses, context)
4507
- : undefined,
4508
- NextToken: __expectString(output.NextToken),
4509
- };
4510
- };
4511
- const de_ListDelegatedAdministratorsResponse = (output, context) => {
4512
- return {
4513
- DelegatedAdministrators: output.DelegatedAdministrators != null
4514
- ? de_DelegatedAdministrators(output.DelegatedAdministrators, context)
4515
- : undefined,
4516
- NextToken: __expectString(output.NextToken),
4517
- };
4518
- };
4519
- const de_ListDelegatedServicesForAccountResponse = (output, context) => {
4520
- return {
4521
- DelegatedServices: output.DelegatedServices != null ? de_DelegatedServices(output.DelegatedServices, context) : undefined,
4522
- NextToken: __expectString(output.NextToken),
4523
- };
4524
- };
4525
- const de_ListHandshakesForAccountResponse = (output, context) => {
4526
- return {
4527
- Handshakes: output.Handshakes != null ? de_Handshakes(output.Handshakes, context) : undefined,
4528
- NextToken: __expectString(output.NextToken),
4529
- };
4530
- };
4531
- const de_ListHandshakesForOrganizationResponse = (output, context) => {
4532
- return {
4533
- Handshakes: output.Handshakes != null ? de_Handshakes(output.Handshakes, context) : undefined,
4534
- NextToken: __expectString(output.NextToken),
4535
- };
4536
- };
4537
- const de_ListOrganizationalUnitsForParentResponse = (output, context) => {
4538
- return {
4539
- NextToken: __expectString(output.NextToken),
4540
- OrganizationalUnits: output.OrganizationalUnits != null ? de_OrganizationalUnits(output.OrganizationalUnits, context) : undefined,
4541
- };
4542
- };
4543
- const de_ListParentsResponse = (output, context) => {
4544
- return {
4545
- NextToken: __expectString(output.NextToken),
4546
- Parents: output.Parents != null ? de_Parents(output.Parents, context) : undefined,
4547
- };
4548
- };
4549
- const de_ListPoliciesForTargetResponse = (output, context) => {
4550
- return {
4551
- NextToken: __expectString(output.NextToken),
4552
- Policies: output.Policies != null ? de_Policies(output.Policies, context) : undefined,
4553
- };
4554
- };
4555
- const de_ListPoliciesResponse = (output, context) => {
4556
- return {
4557
- NextToken: __expectString(output.NextToken),
4558
- Policies: output.Policies != null ? de_Policies(output.Policies, context) : undefined,
4559
- };
4560
- };
4561
- const de_ListRootsResponse = (output, context) => {
4562
- return {
4563
- NextToken: __expectString(output.NextToken),
4564
- Roots: output.Roots != null ? de_Roots(output.Roots, context) : undefined,
4565
- };
4566
- };
4567
- const de_ListTagsForResourceResponse = (output, context) => {
4568
- return {
4569
- NextToken: __expectString(output.NextToken),
4570
- Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined,
4571
- };
4572
- };
4573
- const de_ListTargetsForPolicyResponse = (output, context) => {
4574
- return {
4575
- NextToken: __expectString(output.NextToken),
4576
- Targets: output.Targets != null ? de_PolicyTargets(output.Targets, context) : undefined,
4577
- };
4578
- };
4579
- const de_MalformedPolicyDocumentException = (output, context) => {
4580
- return {
4581
- Message: __expectString(output.Message),
4582
- };
4583
- };
4584
- const de_MasterCannotLeaveOrganizationException = (output, context) => {
4585
- return {
4586
- Message: __expectString(output.Message),
4587
- };
4588
- };
4589
- const de_Organization = (output, context) => {
4590
- return {
4591
- Arn: __expectString(output.Arn),
4592
- AvailablePolicyTypes: output.AvailablePolicyTypes != null ? de_PolicyTypes(output.AvailablePolicyTypes, context) : undefined,
4593
- FeatureSet: __expectString(output.FeatureSet),
4594
- Id: __expectString(output.Id),
4595
- MasterAccountArn: __expectString(output.MasterAccountArn),
4596
- MasterAccountEmail: __expectString(output.MasterAccountEmail),
4597
- MasterAccountId: __expectString(output.MasterAccountId),
4598
- };
4599
- };
4600
- const de_OrganizationalUnit = (output, context) => {
4601
- return {
4602
- Arn: __expectString(output.Arn),
4603
- Id: __expectString(output.Id),
4604
- Name: __expectString(output.Name),
4605
- };
3683
+ const de_CreateGovCloudAccountResponse = (output, context) => {
3684
+ return take(output, {
3685
+ CreateAccountStatus: (_) => de_CreateAccountStatus(_, context),
3686
+ });
4606
3687
  };
4607
- const de_OrganizationalUnitNotEmptyException = (output, context) => {
4608
- return {
4609
- Message: __expectString(output.Message),
4610
- };
3688
+ const de_DeclineHandshakeResponse = (output, context) => {
3689
+ return take(output, {
3690
+ Handshake: (_) => de_Handshake(_, context),
3691
+ });
4611
3692
  };
4612
- const de_OrganizationalUnitNotFoundException = (output, context) => {
4613
- return {
4614
- Message: __expectString(output.Message),
4615
- };
3693
+ const de_DelegatedAdministrator = (output, context) => {
3694
+ return take(output, {
3695
+ Arn: __expectString,
3696
+ DelegationEnabledDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3697
+ Email: __expectString,
3698
+ Id: __expectString,
3699
+ JoinedMethod: __expectString,
3700
+ JoinedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3701
+ Name: __expectString,
3702
+ Status: __expectString,
3703
+ });
4616
3704
  };
4617
- const de_OrganizationalUnits = (output, context) => {
3705
+ const de_DelegatedAdministrators = (output, context) => {
4618
3706
  const retVal = (output || [])
4619
3707
  .filter((e) => e != null)
4620
3708
  .map((entry) => {
4621
- if (entry === null) {
4622
- return null;
4623
- }
4624
- return de_OrganizationalUnit(entry, context);
3709
+ return de_DelegatedAdministrator(entry, context);
4625
3710
  });
4626
3711
  return retVal;
4627
3712
  };
4628
- const de_OrganizationNotEmptyException = (output, context) => {
4629
- return {
4630
- Message: __expectString(output.Message),
4631
- };
4632
- };
4633
- const de_Parent = (output, context) => {
4634
- return {
4635
- Id: __expectString(output.Id),
4636
- Type: __expectString(output.Type),
4637
- };
4638
- };
4639
- const de_ParentNotFoundException = (output, context) => {
4640
- return {
4641
- Message: __expectString(output.Message),
4642
- };
3713
+ const de_DelegatedService = (output, context) => {
3714
+ return take(output, {
3715
+ DelegationEnabledDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3716
+ ServicePrincipal: __expectString,
3717
+ });
4643
3718
  };
4644
- const de_Parents = (output, context) => {
3719
+ const de_DelegatedServices = (output, context) => {
4645
3720
  const retVal = (output || [])
4646
3721
  .filter((e) => e != null)
4647
3722
  .map((entry) => {
4648
- if (entry === null) {
4649
- return null;
4650
- }
4651
- return de_Parent(entry, context);
3723
+ return de_DelegatedService(entry, context);
4652
3724
  });
4653
3725
  return retVal;
4654
3726
  };
4655
- const de_Policies = (output, context) => {
4656
- const retVal = (output || [])
4657
- .filter((e) => e != null)
4658
- .map((entry) => {
4659
- if (entry === null) {
4660
- return null;
4661
- }
4662
- return de_PolicySummary(entry, context);
3727
+ const de_DescribeAccountResponse = (output, context) => {
3728
+ return take(output, {
3729
+ Account: (_) => de_Account(_, context),
4663
3730
  });
4664
- return retVal;
4665
3731
  };
4666
- const de_Policy = (output, context) => {
4667
- return {
4668
- Content: __expectString(output.Content),
4669
- PolicySummary: output.PolicySummary != null ? de_PolicySummary(output.PolicySummary, context) : undefined,
4670
- };
3732
+ const de_DescribeCreateAccountStatusResponse = (output, context) => {
3733
+ return take(output, {
3734
+ CreateAccountStatus: (_) => de_CreateAccountStatus(_, context),
3735
+ });
4671
3736
  };
4672
- const de_PolicyChangesInProgressException = (output, context) => {
4673
- return {
4674
- Message: __expectString(output.Message),
4675
- };
3737
+ const de_DescribeEffectivePolicyResponse = (output, context) => {
3738
+ return take(output, {
3739
+ EffectivePolicy: (_) => de_EffectivePolicy(_, context),
3740
+ });
4676
3741
  };
4677
- const de_PolicyInUseException = (output, context) => {
4678
- return {
4679
- Message: __expectString(output.Message),
4680
- };
3742
+ const de_DescribeHandshakeResponse = (output, context) => {
3743
+ return take(output, {
3744
+ Handshake: (_) => de_Handshake(_, context),
3745
+ });
4681
3746
  };
4682
- const de_PolicyNotAttachedException = (output, context) => {
4683
- return {
4684
- Message: __expectString(output.Message),
4685
- };
3747
+ const de_EffectivePolicy = (output, context) => {
3748
+ return take(output, {
3749
+ LastUpdatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3750
+ PolicyContent: __expectString,
3751
+ PolicyType: __expectString,
3752
+ TargetId: __expectString,
3753
+ });
4686
3754
  };
4687
- const de_PolicyNotFoundException = (output, context) => {
4688
- return {
4689
- Message: __expectString(output.Message),
4690
- };
3755
+ const de_EnableAllFeaturesResponse = (output, context) => {
3756
+ return take(output, {
3757
+ Handshake: (_) => de_Handshake(_, context),
3758
+ });
4691
3759
  };
4692
- const de_PolicySummary = (output, context) => {
4693
- return {
4694
- Arn: __expectString(output.Arn),
4695
- AwsManaged: __expectBoolean(output.AwsManaged),
4696
- Description: __expectString(output.Description),
4697
- Id: __expectString(output.Id),
4698
- Name: __expectString(output.Name),
4699
- Type: __expectString(output.Type),
4700
- };
3760
+ const de_EnabledServicePrincipal = (output, context) => {
3761
+ return take(output, {
3762
+ DateEnabled: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3763
+ ServicePrincipal: __expectString,
3764
+ });
4701
3765
  };
4702
- const de_PolicyTargets = (output, context) => {
3766
+ const de_EnabledServicePrincipals = (output, context) => {
4703
3767
  const retVal = (output || [])
4704
3768
  .filter((e) => e != null)
4705
3769
  .map((entry) => {
4706
- if (entry === null) {
4707
- return null;
4708
- }
4709
- return de_PolicyTargetSummary(entry, context);
3770
+ return de_EnabledServicePrincipal(entry, context);
4710
3771
  });
4711
3772
  return retVal;
4712
3773
  };
4713
- const de_PolicyTargetSummary = (output, context) => {
4714
- return {
4715
- Arn: __expectString(output.Arn),
4716
- Name: __expectString(output.Name),
4717
- TargetId: __expectString(output.TargetId),
4718
- Type: __expectString(output.Type),
4719
- };
4720
- };
4721
- const de_PolicyTypeAlreadyEnabledException = (output, context) => {
4722
- return {
4723
- Message: __expectString(output.Message),
4724
- };
4725
- };
4726
- const de_PolicyTypeNotAvailableForOrganizationException = (output, context) => {
4727
- return {
4728
- Message: __expectString(output.Message),
4729
- };
3774
+ const de_Handshake = (output, context) => {
3775
+ return take(output, {
3776
+ Action: __expectString,
3777
+ Arn: __expectString,
3778
+ ExpirationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3779
+ Id: __expectString,
3780
+ Parties: _json,
3781
+ RequestedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3782
+ Resources: (_) => de_HandshakeResources(_, context),
3783
+ State: __expectString,
3784
+ });
4730
3785
  };
4731
- const de_PolicyTypeNotEnabledException = (output, context) => {
4732
- return {
4733
- Message: __expectString(output.Message),
4734
- };
3786
+ const de_HandshakeResource = (output, context) => {
3787
+ return take(output, {
3788
+ Resources: (_) => de_HandshakeResources(_, context),
3789
+ Type: __expectString,
3790
+ Value: __expectString,
3791
+ });
4735
3792
  };
4736
- const de_PolicyTypes = (output, context) => {
3793
+ const de_HandshakeResources = (output, context) => {
4737
3794
  const retVal = (output || [])
4738
3795
  .filter((e) => e != null)
4739
3796
  .map((entry) => {
4740
- if (entry === null) {
4741
- return null;
4742
- }
4743
- return de_PolicyTypeSummary(entry, context);
3797
+ return de_HandshakeResource(entry, context);
4744
3798
  });
4745
3799
  return retVal;
4746
3800
  };
4747
- const de_PolicyTypeSummary = (output, context) => {
4748
- return {
4749
- Status: __expectString(output.Status),
4750
- Type: __expectString(output.Type),
4751
- };
4752
- };
4753
- const de_PutResourcePolicyResponse = (output, context) => {
4754
- return {
4755
- ResourcePolicy: output.ResourcePolicy != null ? de_ResourcePolicy(output.ResourcePolicy, context) : undefined,
4756
- };
4757
- };
4758
- const de_ResourcePolicy = (output, context) => {
4759
- return {
4760
- Content: __expectString(output.Content),
4761
- ResourcePolicySummary: output.ResourcePolicySummary != null
4762
- ? de_ResourcePolicySummary(output.ResourcePolicySummary, context)
4763
- : undefined,
4764
- };
4765
- };
4766
- const de_ResourcePolicyNotFoundException = (output, context) => {
4767
- return {
4768
- Message: __expectString(output.Message),
4769
- };
4770
- };
4771
- const de_ResourcePolicySummary = (output, context) => {
4772
- return {
4773
- Arn: __expectString(output.Arn),
4774
- Id: __expectString(output.Id),
4775
- };
4776
- };
4777
- const de_Root = (output, context) => {
4778
- return {
4779
- Arn: __expectString(output.Arn),
4780
- Id: __expectString(output.Id),
4781
- Name: __expectString(output.Name),
4782
- PolicyTypes: output.PolicyTypes != null ? de_PolicyTypes(output.PolicyTypes, context) : undefined,
4783
- };
4784
- };
4785
- const de_RootNotFoundException = (output, context) => {
4786
- return {
4787
- Message: __expectString(output.Message),
4788
- };
4789
- };
4790
- const de_Roots = (output, context) => {
3801
+ const de_Handshakes = (output, context) => {
4791
3802
  const retVal = (output || [])
4792
3803
  .filter((e) => e != null)
4793
3804
  .map((entry) => {
4794
- if (entry === null) {
4795
- return null;
4796
- }
4797
- return de_Root(entry, context);
3805
+ return de_Handshake(entry, context);
4798
3806
  });
4799
3807
  return retVal;
4800
3808
  };
4801
- const de_ServiceException = (output, context) => {
4802
- return {
4803
- Message: __expectString(output.Message),
4804
- };
3809
+ const de_InviteAccountToOrganizationResponse = (output, context) => {
3810
+ return take(output, {
3811
+ Handshake: (_) => de_Handshake(_, context),
3812
+ });
4805
3813
  };
4806
- const de_SourceParentNotFoundException = (output, context) => {
4807
- return {
4808
- Message: __expectString(output.Message),
4809
- };
3814
+ const de_ListAccountsForParentResponse = (output, context) => {
3815
+ return take(output, {
3816
+ Accounts: (_) => de_Accounts(_, context),
3817
+ NextToken: __expectString,
3818
+ });
4810
3819
  };
4811
- const de_Tag = (output, context) => {
4812
- return {
4813
- Key: __expectString(output.Key),
4814
- Value: __expectString(output.Value),
4815
- };
3820
+ const de_ListAccountsResponse = (output, context) => {
3821
+ return take(output, {
3822
+ Accounts: (_) => de_Accounts(_, context),
3823
+ NextToken: __expectString,
3824
+ });
4816
3825
  };
4817
- const de_Tags = (output, context) => {
4818
- const retVal = (output || [])
4819
- .filter((e) => e != null)
4820
- .map((entry) => {
4821
- if (entry === null) {
4822
- return null;
4823
- }
4824
- return de_Tag(entry, context);
3826
+ const de_ListAWSServiceAccessForOrganizationResponse = (output, context) => {
3827
+ return take(output, {
3828
+ EnabledServicePrincipals: (_) => de_EnabledServicePrincipals(_, context),
3829
+ NextToken: __expectString,
4825
3830
  });
4826
- return retVal;
4827
3831
  };
4828
- const de_TargetNotFoundException = (output, context) => {
4829
- return {
4830
- Message: __expectString(output.Message),
4831
- };
3832
+ const de_ListCreateAccountStatusResponse = (output, context) => {
3833
+ return take(output, {
3834
+ CreateAccountStatuses: (_) => de_CreateAccountStatuses(_, context),
3835
+ NextToken: __expectString,
3836
+ });
4832
3837
  };
4833
- const de_TooManyRequestsException = (output, context) => {
4834
- return {
4835
- Message: __expectString(output.Message),
4836
- Type: __expectString(output.Type),
4837
- };
3838
+ const de_ListDelegatedAdministratorsResponse = (output, context) => {
3839
+ return take(output, {
3840
+ DelegatedAdministrators: (_) => de_DelegatedAdministrators(_, context),
3841
+ NextToken: __expectString,
3842
+ });
4838
3843
  };
4839
- const de_UnsupportedAPIEndpointException = (output, context) => {
4840
- return {
4841
- Message: __expectString(output.Message),
4842
- };
3844
+ const de_ListDelegatedServicesForAccountResponse = (output, context) => {
3845
+ return take(output, {
3846
+ DelegatedServices: (_) => de_DelegatedServices(_, context),
3847
+ NextToken: __expectString,
3848
+ });
4843
3849
  };
4844
- const de_UpdateOrganizationalUnitResponse = (output, context) => {
4845
- return {
4846
- OrganizationalUnit: output.OrganizationalUnit != null ? de_OrganizationalUnit(output.OrganizationalUnit, context) : undefined,
4847
- };
3850
+ const de_ListHandshakesForAccountResponse = (output, context) => {
3851
+ return take(output, {
3852
+ Handshakes: (_) => de_Handshakes(_, context),
3853
+ NextToken: __expectString,
3854
+ });
4848
3855
  };
4849
- const de_UpdatePolicyResponse = (output, context) => {
4850
- return {
4851
- Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined,
4852
- };
3856
+ const de_ListHandshakesForOrganizationResponse = (output, context) => {
3857
+ return take(output, {
3858
+ Handshakes: (_) => de_Handshakes(_, context),
3859
+ NextToken: __expectString,
3860
+ });
4853
3861
  };
4854
3862
  const deserializeMetadata = (output) => ({
4855
3863
  httpStatusCode: output.statusCode,
@@ -4864,6 +3872,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
4864
3872
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
4865
3873
  };
4866
3874
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3875
+ const throwDefaultError = withBaseException(__BaseException);
4867
3876
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
4868
3877
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
4869
3878
  const contents = {