@aws-sdk/client-organizations 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,547 +8,382 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const OrganizationsServiceException_1 = require("../models/OrganizationsServiceException");
10
10
  const se_AcceptHandshakeCommand = async (input, context) => {
11
- const headers = {
12
- "content-type": "application/x-amz-json-1.1",
13
- "x-amz-target": "AWSOrganizationsV20161128.AcceptHandshake",
14
- };
11
+ const headers = sharedHeaders("AcceptHandshake");
15
12
  let body;
16
- body = JSON.stringify(se_AcceptHandshakeRequest(input, context));
13
+ body = JSON.stringify((0, smithy_client_1._json)(input));
17
14
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
18
15
  };
19
16
  exports.se_AcceptHandshakeCommand = se_AcceptHandshakeCommand;
20
17
  const se_AttachPolicyCommand = async (input, context) => {
21
- const headers = {
22
- "content-type": "application/x-amz-json-1.1",
23
- "x-amz-target": "AWSOrganizationsV20161128.AttachPolicy",
24
- };
18
+ const headers = sharedHeaders("AttachPolicy");
25
19
  let body;
26
- body = JSON.stringify(se_AttachPolicyRequest(input, context));
20
+ body = JSON.stringify((0, smithy_client_1._json)(input));
27
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
22
  };
29
23
  exports.se_AttachPolicyCommand = se_AttachPolicyCommand;
30
24
  const se_CancelHandshakeCommand = async (input, context) => {
31
- const headers = {
32
- "content-type": "application/x-amz-json-1.1",
33
- "x-amz-target": "AWSOrganizationsV20161128.CancelHandshake",
34
- };
25
+ const headers = sharedHeaders("CancelHandshake");
35
26
  let body;
36
- body = JSON.stringify(se_CancelHandshakeRequest(input, context));
27
+ body = JSON.stringify((0, smithy_client_1._json)(input));
37
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
38
29
  };
39
30
  exports.se_CancelHandshakeCommand = se_CancelHandshakeCommand;
40
31
  const se_CloseAccountCommand = async (input, context) => {
41
- const headers = {
42
- "content-type": "application/x-amz-json-1.1",
43
- "x-amz-target": "AWSOrganizationsV20161128.CloseAccount",
44
- };
32
+ const headers = sharedHeaders("CloseAccount");
45
33
  let body;
46
- body = JSON.stringify(se_CloseAccountRequest(input, context));
34
+ body = JSON.stringify((0, smithy_client_1._json)(input));
47
35
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
36
  };
49
37
  exports.se_CloseAccountCommand = se_CloseAccountCommand;
50
38
  const se_CreateAccountCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "AWSOrganizationsV20161128.CreateAccount",
54
- };
39
+ const headers = sharedHeaders("CreateAccount");
55
40
  let body;
56
- body = JSON.stringify(se_CreateAccountRequest(input, context));
41
+ body = JSON.stringify((0, smithy_client_1._json)(input));
57
42
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
43
  };
59
44
  exports.se_CreateAccountCommand = se_CreateAccountCommand;
60
45
  const se_CreateGovCloudAccountCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "AWSOrganizationsV20161128.CreateGovCloudAccount",
64
- };
46
+ const headers = sharedHeaders("CreateGovCloudAccount");
65
47
  let body;
66
- body = JSON.stringify(se_CreateGovCloudAccountRequest(input, context));
48
+ body = JSON.stringify((0, smithy_client_1._json)(input));
67
49
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
50
  };
69
51
  exports.se_CreateGovCloudAccountCommand = se_CreateGovCloudAccountCommand;
70
52
  const se_CreateOrganizationCommand = async (input, context) => {
71
- const headers = {
72
- "content-type": "application/x-amz-json-1.1",
73
- "x-amz-target": "AWSOrganizationsV20161128.CreateOrganization",
74
- };
53
+ const headers = sharedHeaders("CreateOrganization");
75
54
  let body;
76
- body = JSON.stringify(se_CreateOrganizationRequest(input, context));
55
+ body = JSON.stringify((0, smithy_client_1._json)(input));
77
56
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
57
  };
79
58
  exports.se_CreateOrganizationCommand = se_CreateOrganizationCommand;
80
59
  const se_CreateOrganizationalUnitCommand = async (input, context) => {
81
- const headers = {
82
- "content-type": "application/x-amz-json-1.1",
83
- "x-amz-target": "AWSOrganizationsV20161128.CreateOrganizationalUnit",
84
- };
60
+ const headers = sharedHeaders("CreateOrganizationalUnit");
85
61
  let body;
86
- body = JSON.stringify(se_CreateOrganizationalUnitRequest(input, context));
62
+ body = JSON.stringify((0, smithy_client_1._json)(input));
87
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
88
64
  };
89
65
  exports.se_CreateOrganizationalUnitCommand = se_CreateOrganizationalUnitCommand;
90
66
  const se_CreatePolicyCommand = async (input, context) => {
91
- const headers = {
92
- "content-type": "application/x-amz-json-1.1",
93
- "x-amz-target": "AWSOrganizationsV20161128.CreatePolicy",
94
- };
67
+ const headers = sharedHeaders("CreatePolicy");
95
68
  let body;
96
- body = JSON.stringify(se_CreatePolicyRequest(input, context));
69
+ body = JSON.stringify((0, smithy_client_1._json)(input));
97
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
71
  };
99
72
  exports.se_CreatePolicyCommand = se_CreatePolicyCommand;
100
73
  const se_DeclineHandshakeCommand = async (input, context) => {
101
- const headers = {
102
- "content-type": "application/x-amz-json-1.1",
103
- "x-amz-target": "AWSOrganizationsV20161128.DeclineHandshake",
104
- };
74
+ const headers = sharedHeaders("DeclineHandshake");
105
75
  let body;
106
- body = JSON.stringify(se_DeclineHandshakeRequest(input, context));
76
+ body = JSON.stringify((0, smithy_client_1._json)(input));
107
77
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
108
78
  };
109
79
  exports.se_DeclineHandshakeCommand = se_DeclineHandshakeCommand;
110
80
  const se_DeleteOrganizationCommand = async (input, context) => {
111
- const headers = {
112
- "content-type": "application/x-amz-json-1.1",
113
- "x-amz-target": "AWSOrganizationsV20161128.DeleteOrganization",
114
- };
81
+ const headers = sharedHeaders("DeleteOrganization");
115
82
  const body = "{}";
116
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
117
84
  };
118
85
  exports.se_DeleteOrganizationCommand = se_DeleteOrganizationCommand;
119
86
  const se_DeleteOrganizationalUnitCommand = async (input, context) => {
120
- const headers = {
121
- "content-type": "application/x-amz-json-1.1",
122
- "x-amz-target": "AWSOrganizationsV20161128.DeleteOrganizationalUnit",
123
- };
87
+ const headers = sharedHeaders("DeleteOrganizationalUnit");
124
88
  let body;
125
- body = JSON.stringify(se_DeleteOrganizationalUnitRequest(input, context));
89
+ body = JSON.stringify((0, smithy_client_1._json)(input));
126
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
91
  };
128
92
  exports.se_DeleteOrganizationalUnitCommand = se_DeleteOrganizationalUnitCommand;
129
93
  const se_DeletePolicyCommand = async (input, context) => {
130
- const headers = {
131
- "content-type": "application/x-amz-json-1.1",
132
- "x-amz-target": "AWSOrganizationsV20161128.DeletePolicy",
133
- };
94
+ const headers = sharedHeaders("DeletePolicy");
134
95
  let body;
135
- body = JSON.stringify(se_DeletePolicyRequest(input, context));
96
+ body = JSON.stringify((0, smithy_client_1._json)(input));
136
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
98
  };
138
99
  exports.se_DeletePolicyCommand = se_DeletePolicyCommand;
139
100
  const se_DeleteResourcePolicyCommand = async (input, context) => {
140
- const headers = {
141
- "content-type": "application/x-amz-json-1.1",
142
- "x-amz-target": "AWSOrganizationsV20161128.DeleteResourcePolicy",
143
- };
101
+ const headers = sharedHeaders("DeleteResourcePolicy");
144
102
  const body = "{}";
145
103
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
146
104
  };
147
105
  exports.se_DeleteResourcePolicyCommand = se_DeleteResourcePolicyCommand;
148
106
  const se_DeregisterDelegatedAdministratorCommand = async (input, context) => {
149
- const headers = {
150
- "content-type": "application/x-amz-json-1.1",
151
- "x-amz-target": "AWSOrganizationsV20161128.DeregisterDelegatedAdministrator",
152
- };
107
+ const headers = sharedHeaders("DeregisterDelegatedAdministrator");
153
108
  let body;
154
- body = JSON.stringify(se_DeregisterDelegatedAdministratorRequest(input, context));
109
+ body = JSON.stringify((0, smithy_client_1._json)(input));
155
110
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
111
  };
157
112
  exports.se_DeregisterDelegatedAdministratorCommand = se_DeregisterDelegatedAdministratorCommand;
158
113
  const se_DescribeAccountCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "AWSOrganizationsV20161128.DescribeAccount",
162
- };
114
+ const headers = sharedHeaders("DescribeAccount");
163
115
  let body;
164
- body = JSON.stringify(se_DescribeAccountRequest(input, context));
116
+ body = JSON.stringify((0, smithy_client_1._json)(input));
165
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
118
  };
167
119
  exports.se_DescribeAccountCommand = se_DescribeAccountCommand;
168
120
  const se_DescribeCreateAccountStatusCommand = async (input, context) => {
169
- const headers = {
170
- "content-type": "application/x-amz-json-1.1",
171
- "x-amz-target": "AWSOrganizationsV20161128.DescribeCreateAccountStatus",
172
- };
121
+ const headers = sharedHeaders("DescribeCreateAccountStatus");
173
122
  let body;
174
- body = JSON.stringify(se_DescribeCreateAccountStatusRequest(input, context));
123
+ body = JSON.stringify((0, smithy_client_1._json)(input));
175
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
125
  };
177
126
  exports.se_DescribeCreateAccountStatusCommand = se_DescribeCreateAccountStatusCommand;
178
127
  const se_DescribeEffectivePolicyCommand = async (input, context) => {
179
- const headers = {
180
- "content-type": "application/x-amz-json-1.1",
181
- "x-amz-target": "AWSOrganizationsV20161128.DescribeEffectivePolicy",
182
- };
128
+ const headers = sharedHeaders("DescribeEffectivePolicy");
183
129
  let body;
184
- body = JSON.stringify(se_DescribeEffectivePolicyRequest(input, context));
130
+ body = JSON.stringify((0, smithy_client_1._json)(input));
185
131
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
186
132
  };
187
133
  exports.se_DescribeEffectivePolicyCommand = se_DescribeEffectivePolicyCommand;
188
134
  const se_DescribeHandshakeCommand = async (input, context) => {
189
- const headers = {
190
- "content-type": "application/x-amz-json-1.1",
191
- "x-amz-target": "AWSOrganizationsV20161128.DescribeHandshake",
192
- };
135
+ const headers = sharedHeaders("DescribeHandshake");
193
136
  let body;
194
- body = JSON.stringify(se_DescribeHandshakeRequest(input, context));
137
+ body = JSON.stringify((0, smithy_client_1._json)(input));
195
138
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
139
  };
197
140
  exports.se_DescribeHandshakeCommand = se_DescribeHandshakeCommand;
198
141
  const se_DescribeOrganizationCommand = async (input, context) => {
199
- const headers = {
200
- "content-type": "application/x-amz-json-1.1",
201
- "x-amz-target": "AWSOrganizationsV20161128.DescribeOrganization",
202
- };
142
+ const headers = sharedHeaders("DescribeOrganization");
203
143
  const body = "{}";
204
144
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
205
145
  };
206
146
  exports.se_DescribeOrganizationCommand = se_DescribeOrganizationCommand;
207
147
  const se_DescribeOrganizationalUnitCommand = async (input, context) => {
208
- const headers = {
209
- "content-type": "application/x-amz-json-1.1",
210
- "x-amz-target": "AWSOrganizationsV20161128.DescribeOrganizationalUnit",
211
- };
148
+ const headers = sharedHeaders("DescribeOrganizationalUnit");
212
149
  let body;
213
- body = JSON.stringify(se_DescribeOrganizationalUnitRequest(input, context));
150
+ body = JSON.stringify((0, smithy_client_1._json)(input));
214
151
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
215
152
  };
216
153
  exports.se_DescribeOrganizationalUnitCommand = se_DescribeOrganizationalUnitCommand;
217
154
  const se_DescribePolicyCommand = async (input, context) => {
218
- const headers = {
219
- "content-type": "application/x-amz-json-1.1",
220
- "x-amz-target": "AWSOrganizationsV20161128.DescribePolicy",
221
- };
155
+ const headers = sharedHeaders("DescribePolicy");
222
156
  let body;
223
- body = JSON.stringify(se_DescribePolicyRequest(input, context));
157
+ body = JSON.stringify((0, smithy_client_1._json)(input));
224
158
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
225
159
  };
226
160
  exports.se_DescribePolicyCommand = se_DescribePolicyCommand;
227
161
  const se_DescribeResourcePolicyCommand = async (input, context) => {
228
- const headers = {
229
- "content-type": "application/x-amz-json-1.1",
230
- "x-amz-target": "AWSOrganizationsV20161128.DescribeResourcePolicy",
231
- };
162
+ const headers = sharedHeaders("DescribeResourcePolicy");
232
163
  const body = "{}";
233
164
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
234
165
  };
235
166
  exports.se_DescribeResourcePolicyCommand = se_DescribeResourcePolicyCommand;
236
167
  const se_DetachPolicyCommand = async (input, context) => {
237
- const headers = {
238
- "content-type": "application/x-amz-json-1.1",
239
- "x-amz-target": "AWSOrganizationsV20161128.DetachPolicy",
240
- };
168
+ const headers = sharedHeaders("DetachPolicy");
241
169
  let body;
242
- body = JSON.stringify(se_DetachPolicyRequest(input, context));
170
+ body = JSON.stringify((0, smithy_client_1._json)(input));
243
171
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
244
172
  };
245
173
  exports.se_DetachPolicyCommand = se_DetachPolicyCommand;
246
174
  const se_DisableAWSServiceAccessCommand = async (input, context) => {
247
- const headers = {
248
- "content-type": "application/x-amz-json-1.1",
249
- "x-amz-target": "AWSOrganizationsV20161128.DisableAWSServiceAccess",
250
- };
175
+ const headers = sharedHeaders("DisableAWSServiceAccess");
251
176
  let body;
252
- body = JSON.stringify(se_DisableAWSServiceAccessRequest(input, context));
177
+ body = JSON.stringify((0, smithy_client_1._json)(input));
253
178
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
254
179
  };
255
180
  exports.se_DisableAWSServiceAccessCommand = se_DisableAWSServiceAccessCommand;
256
181
  const se_DisablePolicyTypeCommand = async (input, context) => {
257
- const headers = {
258
- "content-type": "application/x-amz-json-1.1",
259
- "x-amz-target": "AWSOrganizationsV20161128.DisablePolicyType",
260
- };
182
+ const headers = sharedHeaders("DisablePolicyType");
261
183
  let body;
262
- body = JSON.stringify(se_DisablePolicyTypeRequest(input, context));
184
+ body = JSON.stringify((0, smithy_client_1._json)(input));
263
185
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
264
186
  };
265
187
  exports.se_DisablePolicyTypeCommand = se_DisablePolicyTypeCommand;
266
188
  const se_EnableAllFeaturesCommand = async (input, context) => {
267
- const headers = {
268
- "content-type": "application/x-amz-json-1.1",
269
- "x-amz-target": "AWSOrganizationsV20161128.EnableAllFeatures",
270
- };
189
+ const headers = sharedHeaders("EnableAllFeatures");
271
190
  let body;
272
- body = JSON.stringify(se_EnableAllFeaturesRequest(input, context));
191
+ body = JSON.stringify((0, smithy_client_1._json)(input));
273
192
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
274
193
  };
275
194
  exports.se_EnableAllFeaturesCommand = se_EnableAllFeaturesCommand;
276
195
  const se_EnableAWSServiceAccessCommand = async (input, context) => {
277
- const headers = {
278
- "content-type": "application/x-amz-json-1.1",
279
- "x-amz-target": "AWSOrganizationsV20161128.EnableAWSServiceAccess",
280
- };
196
+ const headers = sharedHeaders("EnableAWSServiceAccess");
281
197
  let body;
282
- body = JSON.stringify(se_EnableAWSServiceAccessRequest(input, context));
198
+ body = JSON.stringify((0, smithy_client_1._json)(input));
283
199
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
284
200
  };
285
201
  exports.se_EnableAWSServiceAccessCommand = se_EnableAWSServiceAccessCommand;
286
202
  const se_EnablePolicyTypeCommand = async (input, context) => {
287
- const headers = {
288
- "content-type": "application/x-amz-json-1.1",
289
- "x-amz-target": "AWSOrganizationsV20161128.EnablePolicyType",
290
- };
203
+ const headers = sharedHeaders("EnablePolicyType");
291
204
  let body;
292
- body = JSON.stringify(se_EnablePolicyTypeRequest(input, context));
205
+ body = JSON.stringify((0, smithy_client_1._json)(input));
293
206
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
294
207
  };
295
208
  exports.se_EnablePolicyTypeCommand = se_EnablePolicyTypeCommand;
296
209
  const se_InviteAccountToOrganizationCommand = async (input, context) => {
297
- const headers = {
298
- "content-type": "application/x-amz-json-1.1",
299
- "x-amz-target": "AWSOrganizationsV20161128.InviteAccountToOrganization",
300
- };
210
+ const headers = sharedHeaders("InviteAccountToOrganization");
301
211
  let body;
302
- body = JSON.stringify(se_InviteAccountToOrganizationRequest(input, context));
212
+ body = JSON.stringify((0, smithy_client_1._json)(input));
303
213
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
304
214
  };
305
215
  exports.se_InviteAccountToOrganizationCommand = se_InviteAccountToOrganizationCommand;
306
216
  const se_LeaveOrganizationCommand = async (input, context) => {
307
- const headers = {
308
- "content-type": "application/x-amz-json-1.1",
309
- "x-amz-target": "AWSOrganizationsV20161128.LeaveOrganization",
310
- };
217
+ const headers = sharedHeaders("LeaveOrganization");
311
218
  const body = "{}";
312
219
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
313
220
  };
314
221
  exports.se_LeaveOrganizationCommand = se_LeaveOrganizationCommand;
315
222
  const se_ListAccountsCommand = async (input, context) => {
316
- const headers = {
317
- "content-type": "application/x-amz-json-1.1",
318
- "x-amz-target": "AWSOrganizationsV20161128.ListAccounts",
319
- };
223
+ const headers = sharedHeaders("ListAccounts");
320
224
  let body;
321
- body = JSON.stringify(se_ListAccountsRequest(input, context));
225
+ body = JSON.stringify((0, smithy_client_1._json)(input));
322
226
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
323
227
  };
324
228
  exports.se_ListAccountsCommand = se_ListAccountsCommand;
325
229
  const se_ListAccountsForParentCommand = async (input, context) => {
326
- const headers = {
327
- "content-type": "application/x-amz-json-1.1",
328
- "x-amz-target": "AWSOrganizationsV20161128.ListAccountsForParent",
329
- };
230
+ const headers = sharedHeaders("ListAccountsForParent");
330
231
  let body;
331
- body = JSON.stringify(se_ListAccountsForParentRequest(input, context));
232
+ body = JSON.stringify((0, smithy_client_1._json)(input));
332
233
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
333
234
  };
334
235
  exports.se_ListAccountsForParentCommand = se_ListAccountsForParentCommand;
335
236
  const se_ListAWSServiceAccessForOrganizationCommand = async (input, context) => {
336
- const headers = {
337
- "content-type": "application/x-amz-json-1.1",
338
- "x-amz-target": "AWSOrganizationsV20161128.ListAWSServiceAccessForOrganization",
339
- };
237
+ const headers = sharedHeaders("ListAWSServiceAccessForOrganization");
340
238
  let body;
341
- body = JSON.stringify(se_ListAWSServiceAccessForOrganizationRequest(input, context));
239
+ body = JSON.stringify((0, smithy_client_1._json)(input));
342
240
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
343
241
  };
344
242
  exports.se_ListAWSServiceAccessForOrganizationCommand = se_ListAWSServiceAccessForOrganizationCommand;
345
243
  const se_ListChildrenCommand = async (input, context) => {
346
- const headers = {
347
- "content-type": "application/x-amz-json-1.1",
348
- "x-amz-target": "AWSOrganizationsV20161128.ListChildren",
349
- };
244
+ const headers = sharedHeaders("ListChildren");
350
245
  let body;
351
- body = JSON.stringify(se_ListChildrenRequest(input, context));
246
+ body = JSON.stringify((0, smithy_client_1._json)(input));
352
247
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
353
248
  };
354
249
  exports.se_ListChildrenCommand = se_ListChildrenCommand;
355
250
  const se_ListCreateAccountStatusCommand = async (input, context) => {
356
- const headers = {
357
- "content-type": "application/x-amz-json-1.1",
358
- "x-amz-target": "AWSOrganizationsV20161128.ListCreateAccountStatus",
359
- };
251
+ const headers = sharedHeaders("ListCreateAccountStatus");
360
252
  let body;
361
- body = JSON.stringify(se_ListCreateAccountStatusRequest(input, context));
253
+ body = JSON.stringify((0, smithy_client_1._json)(input));
362
254
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
363
255
  };
364
256
  exports.se_ListCreateAccountStatusCommand = se_ListCreateAccountStatusCommand;
365
257
  const se_ListDelegatedAdministratorsCommand = async (input, context) => {
366
- const headers = {
367
- "content-type": "application/x-amz-json-1.1",
368
- "x-amz-target": "AWSOrganizationsV20161128.ListDelegatedAdministrators",
369
- };
258
+ const headers = sharedHeaders("ListDelegatedAdministrators");
370
259
  let body;
371
- body = JSON.stringify(se_ListDelegatedAdministratorsRequest(input, context));
260
+ body = JSON.stringify((0, smithy_client_1._json)(input));
372
261
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
373
262
  };
374
263
  exports.se_ListDelegatedAdministratorsCommand = se_ListDelegatedAdministratorsCommand;
375
264
  const se_ListDelegatedServicesForAccountCommand = async (input, context) => {
376
- const headers = {
377
- "content-type": "application/x-amz-json-1.1",
378
- "x-amz-target": "AWSOrganizationsV20161128.ListDelegatedServicesForAccount",
379
- };
265
+ const headers = sharedHeaders("ListDelegatedServicesForAccount");
380
266
  let body;
381
- body = JSON.stringify(se_ListDelegatedServicesForAccountRequest(input, context));
267
+ body = JSON.stringify((0, smithy_client_1._json)(input));
382
268
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
383
269
  };
384
270
  exports.se_ListDelegatedServicesForAccountCommand = se_ListDelegatedServicesForAccountCommand;
385
271
  const se_ListHandshakesForAccountCommand = async (input, context) => {
386
- const headers = {
387
- "content-type": "application/x-amz-json-1.1",
388
- "x-amz-target": "AWSOrganizationsV20161128.ListHandshakesForAccount",
389
- };
272
+ const headers = sharedHeaders("ListHandshakesForAccount");
390
273
  let body;
391
- body = JSON.stringify(se_ListHandshakesForAccountRequest(input, context));
274
+ body = JSON.stringify((0, smithy_client_1._json)(input));
392
275
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
393
276
  };
394
277
  exports.se_ListHandshakesForAccountCommand = se_ListHandshakesForAccountCommand;
395
278
  const se_ListHandshakesForOrganizationCommand = async (input, context) => {
396
- const headers = {
397
- "content-type": "application/x-amz-json-1.1",
398
- "x-amz-target": "AWSOrganizationsV20161128.ListHandshakesForOrganization",
399
- };
279
+ const headers = sharedHeaders("ListHandshakesForOrganization");
400
280
  let body;
401
- body = JSON.stringify(se_ListHandshakesForOrganizationRequest(input, context));
281
+ body = JSON.stringify((0, smithy_client_1._json)(input));
402
282
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
403
283
  };
404
284
  exports.se_ListHandshakesForOrganizationCommand = se_ListHandshakesForOrganizationCommand;
405
285
  const se_ListOrganizationalUnitsForParentCommand = async (input, context) => {
406
- const headers = {
407
- "content-type": "application/x-amz-json-1.1",
408
- "x-amz-target": "AWSOrganizationsV20161128.ListOrganizationalUnitsForParent",
409
- };
286
+ const headers = sharedHeaders("ListOrganizationalUnitsForParent");
410
287
  let body;
411
- body = JSON.stringify(se_ListOrganizationalUnitsForParentRequest(input, context));
288
+ body = JSON.stringify((0, smithy_client_1._json)(input));
412
289
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
413
290
  };
414
291
  exports.se_ListOrganizationalUnitsForParentCommand = se_ListOrganizationalUnitsForParentCommand;
415
292
  const se_ListParentsCommand = async (input, context) => {
416
- const headers = {
417
- "content-type": "application/x-amz-json-1.1",
418
- "x-amz-target": "AWSOrganizationsV20161128.ListParents",
419
- };
293
+ const headers = sharedHeaders("ListParents");
420
294
  let body;
421
- body = JSON.stringify(se_ListParentsRequest(input, context));
295
+ body = JSON.stringify((0, smithy_client_1._json)(input));
422
296
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
423
297
  };
424
298
  exports.se_ListParentsCommand = se_ListParentsCommand;
425
299
  const se_ListPoliciesCommand = async (input, context) => {
426
- const headers = {
427
- "content-type": "application/x-amz-json-1.1",
428
- "x-amz-target": "AWSOrganizationsV20161128.ListPolicies",
429
- };
300
+ const headers = sharedHeaders("ListPolicies");
430
301
  let body;
431
- body = JSON.stringify(se_ListPoliciesRequest(input, context));
302
+ body = JSON.stringify((0, smithy_client_1._json)(input));
432
303
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
433
304
  };
434
305
  exports.se_ListPoliciesCommand = se_ListPoliciesCommand;
435
306
  const se_ListPoliciesForTargetCommand = async (input, context) => {
436
- const headers = {
437
- "content-type": "application/x-amz-json-1.1",
438
- "x-amz-target": "AWSOrganizationsV20161128.ListPoliciesForTarget",
439
- };
307
+ const headers = sharedHeaders("ListPoliciesForTarget");
440
308
  let body;
441
- body = JSON.stringify(se_ListPoliciesForTargetRequest(input, context));
309
+ body = JSON.stringify((0, smithy_client_1._json)(input));
442
310
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
443
311
  };
444
312
  exports.se_ListPoliciesForTargetCommand = se_ListPoliciesForTargetCommand;
445
313
  const se_ListRootsCommand = async (input, context) => {
446
- const headers = {
447
- "content-type": "application/x-amz-json-1.1",
448
- "x-amz-target": "AWSOrganizationsV20161128.ListRoots",
449
- };
314
+ const headers = sharedHeaders("ListRoots");
450
315
  let body;
451
- body = JSON.stringify(se_ListRootsRequest(input, context));
316
+ body = JSON.stringify((0, smithy_client_1._json)(input));
452
317
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
453
318
  };
454
319
  exports.se_ListRootsCommand = se_ListRootsCommand;
455
320
  const se_ListTagsForResourceCommand = async (input, context) => {
456
- const headers = {
457
- "content-type": "application/x-amz-json-1.1",
458
- "x-amz-target": "AWSOrganizationsV20161128.ListTagsForResource",
459
- };
321
+ const headers = sharedHeaders("ListTagsForResource");
460
322
  let body;
461
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
323
+ body = JSON.stringify((0, smithy_client_1._json)(input));
462
324
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
463
325
  };
464
326
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
465
327
  const se_ListTargetsForPolicyCommand = async (input, context) => {
466
- const headers = {
467
- "content-type": "application/x-amz-json-1.1",
468
- "x-amz-target": "AWSOrganizationsV20161128.ListTargetsForPolicy",
469
- };
328
+ const headers = sharedHeaders("ListTargetsForPolicy");
470
329
  let body;
471
- body = JSON.stringify(se_ListTargetsForPolicyRequest(input, context));
330
+ body = JSON.stringify((0, smithy_client_1._json)(input));
472
331
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
473
332
  };
474
333
  exports.se_ListTargetsForPolicyCommand = se_ListTargetsForPolicyCommand;
475
334
  const se_MoveAccountCommand = async (input, context) => {
476
- const headers = {
477
- "content-type": "application/x-amz-json-1.1",
478
- "x-amz-target": "AWSOrganizationsV20161128.MoveAccount",
479
- };
335
+ const headers = sharedHeaders("MoveAccount");
480
336
  let body;
481
- body = JSON.stringify(se_MoveAccountRequest(input, context));
337
+ body = JSON.stringify((0, smithy_client_1._json)(input));
482
338
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
483
339
  };
484
340
  exports.se_MoveAccountCommand = se_MoveAccountCommand;
485
341
  const se_PutResourcePolicyCommand = async (input, context) => {
486
- const headers = {
487
- "content-type": "application/x-amz-json-1.1",
488
- "x-amz-target": "AWSOrganizationsV20161128.PutResourcePolicy",
489
- };
342
+ const headers = sharedHeaders("PutResourcePolicy");
490
343
  let body;
491
- body = JSON.stringify(se_PutResourcePolicyRequest(input, context));
344
+ body = JSON.stringify((0, smithy_client_1._json)(input));
492
345
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
493
346
  };
494
347
  exports.se_PutResourcePolicyCommand = se_PutResourcePolicyCommand;
495
348
  const se_RegisterDelegatedAdministratorCommand = async (input, context) => {
496
- const headers = {
497
- "content-type": "application/x-amz-json-1.1",
498
- "x-amz-target": "AWSOrganizationsV20161128.RegisterDelegatedAdministrator",
499
- };
349
+ const headers = sharedHeaders("RegisterDelegatedAdministrator");
500
350
  let body;
501
- body = JSON.stringify(se_RegisterDelegatedAdministratorRequest(input, context));
351
+ body = JSON.stringify((0, smithy_client_1._json)(input));
502
352
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
503
353
  };
504
354
  exports.se_RegisterDelegatedAdministratorCommand = se_RegisterDelegatedAdministratorCommand;
505
355
  const se_RemoveAccountFromOrganizationCommand = async (input, context) => {
506
- const headers = {
507
- "content-type": "application/x-amz-json-1.1",
508
- "x-amz-target": "AWSOrganizationsV20161128.RemoveAccountFromOrganization",
509
- };
356
+ const headers = sharedHeaders("RemoveAccountFromOrganization");
510
357
  let body;
511
- body = JSON.stringify(se_RemoveAccountFromOrganizationRequest(input, context));
358
+ body = JSON.stringify((0, smithy_client_1._json)(input));
512
359
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
513
360
  };
514
361
  exports.se_RemoveAccountFromOrganizationCommand = se_RemoveAccountFromOrganizationCommand;
515
362
  const se_TagResourceCommand = async (input, context) => {
516
- const headers = {
517
- "content-type": "application/x-amz-json-1.1",
518
- "x-amz-target": "AWSOrganizationsV20161128.TagResource",
519
- };
363
+ const headers = sharedHeaders("TagResource");
520
364
  let body;
521
- body = JSON.stringify(se_TagResourceRequest(input, context));
365
+ body = JSON.stringify((0, smithy_client_1._json)(input));
522
366
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
523
367
  };
524
368
  exports.se_TagResourceCommand = se_TagResourceCommand;
525
369
  const se_UntagResourceCommand = async (input, context) => {
526
- const headers = {
527
- "content-type": "application/x-amz-json-1.1",
528
- "x-amz-target": "AWSOrganizationsV20161128.UntagResource",
529
- };
370
+ const headers = sharedHeaders("UntagResource");
530
371
  let body;
531
- body = JSON.stringify(se_UntagResourceRequest(input, context));
372
+ body = JSON.stringify((0, smithy_client_1._json)(input));
532
373
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
533
374
  };
534
375
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
535
376
  const se_UpdateOrganizationalUnitCommand = async (input, context) => {
536
- const headers = {
537
- "content-type": "application/x-amz-json-1.1",
538
- "x-amz-target": "AWSOrganizationsV20161128.UpdateOrganizationalUnit",
539
- };
377
+ const headers = sharedHeaders("UpdateOrganizationalUnit");
540
378
  let body;
541
- body = JSON.stringify(se_UpdateOrganizationalUnitRequest(input, context));
379
+ body = JSON.stringify((0, smithy_client_1._json)(input));
542
380
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
543
381
  };
544
382
  exports.se_UpdateOrganizationalUnitCommand = se_UpdateOrganizationalUnitCommand;
545
383
  const se_UpdatePolicyCommand = async (input, context) => {
546
- const headers = {
547
- "content-type": "application/x-amz-json-1.1",
548
- "x-amz-target": "AWSOrganizationsV20161128.UpdatePolicy",
549
- };
384
+ const headers = sharedHeaders("UpdatePolicy");
550
385
  let body;
551
- body = JSON.stringify(se_UpdatePolicyRequest(input, context));
386
+ body = JSON.stringify((0, smithy_client_1._json)(input));
552
387
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
553
388
  };
554
389
  exports.se_UpdatePolicyCommand = se_UpdatePolicyCommand;
@@ -563,7 +398,7 @@ const de_AcceptHandshakeCommand = async (output, context) => {
563
398
  $metadata: deserializeMetadata(output),
564
399
  ...contents,
565
400
  };
566
- return Promise.resolve(response);
401
+ return response;
567
402
  };
568
403
  exports.de_AcceptHandshakeCommand = de_AcceptHandshakeCommand;
569
404
  const de_AcceptHandshakeCommandError = async (output, context) => {
@@ -608,10 +443,9 @@ const de_AcceptHandshakeCommandError = async (output, context) => {
608
443
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
609
444
  default:
610
445
  const parsedBody = parsedOutput.body;
611
- (0, smithy_client_1.throwDefaultError)({
446
+ return throwDefaultError({
612
447
  output,
613
448
  parsedBody,
614
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
615
449
  errorCode,
616
450
  });
617
451
  }
@@ -624,7 +458,7 @@ const de_AttachPolicyCommand = async (output, context) => {
624
458
  const response = {
625
459
  $metadata: deserializeMetadata(output),
626
460
  };
627
- return Promise.resolve(response);
461
+ return response;
628
462
  };
629
463
  exports.de_AttachPolicyCommand = de_AttachPolicyCommand;
630
464
  const de_AttachPolicyCommandError = async (output, context) => {
@@ -675,10 +509,9 @@ const de_AttachPolicyCommandError = async (output, context) => {
675
509
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
676
510
  default:
677
511
  const parsedBody = parsedOutput.body;
678
- (0, smithy_client_1.throwDefaultError)({
512
+ return throwDefaultError({
679
513
  output,
680
514
  parsedBody,
681
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
682
515
  errorCode,
683
516
  });
684
517
  }
@@ -694,7 +527,7 @@ const de_CancelHandshakeCommand = async (output, context) => {
694
527
  $metadata: deserializeMetadata(output),
695
528
  ...contents,
696
529
  };
697
- return Promise.resolve(response);
530
+ return response;
698
531
  };
699
532
  exports.de_CancelHandshakeCommand = de_CancelHandshakeCommand;
700
533
  const de_CancelHandshakeCommandError = async (output, context) => {
@@ -730,10 +563,9 @@ const de_CancelHandshakeCommandError = async (output, context) => {
730
563
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
731
564
  default:
732
565
  const parsedBody = parsedOutput.body;
733
- (0, smithy_client_1.throwDefaultError)({
566
+ return throwDefaultError({
734
567
  output,
735
568
  parsedBody,
736
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
737
569
  errorCode,
738
570
  });
739
571
  }
@@ -746,7 +578,7 @@ const de_CloseAccountCommand = async (output, context) => {
746
578
  const response = {
747
579
  $metadata: deserializeMetadata(output),
748
580
  };
749
- return Promise.resolve(response);
581
+ return response;
750
582
  };
751
583
  exports.de_CloseAccountCommand = de_CloseAccountCommand;
752
584
  const de_CloseAccountCommandError = async (output, context) => {
@@ -791,10 +623,9 @@ const de_CloseAccountCommandError = async (output, context) => {
791
623
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
792
624
  default:
793
625
  const parsedBody = parsedOutput.body;
794
- (0, smithy_client_1.throwDefaultError)({
626
+ return throwDefaultError({
795
627
  output,
796
628
  parsedBody,
797
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
798
629
  errorCode,
799
630
  });
800
631
  }
@@ -810,7 +641,7 @@ const de_CreateAccountCommand = async (output, context) => {
810
641
  $metadata: deserializeMetadata(output),
811
642
  ...contents,
812
643
  };
813
- return Promise.resolve(response);
644
+ return response;
814
645
  };
815
646
  exports.de_CreateAccountCommand = de_CreateAccountCommand;
816
647
  const de_CreateAccountCommandError = async (output, context) => {
@@ -849,10 +680,9 @@ const de_CreateAccountCommandError = async (output, context) => {
849
680
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
850
681
  default:
851
682
  const parsedBody = parsedOutput.body;
852
- (0, smithy_client_1.throwDefaultError)({
683
+ return throwDefaultError({
853
684
  output,
854
685
  parsedBody,
855
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
856
686
  errorCode,
857
687
  });
858
688
  }
@@ -868,7 +698,7 @@ const de_CreateGovCloudAccountCommand = async (output, context) => {
868
698
  $metadata: deserializeMetadata(output),
869
699
  ...contents,
870
700
  };
871
- return Promise.resolve(response);
701
+ return response;
872
702
  };
873
703
  exports.de_CreateGovCloudAccountCommand = de_CreateGovCloudAccountCommand;
874
704
  const de_CreateGovCloudAccountCommandError = async (output, context) => {
@@ -907,10 +737,9 @@ const de_CreateGovCloudAccountCommandError = async (output, context) => {
907
737
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
908
738
  default:
909
739
  const parsedBody = parsedOutput.body;
910
- (0, smithy_client_1.throwDefaultError)({
740
+ return throwDefaultError({
911
741
  output,
912
742
  parsedBody,
913
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
914
743
  errorCode,
915
744
  });
916
745
  }
@@ -921,12 +750,12 @@ const de_CreateOrganizationCommand = async (output, context) => {
921
750
  }
922
751
  const data = await parseBody(output.body, context);
923
752
  let contents = {};
924
- contents = de_CreateOrganizationResponse(data, context);
753
+ contents = (0, smithy_client_1._json)(data);
925
754
  const response = {
926
755
  $metadata: deserializeMetadata(output),
927
756
  ...contents,
928
757
  };
929
- return Promise.resolve(response);
758
+ return response;
930
759
  };
931
760
  exports.de_CreateOrganizationCommand = de_CreateOrganizationCommand;
932
761
  const de_CreateOrganizationCommandError = async (output, context) => {
@@ -962,10 +791,9 @@ const de_CreateOrganizationCommandError = async (output, context) => {
962
791
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
963
792
  default:
964
793
  const parsedBody = parsedOutput.body;
965
- (0, smithy_client_1.throwDefaultError)({
794
+ return throwDefaultError({
966
795
  output,
967
796
  parsedBody,
968
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
969
797
  errorCode,
970
798
  });
971
799
  }
@@ -976,12 +804,12 @@ const de_CreateOrganizationalUnitCommand = async (output, context) => {
976
804
  }
977
805
  const data = await parseBody(output.body, context);
978
806
  let contents = {};
979
- contents = de_CreateOrganizationalUnitResponse(data, context);
807
+ contents = (0, smithy_client_1._json)(data);
980
808
  const response = {
981
809
  $metadata: deserializeMetadata(output),
982
810
  ...contents,
983
811
  };
984
- return Promise.resolve(response);
812
+ return response;
985
813
  };
986
814
  exports.de_CreateOrganizationalUnitCommand = de_CreateOrganizationalUnitCommand;
987
815
  const de_CreateOrganizationalUnitCommandError = async (output, context) => {
@@ -1020,10 +848,9 @@ const de_CreateOrganizationalUnitCommandError = async (output, context) => {
1020
848
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1021
849
  default:
1022
850
  const parsedBody = parsedOutput.body;
1023
- (0, smithy_client_1.throwDefaultError)({
851
+ return throwDefaultError({
1024
852
  output,
1025
853
  parsedBody,
1026
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1027
854
  errorCode,
1028
855
  });
1029
856
  }
@@ -1034,12 +861,12 @@ const de_CreatePolicyCommand = async (output, context) => {
1034
861
  }
1035
862
  const data = await parseBody(output.body, context);
1036
863
  let contents = {};
1037
- contents = de_CreatePolicyResponse(data, context);
864
+ contents = (0, smithy_client_1._json)(data);
1038
865
  const response = {
1039
866
  $metadata: deserializeMetadata(output),
1040
867
  ...contents,
1041
868
  };
1042
- return Promise.resolve(response);
869
+ return response;
1043
870
  };
1044
871
  exports.de_CreatePolicyCommand = de_CreatePolicyCommand;
1045
872
  const de_CreatePolicyCommandError = async (output, context) => {
@@ -1084,10 +911,9 @@ const de_CreatePolicyCommandError = async (output, context) => {
1084
911
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1085
912
  default:
1086
913
  const parsedBody = parsedOutput.body;
1087
- (0, smithy_client_1.throwDefaultError)({
914
+ return throwDefaultError({
1088
915
  output,
1089
916
  parsedBody,
1090
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1091
917
  errorCode,
1092
918
  });
1093
919
  }
@@ -1103,7 +929,7 @@ const de_DeclineHandshakeCommand = async (output, context) => {
1103
929
  $metadata: deserializeMetadata(output),
1104
930
  ...contents,
1105
931
  };
1106
- return Promise.resolve(response);
932
+ return response;
1107
933
  };
1108
934
  exports.de_DeclineHandshakeCommand = de_DeclineHandshakeCommand;
1109
935
  const de_DeclineHandshakeCommandError = async (output, context) => {
@@ -1139,10 +965,9 @@ const de_DeclineHandshakeCommandError = async (output, context) => {
1139
965
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1140
966
  default:
1141
967
  const parsedBody = parsedOutput.body;
1142
- (0, smithy_client_1.throwDefaultError)({
968
+ return throwDefaultError({
1143
969
  output,
1144
970
  parsedBody,
1145
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1146
971
  errorCode,
1147
972
  });
1148
973
  }
@@ -1155,7 +980,7 @@ const de_DeleteOrganizationCommand = async (output, context) => {
1155
980
  const response = {
1156
981
  $metadata: deserializeMetadata(output),
1157
982
  };
1158
- return Promise.resolve(response);
983
+ return response;
1159
984
  };
1160
985
  exports.de_DeleteOrganizationCommand = de_DeleteOrganizationCommand;
1161
986
  const de_DeleteOrganizationCommandError = async (output, context) => {
@@ -1188,10 +1013,9 @@ const de_DeleteOrganizationCommandError = async (output, context) => {
1188
1013
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1189
1014
  default:
1190
1015
  const parsedBody = parsedOutput.body;
1191
- (0, smithy_client_1.throwDefaultError)({
1016
+ return throwDefaultError({
1192
1017
  output,
1193
1018
  parsedBody,
1194
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1195
1019
  errorCode,
1196
1020
  });
1197
1021
  }
@@ -1204,7 +1028,7 @@ const de_DeleteOrganizationalUnitCommand = async (output, context) => {
1204
1028
  const response = {
1205
1029
  $metadata: deserializeMetadata(output),
1206
1030
  };
1207
- return Promise.resolve(response);
1031
+ return response;
1208
1032
  };
1209
1033
  exports.de_DeleteOrganizationalUnitCommand = de_DeleteOrganizationalUnitCommand;
1210
1034
  const de_DeleteOrganizationalUnitCommandError = async (output, context) => {
@@ -1240,10 +1064,9 @@ const de_DeleteOrganizationalUnitCommandError = async (output, context) => {
1240
1064
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1241
1065
  default:
1242
1066
  const parsedBody = parsedOutput.body;
1243
- (0, smithy_client_1.throwDefaultError)({
1067
+ return throwDefaultError({
1244
1068
  output,
1245
1069
  parsedBody,
1246
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1247
1070
  errorCode,
1248
1071
  });
1249
1072
  }
@@ -1256,7 +1079,7 @@ const de_DeletePolicyCommand = async (output, context) => {
1256
1079
  const response = {
1257
1080
  $metadata: deserializeMetadata(output),
1258
1081
  };
1259
- return Promise.resolve(response);
1082
+ return response;
1260
1083
  };
1261
1084
  exports.de_DeletePolicyCommand = de_DeletePolicyCommand;
1262
1085
  const de_DeletePolicyCommandError = async (output, context) => {
@@ -1295,10 +1118,9 @@ const de_DeletePolicyCommandError = async (output, context) => {
1295
1118
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1296
1119
  default:
1297
1120
  const parsedBody = parsedOutput.body;
1298
- (0, smithy_client_1.throwDefaultError)({
1121
+ return throwDefaultError({
1299
1122
  output,
1300
1123
  parsedBody,
1301
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1302
1124
  errorCode,
1303
1125
  });
1304
1126
  }
@@ -1311,7 +1133,7 @@ const de_DeleteResourcePolicyCommand = async (output, context) => {
1311
1133
  const response = {
1312
1134
  $metadata: deserializeMetadata(output),
1313
1135
  };
1314
- return Promise.resolve(response);
1136
+ return response;
1315
1137
  };
1316
1138
  exports.de_DeleteResourcePolicyCommand = de_DeleteResourcePolicyCommand;
1317
1139
  const de_DeleteResourcePolicyCommandError = async (output, context) => {
@@ -1347,10 +1169,9 @@ const de_DeleteResourcePolicyCommandError = async (output, context) => {
1347
1169
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1348
1170
  default:
1349
1171
  const parsedBody = parsedOutput.body;
1350
- (0, smithy_client_1.throwDefaultError)({
1172
+ return throwDefaultError({
1351
1173
  output,
1352
1174
  parsedBody,
1353
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1354
1175
  errorCode,
1355
1176
  });
1356
1177
  }
@@ -1363,7 +1184,7 @@ const de_DeregisterDelegatedAdministratorCommand = async (output, context) => {
1363
1184
  const response = {
1364
1185
  $metadata: deserializeMetadata(output),
1365
1186
  };
1366
- return Promise.resolve(response);
1187
+ return response;
1367
1188
  };
1368
1189
  exports.de_DeregisterDelegatedAdministratorCommand = de_DeregisterDelegatedAdministratorCommand;
1369
1190
  const de_DeregisterDelegatedAdministratorCommandError = async (output, context) => {
@@ -1405,10 +1226,9 @@ const de_DeregisterDelegatedAdministratorCommandError = async (output, context)
1405
1226
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1406
1227
  default:
1407
1228
  const parsedBody = parsedOutput.body;
1408
- (0, smithy_client_1.throwDefaultError)({
1229
+ return throwDefaultError({
1409
1230
  output,
1410
1231
  parsedBody,
1411
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1412
1232
  errorCode,
1413
1233
  });
1414
1234
  }
@@ -1424,7 +1244,7 @@ const de_DescribeAccountCommand = async (output, context) => {
1424
1244
  $metadata: deserializeMetadata(output),
1425
1245
  ...contents,
1426
1246
  };
1427
- return Promise.resolve(response);
1247
+ return response;
1428
1248
  };
1429
1249
  exports.de_DescribeAccountCommand = de_DescribeAccountCommand;
1430
1250
  const de_DescribeAccountCommandError = async (output, context) => {
@@ -1454,10 +1274,9 @@ const de_DescribeAccountCommandError = async (output, context) => {
1454
1274
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1455
1275
  default:
1456
1276
  const parsedBody = parsedOutput.body;
1457
- (0, smithy_client_1.throwDefaultError)({
1277
+ return throwDefaultError({
1458
1278
  output,
1459
1279
  parsedBody,
1460
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1461
1280
  errorCode,
1462
1281
  });
1463
1282
  }
@@ -1473,7 +1292,7 @@ const de_DescribeCreateAccountStatusCommand = async (output, context) => {
1473
1292
  $metadata: deserializeMetadata(output),
1474
1293
  ...contents,
1475
1294
  };
1476
- return Promise.resolve(response);
1295
+ return response;
1477
1296
  };
1478
1297
  exports.de_DescribeCreateAccountStatusCommand = de_DescribeCreateAccountStatusCommand;
1479
1298
  const de_DescribeCreateAccountStatusCommandError = async (output, context) => {
@@ -1506,10 +1325,9 @@ const de_DescribeCreateAccountStatusCommandError = async (output, context) => {
1506
1325
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1507
1326
  default:
1508
1327
  const parsedBody = parsedOutput.body;
1509
- (0, smithy_client_1.throwDefaultError)({
1328
+ return throwDefaultError({
1510
1329
  output,
1511
1330
  parsedBody,
1512
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1513
1331
  errorCode,
1514
1332
  });
1515
1333
  }
@@ -1525,7 +1343,7 @@ const de_DescribeEffectivePolicyCommand = async (output, context) => {
1525
1343
  $metadata: deserializeMetadata(output),
1526
1344
  ...contents,
1527
1345
  };
1528
- return Promise.resolve(response);
1346
+ return response;
1529
1347
  };
1530
1348
  exports.de_DescribeEffectivePolicyCommand = de_DescribeEffectivePolicyCommand;
1531
1349
  const de_DescribeEffectivePolicyCommandError = async (output, context) => {
@@ -1564,10 +1382,9 @@ const de_DescribeEffectivePolicyCommandError = async (output, context) => {
1564
1382
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1565
1383
  default:
1566
1384
  const parsedBody = parsedOutput.body;
1567
- (0, smithy_client_1.throwDefaultError)({
1385
+ return throwDefaultError({
1568
1386
  output,
1569
1387
  parsedBody,
1570
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1571
1388
  errorCode,
1572
1389
  });
1573
1390
  }
@@ -1583,7 +1400,7 @@ const de_DescribeHandshakeCommand = async (output, context) => {
1583
1400
  $metadata: deserializeMetadata(output),
1584
1401
  ...contents,
1585
1402
  };
1586
- return Promise.resolve(response);
1403
+ return response;
1587
1404
  };
1588
1405
  exports.de_DescribeHandshakeCommand = de_DescribeHandshakeCommand;
1589
1406
  const de_DescribeHandshakeCommandError = async (output, context) => {
@@ -1613,10 +1430,9 @@ const de_DescribeHandshakeCommandError = async (output, context) => {
1613
1430
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1614
1431
  default:
1615
1432
  const parsedBody = parsedOutput.body;
1616
- (0, smithy_client_1.throwDefaultError)({
1433
+ return throwDefaultError({
1617
1434
  output,
1618
1435
  parsedBody,
1619
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1620
1436
  errorCode,
1621
1437
  });
1622
1438
  }
@@ -1627,12 +1443,12 @@ const de_DescribeOrganizationCommand = async (output, context) => {
1627
1443
  }
1628
1444
  const data = await parseBody(output.body, context);
1629
1445
  let contents = {};
1630
- contents = de_DescribeOrganizationResponse(data, context);
1446
+ contents = (0, smithy_client_1._json)(data);
1631
1447
  const response = {
1632
1448
  $metadata: deserializeMetadata(output),
1633
1449
  ...contents,
1634
1450
  };
1635
- return Promise.resolve(response);
1451
+ return response;
1636
1452
  };
1637
1453
  exports.de_DescribeOrganizationCommand = de_DescribeOrganizationCommand;
1638
1454
  const de_DescribeOrganizationCommandError = async (output, context) => {
@@ -1659,10 +1475,9 @@ const de_DescribeOrganizationCommandError = async (output, context) => {
1659
1475
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1660
1476
  default:
1661
1477
  const parsedBody = parsedOutput.body;
1662
- (0, smithy_client_1.throwDefaultError)({
1478
+ return throwDefaultError({
1663
1479
  output,
1664
1480
  parsedBody,
1665
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1666
1481
  errorCode,
1667
1482
  });
1668
1483
  }
@@ -1673,12 +1488,12 @@ const de_DescribeOrganizationalUnitCommand = async (output, context) => {
1673
1488
  }
1674
1489
  const data = await parseBody(output.body, context);
1675
1490
  let contents = {};
1676
- contents = de_DescribeOrganizationalUnitResponse(data, context);
1491
+ contents = (0, smithy_client_1._json)(data);
1677
1492
  const response = {
1678
1493
  $metadata: deserializeMetadata(output),
1679
1494
  ...contents,
1680
1495
  };
1681
- return Promise.resolve(response);
1496
+ return response;
1682
1497
  };
1683
1498
  exports.de_DescribeOrganizationalUnitCommand = de_DescribeOrganizationalUnitCommand;
1684
1499
  const de_DescribeOrganizationalUnitCommandError = async (output, context) => {
@@ -1708,10 +1523,9 @@ const de_DescribeOrganizationalUnitCommandError = async (output, context) => {
1708
1523
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1709
1524
  default:
1710
1525
  const parsedBody = parsedOutput.body;
1711
- (0, smithy_client_1.throwDefaultError)({
1526
+ return throwDefaultError({
1712
1527
  output,
1713
1528
  parsedBody,
1714
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1715
1529
  errorCode,
1716
1530
  });
1717
1531
  }
@@ -1722,12 +1536,12 @@ const de_DescribePolicyCommand = async (output, context) => {
1722
1536
  }
1723
1537
  const data = await parseBody(output.body, context);
1724
1538
  let contents = {};
1725
- contents = de_DescribePolicyResponse(data, context);
1539
+ contents = (0, smithy_client_1._json)(data);
1726
1540
  const response = {
1727
1541
  $metadata: deserializeMetadata(output),
1728
1542
  ...contents,
1729
1543
  };
1730
- return Promise.resolve(response);
1544
+ return response;
1731
1545
  };
1732
1546
  exports.de_DescribePolicyCommand = de_DescribePolicyCommand;
1733
1547
  const de_DescribePolicyCommandError = async (output, context) => {
@@ -1760,10 +1574,9 @@ const de_DescribePolicyCommandError = async (output, context) => {
1760
1574
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1761
1575
  default:
1762
1576
  const parsedBody = parsedOutput.body;
1763
- (0, smithy_client_1.throwDefaultError)({
1577
+ return throwDefaultError({
1764
1578
  output,
1765
1579
  parsedBody,
1766
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1767
1580
  errorCode,
1768
1581
  });
1769
1582
  }
@@ -1774,12 +1587,12 @@ const de_DescribeResourcePolicyCommand = async (output, context) => {
1774
1587
  }
1775
1588
  const data = await parseBody(output.body, context);
1776
1589
  let contents = {};
1777
- contents = de_DescribeResourcePolicyResponse(data, context);
1590
+ contents = (0, smithy_client_1._json)(data);
1778
1591
  const response = {
1779
1592
  $metadata: deserializeMetadata(output),
1780
1593
  ...contents,
1781
1594
  };
1782
- return Promise.resolve(response);
1595
+ return response;
1783
1596
  };
1784
1597
  exports.de_DescribeResourcePolicyCommand = de_DescribeResourcePolicyCommand;
1785
1598
  const de_DescribeResourcePolicyCommandError = async (output, context) => {
@@ -1812,10 +1625,9 @@ const de_DescribeResourcePolicyCommandError = async (output, context) => {
1812
1625
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1813
1626
  default:
1814
1627
  const parsedBody = parsedOutput.body;
1815
- (0, smithy_client_1.throwDefaultError)({
1628
+ return throwDefaultError({
1816
1629
  output,
1817
1630
  parsedBody,
1818
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1819
1631
  errorCode,
1820
1632
  });
1821
1633
  }
@@ -1828,7 +1640,7 @@ const de_DetachPolicyCommand = async (output, context) => {
1828
1640
  const response = {
1829
1641
  $metadata: deserializeMetadata(output),
1830
1642
  };
1831
- return Promise.resolve(response);
1643
+ return response;
1832
1644
  };
1833
1645
  exports.de_DetachPolicyCommand = de_DetachPolicyCommand;
1834
1646
  const de_DetachPolicyCommandError = async (output, context) => {
@@ -1876,10 +1688,9 @@ const de_DetachPolicyCommandError = async (output, context) => {
1876
1688
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1877
1689
  default:
1878
1690
  const parsedBody = parsedOutput.body;
1879
- (0, smithy_client_1.throwDefaultError)({
1691
+ return throwDefaultError({
1880
1692
  output,
1881
1693
  parsedBody,
1882
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1883
1694
  errorCode,
1884
1695
  });
1885
1696
  }
@@ -1892,7 +1703,7 @@ const de_DisableAWSServiceAccessCommand = async (output, context) => {
1892
1703
  const response = {
1893
1704
  $metadata: deserializeMetadata(output),
1894
1705
  };
1895
- return Promise.resolve(response);
1706
+ return response;
1896
1707
  };
1897
1708
  exports.de_DisableAWSServiceAccessCommand = de_DisableAWSServiceAccessCommand;
1898
1709
  const de_DisableAWSServiceAccessCommandError = async (output, context) => {
@@ -1928,10 +1739,9 @@ const de_DisableAWSServiceAccessCommandError = async (output, context) => {
1928
1739
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1929
1740
  default:
1930
1741
  const parsedBody = parsedOutput.body;
1931
- (0, smithy_client_1.throwDefaultError)({
1742
+ return throwDefaultError({
1932
1743
  output,
1933
1744
  parsedBody,
1934
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1935
1745
  errorCode,
1936
1746
  });
1937
1747
  }
@@ -1942,12 +1752,12 @@ const de_DisablePolicyTypeCommand = async (output, context) => {
1942
1752
  }
1943
1753
  const data = await parseBody(output.body, context);
1944
1754
  let contents = {};
1945
- contents = de_DisablePolicyTypeResponse(data, context);
1755
+ contents = (0, smithy_client_1._json)(data);
1946
1756
  const response = {
1947
1757
  $metadata: deserializeMetadata(output),
1948
1758
  ...contents,
1949
1759
  };
1950
- return Promise.resolve(response);
1760
+ return response;
1951
1761
  };
1952
1762
  exports.de_DisablePolicyTypeCommand = de_DisablePolicyTypeCommand;
1953
1763
  const de_DisablePolicyTypeCommandError = async (output, context) => {
@@ -1992,10 +1802,9 @@ const de_DisablePolicyTypeCommandError = async (output, context) => {
1992
1802
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1993
1803
  default:
1994
1804
  const parsedBody = parsedOutput.body;
1995
- (0, smithy_client_1.throwDefaultError)({
1805
+ return throwDefaultError({
1996
1806
  output,
1997
1807
  parsedBody,
1998
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
1999
1808
  errorCode,
2000
1809
  });
2001
1810
  }
@@ -2011,7 +1820,7 @@ const de_EnableAllFeaturesCommand = async (output, context) => {
2011
1820
  $metadata: deserializeMetadata(output),
2012
1821
  ...contents,
2013
1822
  };
2014
- return Promise.resolve(response);
1823
+ return response;
2015
1824
  };
2016
1825
  exports.de_EnableAllFeaturesCommand = de_EnableAllFeaturesCommand;
2017
1826
  const de_EnableAllFeaturesCommandError = async (output, context) => {
@@ -2044,10 +1853,9 @@ const de_EnableAllFeaturesCommandError = async (output, context) => {
2044
1853
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2045
1854
  default:
2046
1855
  const parsedBody = parsedOutput.body;
2047
- (0, smithy_client_1.throwDefaultError)({
1856
+ return throwDefaultError({
2048
1857
  output,
2049
1858
  parsedBody,
2050
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2051
1859
  errorCode,
2052
1860
  });
2053
1861
  }
@@ -2060,7 +1868,7 @@ const de_EnableAWSServiceAccessCommand = async (output, context) => {
2060
1868
  const response = {
2061
1869
  $metadata: deserializeMetadata(output),
2062
1870
  };
2063
- return Promise.resolve(response);
1871
+ return response;
2064
1872
  };
2065
1873
  exports.de_EnableAWSServiceAccessCommand = de_EnableAWSServiceAccessCommand;
2066
1874
  const de_EnableAWSServiceAccessCommandError = async (output, context) => {
@@ -2096,10 +1904,9 @@ const de_EnableAWSServiceAccessCommandError = async (output, context) => {
2096
1904
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2097
1905
  default:
2098
1906
  const parsedBody = parsedOutput.body;
2099
- (0, smithy_client_1.throwDefaultError)({
1907
+ return throwDefaultError({
2100
1908
  output,
2101
1909
  parsedBody,
2102
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2103
1910
  errorCode,
2104
1911
  });
2105
1912
  }
@@ -2110,12 +1917,12 @@ const de_EnablePolicyTypeCommand = async (output, context) => {
2110
1917
  }
2111
1918
  const data = await parseBody(output.body, context);
2112
1919
  let contents = {};
2113
- contents = de_EnablePolicyTypeResponse(data, context);
1920
+ contents = (0, smithy_client_1._json)(data);
2114
1921
  const response = {
2115
1922
  $metadata: deserializeMetadata(output),
2116
1923
  ...contents,
2117
1924
  };
2118
- return Promise.resolve(response);
1925
+ return response;
2119
1926
  };
2120
1927
  exports.de_EnablePolicyTypeCommand = de_EnablePolicyTypeCommand;
2121
1928
  const de_EnablePolicyTypeCommandError = async (output, context) => {
@@ -2163,10 +1970,9 @@ const de_EnablePolicyTypeCommandError = async (output, context) => {
2163
1970
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2164
1971
  default:
2165
1972
  const parsedBody = parsedOutput.body;
2166
- (0, smithy_client_1.throwDefaultError)({
1973
+ return throwDefaultError({
2167
1974
  output,
2168
1975
  parsedBody,
2169
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2170
1976
  errorCode,
2171
1977
  });
2172
1978
  }
@@ -2182,7 +1988,7 @@ const de_InviteAccountToOrganizationCommand = async (output, context) => {
2182
1988
  $metadata: deserializeMetadata(output),
2183
1989
  ...contents,
2184
1990
  };
2185
- return Promise.resolve(response);
1991
+ return response;
2186
1992
  };
2187
1993
  exports.de_InviteAccountToOrganizationCommand = de_InviteAccountToOrganizationCommand;
2188
1994
  const de_InviteAccountToOrganizationCommandError = async (output, context) => {
@@ -2227,10 +2033,9 @@ const de_InviteAccountToOrganizationCommandError = async (output, context) => {
2227
2033
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2228
2034
  default:
2229
2035
  const parsedBody = parsedOutput.body;
2230
- (0, smithy_client_1.throwDefaultError)({
2036
+ return throwDefaultError({
2231
2037
  output,
2232
2038
  parsedBody,
2233
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2234
2039
  errorCode,
2235
2040
  });
2236
2041
  }
@@ -2243,7 +2048,7 @@ const de_LeaveOrganizationCommand = async (output, context) => {
2243
2048
  const response = {
2244
2049
  $metadata: deserializeMetadata(output),
2245
2050
  };
2246
- return Promise.resolve(response);
2051
+ return response;
2247
2052
  };
2248
2053
  exports.de_LeaveOrganizationCommand = de_LeaveOrganizationCommand;
2249
2054
  const de_LeaveOrganizationCommandError = async (output, context) => {
@@ -2282,10 +2087,9 @@ const de_LeaveOrganizationCommandError = async (output, context) => {
2282
2087
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2283
2088
  default:
2284
2089
  const parsedBody = parsedOutput.body;
2285
- (0, smithy_client_1.throwDefaultError)({
2090
+ return throwDefaultError({
2286
2091
  output,
2287
2092
  parsedBody,
2288
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2289
2093
  errorCode,
2290
2094
  });
2291
2095
  }
@@ -2301,7 +2105,7 @@ const de_ListAccountsCommand = async (output, context) => {
2301
2105
  $metadata: deserializeMetadata(output),
2302
2106
  ...contents,
2303
2107
  };
2304
- return Promise.resolve(response);
2108
+ return response;
2305
2109
  };
2306
2110
  exports.de_ListAccountsCommand = de_ListAccountsCommand;
2307
2111
  const de_ListAccountsCommandError = async (output, context) => {
@@ -2328,10 +2132,9 @@ const de_ListAccountsCommandError = async (output, context) => {
2328
2132
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2329
2133
  default:
2330
2134
  const parsedBody = parsedOutput.body;
2331
- (0, smithy_client_1.throwDefaultError)({
2135
+ return throwDefaultError({
2332
2136
  output,
2333
2137
  parsedBody,
2334
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2335
2138
  errorCode,
2336
2139
  });
2337
2140
  }
@@ -2347,7 +2150,7 @@ const de_ListAccountsForParentCommand = async (output, context) => {
2347
2150
  $metadata: deserializeMetadata(output),
2348
2151
  ...contents,
2349
2152
  };
2350
- return Promise.resolve(response);
2153
+ return response;
2351
2154
  };
2352
2155
  exports.de_ListAccountsForParentCommand = de_ListAccountsForParentCommand;
2353
2156
  const de_ListAccountsForParentCommandError = async (output, context) => {
@@ -2377,10 +2180,9 @@ const de_ListAccountsForParentCommandError = async (output, context) => {
2377
2180
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2378
2181
  default:
2379
2182
  const parsedBody = parsedOutput.body;
2380
- (0, smithy_client_1.throwDefaultError)({
2183
+ return throwDefaultError({
2381
2184
  output,
2382
2185
  parsedBody,
2383
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2384
2186
  errorCode,
2385
2187
  });
2386
2188
  }
@@ -2396,7 +2198,7 @@ const de_ListAWSServiceAccessForOrganizationCommand = async (output, context) =>
2396
2198
  $metadata: deserializeMetadata(output),
2397
2199
  ...contents,
2398
2200
  };
2399
- return Promise.resolve(response);
2201
+ return response;
2400
2202
  };
2401
2203
  exports.de_ListAWSServiceAccessForOrganizationCommand = de_ListAWSServiceAccessForOrganizationCommand;
2402
2204
  const de_ListAWSServiceAccessForOrganizationCommandError = async (output, context) => {
@@ -2429,10 +2231,9 @@ const de_ListAWSServiceAccessForOrganizationCommandError = async (output, contex
2429
2231
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2430
2232
  default:
2431
2233
  const parsedBody = parsedOutput.body;
2432
- (0, smithy_client_1.throwDefaultError)({
2234
+ return throwDefaultError({
2433
2235
  output,
2434
2236
  parsedBody,
2435
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2436
2237
  errorCode,
2437
2238
  });
2438
2239
  }
@@ -2443,12 +2244,12 @@ const de_ListChildrenCommand = async (output, context) => {
2443
2244
  }
2444
2245
  const data = await parseBody(output.body, context);
2445
2246
  let contents = {};
2446
- contents = de_ListChildrenResponse(data, context);
2247
+ contents = (0, smithy_client_1._json)(data);
2447
2248
  const response = {
2448
2249
  $metadata: deserializeMetadata(output),
2449
2250
  ...contents,
2450
2251
  };
2451
- return Promise.resolve(response);
2252
+ return response;
2452
2253
  };
2453
2254
  exports.de_ListChildrenCommand = de_ListChildrenCommand;
2454
2255
  const de_ListChildrenCommandError = async (output, context) => {
@@ -2478,10 +2279,9 @@ const de_ListChildrenCommandError = async (output, context) => {
2478
2279
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2479
2280
  default:
2480
2281
  const parsedBody = parsedOutput.body;
2481
- (0, smithy_client_1.throwDefaultError)({
2282
+ return throwDefaultError({
2482
2283
  output,
2483
2284
  parsedBody,
2484
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2485
2285
  errorCode,
2486
2286
  });
2487
2287
  }
@@ -2497,7 +2297,7 @@ const de_ListCreateAccountStatusCommand = async (output, context) => {
2497
2297
  $metadata: deserializeMetadata(output),
2498
2298
  ...contents,
2499
2299
  };
2500
- return Promise.resolve(response);
2300
+ return response;
2501
2301
  };
2502
2302
  exports.de_ListCreateAccountStatusCommand = de_ListCreateAccountStatusCommand;
2503
2303
  const de_ListCreateAccountStatusCommandError = async (output, context) => {
@@ -2527,10 +2327,9 @@ const de_ListCreateAccountStatusCommandError = async (output, context) => {
2527
2327
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2528
2328
  default:
2529
2329
  const parsedBody = parsedOutput.body;
2530
- (0, smithy_client_1.throwDefaultError)({
2330
+ return throwDefaultError({
2531
2331
  output,
2532
2332
  parsedBody,
2533
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2534
2333
  errorCode,
2535
2334
  });
2536
2335
  }
@@ -2546,7 +2345,7 @@ const de_ListDelegatedAdministratorsCommand = async (output, context) => {
2546
2345
  $metadata: deserializeMetadata(output),
2547
2346
  ...contents,
2548
2347
  };
2549
- return Promise.resolve(response);
2348
+ return response;
2550
2349
  };
2551
2350
  exports.de_ListDelegatedAdministratorsCommand = de_ListDelegatedAdministratorsCommand;
2552
2351
  const de_ListDelegatedAdministratorsCommandError = async (output, context) => {
@@ -2579,10 +2378,9 @@ const de_ListDelegatedAdministratorsCommandError = async (output, context) => {
2579
2378
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2580
2379
  default:
2581
2380
  const parsedBody = parsedOutput.body;
2582
- (0, smithy_client_1.throwDefaultError)({
2381
+ return throwDefaultError({
2583
2382
  output,
2584
2383
  parsedBody,
2585
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2586
2384
  errorCode,
2587
2385
  });
2588
2386
  }
@@ -2598,7 +2396,7 @@ const de_ListDelegatedServicesForAccountCommand = async (output, context) => {
2598
2396
  $metadata: deserializeMetadata(output),
2599
2397
  ...contents,
2600
2398
  };
2601
- return Promise.resolve(response);
2399
+ return response;
2602
2400
  };
2603
2401
  exports.de_ListDelegatedServicesForAccountCommand = de_ListDelegatedServicesForAccountCommand;
2604
2402
  const de_ListDelegatedServicesForAccountCommandError = async (output, context) => {
@@ -2637,10 +2435,9 @@ const de_ListDelegatedServicesForAccountCommandError = async (output, context) =
2637
2435
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2638
2436
  default:
2639
2437
  const parsedBody = parsedOutput.body;
2640
- (0, smithy_client_1.throwDefaultError)({
2438
+ return throwDefaultError({
2641
2439
  output,
2642
2440
  parsedBody,
2643
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2644
2441
  errorCode,
2645
2442
  });
2646
2443
  }
@@ -2656,7 +2453,7 @@ const de_ListHandshakesForAccountCommand = async (output, context) => {
2656
2453
  $metadata: deserializeMetadata(output),
2657
2454
  ...contents,
2658
2455
  };
2659
- return Promise.resolve(response);
2456
+ return response;
2660
2457
  };
2661
2458
  exports.de_ListHandshakesForAccountCommand = de_ListHandshakesForAccountCommand;
2662
2459
  const de_ListHandshakesForAccountCommandError = async (output, context) => {
@@ -2683,10 +2480,9 @@ const de_ListHandshakesForAccountCommandError = async (output, context) => {
2683
2480
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2684
2481
  default:
2685
2482
  const parsedBody = parsedOutput.body;
2686
- (0, smithy_client_1.throwDefaultError)({
2483
+ return throwDefaultError({
2687
2484
  output,
2688
2485
  parsedBody,
2689
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2690
2486
  errorCode,
2691
2487
  });
2692
2488
  }
@@ -2702,7 +2498,7 @@ const de_ListHandshakesForOrganizationCommand = async (output, context) => {
2702
2498
  $metadata: deserializeMetadata(output),
2703
2499
  ...contents,
2704
2500
  };
2705
- return Promise.resolve(response);
2501
+ return response;
2706
2502
  };
2707
2503
  exports.de_ListHandshakesForOrganizationCommand = de_ListHandshakesForOrganizationCommand;
2708
2504
  const de_ListHandshakesForOrganizationCommandError = async (output, context) => {
@@ -2732,10 +2528,9 @@ const de_ListHandshakesForOrganizationCommandError = async (output, context) =>
2732
2528
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2733
2529
  default:
2734
2530
  const parsedBody = parsedOutput.body;
2735
- (0, smithy_client_1.throwDefaultError)({
2531
+ return throwDefaultError({
2736
2532
  output,
2737
2533
  parsedBody,
2738
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2739
2534
  errorCode,
2740
2535
  });
2741
2536
  }
@@ -2746,12 +2541,12 @@ const de_ListOrganizationalUnitsForParentCommand = async (output, context) => {
2746
2541
  }
2747
2542
  const data = await parseBody(output.body, context);
2748
2543
  let contents = {};
2749
- contents = de_ListOrganizationalUnitsForParentResponse(data, context);
2544
+ contents = (0, smithy_client_1._json)(data);
2750
2545
  const response = {
2751
2546
  $metadata: deserializeMetadata(output),
2752
2547
  ...contents,
2753
2548
  };
2754
- return Promise.resolve(response);
2549
+ return response;
2755
2550
  };
2756
2551
  exports.de_ListOrganizationalUnitsForParentCommand = de_ListOrganizationalUnitsForParentCommand;
2757
2552
  const de_ListOrganizationalUnitsForParentCommandError = async (output, context) => {
@@ -2781,10 +2576,9 @@ const de_ListOrganizationalUnitsForParentCommandError = async (output, context)
2781
2576
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2782
2577
  default:
2783
2578
  const parsedBody = parsedOutput.body;
2784
- (0, smithy_client_1.throwDefaultError)({
2579
+ return throwDefaultError({
2785
2580
  output,
2786
2581
  parsedBody,
2787
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2788
2582
  errorCode,
2789
2583
  });
2790
2584
  }
@@ -2795,12 +2589,12 @@ const de_ListParentsCommand = async (output, context) => {
2795
2589
  }
2796
2590
  const data = await parseBody(output.body, context);
2797
2591
  let contents = {};
2798
- contents = de_ListParentsResponse(data, context);
2592
+ contents = (0, smithy_client_1._json)(data);
2799
2593
  const response = {
2800
2594
  $metadata: deserializeMetadata(output),
2801
2595
  ...contents,
2802
2596
  };
2803
- return Promise.resolve(response);
2597
+ return response;
2804
2598
  };
2805
2599
  exports.de_ListParentsCommand = de_ListParentsCommand;
2806
2600
  const de_ListParentsCommandError = async (output, context) => {
@@ -2830,10 +2624,9 @@ const de_ListParentsCommandError = async (output, context) => {
2830
2624
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2831
2625
  default:
2832
2626
  const parsedBody = parsedOutput.body;
2833
- (0, smithy_client_1.throwDefaultError)({
2627
+ return throwDefaultError({
2834
2628
  output,
2835
2629
  parsedBody,
2836
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2837
2630
  errorCode,
2838
2631
  });
2839
2632
  }
@@ -2844,12 +2637,12 @@ const de_ListPoliciesCommand = async (output, context) => {
2844
2637
  }
2845
2638
  const data = await parseBody(output.body, context);
2846
2639
  let contents = {};
2847
- contents = de_ListPoliciesResponse(data, context);
2640
+ contents = (0, smithy_client_1._json)(data);
2848
2641
  const response = {
2849
2642
  $metadata: deserializeMetadata(output),
2850
2643
  ...contents,
2851
2644
  };
2852
- return Promise.resolve(response);
2645
+ return response;
2853
2646
  };
2854
2647
  exports.de_ListPoliciesCommand = de_ListPoliciesCommand;
2855
2648
  const de_ListPoliciesCommandError = async (output, context) => {
@@ -2879,10 +2672,9 @@ const de_ListPoliciesCommandError = async (output, context) => {
2879
2672
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2880
2673
  default:
2881
2674
  const parsedBody = parsedOutput.body;
2882
- (0, smithy_client_1.throwDefaultError)({
2675
+ return throwDefaultError({
2883
2676
  output,
2884
2677
  parsedBody,
2885
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2886
2678
  errorCode,
2887
2679
  });
2888
2680
  }
@@ -2893,12 +2685,12 @@ const de_ListPoliciesForTargetCommand = async (output, context) => {
2893
2685
  }
2894
2686
  const data = await parseBody(output.body, context);
2895
2687
  let contents = {};
2896
- contents = de_ListPoliciesForTargetResponse(data, context);
2688
+ contents = (0, smithy_client_1._json)(data);
2897
2689
  const response = {
2898
2690
  $metadata: deserializeMetadata(output),
2899
2691
  ...contents,
2900
2692
  };
2901
- return Promise.resolve(response);
2693
+ return response;
2902
2694
  };
2903
2695
  exports.de_ListPoliciesForTargetCommand = de_ListPoliciesForTargetCommand;
2904
2696
  const de_ListPoliciesForTargetCommandError = async (output, context) => {
@@ -2931,10 +2723,9 @@ const de_ListPoliciesForTargetCommandError = async (output, context) => {
2931
2723
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
2932
2724
  default:
2933
2725
  const parsedBody = parsedOutput.body;
2934
- (0, smithy_client_1.throwDefaultError)({
2726
+ return throwDefaultError({
2935
2727
  output,
2936
2728
  parsedBody,
2937
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2938
2729
  errorCode,
2939
2730
  });
2940
2731
  }
@@ -2945,12 +2736,12 @@ const de_ListRootsCommand = async (output, context) => {
2945
2736
  }
2946
2737
  const data = await parseBody(output.body, context);
2947
2738
  let contents = {};
2948
- contents = de_ListRootsResponse(data, context);
2739
+ contents = (0, smithy_client_1._json)(data);
2949
2740
  const response = {
2950
2741
  $metadata: deserializeMetadata(output),
2951
2742
  ...contents,
2952
2743
  };
2953
- return Promise.resolve(response);
2744
+ return response;
2954
2745
  };
2955
2746
  exports.de_ListRootsCommand = de_ListRootsCommand;
2956
2747
  const de_ListRootsCommandError = async (output, context) => {
@@ -2977,10 +2768,9 @@ const de_ListRootsCommandError = async (output, context) => {
2977
2768
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2978
2769
  default:
2979
2770
  const parsedBody = parsedOutput.body;
2980
- (0, smithy_client_1.throwDefaultError)({
2771
+ return throwDefaultError({
2981
2772
  output,
2982
2773
  parsedBody,
2983
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
2984
2774
  errorCode,
2985
2775
  });
2986
2776
  }
@@ -2991,12 +2781,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
2991
2781
  }
2992
2782
  const data = await parseBody(output.body, context);
2993
2783
  let contents = {};
2994
- contents = de_ListTagsForResourceResponse(data, context);
2784
+ contents = (0, smithy_client_1._json)(data);
2995
2785
  const response = {
2996
2786
  $metadata: deserializeMetadata(output),
2997
2787
  ...contents,
2998
2788
  };
2999
- return Promise.resolve(response);
2789
+ return response;
3000
2790
  };
3001
2791
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
3002
2792
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -3026,10 +2816,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
3026
2816
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3027
2817
  default:
3028
2818
  const parsedBody = parsedOutput.body;
3029
- (0, smithy_client_1.throwDefaultError)({
2819
+ return throwDefaultError({
3030
2820
  output,
3031
2821
  parsedBody,
3032
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3033
2822
  errorCode,
3034
2823
  });
3035
2824
  }
@@ -3040,12 +2829,12 @@ const de_ListTargetsForPolicyCommand = async (output, context) => {
3040
2829
  }
3041
2830
  const data = await parseBody(output.body, context);
3042
2831
  let contents = {};
3043
- contents = de_ListTargetsForPolicyResponse(data, context);
2832
+ contents = (0, smithy_client_1._json)(data);
3044
2833
  const response = {
3045
2834
  $metadata: deserializeMetadata(output),
3046
2835
  ...contents,
3047
2836
  };
3048
- return Promise.resolve(response);
2837
+ return response;
3049
2838
  };
3050
2839
  exports.de_ListTargetsForPolicyCommand = de_ListTargetsForPolicyCommand;
3051
2840
  const de_ListTargetsForPolicyCommandError = async (output, context) => {
@@ -3078,10 +2867,9 @@ const de_ListTargetsForPolicyCommandError = async (output, context) => {
3078
2867
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
3079
2868
  default:
3080
2869
  const parsedBody = parsedOutput.body;
3081
- (0, smithy_client_1.throwDefaultError)({
2870
+ return throwDefaultError({
3082
2871
  output,
3083
2872
  parsedBody,
3084
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3085
2873
  errorCode,
3086
2874
  });
3087
2875
  }
@@ -3094,7 +2882,7 @@ const de_MoveAccountCommand = async (output, context) => {
3094
2882
  const response = {
3095
2883
  $metadata: deserializeMetadata(output),
3096
2884
  };
3097
- return Promise.resolve(response);
2885
+ return response;
3098
2886
  };
3099
2887
  exports.de_MoveAccountCommand = de_MoveAccountCommand;
3100
2888
  const de_MoveAccountCommandError = async (output, context) => {
@@ -3136,10 +2924,9 @@ const de_MoveAccountCommandError = async (output, context) => {
3136
2924
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3137
2925
  default:
3138
2926
  const parsedBody = parsedOutput.body;
3139
- (0, smithy_client_1.throwDefaultError)({
2927
+ return throwDefaultError({
3140
2928
  output,
3141
2929
  parsedBody,
3142
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3143
2930
  errorCode,
3144
2931
  });
3145
2932
  }
@@ -3150,12 +2937,12 @@ const de_PutResourcePolicyCommand = async (output, context) => {
3150
2937
  }
3151
2938
  const data = await parseBody(output.body, context);
3152
2939
  let contents = {};
3153
- contents = de_PutResourcePolicyResponse(data, context);
2940
+ contents = (0, smithy_client_1._json)(data);
3154
2941
  const response = {
3155
2942
  $metadata: deserializeMetadata(output),
3156
2943
  ...contents,
3157
2944
  };
3158
- return Promise.resolve(response);
2945
+ return response;
3159
2946
  };
3160
2947
  exports.de_PutResourcePolicyCommand = de_PutResourcePolicyCommand;
3161
2948
  const de_PutResourcePolicyCommandError = async (output, context) => {
@@ -3191,10 +2978,9 @@ const de_PutResourcePolicyCommandError = async (output, context) => {
3191
2978
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
3192
2979
  default:
3193
2980
  const parsedBody = parsedOutput.body;
3194
- (0, smithy_client_1.throwDefaultError)({
2981
+ return throwDefaultError({
3195
2982
  output,
3196
2983
  parsedBody,
3197
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3198
2984
  errorCode,
3199
2985
  });
3200
2986
  }
@@ -3207,7 +2993,7 @@ const de_RegisterDelegatedAdministratorCommand = async (output, context) => {
3207
2993
  const response = {
3208
2994
  $metadata: deserializeMetadata(output),
3209
2995
  };
3210
- return Promise.resolve(response);
2996
+ return response;
3211
2997
  };
3212
2998
  exports.de_RegisterDelegatedAdministratorCommand = de_RegisterDelegatedAdministratorCommand;
3213
2999
  const de_RegisterDelegatedAdministratorCommandError = async (output, context) => {
@@ -3249,10 +3035,9 @@ const de_RegisterDelegatedAdministratorCommandError = async (output, context) =>
3249
3035
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
3250
3036
  default:
3251
3037
  const parsedBody = parsedOutput.body;
3252
- (0, smithy_client_1.throwDefaultError)({
3038
+ return throwDefaultError({
3253
3039
  output,
3254
3040
  parsedBody,
3255
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3256
3041
  errorCode,
3257
3042
  });
3258
3043
  }
@@ -3265,7 +3050,7 @@ const de_RemoveAccountFromOrganizationCommand = async (output, context) => {
3265
3050
  const response = {
3266
3051
  $metadata: deserializeMetadata(output),
3267
3052
  };
3268
- return Promise.resolve(response);
3053
+ return response;
3269
3054
  };
3270
3055
  exports.de_RemoveAccountFromOrganizationCommand = de_RemoveAccountFromOrganizationCommand;
3271
3056
  const de_RemoveAccountFromOrganizationCommandError = async (output, context) => {
@@ -3304,10 +3089,9 @@ const de_RemoveAccountFromOrganizationCommandError = async (output, context) =>
3304
3089
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3305
3090
  default:
3306
3091
  const parsedBody = parsedOutput.body;
3307
- (0, smithy_client_1.throwDefaultError)({
3092
+ return throwDefaultError({
3308
3093
  output,
3309
3094
  parsedBody,
3310
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3311
3095
  errorCode,
3312
3096
  });
3313
3097
  }
@@ -3320,7 +3104,7 @@ const de_TagResourceCommand = async (output, context) => {
3320
3104
  const response = {
3321
3105
  $metadata: deserializeMetadata(output),
3322
3106
  };
3323
- return Promise.resolve(response);
3107
+ return response;
3324
3108
  };
3325
3109
  exports.de_TagResourceCommand = de_TagResourceCommand;
3326
3110
  const de_TagResourceCommandError = async (output, context) => {
@@ -3356,10 +3140,9 @@ const de_TagResourceCommandError = async (output, context) => {
3356
3140
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3357
3141
  default:
3358
3142
  const parsedBody = parsedOutput.body;
3359
- (0, smithy_client_1.throwDefaultError)({
3143
+ return throwDefaultError({
3360
3144
  output,
3361
3145
  parsedBody,
3362
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3363
3146
  errorCode,
3364
3147
  });
3365
3148
  }
@@ -3372,7 +3155,7 @@ const de_UntagResourceCommand = async (output, context) => {
3372
3155
  const response = {
3373
3156
  $metadata: deserializeMetadata(output),
3374
3157
  };
3375
- return Promise.resolve(response);
3158
+ return response;
3376
3159
  };
3377
3160
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
3378
3161
  const de_UntagResourceCommandError = async (output, context) => {
@@ -3408,10 +3191,9 @@ const de_UntagResourceCommandError = async (output, context) => {
3408
3191
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3409
3192
  default:
3410
3193
  const parsedBody = parsedOutput.body;
3411
- (0, smithy_client_1.throwDefaultError)({
3194
+ return throwDefaultError({
3412
3195
  output,
3413
3196
  parsedBody,
3414
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3415
3197
  errorCode,
3416
3198
  });
3417
3199
  }
@@ -3422,12 +3204,12 @@ const de_UpdateOrganizationalUnitCommand = async (output, context) => {
3422
3204
  }
3423
3205
  const data = await parseBody(output.body, context);
3424
3206
  let contents = {};
3425
- contents = de_UpdateOrganizationalUnitResponse(data, context);
3207
+ contents = (0, smithy_client_1._json)(data);
3426
3208
  const response = {
3427
3209
  $metadata: deserializeMetadata(output),
3428
3210
  ...contents,
3429
3211
  };
3430
- return Promise.resolve(response);
3212
+ return response;
3431
3213
  };
3432
3214
  exports.de_UpdateOrganizationalUnitCommand = de_UpdateOrganizationalUnitCommand;
3433
3215
  const de_UpdateOrganizationalUnitCommandError = async (output, context) => {
@@ -3463,10 +3245,9 @@ const de_UpdateOrganizationalUnitCommandError = async (output, context) => {
3463
3245
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3464
3246
  default:
3465
3247
  const parsedBody = parsedOutput.body;
3466
- (0, smithy_client_1.throwDefaultError)({
3248
+ return throwDefaultError({
3467
3249
  output,
3468
3250
  parsedBody,
3469
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3470
3251
  errorCode,
3471
3252
  });
3472
3253
  }
@@ -3477,12 +3258,12 @@ const de_UpdatePolicyCommand = async (output, context) => {
3477
3258
  }
3478
3259
  const data = await parseBody(output.body, context);
3479
3260
  let contents = {};
3480
- contents = de_UpdatePolicyResponse(data, context);
3261
+ contents = (0, smithy_client_1._json)(data);
3481
3262
  const response = {
3482
3263
  $metadata: deserializeMetadata(output),
3483
3264
  ...contents,
3484
3265
  };
3485
- return Promise.resolve(response);
3266
+ return response;
3486
3267
  };
3487
3268
  exports.de_UpdatePolicyCommand = de_UpdatePolicyCommand;
3488
3269
  const de_UpdatePolicyCommandError = async (output, context) => {
@@ -3530,17 +3311,16 @@ const de_UpdatePolicyCommandError = async (output, context) => {
3530
3311
  throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
3531
3312
  default:
3532
3313
  const parsedBody = parsedOutput.body;
3533
- (0, smithy_client_1.throwDefaultError)({
3314
+ return throwDefaultError({
3534
3315
  output,
3535
3316
  parsedBody,
3536
- exceptionCtor: OrganizationsServiceException_1.OrganizationsServiceException,
3537
3317
  errorCode,
3538
3318
  });
3539
3319
  }
3540
3320
  };
3541
3321
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3542
3322
  const body = parsedOutput.body;
3543
- const deserialized = de_AccessDeniedException(body, context);
3323
+ const deserialized = (0, smithy_client_1._json)(body);
3544
3324
  const exception = new models_0_1.AccessDeniedException({
3545
3325
  $metadata: deserializeMetadata(parsedOutput),
3546
3326
  ...deserialized,
@@ -3549,7 +3329,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3549
3329
  };
3550
3330
  const de_AccessDeniedForDependencyExceptionRes = async (parsedOutput, context) => {
3551
3331
  const body = parsedOutput.body;
3552
- const deserialized = de_AccessDeniedForDependencyException(body, context);
3332
+ const deserialized = (0, smithy_client_1._json)(body);
3553
3333
  const exception = new models_0_1.AccessDeniedForDependencyException({
3554
3334
  $metadata: deserializeMetadata(parsedOutput),
3555
3335
  ...deserialized,
@@ -3558,7 +3338,7 @@ const de_AccessDeniedForDependencyExceptionRes = async (parsedOutput, context) =
3558
3338
  };
3559
3339
  const de_AccountAlreadyClosedExceptionRes = async (parsedOutput, context) => {
3560
3340
  const body = parsedOutput.body;
3561
- const deserialized = de_AccountAlreadyClosedException(body, context);
3341
+ const deserialized = (0, smithy_client_1._json)(body);
3562
3342
  const exception = new models_0_1.AccountAlreadyClosedException({
3563
3343
  $metadata: deserializeMetadata(parsedOutput),
3564
3344
  ...deserialized,
@@ -3567,7 +3347,7 @@ const de_AccountAlreadyClosedExceptionRes = async (parsedOutput, context) => {
3567
3347
  };
3568
3348
  const de_AccountAlreadyRegisteredExceptionRes = async (parsedOutput, context) => {
3569
3349
  const body = parsedOutput.body;
3570
- const deserialized = de_AccountAlreadyRegisteredException(body, context);
3350
+ const deserialized = (0, smithy_client_1._json)(body);
3571
3351
  const exception = new models_0_1.AccountAlreadyRegisteredException({
3572
3352
  $metadata: deserializeMetadata(parsedOutput),
3573
3353
  ...deserialized,
@@ -3576,7 +3356,7 @@ const de_AccountAlreadyRegisteredExceptionRes = async (parsedOutput, context) =>
3576
3356
  };
3577
3357
  const de_AccountNotFoundExceptionRes = async (parsedOutput, context) => {
3578
3358
  const body = parsedOutput.body;
3579
- const deserialized = de_AccountNotFoundException(body, context);
3359
+ const deserialized = (0, smithy_client_1._json)(body);
3580
3360
  const exception = new models_0_1.AccountNotFoundException({
3581
3361
  $metadata: deserializeMetadata(parsedOutput),
3582
3362
  ...deserialized,
@@ -3585,7 +3365,7 @@ const de_AccountNotFoundExceptionRes = async (parsedOutput, context) => {
3585
3365
  };
3586
3366
  const de_AccountNotRegisteredExceptionRes = async (parsedOutput, context) => {
3587
3367
  const body = parsedOutput.body;
3588
- const deserialized = de_AccountNotRegisteredException(body, context);
3368
+ const deserialized = (0, smithy_client_1._json)(body);
3589
3369
  const exception = new models_0_1.AccountNotRegisteredException({
3590
3370
  $metadata: deserializeMetadata(parsedOutput),
3591
3371
  ...deserialized,
@@ -3594,7 +3374,7 @@ const de_AccountNotRegisteredExceptionRes = async (parsedOutput, context) => {
3594
3374
  };
3595
3375
  const de_AccountOwnerNotVerifiedExceptionRes = async (parsedOutput, context) => {
3596
3376
  const body = parsedOutput.body;
3597
- const deserialized = de_AccountOwnerNotVerifiedException(body, context);
3377
+ const deserialized = (0, smithy_client_1._json)(body);
3598
3378
  const exception = new models_0_1.AccountOwnerNotVerifiedException({
3599
3379
  $metadata: deserializeMetadata(parsedOutput),
3600
3380
  ...deserialized,
@@ -3603,7 +3383,7 @@ const de_AccountOwnerNotVerifiedExceptionRes = async (parsedOutput, context) =>
3603
3383
  };
3604
3384
  const de_AlreadyInOrganizationExceptionRes = async (parsedOutput, context) => {
3605
3385
  const body = parsedOutput.body;
3606
- const deserialized = de_AlreadyInOrganizationException(body, context);
3386
+ const deserialized = (0, smithy_client_1._json)(body);
3607
3387
  const exception = new models_0_1.AlreadyInOrganizationException({
3608
3388
  $metadata: deserializeMetadata(parsedOutput),
3609
3389
  ...deserialized,
@@ -3612,7 +3392,7 @@ const de_AlreadyInOrganizationExceptionRes = async (parsedOutput, context) => {
3612
3392
  };
3613
3393
  const de_AWSOrganizationsNotInUseExceptionRes = async (parsedOutput, context) => {
3614
3394
  const body = parsedOutput.body;
3615
- const deserialized = de_AWSOrganizationsNotInUseException(body, context);
3395
+ const deserialized = (0, smithy_client_1._json)(body);
3616
3396
  const exception = new models_0_1.AWSOrganizationsNotInUseException({
3617
3397
  $metadata: deserializeMetadata(parsedOutput),
3618
3398
  ...deserialized,
@@ -3621,7 +3401,7 @@ const de_AWSOrganizationsNotInUseExceptionRes = async (parsedOutput, context) =>
3621
3401
  };
3622
3402
  const de_ChildNotFoundExceptionRes = async (parsedOutput, context) => {
3623
3403
  const body = parsedOutput.body;
3624
- const deserialized = de_ChildNotFoundException(body, context);
3404
+ const deserialized = (0, smithy_client_1._json)(body);
3625
3405
  const exception = new models_0_1.ChildNotFoundException({
3626
3406
  $metadata: deserializeMetadata(parsedOutput),
3627
3407
  ...deserialized,
@@ -3630,7 +3410,7 @@ const de_ChildNotFoundExceptionRes = async (parsedOutput, context) => {
3630
3410
  };
3631
3411
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
3632
3412
  const body = parsedOutput.body;
3633
- const deserialized = de_ConcurrentModificationException(body, context);
3413
+ const deserialized = (0, smithy_client_1._json)(body);
3634
3414
  const exception = new models_0_1.ConcurrentModificationException({
3635
3415
  $metadata: deserializeMetadata(parsedOutput),
3636
3416
  ...deserialized,
@@ -3639,7 +3419,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
3639
3419
  };
3640
3420
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
3641
3421
  const body = parsedOutput.body;
3642
- const deserialized = de_ConflictException(body, context);
3422
+ const deserialized = (0, smithy_client_1._json)(body);
3643
3423
  const exception = new models_0_1.ConflictException({
3644
3424
  $metadata: deserializeMetadata(parsedOutput),
3645
3425
  ...deserialized,
@@ -3648,7 +3428,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
3648
3428
  };
3649
3429
  const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
3650
3430
  const body = parsedOutput.body;
3651
- const deserialized = de_ConstraintViolationException(body, context);
3431
+ const deserialized = (0, smithy_client_1._json)(body);
3652
3432
  const exception = new models_0_1.ConstraintViolationException({
3653
3433
  $metadata: deserializeMetadata(parsedOutput),
3654
3434
  ...deserialized,
@@ -3657,7 +3437,7 @@ const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
3657
3437
  };
3658
3438
  const de_CreateAccountStatusNotFoundExceptionRes = async (parsedOutput, context) => {
3659
3439
  const body = parsedOutput.body;
3660
- const deserialized = de_CreateAccountStatusNotFoundException(body, context);
3440
+ const deserialized = (0, smithy_client_1._json)(body);
3661
3441
  const exception = new models_0_1.CreateAccountStatusNotFoundException({
3662
3442
  $metadata: deserializeMetadata(parsedOutput),
3663
3443
  ...deserialized,
@@ -3666,7 +3446,7 @@ const de_CreateAccountStatusNotFoundExceptionRes = async (parsedOutput, context)
3666
3446
  };
3667
3447
  const de_DestinationParentNotFoundExceptionRes = async (parsedOutput, context) => {
3668
3448
  const body = parsedOutput.body;
3669
- const deserialized = de_DestinationParentNotFoundException(body, context);
3449
+ const deserialized = (0, smithy_client_1._json)(body);
3670
3450
  const exception = new models_0_1.DestinationParentNotFoundException({
3671
3451
  $metadata: deserializeMetadata(parsedOutput),
3672
3452
  ...deserialized,
@@ -3675,7 +3455,7 @@ const de_DestinationParentNotFoundExceptionRes = async (parsedOutput, context) =
3675
3455
  };
3676
3456
  const de_DuplicateAccountExceptionRes = async (parsedOutput, context) => {
3677
3457
  const body = parsedOutput.body;
3678
- const deserialized = de_DuplicateAccountException(body, context);
3458
+ const deserialized = (0, smithy_client_1._json)(body);
3679
3459
  const exception = new models_0_1.DuplicateAccountException({
3680
3460
  $metadata: deserializeMetadata(parsedOutput),
3681
3461
  ...deserialized,
@@ -3684,7 +3464,7 @@ const de_DuplicateAccountExceptionRes = async (parsedOutput, context) => {
3684
3464
  };
3685
3465
  const de_DuplicateHandshakeExceptionRes = async (parsedOutput, context) => {
3686
3466
  const body = parsedOutput.body;
3687
- const deserialized = de_DuplicateHandshakeException(body, context);
3467
+ const deserialized = (0, smithy_client_1._json)(body);
3688
3468
  const exception = new models_0_1.DuplicateHandshakeException({
3689
3469
  $metadata: deserializeMetadata(parsedOutput),
3690
3470
  ...deserialized,
@@ -3693,7 +3473,7 @@ const de_DuplicateHandshakeExceptionRes = async (parsedOutput, context) => {
3693
3473
  };
3694
3474
  const de_DuplicateOrganizationalUnitExceptionRes = async (parsedOutput, context) => {
3695
3475
  const body = parsedOutput.body;
3696
- const deserialized = de_DuplicateOrganizationalUnitException(body, context);
3476
+ const deserialized = (0, smithy_client_1._json)(body);
3697
3477
  const exception = new models_0_1.DuplicateOrganizationalUnitException({
3698
3478
  $metadata: deserializeMetadata(parsedOutput),
3699
3479
  ...deserialized,
@@ -3702,7 +3482,7 @@ const de_DuplicateOrganizationalUnitExceptionRes = async (parsedOutput, context)
3702
3482
  };
3703
3483
  const de_DuplicatePolicyAttachmentExceptionRes = async (parsedOutput, context) => {
3704
3484
  const body = parsedOutput.body;
3705
- const deserialized = de_DuplicatePolicyAttachmentException(body, context);
3485
+ const deserialized = (0, smithy_client_1._json)(body);
3706
3486
  const exception = new models_0_1.DuplicatePolicyAttachmentException({
3707
3487
  $metadata: deserializeMetadata(parsedOutput),
3708
3488
  ...deserialized,
@@ -3711,7 +3491,7 @@ const de_DuplicatePolicyAttachmentExceptionRes = async (parsedOutput, context) =
3711
3491
  };
3712
3492
  const de_DuplicatePolicyExceptionRes = async (parsedOutput, context) => {
3713
3493
  const body = parsedOutput.body;
3714
- const deserialized = de_DuplicatePolicyException(body, context);
3494
+ const deserialized = (0, smithy_client_1._json)(body);
3715
3495
  const exception = new models_0_1.DuplicatePolicyException({
3716
3496
  $metadata: deserializeMetadata(parsedOutput),
3717
3497
  ...deserialized,
@@ -3720,7 +3500,7 @@ const de_DuplicatePolicyExceptionRes = async (parsedOutput, context) => {
3720
3500
  };
3721
3501
  const de_EffectivePolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3722
3502
  const body = parsedOutput.body;
3723
- const deserialized = de_EffectivePolicyNotFoundException(body, context);
3503
+ const deserialized = (0, smithy_client_1._json)(body);
3724
3504
  const exception = new models_0_1.EffectivePolicyNotFoundException({
3725
3505
  $metadata: deserializeMetadata(parsedOutput),
3726
3506
  ...deserialized,
@@ -3729,7 +3509,7 @@ const de_EffectivePolicyNotFoundExceptionRes = async (parsedOutput, context) =>
3729
3509
  };
3730
3510
  const de_FinalizingOrganizationExceptionRes = async (parsedOutput, context) => {
3731
3511
  const body = parsedOutput.body;
3732
- const deserialized = de_FinalizingOrganizationException(body, context);
3512
+ const deserialized = (0, smithy_client_1._json)(body);
3733
3513
  const exception = new models_0_1.FinalizingOrganizationException({
3734
3514
  $metadata: deserializeMetadata(parsedOutput),
3735
3515
  ...deserialized,
@@ -3738,7 +3518,7 @@ const de_FinalizingOrganizationExceptionRes = async (parsedOutput, context) => {
3738
3518
  };
3739
3519
  const de_HandshakeAlreadyInStateExceptionRes = async (parsedOutput, context) => {
3740
3520
  const body = parsedOutput.body;
3741
- const deserialized = de_HandshakeAlreadyInStateException(body, context);
3521
+ const deserialized = (0, smithy_client_1._json)(body);
3742
3522
  const exception = new models_0_1.HandshakeAlreadyInStateException({
3743
3523
  $metadata: deserializeMetadata(parsedOutput),
3744
3524
  ...deserialized,
@@ -3747,7 +3527,7 @@ const de_HandshakeAlreadyInStateExceptionRes = async (parsedOutput, context) =>
3747
3527
  };
3748
3528
  const de_HandshakeConstraintViolationExceptionRes = async (parsedOutput, context) => {
3749
3529
  const body = parsedOutput.body;
3750
- const deserialized = de_HandshakeConstraintViolationException(body, context);
3530
+ const deserialized = (0, smithy_client_1._json)(body);
3751
3531
  const exception = new models_0_1.HandshakeConstraintViolationException({
3752
3532
  $metadata: deserializeMetadata(parsedOutput),
3753
3533
  ...deserialized,
@@ -3756,7 +3536,7 @@ const de_HandshakeConstraintViolationExceptionRes = async (parsedOutput, context
3756
3536
  };
3757
3537
  const de_HandshakeNotFoundExceptionRes = async (parsedOutput, context) => {
3758
3538
  const body = parsedOutput.body;
3759
- const deserialized = de_HandshakeNotFoundException(body, context);
3539
+ const deserialized = (0, smithy_client_1._json)(body);
3760
3540
  const exception = new models_0_1.HandshakeNotFoundException({
3761
3541
  $metadata: deserializeMetadata(parsedOutput),
3762
3542
  ...deserialized,
@@ -3765,7 +3545,7 @@ const de_HandshakeNotFoundExceptionRes = async (parsedOutput, context) => {
3765
3545
  };
3766
3546
  const de_InvalidHandshakeTransitionExceptionRes = async (parsedOutput, context) => {
3767
3547
  const body = parsedOutput.body;
3768
- const deserialized = de_InvalidHandshakeTransitionException(body, context);
3548
+ const deserialized = (0, smithy_client_1._json)(body);
3769
3549
  const exception = new models_0_1.InvalidHandshakeTransitionException({
3770
3550
  $metadata: deserializeMetadata(parsedOutput),
3771
3551
  ...deserialized,
@@ -3774,7 +3554,7 @@ const de_InvalidHandshakeTransitionExceptionRes = async (parsedOutput, context)
3774
3554
  };
3775
3555
  const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
3776
3556
  const body = parsedOutput.body;
3777
- const deserialized = de_InvalidInputException(body, context);
3557
+ const deserialized = (0, smithy_client_1._json)(body);
3778
3558
  const exception = new models_0_1.InvalidInputException({
3779
3559
  $metadata: deserializeMetadata(parsedOutput),
3780
3560
  ...deserialized,
@@ -3783,7 +3563,7 @@ const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
3783
3563
  };
3784
3564
  const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
3785
3565
  const body = parsedOutput.body;
3786
- const deserialized = de_MalformedPolicyDocumentException(body, context);
3566
+ const deserialized = (0, smithy_client_1._json)(body);
3787
3567
  const exception = new models_0_1.MalformedPolicyDocumentException({
3788
3568
  $metadata: deserializeMetadata(parsedOutput),
3789
3569
  ...deserialized,
@@ -3792,7 +3572,7 @@ const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) =>
3792
3572
  };
3793
3573
  const de_MasterCannotLeaveOrganizationExceptionRes = async (parsedOutput, context) => {
3794
3574
  const body = parsedOutput.body;
3795
- const deserialized = de_MasterCannotLeaveOrganizationException(body, context);
3575
+ const deserialized = (0, smithy_client_1._json)(body);
3796
3576
  const exception = new models_0_1.MasterCannotLeaveOrganizationException({
3797
3577
  $metadata: deserializeMetadata(parsedOutput),
3798
3578
  ...deserialized,
@@ -3801,7 +3581,7 @@ const de_MasterCannotLeaveOrganizationExceptionRes = async (parsedOutput, contex
3801
3581
  };
3802
3582
  const de_OrganizationalUnitNotEmptyExceptionRes = async (parsedOutput, context) => {
3803
3583
  const body = parsedOutput.body;
3804
- const deserialized = de_OrganizationalUnitNotEmptyException(body, context);
3584
+ const deserialized = (0, smithy_client_1._json)(body);
3805
3585
  const exception = new models_0_1.OrganizationalUnitNotEmptyException({
3806
3586
  $metadata: deserializeMetadata(parsedOutput),
3807
3587
  ...deserialized,
@@ -3810,7 +3590,7 @@ const de_OrganizationalUnitNotEmptyExceptionRes = async (parsedOutput, context)
3810
3590
  };
3811
3591
  const de_OrganizationalUnitNotFoundExceptionRes = async (parsedOutput, context) => {
3812
3592
  const body = parsedOutput.body;
3813
- const deserialized = de_OrganizationalUnitNotFoundException(body, context);
3593
+ const deserialized = (0, smithy_client_1._json)(body);
3814
3594
  const exception = new models_0_1.OrganizationalUnitNotFoundException({
3815
3595
  $metadata: deserializeMetadata(parsedOutput),
3816
3596
  ...deserialized,
@@ -3819,7 +3599,7 @@ const de_OrganizationalUnitNotFoundExceptionRes = async (parsedOutput, context)
3819
3599
  };
3820
3600
  const de_OrganizationNotEmptyExceptionRes = async (parsedOutput, context) => {
3821
3601
  const body = parsedOutput.body;
3822
- const deserialized = de_OrganizationNotEmptyException(body, context);
3602
+ const deserialized = (0, smithy_client_1._json)(body);
3823
3603
  const exception = new models_0_1.OrganizationNotEmptyException({
3824
3604
  $metadata: deserializeMetadata(parsedOutput),
3825
3605
  ...deserialized,
@@ -3828,7 +3608,7 @@ const de_OrganizationNotEmptyExceptionRes = async (parsedOutput, context) => {
3828
3608
  };
3829
3609
  const de_ParentNotFoundExceptionRes = async (parsedOutput, context) => {
3830
3610
  const body = parsedOutput.body;
3831
- const deserialized = de_ParentNotFoundException(body, context);
3611
+ const deserialized = (0, smithy_client_1._json)(body);
3832
3612
  const exception = new models_0_1.ParentNotFoundException({
3833
3613
  $metadata: deserializeMetadata(parsedOutput),
3834
3614
  ...deserialized,
@@ -3837,7 +3617,7 @@ const de_ParentNotFoundExceptionRes = async (parsedOutput, context) => {
3837
3617
  };
3838
3618
  const de_PolicyChangesInProgressExceptionRes = async (parsedOutput, context) => {
3839
3619
  const body = parsedOutput.body;
3840
- const deserialized = de_PolicyChangesInProgressException(body, context);
3620
+ const deserialized = (0, smithy_client_1._json)(body);
3841
3621
  const exception = new models_0_1.PolicyChangesInProgressException({
3842
3622
  $metadata: deserializeMetadata(parsedOutput),
3843
3623
  ...deserialized,
@@ -3846,7 +3626,7 @@ const de_PolicyChangesInProgressExceptionRes = async (parsedOutput, context) =>
3846
3626
  };
3847
3627
  const de_PolicyInUseExceptionRes = async (parsedOutput, context) => {
3848
3628
  const body = parsedOutput.body;
3849
- const deserialized = de_PolicyInUseException(body, context);
3629
+ const deserialized = (0, smithy_client_1._json)(body);
3850
3630
  const exception = new models_0_1.PolicyInUseException({
3851
3631
  $metadata: deserializeMetadata(parsedOutput),
3852
3632
  ...deserialized,
@@ -3855,7 +3635,7 @@ const de_PolicyInUseExceptionRes = async (parsedOutput, context) => {
3855
3635
  };
3856
3636
  const de_PolicyNotAttachedExceptionRes = async (parsedOutput, context) => {
3857
3637
  const body = parsedOutput.body;
3858
- const deserialized = de_PolicyNotAttachedException(body, context);
3638
+ const deserialized = (0, smithy_client_1._json)(body);
3859
3639
  const exception = new models_0_1.PolicyNotAttachedException({
3860
3640
  $metadata: deserializeMetadata(parsedOutput),
3861
3641
  ...deserialized,
@@ -3864,7 +3644,7 @@ const de_PolicyNotAttachedExceptionRes = async (parsedOutput, context) => {
3864
3644
  };
3865
3645
  const de_PolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3866
3646
  const body = parsedOutput.body;
3867
- const deserialized = de_PolicyNotFoundException(body, context);
3647
+ const deserialized = (0, smithy_client_1._json)(body);
3868
3648
  const exception = new models_0_1.PolicyNotFoundException({
3869
3649
  $metadata: deserializeMetadata(parsedOutput),
3870
3650
  ...deserialized,
@@ -3873,7 +3653,7 @@ const de_PolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3873
3653
  };
3874
3654
  const de_PolicyTypeAlreadyEnabledExceptionRes = async (parsedOutput, context) => {
3875
3655
  const body = parsedOutput.body;
3876
- const deserialized = de_PolicyTypeAlreadyEnabledException(body, context);
3656
+ const deserialized = (0, smithy_client_1._json)(body);
3877
3657
  const exception = new models_0_1.PolicyTypeAlreadyEnabledException({
3878
3658
  $metadata: deserializeMetadata(parsedOutput),
3879
3659
  ...deserialized,
@@ -3882,7 +3662,7 @@ const de_PolicyTypeAlreadyEnabledExceptionRes = async (parsedOutput, context) =>
3882
3662
  };
3883
3663
  const de_PolicyTypeNotAvailableForOrganizationExceptionRes = async (parsedOutput, context) => {
3884
3664
  const body = parsedOutput.body;
3885
- const deserialized = de_PolicyTypeNotAvailableForOrganizationException(body, context);
3665
+ const deserialized = (0, smithy_client_1._json)(body);
3886
3666
  const exception = new models_0_1.PolicyTypeNotAvailableForOrganizationException({
3887
3667
  $metadata: deserializeMetadata(parsedOutput),
3888
3668
  ...deserialized,
@@ -3891,7 +3671,7 @@ const de_PolicyTypeNotAvailableForOrganizationExceptionRes = async (parsedOutput
3891
3671
  };
3892
3672
  const de_PolicyTypeNotEnabledExceptionRes = async (parsedOutput, context) => {
3893
3673
  const body = parsedOutput.body;
3894
- const deserialized = de_PolicyTypeNotEnabledException(body, context);
3674
+ const deserialized = (0, smithy_client_1._json)(body);
3895
3675
  const exception = new models_0_1.PolicyTypeNotEnabledException({
3896
3676
  $metadata: deserializeMetadata(parsedOutput),
3897
3677
  ...deserialized,
@@ -3900,7 +3680,7 @@ const de_PolicyTypeNotEnabledExceptionRes = async (parsedOutput, context) => {
3900
3680
  };
3901
3681
  const de_ResourcePolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3902
3682
  const body = parsedOutput.body;
3903
- const deserialized = de_ResourcePolicyNotFoundException(body, context);
3683
+ const deserialized = (0, smithy_client_1._json)(body);
3904
3684
  const exception = new models_0_1.ResourcePolicyNotFoundException({
3905
3685
  $metadata: deserializeMetadata(parsedOutput),
3906
3686
  ...deserialized,
@@ -3909,7 +3689,7 @@ const de_ResourcePolicyNotFoundExceptionRes = async (parsedOutput, context) => {
3909
3689
  };
3910
3690
  const de_RootNotFoundExceptionRes = async (parsedOutput, context) => {
3911
3691
  const body = parsedOutput.body;
3912
- const deserialized = de_RootNotFoundException(body, context);
3692
+ const deserialized = (0, smithy_client_1._json)(body);
3913
3693
  const exception = new models_0_1.RootNotFoundException({
3914
3694
  $metadata: deserializeMetadata(parsedOutput),
3915
3695
  ...deserialized,
@@ -3918,7 +3698,7 @@ const de_RootNotFoundExceptionRes = async (parsedOutput, context) => {
3918
3698
  };
3919
3699
  const de_ServiceExceptionRes = async (parsedOutput, context) => {
3920
3700
  const body = parsedOutput.body;
3921
- const deserialized = de_ServiceException(body, context);
3701
+ const deserialized = (0, smithy_client_1._json)(body);
3922
3702
  const exception = new models_0_1.ServiceException({
3923
3703
  $metadata: deserializeMetadata(parsedOutput),
3924
3704
  ...deserialized,
@@ -3927,7 +3707,7 @@ const de_ServiceExceptionRes = async (parsedOutput, context) => {
3927
3707
  };
3928
3708
  const de_SourceParentNotFoundExceptionRes = async (parsedOutput, context) => {
3929
3709
  const body = parsedOutput.body;
3930
- const deserialized = de_SourceParentNotFoundException(body, context);
3710
+ const deserialized = (0, smithy_client_1._json)(body);
3931
3711
  const exception = new models_0_1.SourceParentNotFoundException({
3932
3712
  $metadata: deserializeMetadata(parsedOutput),
3933
3713
  ...deserialized,
@@ -3936,7 +3716,7 @@ const de_SourceParentNotFoundExceptionRes = async (parsedOutput, context) => {
3936
3716
  };
3937
3717
  const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
3938
3718
  const body = parsedOutput.body;
3939
- const deserialized = de_TargetNotFoundException(body, context);
3719
+ const deserialized = (0, smithy_client_1._json)(body);
3940
3720
  const exception = new models_0_1.TargetNotFoundException({
3941
3721
  $metadata: deserializeMetadata(parsedOutput),
3942
3722
  ...deserialized,
@@ -3945,7 +3725,7 @@ const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
3945
3725
  };
3946
3726
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
3947
3727
  const body = parsedOutput.body;
3948
- const deserialized = de_TooManyRequestsException(body, context);
3728
+ const deserialized = (0, smithy_client_1._json)(body);
3949
3729
  const exception = new models_0_1.TooManyRequestsException({
3950
3730
  $metadata: deserializeMetadata(parsedOutput),
3951
3731
  ...deserialized,
@@ -3954,1182 +3734,245 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
3954
3734
  };
3955
3735
  const de_UnsupportedAPIEndpointExceptionRes = async (parsedOutput, context) => {
3956
3736
  const body = parsedOutput.body;
3957
- const deserialized = de_UnsupportedAPIEndpointException(body, context);
3737
+ const deserialized = (0, smithy_client_1._json)(body);
3958
3738
  const exception = new models_0_1.UnsupportedAPIEndpointException({
3959
3739
  $metadata: deserializeMetadata(parsedOutput),
3960
3740
  ...deserialized,
3961
3741
  });
3962
3742
  return (0, smithy_client_1.decorateServiceException)(exception, body);
3963
3743
  };
3964
- const se_AcceptHandshakeRequest = (input, context) => {
3965
- return {
3966
- ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }),
3967
- };
3744
+ const de_AcceptHandshakeResponse = (output, context) => {
3745
+ return (0, smithy_client_1.take)(output, {
3746
+ Handshake: (_) => de_Handshake(_, context),
3747
+ });
3968
3748
  };
3969
- const se_AttachPolicyRequest = (input, context) => {
3970
- return {
3971
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
3972
- ...(input.TargetId != null && { TargetId: input.TargetId }),
3973
- };
3749
+ const de_Account = (output, context) => {
3750
+ return (0, smithy_client_1.take)(output, {
3751
+ Arn: smithy_client_1.expectString,
3752
+ Email: smithy_client_1.expectString,
3753
+ Id: smithy_client_1.expectString,
3754
+ JoinedMethod: smithy_client_1.expectString,
3755
+ JoinedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3756
+ Name: smithy_client_1.expectString,
3757
+ Status: smithy_client_1.expectString,
3758
+ });
3974
3759
  };
3975
- const se_CancelHandshakeRequest = (input, context) => {
3976
- return {
3977
- ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }),
3978
- };
3760
+ const de_Accounts = (output, context) => {
3761
+ const retVal = (output || [])
3762
+ .filter((e) => e != null)
3763
+ .map((entry) => {
3764
+ return de_Account(entry, context);
3765
+ });
3766
+ return retVal;
3979
3767
  };
3980
- const se_CloseAccountRequest = (input, context) => {
3981
- return {
3982
- ...(input.AccountId != null && { AccountId: input.AccountId }),
3983
- };
3768
+ const de_CancelHandshakeResponse = (output, context) => {
3769
+ return (0, smithy_client_1.take)(output, {
3770
+ Handshake: (_) => de_Handshake(_, context),
3771
+ });
3984
3772
  };
3985
- const se_CreateAccountRequest = (input, context) => {
3986
- return {
3987
- ...(input.AccountName != null && { AccountName: input.AccountName }),
3988
- ...(input.Email != null && { Email: input.Email }),
3989
- ...(input.IamUserAccessToBilling != null && { IamUserAccessToBilling: input.IamUserAccessToBilling }),
3990
- ...(input.RoleName != null && { RoleName: input.RoleName }),
3991
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
3992
- };
3773
+ const de_CreateAccountResponse = (output, context) => {
3774
+ return (0, smithy_client_1.take)(output, {
3775
+ CreateAccountStatus: (_) => de_CreateAccountStatus(_, context),
3776
+ });
3777
+ };
3778
+ const de_CreateAccountStatus = (output, context) => {
3779
+ return (0, smithy_client_1.take)(output, {
3780
+ AccountId: smithy_client_1.expectString,
3781
+ AccountName: smithy_client_1.expectString,
3782
+ CompletedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3783
+ FailureReason: smithy_client_1.expectString,
3784
+ GovCloudAccountId: smithy_client_1.expectString,
3785
+ Id: smithy_client_1.expectString,
3786
+ RequestedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3787
+ State: smithy_client_1.expectString,
3788
+ });
3993
3789
  };
3994
- const se_CreateAccountStates = (input, context) => {
3995
- return input
3790
+ const de_CreateAccountStatuses = (output, context) => {
3791
+ const retVal = (output || [])
3996
3792
  .filter((e) => e != null)
3997
3793
  .map((entry) => {
3998
- return entry;
3794
+ return de_CreateAccountStatus(entry, context);
3999
3795
  });
3796
+ return retVal;
4000
3797
  };
4001
- const se_CreateGovCloudAccountRequest = (input, context) => {
4002
- return {
4003
- ...(input.AccountName != null && { AccountName: input.AccountName }),
4004
- ...(input.Email != null && { Email: input.Email }),
4005
- ...(input.IamUserAccessToBilling != null && { IamUserAccessToBilling: input.IamUserAccessToBilling }),
4006
- ...(input.RoleName != null && { RoleName: input.RoleName }),
4007
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
4008
- };
3798
+ const de_CreateGovCloudAccountResponse = (output, context) => {
3799
+ return (0, smithy_client_1.take)(output, {
3800
+ CreateAccountStatus: (_) => de_CreateAccountStatus(_, context),
3801
+ });
4009
3802
  };
4010
- const se_CreateOrganizationalUnitRequest = (input, context) => {
4011
- return {
4012
- ...(input.Name != null && { Name: input.Name }),
4013
- ...(input.ParentId != null && { ParentId: input.ParentId }),
4014
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
4015
- };
3803
+ const de_DeclineHandshakeResponse = (output, context) => {
3804
+ return (0, smithy_client_1.take)(output, {
3805
+ Handshake: (_) => de_Handshake(_, context),
3806
+ });
4016
3807
  };
4017
- const se_CreateOrganizationRequest = (input, context) => {
4018
- return {
4019
- ...(input.FeatureSet != null && { FeatureSet: input.FeatureSet }),
4020
- };
3808
+ const de_DelegatedAdministrator = (output, context) => {
3809
+ return (0, smithy_client_1.take)(output, {
3810
+ Arn: smithy_client_1.expectString,
3811
+ DelegationEnabledDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3812
+ Email: smithy_client_1.expectString,
3813
+ Id: smithy_client_1.expectString,
3814
+ JoinedMethod: smithy_client_1.expectString,
3815
+ JoinedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3816
+ Name: smithy_client_1.expectString,
3817
+ Status: smithy_client_1.expectString,
3818
+ });
4021
3819
  };
4022
- const se_CreatePolicyRequest = (input, context) => {
4023
- return {
4024
- ...(input.Content != null && { Content: input.Content }),
4025
- ...(input.Description != null && { Description: input.Description }),
4026
- ...(input.Name != null && { Name: input.Name }),
4027
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
4028
- ...(input.Type != null && { Type: input.Type }),
4029
- };
3820
+ const de_DelegatedAdministrators = (output, context) => {
3821
+ const retVal = (output || [])
3822
+ .filter((e) => e != null)
3823
+ .map((entry) => {
3824
+ return de_DelegatedAdministrator(entry, context);
3825
+ });
3826
+ return retVal;
4030
3827
  };
4031
- const se_DeclineHandshakeRequest = (input, context) => {
4032
- return {
4033
- ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }),
4034
- };
3828
+ const de_DelegatedService = (output, context) => {
3829
+ return (0, smithy_client_1.take)(output, {
3830
+ DelegationEnabledDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3831
+ ServicePrincipal: smithy_client_1.expectString,
3832
+ });
4035
3833
  };
4036
- const se_DeleteOrganizationalUnitRequest = (input, context) => {
4037
- return {
4038
- ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }),
4039
- };
3834
+ const de_DelegatedServices = (output, context) => {
3835
+ const retVal = (output || [])
3836
+ .filter((e) => e != null)
3837
+ .map((entry) => {
3838
+ return de_DelegatedService(entry, context);
3839
+ });
3840
+ return retVal;
4040
3841
  };
4041
- const se_DeletePolicyRequest = (input, context) => {
4042
- return {
4043
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
4044
- };
3842
+ const de_DescribeAccountResponse = (output, context) => {
3843
+ return (0, smithy_client_1.take)(output, {
3844
+ Account: (_) => de_Account(_, context),
3845
+ });
4045
3846
  };
4046
- const se_DeregisterDelegatedAdministratorRequest = (input, context) => {
4047
- return {
4048
- ...(input.AccountId != null && { AccountId: input.AccountId }),
4049
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
4050
- };
3847
+ const de_DescribeCreateAccountStatusResponse = (output, context) => {
3848
+ return (0, smithy_client_1.take)(output, {
3849
+ CreateAccountStatus: (_) => de_CreateAccountStatus(_, context),
3850
+ });
4051
3851
  };
4052
- const se_DescribeAccountRequest = (input, context) => {
4053
- return {
4054
- ...(input.AccountId != null && { AccountId: input.AccountId }),
4055
- };
3852
+ const de_DescribeEffectivePolicyResponse = (output, context) => {
3853
+ return (0, smithy_client_1.take)(output, {
3854
+ EffectivePolicy: (_) => de_EffectivePolicy(_, context),
3855
+ });
4056
3856
  };
4057
- const se_DescribeCreateAccountStatusRequest = (input, context) => {
4058
- return {
4059
- ...(input.CreateAccountRequestId != null && { CreateAccountRequestId: input.CreateAccountRequestId }),
4060
- };
3857
+ const de_DescribeHandshakeResponse = (output, context) => {
3858
+ return (0, smithy_client_1.take)(output, {
3859
+ Handshake: (_) => de_Handshake(_, context),
3860
+ });
4061
3861
  };
4062
- const se_DescribeEffectivePolicyRequest = (input, context) => {
4063
- return {
4064
- ...(input.PolicyType != null && { PolicyType: input.PolicyType }),
4065
- ...(input.TargetId != null && { TargetId: input.TargetId }),
4066
- };
3862
+ const de_EffectivePolicy = (output, context) => {
3863
+ return (0, smithy_client_1.take)(output, {
3864
+ LastUpdatedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3865
+ PolicyContent: smithy_client_1.expectString,
3866
+ PolicyType: smithy_client_1.expectString,
3867
+ TargetId: smithy_client_1.expectString,
3868
+ });
4067
3869
  };
4068
- const se_DescribeHandshakeRequest = (input, context) => {
4069
- return {
4070
- ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }),
4071
- };
3870
+ const de_EnableAllFeaturesResponse = (output, context) => {
3871
+ return (0, smithy_client_1.take)(output, {
3872
+ Handshake: (_) => de_Handshake(_, context),
3873
+ });
4072
3874
  };
4073
- const se_DescribeOrganizationalUnitRequest = (input, context) => {
4074
- return {
4075
- ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }),
4076
- };
3875
+ const de_EnabledServicePrincipal = (output, context) => {
3876
+ return (0, smithy_client_1.take)(output, {
3877
+ DateEnabled: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3878
+ ServicePrincipal: smithy_client_1.expectString,
3879
+ });
4077
3880
  };
4078
- const se_DescribePolicyRequest = (input, context) => {
4079
- return {
4080
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
4081
- };
3881
+ const de_EnabledServicePrincipals = (output, context) => {
3882
+ const retVal = (output || [])
3883
+ .filter((e) => e != null)
3884
+ .map((entry) => {
3885
+ return de_EnabledServicePrincipal(entry, context);
3886
+ });
3887
+ return retVal;
4082
3888
  };
4083
- const se_DetachPolicyRequest = (input, context) => {
4084
- return {
4085
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
4086
- ...(input.TargetId != null && { TargetId: input.TargetId }),
4087
- };
3889
+ const de_Handshake = (output, context) => {
3890
+ return (0, smithy_client_1.take)(output, {
3891
+ Action: smithy_client_1.expectString,
3892
+ Arn: smithy_client_1.expectString,
3893
+ ExpirationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3894
+ Id: smithy_client_1.expectString,
3895
+ Parties: smithy_client_1._json,
3896
+ RequestedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3897
+ Resources: (_) => de_HandshakeResources(_, context),
3898
+ State: smithy_client_1.expectString,
3899
+ });
4088
3900
  };
4089
- const se_DisableAWSServiceAccessRequest = (input, context) => {
4090
- return {
4091
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
4092
- };
3901
+ const de_HandshakeResource = (output, context) => {
3902
+ return (0, smithy_client_1.take)(output, {
3903
+ Resources: (_) => de_HandshakeResources(_, context),
3904
+ Type: smithy_client_1.expectString,
3905
+ Value: smithy_client_1.expectString,
3906
+ });
4093
3907
  };
4094
- const se_DisablePolicyTypeRequest = (input, context) => {
4095
- return {
4096
- ...(input.PolicyType != null && { PolicyType: input.PolicyType }),
4097
- ...(input.RootId != null && { RootId: input.RootId }),
4098
- };
3908
+ const de_HandshakeResources = (output, context) => {
3909
+ const retVal = (output || [])
3910
+ .filter((e) => e != null)
3911
+ .map((entry) => {
3912
+ return de_HandshakeResource(entry, context);
3913
+ });
3914
+ return retVal;
4099
3915
  };
4100
- const se_EnableAllFeaturesRequest = (input, context) => {
4101
- return {};
3916
+ const de_Handshakes = (output, context) => {
3917
+ const retVal = (output || [])
3918
+ .filter((e) => e != null)
3919
+ .map((entry) => {
3920
+ return de_Handshake(entry, context);
3921
+ });
3922
+ return retVal;
4102
3923
  };
4103
- const se_EnableAWSServiceAccessRequest = (input, context) => {
4104
- return {
4105
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
4106
- };
3924
+ const de_InviteAccountToOrganizationResponse = (output, context) => {
3925
+ return (0, smithy_client_1.take)(output, {
3926
+ Handshake: (_) => de_Handshake(_, context),
3927
+ });
4107
3928
  };
4108
- const se_EnablePolicyTypeRequest = (input, context) => {
4109
- return {
4110
- ...(input.PolicyType != null && { PolicyType: input.PolicyType }),
4111
- ...(input.RootId != null && { RootId: input.RootId }),
4112
- };
3929
+ const de_ListAccountsForParentResponse = (output, context) => {
3930
+ return (0, smithy_client_1.take)(output, {
3931
+ Accounts: (_) => de_Accounts(_, context),
3932
+ NextToken: smithy_client_1.expectString,
3933
+ });
4113
3934
  };
4114
- const se_HandshakeFilter = (input, context) => {
4115
- return {
4116
- ...(input.ActionType != null && { ActionType: input.ActionType }),
4117
- ...(input.ParentHandshakeId != null && { ParentHandshakeId: input.ParentHandshakeId }),
4118
- };
3935
+ const de_ListAccountsResponse = (output, context) => {
3936
+ return (0, smithy_client_1.take)(output, {
3937
+ Accounts: (_) => de_Accounts(_, context),
3938
+ NextToken: smithy_client_1.expectString,
3939
+ });
4119
3940
  };
4120
- const se_HandshakeParty = (input, context) => {
4121
- return {
4122
- ...(input.Id != null && { Id: input.Id }),
4123
- ...(input.Type != null && { Type: input.Type }),
4124
- };
4125
- };
4126
- const se_InviteAccountToOrganizationRequest = (input, context) => {
4127
- return {
4128
- ...(input.Notes != null && { Notes: input.Notes }),
4129
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
4130
- ...(input.Target != null && { Target: se_HandshakeParty(input.Target, context) }),
4131
- };
4132
- };
4133
- const se_ListAccountsForParentRequest = (input, context) => {
4134
- return {
4135
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4136
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4137
- ...(input.ParentId != null && { ParentId: input.ParentId }),
4138
- };
4139
- };
4140
- const se_ListAccountsRequest = (input, context) => {
4141
- return {
4142
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4143
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4144
- };
4145
- };
4146
- const se_ListAWSServiceAccessForOrganizationRequest = (input, context) => {
4147
- return {
4148
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4149
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4150
- };
4151
- };
4152
- const se_ListChildrenRequest = (input, context) => {
4153
- return {
4154
- ...(input.ChildType != null && { ChildType: input.ChildType }),
4155
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4156
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4157
- ...(input.ParentId != null && { ParentId: input.ParentId }),
4158
- };
4159
- };
4160
- const se_ListCreateAccountStatusRequest = (input, context) => {
4161
- return {
4162
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4163
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4164
- ...(input.States != null && { States: se_CreateAccountStates(input.States, context) }),
4165
- };
4166
- };
4167
- const se_ListDelegatedAdministratorsRequest = (input, context) => {
4168
- return {
4169
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4170
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4171
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
4172
- };
4173
- };
4174
- const se_ListDelegatedServicesForAccountRequest = (input, context) => {
4175
- return {
4176
- ...(input.AccountId != null && { AccountId: input.AccountId }),
4177
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4178
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4179
- };
4180
- };
4181
- const se_ListHandshakesForAccountRequest = (input, context) => {
4182
- return {
4183
- ...(input.Filter != null && { Filter: se_HandshakeFilter(input.Filter, context) }),
4184
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4185
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4186
- };
4187
- };
4188
- const se_ListHandshakesForOrganizationRequest = (input, context) => {
4189
- return {
4190
- ...(input.Filter != null && { Filter: se_HandshakeFilter(input.Filter, context) }),
4191
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4192
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4193
- };
4194
- };
4195
- const se_ListOrganizationalUnitsForParentRequest = (input, context) => {
4196
- return {
4197
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4198
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4199
- ...(input.ParentId != null && { ParentId: input.ParentId }),
4200
- };
4201
- };
4202
- const se_ListParentsRequest = (input, context) => {
4203
- return {
4204
- ...(input.ChildId != null && { ChildId: input.ChildId }),
4205
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4206
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4207
- };
4208
- };
4209
- const se_ListPoliciesForTargetRequest = (input, context) => {
4210
- return {
4211
- ...(input.Filter != null && { Filter: input.Filter }),
4212
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4213
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4214
- ...(input.TargetId != null && { TargetId: input.TargetId }),
4215
- };
4216
- };
4217
- const se_ListPoliciesRequest = (input, context) => {
4218
- return {
4219
- ...(input.Filter != null && { Filter: input.Filter }),
4220
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4221
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4222
- };
4223
- };
4224
- const se_ListRootsRequest = (input, context) => {
4225
- return {
4226
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4227
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4228
- };
4229
- };
4230
- const se_ListTagsForResourceRequest = (input, context) => {
4231
- return {
4232
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4233
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
4234
- };
4235
- };
4236
- const se_ListTargetsForPolicyRequest = (input, context) => {
4237
- return {
4238
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
4239
- ...(input.NextToken != null && { NextToken: input.NextToken }),
4240
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
4241
- };
4242
- };
4243
- const se_MoveAccountRequest = (input, context) => {
4244
- return {
4245
- ...(input.AccountId != null && { AccountId: input.AccountId }),
4246
- ...(input.DestinationParentId != null && { DestinationParentId: input.DestinationParentId }),
4247
- ...(input.SourceParentId != null && { SourceParentId: input.SourceParentId }),
4248
- };
4249
- };
4250
- const se_PutResourcePolicyRequest = (input, context) => {
4251
- return {
4252
- ...(input.Content != null && { Content: input.Content }),
4253
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
4254
- };
4255
- };
4256
- const se_RegisterDelegatedAdministratorRequest = (input, context) => {
4257
- return {
4258
- ...(input.AccountId != null && { AccountId: input.AccountId }),
4259
- ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }),
4260
- };
4261
- };
4262
- const se_RemoveAccountFromOrganizationRequest = (input, context) => {
4263
- return {
4264
- ...(input.AccountId != null && { AccountId: input.AccountId }),
4265
- };
4266
- };
4267
- const se_Tag = (input, context) => {
4268
- return {
4269
- ...(input.Key != null && { Key: input.Key }),
4270
- ...(input.Value != null && { Value: input.Value }),
4271
- };
4272
- };
4273
- const se_TagKeys = (input, context) => {
4274
- return input
4275
- .filter((e) => e != null)
4276
- .map((entry) => {
4277
- return entry;
4278
- });
4279
- };
4280
- const se_TagResourceRequest = (input, context) => {
4281
- return {
4282
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
4283
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
4284
- };
4285
- };
4286
- const se_Tags = (input, context) => {
4287
- return input
4288
- .filter((e) => e != null)
4289
- .map((entry) => {
4290
- return se_Tag(entry, context);
4291
- });
4292
- };
4293
- const se_UntagResourceRequest = (input, context) => {
4294
- return {
4295
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
4296
- ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }),
4297
- };
4298
- };
4299
- const se_UpdateOrganizationalUnitRequest = (input, context) => {
4300
- return {
4301
- ...(input.Name != null && { Name: input.Name }),
4302
- ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }),
4303
- };
4304
- };
4305
- const se_UpdatePolicyRequest = (input, context) => {
4306
- return {
4307
- ...(input.Content != null && { Content: input.Content }),
4308
- ...(input.Description != null && { Description: input.Description }),
4309
- ...(input.Name != null && { Name: input.Name }),
4310
- ...(input.PolicyId != null && { PolicyId: input.PolicyId }),
4311
- };
4312
- };
4313
- const de_AcceptHandshakeResponse = (output, context) => {
4314
- return {
4315
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4316
- };
4317
- };
4318
- const de_AccessDeniedException = (output, context) => {
4319
- return {
4320
- Message: (0, smithy_client_1.expectString)(output.Message),
4321
- };
4322
- };
4323
- const de_AccessDeniedForDependencyException = (output, context) => {
4324
- return {
4325
- Message: (0, smithy_client_1.expectString)(output.Message),
4326
- Reason: (0, smithy_client_1.expectString)(output.Reason),
4327
- };
4328
- };
4329
- const de_Account = (output, context) => {
4330
- return {
4331
- Arn: (0, smithy_client_1.expectString)(output.Arn),
4332
- Email: (0, smithy_client_1.expectString)(output.Email),
4333
- Id: (0, smithy_client_1.expectString)(output.Id),
4334
- JoinedMethod: (0, smithy_client_1.expectString)(output.JoinedMethod),
4335
- JoinedTimestamp: output.JoinedTimestamp != null
4336
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.JoinedTimestamp)))
4337
- : undefined,
4338
- Name: (0, smithy_client_1.expectString)(output.Name),
4339
- Status: (0, smithy_client_1.expectString)(output.Status),
4340
- };
4341
- };
4342
- const de_AccountAlreadyClosedException = (output, context) => {
4343
- return {
4344
- Message: (0, smithy_client_1.expectString)(output.Message),
4345
- };
4346
- };
4347
- const de_AccountAlreadyRegisteredException = (output, context) => {
4348
- return {
4349
- Message: (0, smithy_client_1.expectString)(output.Message),
4350
- };
4351
- };
4352
- const de_AccountNotFoundException = (output, context) => {
4353
- return {
4354
- Message: (0, smithy_client_1.expectString)(output.Message),
4355
- };
4356
- };
4357
- const de_AccountNotRegisteredException = (output, context) => {
4358
- return {
4359
- Message: (0, smithy_client_1.expectString)(output.Message),
4360
- };
4361
- };
4362
- const de_AccountOwnerNotVerifiedException = (output, context) => {
4363
- return {
4364
- Message: (0, smithy_client_1.expectString)(output.Message),
4365
- };
4366
- };
4367
- const de_Accounts = (output, context) => {
4368
- const retVal = (output || [])
4369
- .filter((e) => e != null)
4370
- .map((entry) => {
4371
- if (entry === null) {
4372
- return null;
4373
- }
4374
- return de_Account(entry, context);
4375
- });
4376
- return retVal;
4377
- };
4378
- const de_AlreadyInOrganizationException = (output, context) => {
4379
- return {
4380
- Message: (0, smithy_client_1.expectString)(output.Message),
4381
- };
4382
- };
4383
- const de_AWSOrganizationsNotInUseException = (output, context) => {
4384
- return {
4385
- Message: (0, smithy_client_1.expectString)(output.Message),
4386
- };
4387
- };
4388
- const de_CancelHandshakeResponse = (output, context) => {
4389
- return {
4390
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4391
- };
4392
- };
4393
- const de_Child = (output, context) => {
4394
- return {
4395
- Id: (0, smithy_client_1.expectString)(output.Id),
4396
- Type: (0, smithy_client_1.expectString)(output.Type),
4397
- };
4398
- };
4399
- const de_ChildNotFoundException = (output, context) => {
4400
- return {
4401
- Message: (0, smithy_client_1.expectString)(output.Message),
4402
- };
4403
- };
4404
- const de_Children = (output, context) => {
4405
- const retVal = (output || [])
4406
- .filter((e) => e != null)
4407
- .map((entry) => {
4408
- if (entry === null) {
4409
- return null;
4410
- }
4411
- return de_Child(entry, context);
4412
- });
4413
- return retVal;
4414
- };
4415
- const de_ConcurrentModificationException = (output, context) => {
4416
- return {
4417
- Message: (0, smithy_client_1.expectString)(output.Message),
4418
- };
4419
- };
4420
- const de_ConflictException = (output, context) => {
4421
- return {
4422
- Message: (0, smithy_client_1.expectString)(output.Message),
4423
- };
4424
- };
4425
- const de_ConstraintViolationException = (output, context) => {
4426
- return {
4427
- Message: (0, smithy_client_1.expectString)(output.Message),
4428
- Reason: (0, smithy_client_1.expectString)(output.Reason),
4429
- };
4430
- };
4431
- const de_CreateAccountResponse = (output, context) => {
4432
- return {
4433
- CreateAccountStatus: output.CreateAccountStatus != null ? de_CreateAccountStatus(output.CreateAccountStatus, context) : undefined,
4434
- };
4435
- };
4436
- const de_CreateAccountStatus = (output, context) => {
4437
- return {
4438
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
4439
- AccountName: (0, smithy_client_1.expectString)(output.AccountName),
4440
- CompletedTimestamp: output.CompletedTimestamp != null
4441
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CompletedTimestamp)))
4442
- : undefined,
4443
- FailureReason: (0, smithy_client_1.expectString)(output.FailureReason),
4444
- GovCloudAccountId: (0, smithy_client_1.expectString)(output.GovCloudAccountId),
4445
- Id: (0, smithy_client_1.expectString)(output.Id),
4446
- RequestedTimestamp: output.RequestedTimestamp != null
4447
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.RequestedTimestamp)))
4448
- : undefined,
4449
- State: (0, smithy_client_1.expectString)(output.State),
4450
- };
4451
- };
4452
- const de_CreateAccountStatuses = (output, context) => {
4453
- const retVal = (output || [])
4454
- .filter((e) => e != null)
4455
- .map((entry) => {
4456
- if (entry === null) {
4457
- return null;
4458
- }
4459
- return de_CreateAccountStatus(entry, context);
4460
- });
4461
- return retVal;
4462
- };
4463
- const de_CreateAccountStatusNotFoundException = (output, context) => {
4464
- return {
4465
- Message: (0, smithy_client_1.expectString)(output.Message),
4466
- };
4467
- };
4468
- const de_CreateGovCloudAccountResponse = (output, context) => {
4469
- return {
4470
- CreateAccountStatus: output.CreateAccountStatus != null ? de_CreateAccountStatus(output.CreateAccountStatus, context) : undefined,
4471
- };
4472
- };
4473
- const de_CreateOrganizationalUnitResponse = (output, context) => {
4474
- return {
4475
- OrganizationalUnit: output.OrganizationalUnit != null ? de_OrganizationalUnit(output.OrganizationalUnit, context) : undefined,
4476
- };
4477
- };
4478
- const de_CreateOrganizationResponse = (output, context) => {
4479
- return {
4480
- Organization: output.Organization != null ? de_Organization(output.Organization, context) : undefined,
4481
- };
4482
- };
4483
- const de_CreatePolicyResponse = (output, context) => {
4484
- return {
4485
- Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined,
4486
- };
4487
- };
4488
- const de_DeclineHandshakeResponse = (output, context) => {
4489
- return {
4490
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4491
- };
4492
- };
4493
- const de_DelegatedAdministrator = (output, context) => {
4494
- return {
4495
- Arn: (0, smithy_client_1.expectString)(output.Arn),
4496
- DelegationEnabledDate: output.DelegationEnabledDate != null
4497
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DelegationEnabledDate)))
4498
- : undefined,
4499
- Email: (0, smithy_client_1.expectString)(output.Email),
4500
- Id: (0, smithy_client_1.expectString)(output.Id),
4501
- JoinedMethod: (0, smithy_client_1.expectString)(output.JoinedMethod),
4502
- JoinedTimestamp: output.JoinedTimestamp != null
4503
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.JoinedTimestamp)))
4504
- : undefined,
4505
- Name: (0, smithy_client_1.expectString)(output.Name),
4506
- Status: (0, smithy_client_1.expectString)(output.Status),
4507
- };
4508
- };
4509
- const de_DelegatedAdministrators = (output, context) => {
4510
- const retVal = (output || [])
4511
- .filter((e) => e != null)
4512
- .map((entry) => {
4513
- if (entry === null) {
4514
- return null;
4515
- }
4516
- return de_DelegatedAdministrator(entry, context);
4517
- });
4518
- return retVal;
4519
- };
4520
- const de_DelegatedService = (output, context) => {
4521
- return {
4522
- DelegationEnabledDate: output.DelegationEnabledDate != null
4523
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DelegationEnabledDate)))
4524
- : undefined,
4525
- ServicePrincipal: (0, smithy_client_1.expectString)(output.ServicePrincipal),
4526
- };
4527
- };
4528
- const de_DelegatedServices = (output, context) => {
4529
- const retVal = (output || [])
4530
- .filter((e) => e != null)
4531
- .map((entry) => {
4532
- if (entry === null) {
4533
- return null;
4534
- }
4535
- return de_DelegatedService(entry, context);
4536
- });
4537
- return retVal;
4538
- };
4539
- const de_DescribeAccountResponse = (output, context) => {
4540
- return {
4541
- Account: output.Account != null ? de_Account(output.Account, context) : undefined,
4542
- };
4543
- };
4544
- const de_DescribeCreateAccountStatusResponse = (output, context) => {
4545
- return {
4546
- CreateAccountStatus: output.CreateAccountStatus != null ? de_CreateAccountStatus(output.CreateAccountStatus, context) : undefined,
4547
- };
4548
- };
4549
- const de_DescribeEffectivePolicyResponse = (output, context) => {
4550
- return {
4551
- EffectivePolicy: output.EffectivePolicy != null ? de_EffectivePolicy(output.EffectivePolicy, context) : undefined,
4552
- };
4553
- };
4554
- const de_DescribeHandshakeResponse = (output, context) => {
4555
- return {
4556
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4557
- };
4558
- };
4559
- const de_DescribeOrganizationalUnitResponse = (output, context) => {
4560
- return {
4561
- OrganizationalUnit: output.OrganizationalUnit != null ? de_OrganizationalUnit(output.OrganizationalUnit, context) : undefined,
4562
- };
4563
- };
4564
- const de_DescribeOrganizationResponse = (output, context) => {
4565
- return {
4566
- Organization: output.Organization != null ? de_Organization(output.Organization, context) : undefined,
4567
- };
4568
- };
4569
- const de_DescribePolicyResponse = (output, context) => {
4570
- return {
4571
- Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined,
4572
- };
4573
- };
4574
- const de_DescribeResourcePolicyResponse = (output, context) => {
4575
- return {
4576
- ResourcePolicy: output.ResourcePolicy != null ? de_ResourcePolicy(output.ResourcePolicy, context) : undefined,
4577
- };
4578
- };
4579
- const de_DestinationParentNotFoundException = (output, context) => {
4580
- return {
4581
- Message: (0, smithy_client_1.expectString)(output.Message),
4582
- };
4583
- };
4584
- const de_DisablePolicyTypeResponse = (output, context) => {
4585
- return {
4586
- Root: output.Root != null ? de_Root(output.Root, context) : undefined,
4587
- };
4588
- };
4589
- const de_DuplicateAccountException = (output, context) => {
4590
- return {
4591
- Message: (0, smithy_client_1.expectString)(output.Message),
4592
- };
4593
- };
4594
- const de_DuplicateHandshakeException = (output, context) => {
4595
- return {
4596
- Message: (0, smithy_client_1.expectString)(output.Message),
4597
- };
4598
- };
4599
- const de_DuplicateOrganizationalUnitException = (output, context) => {
4600
- return {
4601
- Message: (0, smithy_client_1.expectString)(output.Message),
4602
- };
4603
- };
4604
- const de_DuplicatePolicyAttachmentException = (output, context) => {
4605
- return {
4606
- Message: (0, smithy_client_1.expectString)(output.Message),
4607
- };
4608
- };
4609
- const de_DuplicatePolicyException = (output, context) => {
4610
- return {
4611
- Message: (0, smithy_client_1.expectString)(output.Message),
4612
- };
4613
- };
4614
- const de_EffectivePolicy = (output, context) => {
4615
- return {
4616
- LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
4617
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
4618
- : undefined,
4619
- PolicyContent: (0, smithy_client_1.expectString)(output.PolicyContent),
4620
- PolicyType: (0, smithy_client_1.expectString)(output.PolicyType),
4621
- TargetId: (0, smithy_client_1.expectString)(output.TargetId),
4622
- };
4623
- };
4624
- const de_EffectivePolicyNotFoundException = (output, context) => {
4625
- return {
4626
- Message: (0, smithy_client_1.expectString)(output.Message),
4627
- };
4628
- };
4629
- const de_EnableAllFeaturesResponse = (output, context) => {
4630
- return {
4631
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4632
- };
4633
- };
4634
- const de_EnabledServicePrincipal = (output, context) => {
4635
- return {
4636
- DateEnabled: output.DateEnabled != null
4637
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DateEnabled)))
4638
- : undefined,
4639
- ServicePrincipal: (0, smithy_client_1.expectString)(output.ServicePrincipal),
4640
- };
4641
- };
4642
- const de_EnabledServicePrincipals = (output, context) => {
4643
- const retVal = (output || [])
4644
- .filter((e) => e != null)
4645
- .map((entry) => {
4646
- if (entry === null) {
4647
- return null;
4648
- }
4649
- return de_EnabledServicePrincipal(entry, context);
4650
- });
4651
- return retVal;
4652
- };
4653
- const de_EnablePolicyTypeResponse = (output, context) => {
4654
- return {
4655
- Root: output.Root != null ? de_Root(output.Root, context) : undefined,
4656
- };
4657
- };
4658
- const de_FinalizingOrganizationException = (output, context) => {
4659
- return {
4660
- Message: (0, smithy_client_1.expectString)(output.Message),
4661
- };
4662
- };
4663
- const de_Handshake = (output, context) => {
4664
- return {
4665
- Action: (0, smithy_client_1.expectString)(output.Action),
4666
- Arn: (0, smithy_client_1.expectString)(output.Arn),
4667
- ExpirationTimestamp: output.ExpirationTimestamp != null
4668
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ExpirationTimestamp)))
4669
- : undefined,
4670
- Id: (0, smithy_client_1.expectString)(output.Id),
4671
- Parties: output.Parties != null ? de_HandshakeParties(output.Parties, context) : undefined,
4672
- RequestedTimestamp: output.RequestedTimestamp != null
4673
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.RequestedTimestamp)))
4674
- : undefined,
4675
- Resources: output.Resources != null ? de_HandshakeResources(output.Resources, context) : undefined,
4676
- State: (0, smithy_client_1.expectString)(output.State),
4677
- };
4678
- };
4679
- const de_HandshakeAlreadyInStateException = (output, context) => {
4680
- return {
4681
- Message: (0, smithy_client_1.expectString)(output.Message),
4682
- };
4683
- };
4684
- const de_HandshakeConstraintViolationException = (output, context) => {
4685
- return {
4686
- Message: (0, smithy_client_1.expectString)(output.Message),
4687
- Reason: (0, smithy_client_1.expectString)(output.Reason),
4688
- };
4689
- };
4690
- const de_HandshakeNotFoundException = (output, context) => {
4691
- return {
4692
- Message: (0, smithy_client_1.expectString)(output.Message),
4693
- };
4694
- };
4695
- const de_HandshakeParties = (output, context) => {
4696
- const retVal = (output || [])
4697
- .filter((e) => e != null)
4698
- .map((entry) => {
4699
- if (entry === null) {
4700
- return null;
4701
- }
4702
- return de_HandshakeParty(entry, context);
4703
- });
4704
- return retVal;
4705
- };
4706
- const de_HandshakeParty = (output, context) => {
4707
- return {
4708
- Id: (0, smithy_client_1.expectString)(output.Id),
4709
- Type: (0, smithy_client_1.expectString)(output.Type),
4710
- };
4711
- };
4712
- const de_HandshakeResource = (output, context) => {
4713
- return {
4714
- Resources: output.Resources != null ? de_HandshakeResources(output.Resources, context) : undefined,
4715
- Type: (0, smithy_client_1.expectString)(output.Type),
4716
- Value: (0, smithy_client_1.expectString)(output.Value),
4717
- };
4718
- };
4719
- const de_HandshakeResources = (output, context) => {
4720
- const retVal = (output || [])
4721
- .filter((e) => e != null)
4722
- .map((entry) => {
4723
- if (entry === null) {
4724
- return null;
4725
- }
4726
- return de_HandshakeResource(entry, context);
4727
- });
4728
- return retVal;
4729
- };
4730
- const de_Handshakes = (output, context) => {
4731
- const retVal = (output || [])
4732
- .filter((e) => e != null)
4733
- .map((entry) => {
4734
- if (entry === null) {
4735
- return null;
4736
- }
4737
- return de_Handshake(entry, context);
4738
- });
4739
- return retVal;
4740
- };
4741
- const de_InvalidHandshakeTransitionException = (output, context) => {
4742
- return {
4743
- Message: (0, smithy_client_1.expectString)(output.Message),
4744
- };
4745
- };
4746
- const de_InvalidInputException = (output, context) => {
4747
- return {
4748
- Message: (0, smithy_client_1.expectString)(output.Message),
4749
- Reason: (0, smithy_client_1.expectString)(output.Reason),
4750
- };
4751
- };
4752
- const de_InviteAccountToOrganizationResponse = (output, context) => {
4753
- return {
4754
- Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined,
4755
- };
4756
- };
4757
- const de_ListAccountsForParentResponse = (output, context) => {
4758
- return {
4759
- Accounts: output.Accounts != null ? de_Accounts(output.Accounts, context) : undefined,
4760
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4761
- };
4762
- };
4763
- const de_ListAccountsResponse = (output, context) => {
4764
- return {
4765
- Accounts: output.Accounts != null ? de_Accounts(output.Accounts, context) : undefined,
4766
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4767
- };
4768
- };
4769
- const de_ListAWSServiceAccessForOrganizationResponse = (output, context) => {
4770
- return {
4771
- EnabledServicePrincipals: output.EnabledServicePrincipals != null
4772
- ? de_EnabledServicePrincipals(output.EnabledServicePrincipals, context)
4773
- : undefined,
4774
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4775
- };
4776
- };
4777
- const de_ListChildrenResponse = (output, context) => {
4778
- return {
4779
- Children: output.Children != null ? de_Children(output.Children, context) : undefined,
4780
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4781
- };
3941
+ const de_ListAWSServiceAccessForOrganizationResponse = (output, context) => {
3942
+ return (0, smithy_client_1.take)(output, {
3943
+ EnabledServicePrincipals: (_) => de_EnabledServicePrincipals(_, context),
3944
+ NextToken: smithy_client_1.expectString,
3945
+ });
4782
3946
  };
4783
3947
  const de_ListCreateAccountStatusResponse = (output, context) => {
4784
- return {
4785
- CreateAccountStatuses: output.CreateAccountStatuses != null
4786
- ? de_CreateAccountStatuses(output.CreateAccountStatuses, context)
4787
- : undefined,
4788
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4789
- };
4790
- };
4791
- const de_ListDelegatedAdministratorsResponse = (output, context) => {
4792
- return {
4793
- DelegatedAdministrators: output.DelegatedAdministrators != null
4794
- ? de_DelegatedAdministrators(output.DelegatedAdministrators, context)
4795
- : undefined,
4796
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4797
- };
4798
- };
4799
- const de_ListDelegatedServicesForAccountResponse = (output, context) => {
4800
- return {
4801
- DelegatedServices: output.DelegatedServices != null ? de_DelegatedServices(output.DelegatedServices, context) : undefined,
4802
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4803
- };
4804
- };
4805
- const de_ListHandshakesForAccountResponse = (output, context) => {
4806
- return {
4807
- Handshakes: output.Handshakes != null ? de_Handshakes(output.Handshakes, context) : undefined,
4808
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4809
- };
4810
- };
4811
- const de_ListHandshakesForOrganizationResponse = (output, context) => {
4812
- return {
4813
- Handshakes: output.Handshakes != null ? de_Handshakes(output.Handshakes, context) : undefined,
4814
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4815
- };
4816
- };
4817
- const de_ListOrganizationalUnitsForParentResponse = (output, context) => {
4818
- return {
4819
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4820
- OrganizationalUnits: output.OrganizationalUnits != null ? de_OrganizationalUnits(output.OrganizationalUnits, context) : undefined,
4821
- };
4822
- };
4823
- const de_ListParentsResponse = (output, context) => {
4824
- return {
4825
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4826
- Parents: output.Parents != null ? de_Parents(output.Parents, context) : undefined,
4827
- };
4828
- };
4829
- const de_ListPoliciesForTargetResponse = (output, context) => {
4830
- return {
4831
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4832
- Policies: output.Policies != null ? de_Policies(output.Policies, context) : undefined,
4833
- };
4834
- };
4835
- const de_ListPoliciesResponse = (output, context) => {
4836
- return {
4837
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4838
- Policies: output.Policies != null ? de_Policies(output.Policies, context) : undefined,
4839
- };
4840
- };
4841
- const de_ListRootsResponse = (output, context) => {
4842
- return {
4843
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4844
- Roots: output.Roots != null ? de_Roots(output.Roots, context) : undefined,
4845
- };
4846
- };
4847
- const de_ListTagsForResourceResponse = (output, context) => {
4848
- return {
4849
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4850
- Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined,
4851
- };
4852
- };
4853
- const de_ListTargetsForPolicyResponse = (output, context) => {
4854
- return {
4855
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
4856
- Targets: output.Targets != null ? de_PolicyTargets(output.Targets, context) : undefined,
4857
- };
4858
- };
4859
- const de_MalformedPolicyDocumentException = (output, context) => {
4860
- return {
4861
- Message: (0, smithy_client_1.expectString)(output.Message),
4862
- };
4863
- };
4864
- const de_MasterCannotLeaveOrganizationException = (output, context) => {
4865
- return {
4866
- Message: (0, smithy_client_1.expectString)(output.Message),
4867
- };
4868
- };
4869
- const de_Organization = (output, context) => {
4870
- return {
4871
- Arn: (0, smithy_client_1.expectString)(output.Arn),
4872
- AvailablePolicyTypes: output.AvailablePolicyTypes != null ? de_PolicyTypes(output.AvailablePolicyTypes, context) : undefined,
4873
- FeatureSet: (0, smithy_client_1.expectString)(output.FeatureSet),
4874
- Id: (0, smithy_client_1.expectString)(output.Id),
4875
- MasterAccountArn: (0, smithy_client_1.expectString)(output.MasterAccountArn),
4876
- MasterAccountEmail: (0, smithy_client_1.expectString)(output.MasterAccountEmail),
4877
- MasterAccountId: (0, smithy_client_1.expectString)(output.MasterAccountId),
4878
- };
4879
- };
4880
- const de_OrganizationalUnit = (output, context) => {
4881
- return {
4882
- Arn: (0, smithy_client_1.expectString)(output.Arn),
4883
- Id: (0, smithy_client_1.expectString)(output.Id),
4884
- Name: (0, smithy_client_1.expectString)(output.Name),
4885
- };
4886
- };
4887
- const de_OrganizationalUnitNotEmptyException = (output, context) => {
4888
- return {
4889
- Message: (0, smithy_client_1.expectString)(output.Message),
4890
- };
4891
- };
4892
- const de_OrganizationalUnitNotFoundException = (output, context) => {
4893
- return {
4894
- Message: (0, smithy_client_1.expectString)(output.Message),
4895
- };
4896
- };
4897
- const de_OrganizationalUnits = (output, context) => {
4898
- const retVal = (output || [])
4899
- .filter((e) => e != null)
4900
- .map((entry) => {
4901
- if (entry === null) {
4902
- return null;
4903
- }
4904
- return de_OrganizationalUnit(entry, context);
4905
- });
4906
- return retVal;
4907
- };
4908
- const de_OrganizationNotEmptyException = (output, context) => {
4909
- return {
4910
- Message: (0, smithy_client_1.expectString)(output.Message),
4911
- };
4912
- };
4913
- const de_Parent = (output, context) => {
4914
- return {
4915
- Id: (0, smithy_client_1.expectString)(output.Id),
4916
- Type: (0, smithy_client_1.expectString)(output.Type),
4917
- };
4918
- };
4919
- const de_ParentNotFoundException = (output, context) => {
4920
- return {
4921
- Message: (0, smithy_client_1.expectString)(output.Message),
4922
- };
4923
- };
4924
- const de_Parents = (output, context) => {
4925
- const retVal = (output || [])
4926
- .filter((e) => e != null)
4927
- .map((entry) => {
4928
- if (entry === null) {
4929
- return null;
4930
- }
4931
- return de_Parent(entry, context);
4932
- });
4933
- return retVal;
4934
- };
4935
- const de_Policies = (output, context) => {
4936
- const retVal = (output || [])
4937
- .filter((e) => e != null)
4938
- .map((entry) => {
4939
- if (entry === null) {
4940
- return null;
4941
- }
4942
- return de_PolicySummary(entry, context);
3948
+ return (0, smithy_client_1.take)(output, {
3949
+ CreateAccountStatuses: (_) => de_CreateAccountStatuses(_, context),
3950
+ NextToken: smithy_client_1.expectString,
4943
3951
  });
4944
- return retVal;
4945
- };
4946
- const de_Policy = (output, context) => {
4947
- return {
4948
- Content: (0, smithy_client_1.expectString)(output.Content),
4949
- PolicySummary: output.PolicySummary != null ? de_PolicySummary(output.PolicySummary, context) : undefined,
4950
- };
4951
- };
4952
- const de_PolicyChangesInProgressException = (output, context) => {
4953
- return {
4954
- Message: (0, smithy_client_1.expectString)(output.Message),
4955
- };
4956
3952
  };
4957
- const de_PolicyInUseException = (output, context) => {
4958
- return {
4959
- Message: (0, smithy_client_1.expectString)(output.Message),
4960
- };
4961
- };
4962
- const de_PolicyNotAttachedException = (output, context) => {
4963
- return {
4964
- Message: (0, smithy_client_1.expectString)(output.Message),
4965
- };
4966
- };
4967
- const de_PolicyNotFoundException = (output, context) => {
4968
- return {
4969
- Message: (0, smithy_client_1.expectString)(output.Message),
4970
- };
4971
- };
4972
- const de_PolicySummary = (output, context) => {
4973
- return {
4974
- Arn: (0, smithy_client_1.expectString)(output.Arn),
4975
- AwsManaged: (0, smithy_client_1.expectBoolean)(output.AwsManaged),
4976
- Description: (0, smithy_client_1.expectString)(output.Description),
4977
- Id: (0, smithy_client_1.expectString)(output.Id),
4978
- Name: (0, smithy_client_1.expectString)(output.Name),
4979
- Type: (0, smithy_client_1.expectString)(output.Type),
4980
- };
4981
- };
4982
- const de_PolicyTargets = (output, context) => {
4983
- const retVal = (output || [])
4984
- .filter((e) => e != null)
4985
- .map((entry) => {
4986
- if (entry === null) {
4987
- return null;
4988
- }
4989
- return de_PolicyTargetSummary(entry, context);
3953
+ const de_ListDelegatedAdministratorsResponse = (output, context) => {
3954
+ return (0, smithy_client_1.take)(output, {
3955
+ DelegatedAdministrators: (_) => de_DelegatedAdministrators(_, context),
3956
+ NextToken: smithy_client_1.expectString,
4990
3957
  });
4991
- return retVal;
4992
- };
4993
- const de_PolicyTargetSummary = (output, context) => {
4994
- return {
4995
- Arn: (0, smithy_client_1.expectString)(output.Arn),
4996
- Name: (0, smithy_client_1.expectString)(output.Name),
4997
- TargetId: (0, smithy_client_1.expectString)(output.TargetId),
4998
- Type: (0, smithy_client_1.expectString)(output.Type),
4999
- };
5000
- };
5001
- const de_PolicyTypeAlreadyEnabledException = (output, context) => {
5002
- return {
5003
- Message: (0, smithy_client_1.expectString)(output.Message),
5004
- };
5005
3958
  };
5006
- const de_PolicyTypeNotAvailableForOrganizationException = (output, context) => {
5007
- return {
5008
- Message: (0, smithy_client_1.expectString)(output.Message),
5009
- };
5010
- };
5011
- const de_PolicyTypeNotEnabledException = (output, context) => {
5012
- return {
5013
- Message: (0, smithy_client_1.expectString)(output.Message),
5014
- };
5015
- };
5016
- const de_PolicyTypes = (output, context) => {
5017
- const retVal = (output || [])
5018
- .filter((e) => e != null)
5019
- .map((entry) => {
5020
- if (entry === null) {
5021
- return null;
5022
- }
5023
- return de_PolicyTypeSummary(entry, context);
3959
+ const de_ListDelegatedServicesForAccountResponse = (output, context) => {
3960
+ return (0, smithy_client_1.take)(output, {
3961
+ DelegatedServices: (_) => de_DelegatedServices(_, context),
3962
+ NextToken: smithy_client_1.expectString,
5024
3963
  });
5025
- return retVal;
5026
- };
5027
- const de_PolicyTypeSummary = (output, context) => {
5028
- return {
5029
- Status: (0, smithy_client_1.expectString)(output.Status),
5030
- Type: (0, smithy_client_1.expectString)(output.Type),
5031
- };
5032
- };
5033
- const de_PutResourcePolicyResponse = (output, context) => {
5034
- return {
5035
- ResourcePolicy: output.ResourcePolicy != null ? de_ResourcePolicy(output.ResourcePolicy, context) : undefined,
5036
- };
5037
- };
5038
- const de_ResourcePolicy = (output, context) => {
5039
- return {
5040
- Content: (0, smithy_client_1.expectString)(output.Content),
5041
- ResourcePolicySummary: output.ResourcePolicySummary != null
5042
- ? de_ResourcePolicySummary(output.ResourcePolicySummary, context)
5043
- : undefined,
5044
- };
5045
- };
5046
- const de_ResourcePolicyNotFoundException = (output, context) => {
5047
- return {
5048
- Message: (0, smithy_client_1.expectString)(output.Message),
5049
- };
5050
3964
  };
5051
- const de_ResourcePolicySummary = (output, context) => {
5052
- return {
5053
- Arn: (0, smithy_client_1.expectString)(output.Arn),
5054
- Id: (0, smithy_client_1.expectString)(output.Id),
5055
- };
5056
- };
5057
- const de_Root = (output, context) => {
5058
- return {
5059
- Arn: (0, smithy_client_1.expectString)(output.Arn),
5060
- Id: (0, smithy_client_1.expectString)(output.Id),
5061
- Name: (0, smithy_client_1.expectString)(output.Name),
5062
- PolicyTypes: output.PolicyTypes != null ? de_PolicyTypes(output.PolicyTypes, context) : undefined,
5063
- };
5064
- };
5065
- const de_RootNotFoundException = (output, context) => {
5066
- return {
5067
- Message: (0, smithy_client_1.expectString)(output.Message),
5068
- };
5069
- };
5070
- const de_Roots = (output, context) => {
5071
- const retVal = (output || [])
5072
- .filter((e) => e != null)
5073
- .map((entry) => {
5074
- if (entry === null) {
5075
- return null;
5076
- }
5077
- return de_Root(entry, context);
3965
+ const de_ListHandshakesForAccountResponse = (output, context) => {
3966
+ return (0, smithy_client_1.take)(output, {
3967
+ Handshakes: (_) => de_Handshakes(_, context),
3968
+ NextToken: smithy_client_1.expectString,
5078
3969
  });
5079
- return retVal;
5080
- };
5081
- const de_ServiceException = (output, context) => {
5082
- return {
5083
- Message: (0, smithy_client_1.expectString)(output.Message),
5084
- };
5085
- };
5086
- const de_SourceParentNotFoundException = (output, context) => {
5087
- return {
5088
- Message: (0, smithy_client_1.expectString)(output.Message),
5089
- };
5090
- };
5091
- const de_Tag = (output, context) => {
5092
- return {
5093
- Key: (0, smithy_client_1.expectString)(output.Key),
5094
- Value: (0, smithy_client_1.expectString)(output.Value),
5095
- };
5096
3970
  };
5097
- const de_Tags = (output, context) => {
5098
- const retVal = (output || [])
5099
- .filter((e) => e != null)
5100
- .map((entry) => {
5101
- if (entry === null) {
5102
- return null;
5103
- }
5104
- return de_Tag(entry, context);
3971
+ const de_ListHandshakesForOrganizationResponse = (output, context) => {
3972
+ return (0, smithy_client_1.take)(output, {
3973
+ Handshakes: (_) => de_Handshakes(_, context),
3974
+ NextToken: smithy_client_1.expectString,
5105
3975
  });
5106
- return retVal;
5107
- };
5108
- const de_TargetNotFoundException = (output, context) => {
5109
- return {
5110
- Message: (0, smithy_client_1.expectString)(output.Message),
5111
- };
5112
- };
5113
- const de_TooManyRequestsException = (output, context) => {
5114
- return {
5115
- Message: (0, smithy_client_1.expectString)(output.Message),
5116
- Type: (0, smithy_client_1.expectString)(output.Type),
5117
- };
5118
- };
5119
- const de_UnsupportedAPIEndpointException = (output, context) => {
5120
- return {
5121
- Message: (0, smithy_client_1.expectString)(output.Message),
5122
- };
5123
- };
5124
- const de_UpdateOrganizationalUnitResponse = (output, context) => {
5125
- return {
5126
- OrganizationalUnit: output.OrganizationalUnit != null ? de_OrganizationalUnit(output.OrganizationalUnit, context) : undefined,
5127
- };
5128
- };
5129
- const de_UpdatePolicyResponse = (output, context) => {
5130
- return {
5131
- Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined,
5132
- };
5133
3976
  };
5134
3977
  const deserializeMetadata = (output) => ({
5135
3978
  httpStatusCode: output.statusCode,
@@ -5144,6 +3987,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
5144
3987
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
5145
3988
  };
5146
3989
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3990
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(OrganizationsServiceException_1.OrganizationsServiceException);
5147
3991
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
5148
3992
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
5149
3993
  const contents = {
@@ -5162,6 +4006,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
5162
4006
  }
5163
4007
  return new protocol_http_1.HttpRequest(contents);
5164
4008
  };
4009
+ function sharedHeaders(operation) {
4010
+ return {
4011
+ "content-type": "application/x-amz-json-1.1",
4012
+ "x-amz-target": `AWSOrganizationsV20161128.${operation}`,
4013
+ };
4014
+ }
5165
4015
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
5166
4016
  if (encoded.length) {
5167
4017
  return JSON.parse(encoded);