@cdklabs/cdk-ecs-codedeploy 0.0.130 → 0.0.132

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.jsii +3 -3
  2. package/API.md +156 -0
  3. package/lib/api-canary/index.js +1 -1
  4. package/lib/ecs-appspec/index.js +1 -1
  5. package/lib/ecs-deployment/index.js +1 -1
  6. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  7. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/protocols/Aws_json1_1.js +561 -2630
  8. package/node_modules/@aws-sdk/client-codedeploy/dist-es/protocols/Aws_json1_1.js +562 -2631
  9. package/node_modules/@aws-sdk/client-codedeploy/package.json +6 -6
  10. package/node_modules/@aws-sdk/client-sso/dist-cjs/protocols/Aws_restJson1.js +50 -94
  11. package/node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js +36 -80
  12. package/node_modules/@aws-sdk/client-sso/package.json +4 -4
  13. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/protocols/Aws_restJson1.js +125 -172
  14. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js +111 -158
  15. package/node_modules/@aws-sdk/client-sso-oidc/package.json +4 -4
  16. package/node_modules/@aws-sdk/client-sts/dist-cjs/protocols/Aws_query.js +17 -24
  17. package/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js +18 -25
  18. package/node_modules/@aws-sdk/client-sts/package.json +5 -5
  19. package/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
  20. package/node_modules/@aws-sdk/credential-provider-node/package.json +3 -3
  21. package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
  22. package/node_modules/@aws-sdk/smithy-client/dist-cjs/default-error-handler.js +7 -1
  23. package/node_modules/@aws-sdk/smithy-client/dist-cjs/index.js +1 -0
  24. package/node_modules/@aws-sdk/smithy-client/dist-cjs/serde-json.js +23 -0
  25. package/node_modules/@aws-sdk/smithy-client/dist-es/default-error-handler.js +5 -0
  26. package/node_modules/@aws-sdk/smithy-client/dist-es/index.js +1 -0
  27. package/node_modules/@aws-sdk/smithy-client/dist-es/serde-json.js +19 -0
  28. package/node_modules/@aws-sdk/smithy-client/dist-types/default-error-handler.d.ts +6 -0
  29. package/node_modules/@aws-sdk/smithy-client/dist-types/index.d.ts +1 -0
  30. package/node_modules/@aws-sdk/smithy-client/dist-types/serde-json.d.ts +10 -0
  31. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/default-error-handler.d.ts +3 -0
  32. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/index.d.ts +1 -0
  33. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/serde-json.d.ts +1 -0
  34. package/node_modules/@aws-sdk/smithy-client/package.json +1 -1
  35. package/node_modules/@aws-sdk/token-providers/package.json +2 -2
  36. package/node_modules/@aws-sdk/util-defaults-mode-browser/package.json +2 -2
  37. package/node_modules/@aws-sdk/util-defaults-mode-node/package.json +2 -2
  38. package/package.json +5 -5
@@ -12,16 +12,16 @@ const se_CreateTokenCommand = async (input, context) => {
12
12
  };
13
13
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/token";
14
14
  let body;
15
- body = JSON.stringify({
16
- ...(input.clientId != null && { clientId: input.clientId }),
17
- ...(input.clientSecret != null && { clientSecret: input.clientSecret }),
18
- ...(input.code != null && { code: input.code }),
19
- ...(input.deviceCode != null && { deviceCode: input.deviceCode }),
20
- ...(input.grantType != null && { grantType: input.grantType }),
21
- ...(input.redirectUri != null && { redirectUri: input.redirectUri }),
22
- ...(input.refreshToken != null && { refreshToken: input.refreshToken }),
23
- ...(input.scope != null && { scope: se_Scopes(input.scope, context) }),
24
- });
15
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
16
+ clientId: [],
17
+ clientSecret: [],
18
+ code: [],
19
+ deviceCode: [],
20
+ grantType: [],
21
+ redirectUri: [],
22
+ refreshToken: [],
23
+ scope: (_) => (0, smithy_client_1._json)(_),
24
+ }));
25
25
  return new protocol_http_1.HttpRequest({
26
26
  protocol,
27
27
  hostname,
@@ -40,11 +40,11 @@ const se_RegisterClientCommand = async (input, context) => {
40
40
  };
41
41
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/client/register";
42
42
  let body;
43
- body = JSON.stringify({
44
- ...(input.clientName != null && { clientName: input.clientName }),
45
- ...(input.clientType != null && { clientType: input.clientType }),
46
- ...(input.scopes != null && { scopes: se_Scopes(input.scopes, context) }),
47
- });
43
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
44
+ clientName: [],
45
+ clientType: [],
46
+ scopes: (_) => (0, smithy_client_1._json)(_),
47
+ }));
48
48
  return new protocol_http_1.HttpRequest({
49
49
  protocol,
50
50
  hostname,
@@ -63,11 +63,11 @@ const se_StartDeviceAuthorizationCommand = async (input, context) => {
63
63
  };
64
64
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/device_authorization";
65
65
  let body;
66
- body = JSON.stringify({
67
- ...(input.clientId != null && { clientId: input.clientId }),
68
- ...(input.clientSecret != null && { clientSecret: input.clientSecret }),
69
- ...(input.startUrl != null && { startUrl: input.startUrl }),
70
- });
66
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
67
+ clientId: [],
68
+ clientSecret: [],
69
+ startUrl: [],
70
+ }));
71
71
  return new protocol_http_1.HttpRequest({
72
72
  protocol,
73
73
  hostname,
@@ -83,25 +83,18 @@ const de_CreateTokenCommand = async (output, context) => {
83
83
  if (output.statusCode !== 200 && output.statusCode >= 300) {
84
84
  return de_CreateTokenCommandError(output, context);
85
85
  }
86
- const contents = map({
86
+ const contents = (0, smithy_client_1.map)({
87
87
  $metadata: deserializeMetadata(output),
88
88
  });
89
89
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
90
- if (data.accessToken != null) {
91
- contents.accessToken = (0, smithy_client_1.expectString)(data.accessToken);
92
- }
93
- if (data.expiresIn != null) {
94
- contents.expiresIn = (0, smithy_client_1.expectInt32)(data.expiresIn);
95
- }
96
- if (data.idToken != null) {
97
- contents.idToken = (0, smithy_client_1.expectString)(data.idToken);
98
- }
99
- if (data.refreshToken != null) {
100
- contents.refreshToken = (0, smithy_client_1.expectString)(data.refreshToken);
101
- }
102
- if (data.tokenType != null) {
103
- contents.tokenType = (0, smithy_client_1.expectString)(data.tokenType);
104
- }
90
+ const doc = (0, smithy_client_1.take)(data, {
91
+ accessToken: smithy_client_1.expectString,
92
+ expiresIn: smithy_client_1.expectInt32,
93
+ idToken: smithy_client_1.expectString,
94
+ refreshToken: smithy_client_1.expectString,
95
+ tokenType: smithy_client_1.expectString,
96
+ });
97
+ Object.assign(contents, doc);
105
98
  return contents;
106
99
  };
107
100
  exports.de_CreateTokenCommand = de_CreateTokenCommand;
@@ -147,10 +140,9 @@ const de_CreateTokenCommandError = async (output, context) => {
147
140
  throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
148
141
  default:
149
142
  const parsedBody = parsedOutput.body;
150
- (0, smithy_client_1.throwDefaultError)({
143
+ return throwDefaultError({
151
144
  output,
152
145
  parsedBody,
153
- exceptionCtor: SSOOIDCServiceException_1.SSOOIDCServiceException,
154
146
  errorCode,
155
147
  });
156
148
  }
@@ -159,28 +151,19 @@ const de_RegisterClientCommand = async (output, context) => {
159
151
  if (output.statusCode !== 200 && output.statusCode >= 300) {
160
152
  return de_RegisterClientCommandError(output, context);
161
153
  }
162
- const contents = map({
154
+ const contents = (0, smithy_client_1.map)({
163
155
  $metadata: deserializeMetadata(output),
164
156
  });
165
157
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
166
- if (data.authorizationEndpoint != null) {
167
- contents.authorizationEndpoint = (0, smithy_client_1.expectString)(data.authorizationEndpoint);
168
- }
169
- if (data.clientId != null) {
170
- contents.clientId = (0, smithy_client_1.expectString)(data.clientId);
171
- }
172
- if (data.clientIdIssuedAt != null) {
173
- contents.clientIdIssuedAt = (0, smithy_client_1.expectLong)(data.clientIdIssuedAt);
174
- }
175
- if (data.clientSecret != null) {
176
- contents.clientSecret = (0, smithy_client_1.expectString)(data.clientSecret);
177
- }
178
- if (data.clientSecretExpiresAt != null) {
179
- contents.clientSecretExpiresAt = (0, smithy_client_1.expectLong)(data.clientSecretExpiresAt);
180
- }
181
- if (data.tokenEndpoint != null) {
182
- contents.tokenEndpoint = (0, smithy_client_1.expectString)(data.tokenEndpoint);
183
- }
158
+ const doc = (0, smithy_client_1.take)(data, {
159
+ authorizationEndpoint: smithy_client_1.expectString,
160
+ clientId: smithy_client_1.expectString,
161
+ clientIdIssuedAt: smithy_client_1.expectLong,
162
+ clientSecret: smithy_client_1.expectString,
163
+ clientSecretExpiresAt: smithy_client_1.expectLong,
164
+ tokenEndpoint: smithy_client_1.expectString,
165
+ });
166
+ Object.assign(contents, doc);
184
167
  return contents;
185
168
  };
186
169
  exports.de_RegisterClientCommand = de_RegisterClientCommand;
@@ -205,10 +188,9 @@ const de_RegisterClientCommandError = async (output, context) => {
205
188
  throw await de_InvalidScopeExceptionRes(parsedOutput, context);
206
189
  default:
207
190
  const parsedBody = parsedOutput.body;
208
- (0, smithy_client_1.throwDefaultError)({
191
+ return throwDefaultError({
209
192
  output,
210
193
  parsedBody,
211
- exceptionCtor: SSOOIDCServiceException_1.SSOOIDCServiceException,
212
194
  errorCode,
213
195
  });
214
196
  }
@@ -217,28 +199,19 @@ const de_StartDeviceAuthorizationCommand = async (output, context) => {
217
199
  if (output.statusCode !== 200 && output.statusCode >= 300) {
218
200
  return de_StartDeviceAuthorizationCommandError(output, context);
219
201
  }
220
- const contents = map({
202
+ const contents = (0, smithy_client_1.map)({
221
203
  $metadata: deserializeMetadata(output),
222
204
  });
223
205
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
224
- if (data.deviceCode != null) {
225
- contents.deviceCode = (0, smithy_client_1.expectString)(data.deviceCode);
226
- }
227
- if (data.expiresIn != null) {
228
- contents.expiresIn = (0, smithy_client_1.expectInt32)(data.expiresIn);
229
- }
230
- if (data.interval != null) {
231
- contents.interval = (0, smithy_client_1.expectInt32)(data.interval);
232
- }
233
- if (data.userCode != null) {
234
- contents.userCode = (0, smithy_client_1.expectString)(data.userCode);
235
- }
236
- if (data.verificationUri != null) {
237
- contents.verificationUri = (0, smithy_client_1.expectString)(data.verificationUri);
238
- }
239
- if (data.verificationUriComplete != null) {
240
- contents.verificationUriComplete = (0, smithy_client_1.expectString)(data.verificationUriComplete);
241
- }
206
+ const doc = (0, smithy_client_1.take)(data, {
207
+ deviceCode: smithy_client_1.expectString,
208
+ expiresIn: smithy_client_1.expectInt32,
209
+ interval: smithy_client_1.expectInt32,
210
+ userCode: smithy_client_1.expectString,
211
+ verificationUri: smithy_client_1.expectString,
212
+ verificationUriComplete: smithy_client_1.expectString,
213
+ });
214
+ Object.assign(contents, doc);
242
215
  return contents;
243
216
  };
244
217
  exports.de_StartDeviceAuthorizationCommand = de_StartDeviceAuthorizationCommand;
@@ -266,24 +239,22 @@ const de_StartDeviceAuthorizationCommandError = async (output, context) => {
266
239
  throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
267
240
  default:
268
241
  const parsedBody = parsedOutput.body;
269
- (0, smithy_client_1.throwDefaultError)({
242
+ return throwDefaultError({
270
243
  output,
271
244
  parsedBody,
272
- exceptionCtor: SSOOIDCServiceException_1.SSOOIDCServiceException,
273
245
  errorCode,
274
246
  });
275
247
  }
276
248
  };
277
- const map = smithy_client_1.map;
249
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(SSOOIDCServiceException_1.SSOOIDCServiceException);
278
250
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
279
- const contents = map({});
251
+ const contents = (0, smithy_client_1.map)({});
280
252
  const data = parsedOutput.body;
281
- if (data.error != null) {
282
- contents.error = (0, smithy_client_1.expectString)(data.error);
283
- }
284
- if (data.error_description != null) {
285
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
286
- }
253
+ const doc = (0, smithy_client_1.take)(data, {
254
+ error: smithy_client_1.expectString,
255
+ error_description: smithy_client_1.expectString,
256
+ });
257
+ Object.assign(contents, doc);
287
258
  const exception = new models_0_1.AccessDeniedException({
288
259
  $metadata: deserializeMetadata(parsedOutput),
289
260
  ...contents,
@@ -291,14 +262,13 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
291
262
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
292
263
  };
293
264
  const de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
294
- const contents = map({});
265
+ const contents = (0, smithy_client_1.map)({});
295
266
  const data = parsedOutput.body;
296
- if (data.error != null) {
297
- contents.error = (0, smithy_client_1.expectString)(data.error);
298
- }
299
- if (data.error_description != null) {
300
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
301
- }
267
+ const doc = (0, smithy_client_1.take)(data, {
268
+ error: smithy_client_1.expectString,
269
+ error_description: smithy_client_1.expectString,
270
+ });
271
+ Object.assign(contents, doc);
302
272
  const exception = new models_0_1.AuthorizationPendingException({
303
273
  $metadata: deserializeMetadata(parsedOutput),
304
274
  ...contents,
@@ -306,14 +276,13 @@ const de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
306
276
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
307
277
  };
308
278
  const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
309
- const contents = map({});
279
+ const contents = (0, smithy_client_1.map)({});
310
280
  const data = parsedOutput.body;
311
- if (data.error != null) {
312
- contents.error = (0, smithy_client_1.expectString)(data.error);
313
- }
314
- if (data.error_description != null) {
315
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
316
- }
281
+ const doc = (0, smithy_client_1.take)(data, {
282
+ error: smithy_client_1.expectString,
283
+ error_description: smithy_client_1.expectString,
284
+ });
285
+ Object.assign(contents, doc);
317
286
  const exception = new models_0_1.ExpiredTokenException({
318
287
  $metadata: deserializeMetadata(parsedOutput),
319
288
  ...contents,
@@ -321,14 +290,13 @@ const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
321
290
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
322
291
  };
323
292
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
324
- const contents = map({});
293
+ const contents = (0, smithy_client_1.map)({});
325
294
  const data = parsedOutput.body;
326
- if (data.error != null) {
327
- contents.error = (0, smithy_client_1.expectString)(data.error);
328
- }
329
- if (data.error_description != null) {
330
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
331
- }
295
+ const doc = (0, smithy_client_1.take)(data, {
296
+ error: smithy_client_1.expectString,
297
+ error_description: smithy_client_1.expectString,
298
+ });
299
+ Object.assign(contents, doc);
332
300
  const exception = new models_0_1.InternalServerException({
333
301
  $metadata: deserializeMetadata(parsedOutput),
334
302
  ...contents,
@@ -336,14 +304,13 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
336
304
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
337
305
  };
338
306
  const de_InvalidClientExceptionRes = async (parsedOutput, context) => {
339
- const contents = map({});
307
+ const contents = (0, smithy_client_1.map)({});
340
308
  const data = parsedOutput.body;
341
- if (data.error != null) {
342
- contents.error = (0, smithy_client_1.expectString)(data.error);
343
- }
344
- if (data.error_description != null) {
345
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
346
- }
309
+ const doc = (0, smithy_client_1.take)(data, {
310
+ error: smithy_client_1.expectString,
311
+ error_description: smithy_client_1.expectString,
312
+ });
313
+ Object.assign(contents, doc);
347
314
  const exception = new models_0_1.InvalidClientException({
348
315
  $metadata: deserializeMetadata(parsedOutput),
349
316
  ...contents,
@@ -351,14 +318,13 @@ const de_InvalidClientExceptionRes = async (parsedOutput, context) => {
351
318
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
352
319
  };
353
320
  const de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => {
354
- const contents = map({});
321
+ const contents = (0, smithy_client_1.map)({});
355
322
  const data = parsedOutput.body;
356
- if (data.error != null) {
357
- contents.error = (0, smithy_client_1.expectString)(data.error);
358
- }
359
- if (data.error_description != null) {
360
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
361
- }
323
+ const doc = (0, smithy_client_1.take)(data, {
324
+ error: smithy_client_1.expectString,
325
+ error_description: smithy_client_1.expectString,
326
+ });
327
+ Object.assign(contents, doc);
362
328
  const exception = new models_0_1.InvalidClientMetadataException({
363
329
  $metadata: deserializeMetadata(parsedOutput),
364
330
  ...contents,
@@ -366,14 +332,13 @@ const de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => {
366
332
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
367
333
  };
368
334
  const de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
369
- const contents = map({});
335
+ const contents = (0, smithy_client_1.map)({});
370
336
  const data = parsedOutput.body;
371
- if (data.error != null) {
372
- contents.error = (0, smithy_client_1.expectString)(data.error);
373
- }
374
- if (data.error_description != null) {
375
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
376
- }
337
+ const doc = (0, smithy_client_1.take)(data, {
338
+ error: smithy_client_1.expectString,
339
+ error_description: smithy_client_1.expectString,
340
+ });
341
+ Object.assign(contents, doc);
377
342
  const exception = new models_0_1.InvalidGrantException({
378
343
  $metadata: deserializeMetadata(parsedOutput),
379
344
  ...contents,
@@ -381,14 +346,13 @@ const de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
381
346
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
382
347
  };
383
348
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
384
- const contents = map({});
349
+ const contents = (0, smithy_client_1.map)({});
385
350
  const data = parsedOutput.body;
386
- if (data.error != null) {
387
- contents.error = (0, smithy_client_1.expectString)(data.error);
388
- }
389
- if (data.error_description != null) {
390
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
391
- }
351
+ const doc = (0, smithy_client_1.take)(data, {
352
+ error: smithy_client_1.expectString,
353
+ error_description: smithy_client_1.expectString,
354
+ });
355
+ Object.assign(contents, doc);
392
356
  const exception = new models_0_1.InvalidRequestException({
393
357
  $metadata: deserializeMetadata(parsedOutput),
394
358
  ...contents,
@@ -396,14 +360,13 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
396
360
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
397
361
  };
398
362
  const de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
399
- const contents = map({});
363
+ const contents = (0, smithy_client_1.map)({});
400
364
  const data = parsedOutput.body;
401
- if (data.error != null) {
402
- contents.error = (0, smithy_client_1.expectString)(data.error);
403
- }
404
- if (data.error_description != null) {
405
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
406
- }
365
+ const doc = (0, smithy_client_1.take)(data, {
366
+ error: smithy_client_1.expectString,
367
+ error_description: smithy_client_1.expectString,
368
+ });
369
+ Object.assign(contents, doc);
407
370
  const exception = new models_0_1.InvalidScopeException({
408
371
  $metadata: deserializeMetadata(parsedOutput),
409
372
  ...contents,
@@ -411,14 +374,13 @@ const de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
411
374
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
412
375
  };
413
376
  const de_SlowDownExceptionRes = async (parsedOutput, context) => {
414
- const contents = map({});
377
+ const contents = (0, smithy_client_1.map)({});
415
378
  const data = parsedOutput.body;
416
- if (data.error != null) {
417
- contents.error = (0, smithy_client_1.expectString)(data.error);
418
- }
419
- if (data.error_description != null) {
420
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
421
- }
379
+ const doc = (0, smithy_client_1.take)(data, {
380
+ error: smithy_client_1.expectString,
381
+ error_description: smithy_client_1.expectString,
382
+ });
383
+ Object.assign(contents, doc);
422
384
  const exception = new models_0_1.SlowDownException({
423
385
  $metadata: deserializeMetadata(parsedOutput),
424
386
  ...contents,
@@ -426,14 +388,13 @@ const de_SlowDownExceptionRes = async (parsedOutput, context) => {
426
388
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
427
389
  };
428
390
  const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
429
- const contents = map({});
391
+ const contents = (0, smithy_client_1.map)({});
430
392
  const data = parsedOutput.body;
431
- if (data.error != null) {
432
- contents.error = (0, smithy_client_1.expectString)(data.error);
433
- }
434
- if (data.error_description != null) {
435
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
436
- }
393
+ const doc = (0, smithy_client_1.take)(data, {
394
+ error: smithy_client_1.expectString,
395
+ error_description: smithy_client_1.expectString,
396
+ });
397
+ Object.assign(contents, doc);
437
398
  const exception = new models_0_1.UnauthorizedClientException({
438
399
  $metadata: deserializeMetadata(parsedOutput),
439
400
  ...contents,
@@ -441,27 +402,19 @@ const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
441
402
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
442
403
  };
443
404
  const de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
444
- const contents = map({});
405
+ const contents = (0, smithy_client_1.map)({});
445
406
  const data = parsedOutput.body;
446
- if (data.error != null) {
447
- contents.error = (0, smithy_client_1.expectString)(data.error);
448
- }
449
- if (data.error_description != null) {
450
- contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
451
- }
407
+ const doc = (0, smithy_client_1.take)(data, {
408
+ error: smithy_client_1.expectString,
409
+ error_description: smithy_client_1.expectString,
410
+ });
411
+ Object.assign(contents, doc);
452
412
  const exception = new models_0_1.UnsupportedGrantTypeException({
453
413
  $metadata: deserializeMetadata(parsedOutput),
454
414
  ...contents,
455
415
  });
456
416
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
457
417
  };
458
- const se_Scopes = (input, context) => {
459
- return input
460
- .filter((e) => e != null)
461
- .map((entry) => {
462
- return entry;
463
- });
464
- };
465
418
  const deserializeMetadata = (output) => ({
466
419
  httpStatusCode: output.statusCode,
467
420
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],