@aws-sdk/client-sso-oidc 3.131.0 → 3.142.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.
@@ -28,14 +28,6 @@ var AuthorizationPendingException = (function (_super) {
28
28
  return AuthorizationPendingException;
29
29
  }(__BaseException));
30
30
  export { AuthorizationPendingException };
31
- export var CreateTokenRequest;
32
- (function (CreateTokenRequest) {
33
- CreateTokenRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
34
- })(CreateTokenRequest || (CreateTokenRequest = {}));
35
- export var CreateTokenResponse;
36
- (function (CreateTokenResponse) {
37
- CreateTokenResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
38
- })(CreateTokenResponse || (CreateTokenResponse = {}));
39
31
  var ExpiredTokenException = (function (_super) {
40
32
  __extends(ExpiredTokenException, _super);
41
33
  function ExpiredTokenException(opts) {
@@ -176,19 +168,9 @@ var InvalidClientMetadataException = (function (_super) {
176
168
  return InvalidClientMetadataException;
177
169
  }(__BaseException));
178
170
  export { InvalidClientMetadataException };
179
- export var RegisterClientRequest;
180
- (function (RegisterClientRequest) {
181
- RegisterClientRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
182
- })(RegisterClientRequest || (RegisterClientRequest = {}));
183
- export var RegisterClientResponse;
184
- (function (RegisterClientResponse) {
185
- RegisterClientResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
186
- })(RegisterClientResponse || (RegisterClientResponse = {}));
187
- export var StartDeviceAuthorizationRequest;
188
- (function (StartDeviceAuthorizationRequest) {
189
- StartDeviceAuthorizationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
190
- })(StartDeviceAuthorizationRequest || (StartDeviceAuthorizationRequest = {}));
191
- export var StartDeviceAuthorizationResponse;
192
- (function (StartDeviceAuthorizationResponse) {
193
- StartDeviceAuthorizationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
194
- })(StartDeviceAuthorizationResponse || (StartDeviceAuthorizationResponse = {}));
171
+ export var CreateTokenRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
172
+ export var CreateTokenResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
173
+ export var RegisterClientRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
174
+ export var RegisterClientResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
175
+ export var StartDeviceAuthorizationRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
176
+ export var StartDeviceAuthorizationResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidClientMetadataException, InvalidGrantException, InvalidRequestException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, } from "../models/models_0";
5
5
  import { SSOOIDCServiceException as __BaseException } from "../models/SSOOIDCServiceException";
6
6
  export var serializeAws_restJson1CreateTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -83,40 +83,35 @@ export var deserializeAws_restJson1CreateTokenCommand = function (output, contex
83
83
  if (output.statusCode !== 200 && output.statusCode >= 300) {
84
84
  return [2, deserializeAws_restJson1CreateTokenCommandError(output, context)];
85
85
  }
86
- contents = {
86
+ contents = map({
87
87
  $metadata: deserializeMetadata(output),
88
- accessToken: undefined,
89
- expiresIn: undefined,
90
- idToken: undefined,
91
- refreshToken: undefined,
92
- tokenType: undefined,
93
- };
88
+ });
94
89
  _a = __expectNonNull;
95
90
  _b = __expectObject;
96
91
  return [4, parseBody(output.body, context)];
97
92
  case 1:
98
93
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
99
- if (data.accessToken !== undefined && data.accessToken !== null) {
94
+ if (data.accessToken != null) {
100
95
  contents.accessToken = __expectString(data.accessToken);
101
96
  }
102
- if (data.expiresIn !== undefined && data.expiresIn !== null) {
97
+ if (data.expiresIn != null) {
103
98
  contents.expiresIn = __expectInt32(data.expiresIn);
104
99
  }
105
- if (data.idToken !== undefined && data.idToken !== null) {
100
+ if (data.idToken != null) {
106
101
  contents.idToken = __expectString(data.idToken);
107
102
  }
108
- if (data.refreshToken !== undefined && data.refreshToken !== null) {
103
+ if (data.refreshToken != null) {
109
104
  contents.refreshToken = __expectString(data.refreshToken);
110
105
  }
111
- if (data.tokenType !== undefined && data.tokenType !== null) {
106
+ if (data.tokenType != null) {
112
107
  contents.tokenType = __expectString(data.tokenType);
113
108
  }
114
- return [2, Promise.resolve(contents)];
109
+ return [2, contents];
115
110
  }
116
111
  });
117
112
  }); };
118
113
  var deserializeAws_restJson1CreateTokenCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
119
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
114
+ var parsedOutput, _a, errorCode, _b, parsedBody;
120
115
  var _c;
121
116
  return __generator(this, function (_d) {
122
117
  switch (_d.label) {
@@ -177,14 +172,14 @@ var deserializeAws_restJson1CreateTokenCommandError = function (output, context)
177
172
  case 23: throw _d.sent();
178
173
  case 24:
179
174
  parsedBody = parsedOutput.body;
180
- $metadata = deserializeMetadata(output);
181
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
182
- response = new __BaseException({
183
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
184
- $fault: "client",
185
- $metadata: $metadata,
175
+ throwDefaultError({
176
+ output: output,
177
+ parsedBody: parsedBody,
178
+ exceptionCtor: __BaseException,
179
+ errorCode: errorCode,
186
180
  });
187
- throw __decorateServiceException(response, parsedBody);
181
+ _d.label = 25;
182
+ case 25: return [2];
188
183
  }
189
184
  });
190
185
  }); };
@@ -196,44 +191,38 @@ export var deserializeAws_restJson1RegisterClientCommand = function (output, con
196
191
  if (output.statusCode !== 200 && output.statusCode >= 300) {
197
192
  return [2, deserializeAws_restJson1RegisterClientCommandError(output, context)];
198
193
  }
199
- contents = {
194
+ contents = map({
200
195
  $metadata: deserializeMetadata(output),
201
- authorizationEndpoint: undefined,
202
- clientId: undefined,
203
- clientIdIssuedAt: undefined,
204
- clientSecret: undefined,
205
- clientSecretExpiresAt: undefined,
206
- tokenEndpoint: undefined,
207
- };
196
+ });
208
197
  _a = __expectNonNull;
209
198
  _b = __expectObject;
210
199
  return [4, parseBody(output.body, context)];
211
200
  case 1:
212
201
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
213
- if (data.authorizationEndpoint !== undefined && data.authorizationEndpoint !== null) {
202
+ if (data.authorizationEndpoint != null) {
214
203
  contents.authorizationEndpoint = __expectString(data.authorizationEndpoint);
215
204
  }
216
- if (data.clientId !== undefined && data.clientId !== null) {
205
+ if (data.clientId != null) {
217
206
  contents.clientId = __expectString(data.clientId);
218
207
  }
219
- if (data.clientIdIssuedAt !== undefined && data.clientIdIssuedAt !== null) {
208
+ if (data.clientIdIssuedAt != null) {
220
209
  contents.clientIdIssuedAt = __expectLong(data.clientIdIssuedAt);
221
210
  }
222
- if (data.clientSecret !== undefined && data.clientSecret !== null) {
211
+ if (data.clientSecret != null) {
223
212
  contents.clientSecret = __expectString(data.clientSecret);
224
213
  }
225
- if (data.clientSecretExpiresAt !== undefined && data.clientSecretExpiresAt !== null) {
214
+ if (data.clientSecretExpiresAt != null) {
226
215
  contents.clientSecretExpiresAt = __expectLong(data.clientSecretExpiresAt);
227
216
  }
228
- if (data.tokenEndpoint !== undefined && data.tokenEndpoint !== null) {
217
+ if (data.tokenEndpoint != null) {
229
218
  contents.tokenEndpoint = __expectString(data.tokenEndpoint);
230
219
  }
231
- return [2, Promise.resolve(contents)];
220
+ return [2, contents];
232
221
  }
233
222
  });
234
223
  }); };
235
224
  var deserializeAws_restJson1RegisterClientCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
236
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
225
+ var parsedOutput, _a, errorCode, _b, parsedBody;
237
226
  var _c;
238
227
  return __generator(this, function (_d) {
239
228
  switch (_d.label) {
@@ -266,14 +255,14 @@ var deserializeAws_restJson1RegisterClientCommandError = function (output, conte
266
255
  case 9: throw _d.sent();
267
256
  case 10:
268
257
  parsedBody = parsedOutput.body;
269
- $metadata = deserializeMetadata(output);
270
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
271
- response = new __BaseException({
272
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
273
- $fault: "client",
274
- $metadata: $metadata,
258
+ throwDefaultError({
259
+ output: output,
260
+ parsedBody: parsedBody,
261
+ exceptionCtor: __BaseException,
262
+ errorCode: errorCode,
275
263
  });
276
- throw __decorateServiceException(response, parsedBody);
264
+ _d.label = 11;
265
+ case 11: return [2];
277
266
  }
278
267
  });
279
268
  }); };
@@ -285,44 +274,38 @@ export var deserializeAws_restJson1StartDeviceAuthorizationCommand = function (o
285
274
  if (output.statusCode !== 200 && output.statusCode >= 300) {
286
275
  return [2, deserializeAws_restJson1StartDeviceAuthorizationCommandError(output, context)];
287
276
  }
288
- contents = {
277
+ contents = map({
289
278
  $metadata: deserializeMetadata(output),
290
- deviceCode: undefined,
291
- expiresIn: undefined,
292
- interval: undefined,
293
- userCode: undefined,
294
- verificationUri: undefined,
295
- verificationUriComplete: undefined,
296
- };
279
+ });
297
280
  _a = __expectNonNull;
298
281
  _b = __expectObject;
299
282
  return [4, parseBody(output.body, context)];
300
283
  case 1:
301
284
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
302
- if (data.deviceCode !== undefined && data.deviceCode !== null) {
285
+ if (data.deviceCode != null) {
303
286
  contents.deviceCode = __expectString(data.deviceCode);
304
287
  }
305
- if (data.expiresIn !== undefined && data.expiresIn !== null) {
288
+ if (data.expiresIn != null) {
306
289
  contents.expiresIn = __expectInt32(data.expiresIn);
307
290
  }
308
- if (data.interval !== undefined && data.interval !== null) {
291
+ if (data.interval != null) {
309
292
  contents.interval = __expectInt32(data.interval);
310
293
  }
311
- if (data.userCode !== undefined && data.userCode !== null) {
294
+ if (data.userCode != null) {
312
295
  contents.userCode = __expectString(data.userCode);
313
296
  }
314
- if (data.verificationUri !== undefined && data.verificationUri !== null) {
297
+ if (data.verificationUri != null) {
315
298
  contents.verificationUri = __expectString(data.verificationUri);
316
299
  }
317
- if (data.verificationUriComplete !== undefined && data.verificationUriComplete !== null) {
300
+ if (data.verificationUriComplete != null) {
318
301
  contents.verificationUriComplete = __expectString(data.verificationUriComplete);
319
302
  }
320
- return [2, Promise.resolve(contents)];
303
+ return [2, contents];
321
304
  }
322
305
  });
323
306
  }); };
324
307
  var deserializeAws_restJson1StartDeviceAuthorizationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
325
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
308
+ var parsedOutput, _a, errorCode, _b, parsedBody;
326
309
  var _c;
327
310
  return __generator(this, function (_d) {
328
311
  switch (_d.label) {
@@ -359,26 +342,27 @@ var deserializeAws_restJson1StartDeviceAuthorizationCommandError = function (out
359
342
  case 11: throw _d.sent();
360
343
  case 12:
361
344
  parsedBody = parsedOutput.body;
362
- $metadata = deserializeMetadata(output);
363
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
364
- response = new __BaseException({
365
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
366
- $fault: "client",
367
- $metadata: $metadata,
345
+ throwDefaultError({
346
+ output: output,
347
+ parsedBody: parsedBody,
348
+ exceptionCtor: __BaseException,
349
+ errorCode: errorCode,
368
350
  });
369
- throw __decorateServiceException(response, parsedBody);
351
+ _d.label = 13;
352
+ case 13: return [2];
370
353
  }
371
354
  });
372
355
  }); };
356
+ var map = __map;
373
357
  var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
374
358
  var contents, data, exception;
375
359
  return __generator(this, function (_a) {
376
- contents = {};
360
+ contents = map({});
377
361
  data = parsedOutput.body;
378
- if (data.error !== undefined && data.error !== null) {
362
+ if (data.error != null) {
379
363
  contents.error = __expectString(data.error);
380
364
  }
381
- if (data.error_description !== undefined && data.error_description !== null) {
365
+ if (data.error_description != null) {
382
366
  contents.error_description = __expectString(data.error_description);
383
367
  }
384
368
  exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -388,12 +372,12 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
388
372
  var deserializeAws_restJson1AuthorizationPendingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
389
373
  var contents, data, exception;
390
374
  return __generator(this, function (_a) {
391
- contents = {};
375
+ contents = map({});
392
376
  data = parsedOutput.body;
393
- if (data.error !== undefined && data.error !== null) {
377
+ if (data.error != null) {
394
378
  contents.error = __expectString(data.error);
395
379
  }
396
- if (data.error_description !== undefined && data.error_description !== null) {
380
+ if (data.error_description != null) {
397
381
  contents.error_description = __expectString(data.error_description);
398
382
  }
399
383
  exception = new AuthorizationPendingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -403,12 +387,12 @@ var deserializeAws_restJson1AuthorizationPendingExceptionResponse = function (pa
403
387
  var deserializeAws_restJson1ExpiredTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
404
388
  var contents, data, exception;
405
389
  return __generator(this, function (_a) {
406
- contents = {};
390
+ contents = map({});
407
391
  data = parsedOutput.body;
408
- if (data.error !== undefined && data.error !== null) {
392
+ if (data.error != null) {
409
393
  contents.error = __expectString(data.error);
410
394
  }
411
- if (data.error_description !== undefined && data.error_description !== null) {
395
+ if (data.error_description != null) {
412
396
  contents.error_description = __expectString(data.error_description);
413
397
  }
414
398
  exception = new ExpiredTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -418,12 +402,12 @@ var deserializeAws_restJson1ExpiredTokenExceptionResponse = function (parsedOutp
418
402
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
419
403
  var contents, data, exception;
420
404
  return __generator(this, function (_a) {
421
- contents = {};
405
+ contents = map({});
422
406
  data = parsedOutput.body;
423
- if (data.error !== undefined && data.error !== null) {
407
+ if (data.error != null) {
424
408
  contents.error = __expectString(data.error);
425
409
  }
426
- if (data.error_description !== undefined && data.error_description !== null) {
410
+ if (data.error_description != null) {
427
411
  contents.error_description = __expectString(data.error_description);
428
412
  }
429
413
  exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -433,12 +417,12 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
433
417
  var deserializeAws_restJson1InvalidClientExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
434
418
  var contents, data, exception;
435
419
  return __generator(this, function (_a) {
436
- contents = {};
420
+ contents = map({});
437
421
  data = parsedOutput.body;
438
- if (data.error !== undefined && data.error !== null) {
422
+ if (data.error != null) {
439
423
  contents.error = __expectString(data.error);
440
424
  }
441
- if (data.error_description !== undefined && data.error_description !== null) {
425
+ if (data.error_description != null) {
442
426
  contents.error_description = __expectString(data.error_description);
443
427
  }
444
428
  exception = new InvalidClientException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -448,12 +432,12 @@ var deserializeAws_restJson1InvalidClientExceptionResponse = function (parsedOut
448
432
  var deserializeAws_restJson1InvalidClientMetadataExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
449
433
  var contents, data, exception;
450
434
  return __generator(this, function (_a) {
451
- contents = {};
435
+ contents = map({});
452
436
  data = parsedOutput.body;
453
- if (data.error !== undefined && data.error !== null) {
437
+ if (data.error != null) {
454
438
  contents.error = __expectString(data.error);
455
439
  }
456
- if (data.error_description !== undefined && data.error_description !== null) {
440
+ if (data.error_description != null) {
457
441
  contents.error_description = __expectString(data.error_description);
458
442
  }
459
443
  exception = new InvalidClientMetadataException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -463,12 +447,12 @@ var deserializeAws_restJson1InvalidClientMetadataExceptionResponse = function (p
463
447
  var deserializeAws_restJson1InvalidGrantExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
464
448
  var contents, data, exception;
465
449
  return __generator(this, function (_a) {
466
- contents = {};
450
+ contents = map({});
467
451
  data = parsedOutput.body;
468
- if (data.error !== undefined && data.error !== null) {
452
+ if (data.error != null) {
469
453
  contents.error = __expectString(data.error);
470
454
  }
471
- if (data.error_description !== undefined && data.error_description !== null) {
455
+ if (data.error_description != null) {
472
456
  contents.error_description = __expectString(data.error_description);
473
457
  }
474
458
  exception = new InvalidGrantException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -478,12 +462,12 @@ var deserializeAws_restJson1InvalidGrantExceptionResponse = function (parsedOutp
478
462
  var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
479
463
  var contents, data, exception;
480
464
  return __generator(this, function (_a) {
481
- contents = {};
465
+ contents = map({});
482
466
  data = parsedOutput.body;
483
- if (data.error !== undefined && data.error !== null) {
467
+ if (data.error != null) {
484
468
  contents.error = __expectString(data.error);
485
469
  }
486
- if (data.error_description !== undefined && data.error_description !== null) {
470
+ if (data.error_description != null) {
487
471
  contents.error_description = __expectString(data.error_description);
488
472
  }
489
473
  exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -493,12 +477,12 @@ var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOu
493
477
  var deserializeAws_restJson1InvalidScopeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
494
478
  var contents, data, exception;
495
479
  return __generator(this, function (_a) {
496
- contents = {};
480
+ contents = map({});
497
481
  data = parsedOutput.body;
498
- if (data.error !== undefined && data.error !== null) {
482
+ if (data.error != null) {
499
483
  contents.error = __expectString(data.error);
500
484
  }
501
- if (data.error_description !== undefined && data.error_description !== null) {
485
+ if (data.error_description != null) {
502
486
  contents.error_description = __expectString(data.error_description);
503
487
  }
504
488
  exception = new InvalidScopeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -508,12 +492,12 @@ var deserializeAws_restJson1InvalidScopeExceptionResponse = function (parsedOutp
508
492
  var deserializeAws_restJson1SlowDownExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
509
493
  var contents, data, exception;
510
494
  return __generator(this, function (_a) {
511
- contents = {};
495
+ contents = map({});
512
496
  data = parsedOutput.body;
513
- if (data.error !== undefined && data.error !== null) {
497
+ if (data.error != null) {
514
498
  contents.error = __expectString(data.error);
515
499
  }
516
- if (data.error_description !== undefined && data.error_description !== null) {
500
+ if (data.error_description != null) {
517
501
  contents.error_description = __expectString(data.error_description);
518
502
  }
519
503
  exception = new SlowDownException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -523,12 +507,12 @@ var deserializeAws_restJson1SlowDownExceptionResponse = function (parsedOutput,
523
507
  var deserializeAws_restJson1UnauthorizedClientExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
524
508
  var contents, data, exception;
525
509
  return __generator(this, function (_a) {
526
- contents = {};
510
+ contents = map({});
527
511
  data = parsedOutput.body;
528
- if (data.error !== undefined && data.error !== null) {
512
+ if (data.error != null) {
529
513
  contents.error = __expectString(data.error);
530
514
  }
531
- if (data.error_description !== undefined && data.error_description !== null) {
515
+ if (data.error_description != null) {
532
516
  contents.error_description = __expectString(data.error_description);
533
517
  }
534
518
  exception = new UnauthorizedClientException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -538,12 +522,12 @@ var deserializeAws_restJson1UnauthorizedClientExceptionResponse = function (pars
538
522
  var deserializeAws_restJson1UnsupportedGrantTypeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
539
523
  var contents, data, exception;
540
524
  return __generator(this, function (_a) {
541
- contents = {};
525
+ contents = map({});
542
526
  data = parsedOutput.body;
543
- if (data.error !== undefined && data.error !== null) {
527
+ if (data.error != null) {
544
528
  contents.error = __expectString(data.error);
545
529
  }
546
- if (data.error_description !== undefined && data.error_description !== null) {
530
+ if (data.error_description != null) {
547
531
  contents.error_description = __expectString(data.error_description);
548
532
  }
549
533
  exception = new UnsupportedGrantTypeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -554,9 +538,6 @@ var serializeAws_restJson1Scopes = function (input, context) {
554
538
  return input
555
539
  .filter(function (e) { return e != null; })
556
540
  .map(function (entry) {
557
- if (entry === null) {
558
- return null;
559
- }
560
541
  return entry;
561
542
  });
562
543
  };
@@ -64,12 +64,6 @@ export interface CreateTokenRequest {
64
64
  */
65
65
  redirectUri?: string;
66
66
  }
67
- export declare namespace CreateTokenRequest {
68
- /**
69
- * @internal
70
- */
71
- const filterSensitiveLog: (obj: CreateTokenRequest) => any;
72
- }
73
67
  export interface CreateTokenResponse {
74
68
  /**
75
69
  * <p>An opaque token to access AWS SSO resources assigned to a user.</p>
@@ -94,12 +88,6 @@ export interface CreateTokenResponse {
94
88
  */
95
89
  idToken?: string;
96
90
  }
97
- export declare namespace CreateTokenResponse {
98
- /**
99
- * @internal
100
- */
101
- const filterSensitiveLog: (obj: CreateTokenResponse) => any;
102
- }
103
91
  /**
104
92
  * <p>Indicates that the token issued by the service is expired and is no longer valid.</p>
105
93
  */
@@ -249,12 +237,6 @@ export interface RegisterClientRequest {
249
237
  */
250
238
  scopes?: string[];
251
239
  }
252
- export declare namespace RegisterClientRequest {
253
- /**
254
- * @internal
255
- */
256
- const filterSensitiveLog: (obj: RegisterClientRequest) => any;
257
- }
258
240
  export interface RegisterClientResponse {
259
241
  /**
260
242
  * <p>The unique identifier string for each client. This client uses this identifier to get
@@ -283,12 +265,6 @@ export interface RegisterClientResponse {
283
265
  */
284
266
  tokenEndpoint?: string;
285
267
  }
286
- export declare namespace RegisterClientResponse {
287
- /**
288
- * @internal
289
- */
290
- const filterSensitiveLog: (obj: RegisterClientResponse) => any;
291
- }
292
268
  export interface StartDeviceAuthorizationRequest {
293
269
  /**
294
270
  * <p>The unique identifier string for the client that is registered with AWS SSO. This value
@@ -307,12 +283,6 @@ export interface StartDeviceAuthorizationRequest {
307
283
  */
308
284
  startUrl: string | undefined;
309
285
  }
310
- export declare namespace StartDeviceAuthorizationRequest {
311
- /**
312
- * @internal
313
- */
314
- const filterSensitiveLog: (obj: StartDeviceAuthorizationRequest) => any;
315
- }
316
286
  export interface StartDeviceAuthorizationResponse {
317
287
  /**
318
288
  * <p>The short-lived code that is used by the device when polling for a session token.</p>
@@ -341,9 +311,27 @@ export interface StartDeviceAuthorizationResponse {
341
311
  */
342
312
  interval?: number;
343
313
  }
344
- export declare namespace StartDeviceAuthorizationResponse {
345
- /**
346
- * @internal
347
- */
348
- const filterSensitiveLog: (obj: StartDeviceAuthorizationResponse) => any;
349
- }
314
+ /**
315
+ * @internal
316
+ */
317
+ export declare const CreateTokenRequestFilterSensitiveLog: (obj: CreateTokenRequest) => any;
318
+ /**
319
+ * @internal
320
+ */
321
+ export declare const CreateTokenResponseFilterSensitiveLog: (obj: CreateTokenResponse) => any;
322
+ /**
323
+ * @internal
324
+ */
325
+ export declare const RegisterClientRequestFilterSensitiveLog: (obj: RegisterClientRequest) => any;
326
+ /**
327
+ * @internal
328
+ */
329
+ export declare const RegisterClientResponseFilterSensitiveLog: (obj: RegisterClientResponse) => any;
330
+ /**
331
+ * @internal
332
+ */
333
+ export declare const StartDeviceAuthorizationRequestFilterSensitiveLog: (obj: StartDeviceAuthorizationRequest) => any;
334
+ /**
335
+ * @internal
336
+ */
337
+ export declare const StartDeviceAuthorizationResponseFilterSensitiveLog: (obj: StartDeviceAuthorizationResponse) => any;
@@ -36,10 +36,6 @@ export interface CreateTokenRequest {
36
36
 
37
37
  redirectUri?: string;
38
38
  }
39
- export declare namespace CreateTokenRequest {
40
-
41
- const filterSensitiveLog: (obj: CreateTokenRequest) => any;
42
- }
43
39
  export interface CreateTokenResponse {
44
40
 
45
41
  accessToken?: string;
@@ -52,10 +48,6 @@ export interface CreateTokenResponse {
52
48
 
53
49
  idToken?: string;
54
50
  }
55
- export declare namespace CreateTokenResponse {
56
-
57
- const filterSensitiveLog: (obj: CreateTokenResponse) => any;
58
- }
59
51
 
60
52
  export declare class ExpiredTokenException extends __BaseException {
61
53
  readonly name: "ExpiredTokenException";
@@ -154,10 +146,6 @@ export interface RegisterClientRequest {
154
146
 
155
147
  scopes?: string[];
156
148
  }
157
- export declare namespace RegisterClientRequest {
158
-
159
- const filterSensitiveLog: (obj: RegisterClientRequest) => any;
160
- }
161
149
  export interface RegisterClientResponse {
162
150
 
163
151
  clientId?: string;
@@ -172,10 +160,6 @@ export interface RegisterClientResponse {
172
160
 
173
161
  tokenEndpoint?: string;
174
162
  }
175
- export declare namespace RegisterClientResponse {
176
-
177
- const filterSensitiveLog: (obj: RegisterClientResponse) => any;
178
- }
179
163
  export interface StartDeviceAuthorizationRequest {
180
164
 
181
165
  clientId: string | undefined;
@@ -184,10 +168,6 @@ export interface StartDeviceAuthorizationRequest {
184
168
 
185
169
  startUrl: string | undefined;
186
170
  }
187
- export declare namespace StartDeviceAuthorizationRequest {
188
-
189
- const filterSensitiveLog: (obj: StartDeviceAuthorizationRequest) => any;
190
- }
191
171
  export interface StartDeviceAuthorizationResponse {
192
172
 
193
173
  deviceCode?: string;
@@ -202,7 +182,15 @@ export interface StartDeviceAuthorizationResponse {
202
182
 
203
183
  interval?: number;
204
184
  }
205
- export declare namespace StartDeviceAuthorizationResponse {
206
-
207
- const filterSensitiveLog: (obj: StartDeviceAuthorizationResponse) => any;
208
- }
185
+
186
+ export declare const CreateTokenRequestFilterSensitiveLog: (obj: CreateTokenRequest) => any;
187
+
188
+ export declare const CreateTokenResponseFilterSensitiveLog: (obj: CreateTokenResponse) => any;
189
+
190
+ export declare const RegisterClientRequestFilterSensitiveLog: (obj: RegisterClientRequest) => any;
191
+
192
+ export declare const RegisterClientResponseFilterSensitiveLog: (obj: RegisterClientResponse) => any;
193
+
194
+ export declare const StartDeviceAuthorizationRequestFilterSensitiveLog: (obj: StartDeviceAuthorizationRequest) => any;
195
+
196
+ export declare const StartDeviceAuthorizationResponseFilterSensitiveLog: (obj: StartDeviceAuthorizationResponse) => any;