@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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,39 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
7
+
8
+
9
+ ### Features
10
+
11
+ * **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
18
+
19
+
20
+ ### Features
21
+
22
+ * **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
29
+
30
+
31
+ ### Features
32
+
33
+ * **namespaces:** remove namespaces with only a log filter ([#3823](https://github.com/aws/aws-sdk-js-v3/issues/3823)) ([33e6822](https://github.com/aws/aws-sdk-js-v3/commit/33e68228fb64c53dd8f89e6be76dd5f46edc3cfd))
34
+
35
+
36
+
37
+
38
+
6
39
  # [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
7
40
 
8
41
  **Note:** Version bump only for package @aws-sdk/client-sso-oidc
package/README.md CHANGED
@@ -182,7 +182,7 @@ try {
182
182
  const data = await client.send(command);
183
183
  // process data.
184
184
  } catch (error) {
185
- const { requestId, cfId, extendedRequestId } = error.$metadata;
185
+ const { requestId, cfId, extendedRequestId } = error.$$metadata;
186
186
  console.log({ requestId, cfId, extendedRequestId });
187
187
  /**
188
188
  * The keys within exceptions are also parsed.
@@ -20,8 +20,8 @@ class CreateTokenCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.CreateTokenRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.CreateTokenResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.CreateTokenRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.CreateTokenResponseFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20,8 +20,8 @@ class RegisterClientCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.RegisterClientRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.RegisterClientResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.RegisterClientRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.RegisterClientResponseFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20,8 +20,8 @@ class StartDeviceAuthorizationCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.StartDeviceAuthorizationRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.StartDeviceAuthorizationResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.StartDeviceAuthorizationRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.StartDeviceAuthorizationResponseFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StartDeviceAuthorizationResponse = exports.StartDeviceAuthorizationRequest = exports.RegisterClientResponse = exports.RegisterClientRequest = exports.InvalidClientMetadataException = exports.UnsupportedGrantTypeException = exports.UnauthorizedClientException = exports.SlowDownException = exports.InvalidScopeException = exports.InvalidRequestException = exports.InvalidGrantException = exports.InvalidClientException = exports.InternalServerException = exports.ExpiredTokenException = exports.CreateTokenResponse = exports.CreateTokenRequest = exports.AuthorizationPendingException = exports.AccessDeniedException = void 0;
3
+ exports.StartDeviceAuthorizationResponseFilterSensitiveLog = exports.StartDeviceAuthorizationRequestFilterSensitiveLog = exports.RegisterClientResponseFilterSensitiveLog = exports.RegisterClientRequestFilterSensitiveLog = exports.CreateTokenResponseFilterSensitiveLog = exports.CreateTokenRequestFilterSensitiveLog = exports.InvalidClientMetadataException = exports.UnsupportedGrantTypeException = exports.UnauthorizedClientException = exports.SlowDownException = exports.InvalidScopeException = exports.InvalidRequestException = exports.InvalidGrantException = exports.InvalidClientException = exports.InternalServerException = exports.ExpiredTokenException = exports.AuthorizationPendingException = exports.AccessDeniedException = void 0;
4
4
  const SSOOIDCServiceException_1 = require("./SSOOIDCServiceException");
5
5
  class AccessDeniedException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
6
6
  constructor(opts) {
@@ -32,18 +32,6 @@ class AuthorizationPendingException extends SSOOIDCServiceException_1.SSOOIDCSer
32
32
  }
33
33
  }
34
34
  exports.AuthorizationPendingException = AuthorizationPendingException;
35
- var CreateTokenRequest;
36
- (function (CreateTokenRequest) {
37
- CreateTokenRequest.filterSensitiveLog = (obj) => ({
38
- ...obj,
39
- });
40
- })(CreateTokenRequest = exports.CreateTokenRequest || (exports.CreateTokenRequest = {}));
41
- var CreateTokenResponse;
42
- (function (CreateTokenResponse) {
43
- CreateTokenResponse.filterSensitiveLog = (obj) => ({
44
- ...obj,
45
- });
46
- })(CreateTokenResponse = exports.CreateTokenResponse || (exports.CreateTokenResponse = {}));
47
35
  class ExpiredTokenException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
48
36
  constructor(opts) {
49
37
  super({
@@ -194,27 +182,27 @@ class InvalidClientMetadataException extends SSOOIDCServiceException_1.SSOOIDCSe
194
182
  }
195
183
  }
196
184
  exports.InvalidClientMetadataException = InvalidClientMetadataException;
197
- var RegisterClientRequest;
198
- (function (RegisterClientRequest) {
199
- RegisterClientRequest.filterSensitiveLog = (obj) => ({
200
- ...obj,
201
- });
202
- })(RegisterClientRequest = exports.RegisterClientRequest || (exports.RegisterClientRequest = {}));
203
- var RegisterClientResponse;
204
- (function (RegisterClientResponse) {
205
- RegisterClientResponse.filterSensitiveLog = (obj) => ({
206
- ...obj,
207
- });
208
- })(RegisterClientResponse = exports.RegisterClientResponse || (exports.RegisterClientResponse = {}));
209
- var StartDeviceAuthorizationRequest;
210
- (function (StartDeviceAuthorizationRequest) {
211
- StartDeviceAuthorizationRequest.filterSensitiveLog = (obj) => ({
212
- ...obj,
213
- });
214
- })(StartDeviceAuthorizationRequest = exports.StartDeviceAuthorizationRequest || (exports.StartDeviceAuthorizationRequest = {}));
215
- var StartDeviceAuthorizationResponse;
216
- (function (StartDeviceAuthorizationResponse) {
217
- StartDeviceAuthorizationResponse.filterSensitiveLog = (obj) => ({
218
- ...obj,
219
- });
220
- })(StartDeviceAuthorizationResponse = exports.StartDeviceAuthorizationResponse || (exports.StartDeviceAuthorizationResponse = {}));
185
+ const CreateTokenRequestFilterSensitiveLog = (obj) => ({
186
+ ...obj,
187
+ });
188
+ exports.CreateTokenRequestFilterSensitiveLog = CreateTokenRequestFilterSensitiveLog;
189
+ const CreateTokenResponseFilterSensitiveLog = (obj) => ({
190
+ ...obj,
191
+ });
192
+ exports.CreateTokenResponseFilterSensitiveLog = CreateTokenResponseFilterSensitiveLog;
193
+ const RegisterClientRequestFilterSensitiveLog = (obj) => ({
194
+ ...obj,
195
+ });
196
+ exports.RegisterClientRequestFilterSensitiveLog = RegisterClientRequestFilterSensitiveLog;
197
+ const RegisterClientResponseFilterSensitiveLog = (obj) => ({
198
+ ...obj,
199
+ });
200
+ exports.RegisterClientResponseFilterSensitiveLog = RegisterClientResponseFilterSensitiveLog;
201
+ const StartDeviceAuthorizationRequestFilterSensitiveLog = (obj) => ({
202
+ ...obj,
203
+ });
204
+ exports.StartDeviceAuthorizationRequestFilterSensitiveLog = StartDeviceAuthorizationRequestFilterSensitiveLog;
205
+ const StartDeviceAuthorizationResponseFilterSensitiveLog = (obj) => ({
206
+ ...obj,
207
+ });
208
+ exports.StartDeviceAuthorizationResponseFilterSensitiveLog = StartDeviceAuthorizationResponseFilterSensitiveLog;
@@ -83,31 +83,26 @@ const deserializeAws_restJson1CreateTokenCommand = async (output, context) => {
83
83
  if (output.statusCode !== 200 && output.statusCode >= 300) {
84
84
  return deserializeAws_restJson1CreateTokenCommandError(output, context);
85
85
  }
86
- const contents = {
86
+ const 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
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
95
- if (data.accessToken !== undefined && data.accessToken !== null) {
90
+ if (data.accessToken != null) {
96
91
  contents.accessToken = (0, smithy_client_1.expectString)(data.accessToken);
97
92
  }
98
- if (data.expiresIn !== undefined && data.expiresIn !== null) {
93
+ if (data.expiresIn != null) {
99
94
  contents.expiresIn = (0, smithy_client_1.expectInt32)(data.expiresIn);
100
95
  }
101
- if (data.idToken !== undefined && data.idToken !== null) {
96
+ if (data.idToken != null) {
102
97
  contents.idToken = (0, smithy_client_1.expectString)(data.idToken);
103
98
  }
104
- if (data.refreshToken !== undefined && data.refreshToken !== null) {
99
+ if (data.refreshToken != null) {
105
100
  contents.refreshToken = (0, smithy_client_1.expectString)(data.refreshToken);
106
101
  }
107
- if (data.tokenType !== undefined && data.tokenType !== null) {
102
+ if (data.tokenType != null) {
108
103
  contents.tokenType = (0, smithy_client_1.expectString)(data.tokenType);
109
104
  }
110
- return Promise.resolve(contents);
105
+ return contents;
111
106
  };
112
107
  exports.deserializeAws_restJson1CreateTokenCommand = deserializeAws_restJson1CreateTokenCommand;
113
108
  const deserializeAws_restJson1CreateTokenCommandError = async (output, context) => {
@@ -115,7 +110,6 @@ const deserializeAws_restJson1CreateTokenCommandError = async (output, context)
115
110
  ...output,
116
111
  body: await parseBody(output.body, context),
117
112
  };
118
- let response;
119
113
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
120
114
  switch (errorCode) {
121
115
  case "AccessDeniedException":
@@ -153,49 +147,41 @@ const deserializeAws_restJson1CreateTokenCommandError = async (output, context)
153
147
  throw await deserializeAws_restJson1UnsupportedGrantTypeExceptionResponse(parsedOutput, context);
154
148
  default:
155
149
  const parsedBody = parsedOutput.body;
156
- const $metadata = deserializeMetadata(output);
157
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
158
- response = new SSOOIDCServiceException_1.SSOOIDCServiceException({
159
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
160
- $fault: "client",
161
- $metadata,
150
+ (0, smithy_client_1.throwDefaultError)({
151
+ output,
152
+ parsedBody,
153
+ exceptionCtor: SSOOIDCServiceException_1.SSOOIDCServiceException,
154
+ errorCode,
162
155
  });
163
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
164
156
  }
165
157
  };
166
158
  const deserializeAws_restJson1RegisterClientCommand = async (output, context) => {
167
159
  if (output.statusCode !== 200 && output.statusCode >= 300) {
168
160
  return deserializeAws_restJson1RegisterClientCommandError(output, context);
169
161
  }
170
- const contents = {
162
+ const contents = map({
171
163
  $metadata: deserializeMetadata(output),
172
- authorizationEndpoint: undefined,
173
- clientId: undefined,
174
- clientIdIssuedAt: undefined,
175
- clientSecret: undefined,
176
- clientSecretExpiresAt: undefined,
177
- tokenEndpoint: undefined,
178
- };
164
+ });
179
165
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
180
- if (data.authorizationEndpoint !== undefined && data.authorizationEndpoint !== null) {
166
+ if (data.authorizationEndpoint != null) {
181
167
  contents.authorizationEndpoint = (0, smithy_client_1.expectString)(data.authorizationEndpoint);
182
168
  }
183
- if (data.clientId !== undefined && data.clientId !== null) {
169
+ if (data.clientId != null) {
184
170
  contents.clientId = (0, smithy_client_1.expectString)(data.clientId);
185
171
  }
186
- if (data.clientIdIssuedAt !== undefined && data.clientIdIssuedAt !== null) {
172
+ if (data.clientIdIssuedAt != null) {
187
173
  contents.clientIdIssuedAt = (0, smithy_client_1.expectLong)(data.clientIdIssuedAt);
188
174
  }
189
- if (data.clientSecret !== undefined && data.clientSecret !== null) {
175
+ if (data.clientSecret != null) {
190
176
  contents.clientSecret = (0, smithy_client_1.expectString)(data.clientSecret);
191
177
  }
192
- if (data.clientSecretExpiresAt !== undefined && data.clientSecretExpiresAt !== null) {
178
+ if (data.clientSecretExpiresAt != null) {
193
179
  contents.clientSecretExpiresAt = (0, smithy_client_1.expectLong)(data.clientSecretExpiresAt);
194
180
  }
195
- if (data.tokenEndpoint !== undefined && data.tokenEndpoint !== null) {
181
+ if (data.tokenEndpoint != null) {
196
182
  contents.tokenEndpoint = (0, smithy_client_1.expectString)(data.tokenEndpoint);
197
183
  }
198
- return Promise.resolve(contents);
184
+ return contents;
199
185
  };
200
186
  exports.deserializeAws_restJson1RegisterClientCommand = deserializeAws_restJson1RegisterClientCommand;
201
187
  const deserializeAws_restJson1RegisterClientCommandError = async (output, context) => {
@@ -203,7 +189,6 @@ const deserializeAws_restJson1RegisterClientCommandError = async (output, contex
203
189
  ...output,
204
190
  body: await parseBody(output.body, context),
205
191
  };
206
- let response;
207
192
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
208
193
  switch (errorCode) {
209
194
  case "InternalServerException":
@@ -220,49 +205,41 @@ const deserializeAws_restJson1RegisterClientCommandError = async (output, contex
220
205
  throw await deserializeAws_restJson1InvalidScopeExceptionResponse(parsedOutput, context);
221
206
  default:
222
207
  const parsedBody = parsedOutput.body;
223
- const $metadata = deserializeMetadata(output);
224
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
225
- response = new SSOOIDCServiceException_1.SSOOIDCServiceException({
226
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
227
- $fault: "client",
228
- $metadata,
208
+ (0, smithy_client_1.throwDefaultError)({
209
+ output,
210
+ parsedBody,
211
+ exceptionCtor: SSOOIDCServiceException_1.SSOOIDCServiceException,
212
+ errorCode,
229
213
  });
230
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
231
214
  }
232
215
  };
233
216
  const deserializeAws_restJson1StartDeviceAuthorizationCommand = async (output, context) => {
234
217
  if (output.statusCode !== 200 && output.statusCode >= 300) {
235
218
  return deserializeAws_restJson1StartDeviceAuthorizationCommandError(output, context);
236
219
  }
237
- const contents = {
220
+ const contents = map({
238
221
  $metadata: deserializeMetadata(output),
239
- deviceCode: undefined,
240
- expiresIn: undefined,
241
- interval: undefined,
242
- userCode: undefined,
243
- verificationUri: undefined,
244
- verificationUriComplete: undefined,
245
- };
222
+ });
246
223
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
247
- if (data.deviceCode !== undefined && data.deviceCode !== null) {
224
+ if (data.deviceCode != null) {
248
225
  contents.deviceCode = (0, smithy_client_1.expectString)(data.deviceCode);
249
226
  }
250
- if (data.expiresIn !== undefined && data.expiresIn !== null) {
227
+ if (data.expiresIn != null) {
251
228
  contents.expiresIn = (0, smithy_client_1.expectInt32)(data.expiresIn);
252
229
  }
253
- if (data.interval !== undefined && data.interval !== null) {
230
+ if (data.interval != null) {
254
231
  contents.interval = (0, smithy_client_1.expectInt32)(data.interval);
255
232
  }
256
- if (data.userCode !== undefined && data.userCode !== null) {
233
+ if (data.userCode != null) {
257
234
  contents.userCode = (0, smithy_client_1.expectString)(data.userCode);
258
235
  }
259
- if (data.verificationUri !== undefined && data.verificationUri !== null) {
236
+ if (data.verificationUri != null) {
260
237
  contents.verificationUri = (0, smithy_client_1.expectString)(data.verificationUri);
261
238
  }
262
- if (data.verificationUriComplete !== undefined && data.verificationUriComplete !== null) {
239
+ if (data.verificationUriComplete != null) {
263
240
  contents.verificationUriComplete = (0, smithy_client_1.expectString)(data.verificationUriComplete);
264
241
  }
265
- return Promise.resolve(contents);
242
+ return contents;
266
243
  };
267
244
  exports.deserializeAws_restJson1StartDeviceAuthorizationCommand = deserializeAws_restJson1StartDeviceAuthorizationCommand;
268
245
  const deserializeAws_restJson1StartDeviceAuthorizationCommandError = async (output, context) => {
@@ -270,7 +247,6 @@ const deserializeAws_restJson1StartDeviceAuthorizationCommandError = async (outp
270
247
  ...output,
271
248
  body: await parseBody(output.body, context),
272
249
  };
273
- let response;
274
250
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
275
251
  switch (errorCode) {
276
252
  case "InternalServerException":
@@ -290,23 +266,22 @@ const deserializeAws_restJson1StartDeviceAuthorizationCommandError = async (outp
290
266
  throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
291
267
  default:
292
268
  const parsedBody = parsedOutput.body;
293
- const $metadata = deserializeMetadata(output);
294
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
295
- response = new SSOOIDCServiceException_1.SSOOIDCServiceException({
296
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
297
- $fault: "client",
298
- $metadata,
269
+ (0, smithy_client_1.throwDefaultError)({
270
+ output,
271
+ parsedBody,
272
+ exceptionCtor: SSOOIDCServiceException_1.SSOOIDCServiceException,
273
+ errorCode,
299
274
  });
300
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
301
275
  }
302
276
  };
277
+ const map = smithy_client_1.map;
303
278
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
304
- const contents = {};
279
+ const contents = map({});
305
280
  const data = parsedOutput.body;
306
- if (data.error !== undefined && data.error !== null) {
281
+ if (data.error != null) {
307
282
  contents.error = (0, smithy_client_1.expectString)(data.error);
308
283
  }
309
- if (data.error_description !== undefined && data.error_description !== null) {
284
+ if (data.error_description != null) {
310
285
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
311
286
  }
312
287
  const exception = new models_0_1.AccessDeniedException({
@@ -316,12 +291,12 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
316
291
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
317
292
  };
318
293
  const deserializeAws_restJson1AuthorizationPendingExceptionResponse = async (parsedOutput, context) => {
319
- const contents = {};
294
+ const contents = map({});
320
295
  const data = parsedOutput.body;
321
- if (data.error !== undefined && data.error !== null) {
296
+ if (data.error != null) {
322
297
  contents.error = (0, smithy_client_1.expectString)(data.error);
323
298
  }
324
- if (data.error_description !== undefined && data.error_description !== null) {
299
+ if (data.error_description != null) {
325
300
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
326
301
  }
327
302
  const exception = new models_0_1.AuthorizationPendingException({
@@ -331,12 +306,12 @@ const deserializeAws_restJson1AuthorizationPendingExceptionResponse = async (par
331
306
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
332
307
  };
333
308
  const deserializeAws_restJson1ExpiredTokenExceptionResponse = async (parsedOutput, context) => {
334
- const contents = {};
309
+ const contents = map({});
335
310
  const data = parsedOutput.body;
336
- if (data.error !== undefined && data.error !== null) {
311
+ if (data.error != null) {
337
312
  contents.error = (0, smithy_client_1.expectString)(data.error);
338
313
  }
339
- if (data.error_description !== undefined && data.error_description !== null) {
314
+ if (data.error_description != null) {
340
315
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
341
316
  }
342
317
  const exception = new models_0_1.ExpiredTokenException({
@@ -346,12 +321,12 @@ const deserializeAws_restJson1ExpiredTokenExceptionResponse = async (parsedOutpu
346
321
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
347
322
  };
348
323
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
349
- const contents = {};
324
+ const contents = map({});
350
325
  const data = parsedOutput.body;
351
- if (data.error !== undefined && data.error !== null) {
326
+ if (data.error != null) {
352
327
  contents.error = (0, smithy_client_1.expectString)(data.error);
353
328
  }
354
- if (data.error_description !== undefined && data.error_description !== null) {
329
+ if (data.error_description != null) {
355
330
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
356
331
  }
357
332
  const exception = new models_0_1.InternalServerException({
@@ -361,12 +336,12 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
361
336
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
362
337
  };
363
338
  const deserializeAws_restJson1InvalidClientExceptionResponse = async (parsedOutput, context) => {
364
- const contents = {};
339
+ const contents = map({});
365
340
  const data = parsedOutput.body;
366
- if (data.error !== undefined && data.error !== null) {
341
+ if (data.error != null) {
367
342
  contents.error = (0, smithy_client_1.expectString)(data.error);
368
343
  }
369
- if (data.error_description !== undefined && data.error_description !== null) {
344
+ if (data.error_description != null) {
370
345
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
371
346
  }
372
347
  const exception = new models_0_1.InvalidClientException({
@@ -376,12 +351,12 @@ const deserializeAws_restJson1InvalidClientExceptionResponse = async (parsedOutp
376
351
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
377
352
  };
378
353
  const deserializeAws_restJson1InvalidClientMetadataExceptionResponse = async (parsedOutput, context) => {
379
- const contents = {};
354
+ const contents = map({});
380
355
  const data = parsedOutput.body;
381
- if (data.error !== undefined && data.error !== null) {
356
+ if (data.error != null) {
382
357
  contents.error = (0, smithy_client_1.expectString)(data.error);
383
358
  }
384
- if (data.error_description !== undefined && data.error_description !== null) {
359
+ if (data.error_description != null) {
385
360
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
386
361
  }
387
362
  const exception = new models_0_1.InvalidClientMetadataException({
@@ -391,12 +366,12 @@ const deserializeAws_restJson1InvalidClientMetadataExceptionResponse = async (pa
391
366
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
392
367
  };
393
368
  const deserializeAws_restJson1InvalidGrantExceptionResponse = async (parsedOutput, context) => {
394
- const contents = {};
369
+ const contents = map({});
395
370
  const data = parsedOutput.body;
396
- if (data.error !== undefined && data.error !== null) {
371
+ if (data.error != null) {
397
372
  contents.error = (0, smithy_client_1.expectString)(data.error);
398
373
  }
399
- if (data.error_description !== undefined && data.error_description !== null) {
374
+ if (data.error_description != null) {
400
375
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
401
376
  }
402
377
  const exception = new models_0_1.InvalidGrantException({
@@ -406,12 +381,12 @@ const deserializeAws_restJson1InvalidGrantExceptionResponse = async (parsedOutpu
406
381
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
407
382
  };
408
383
  const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
409
- const contents = {};
384
+ const contents = map({});
410
385
  const data = parsedOutput.body;
411
- if (data.error !== undefined && data.error !== null) {
386
+ if (data.error != null) {
412
387
  contents.error = (0, smithy_client_1.expectString)(data.error);
413
388
  }
414
- if (data.error_description !== undefined && data.error_description !== null) {
389
+ if (data.error_description != null) {
415
390
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
416
391
  }
417
392
  const exception = new models_0_1.InvalidRequestException({
@@ -421,12 +396,12 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
421
396
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
422
397
  };
423
398
  const deserializeAws_restJson1InvalidScopeExceptionResponse = async (parsedOutput, context) => {
424
- const contents = {};
399
+ const contents = map({});
425
400
  const data = parsedOutput.body;
426
- if (data.error !== undefined && data.error !== null) {
401
+ if (data.error != null) {
427
402
  contents.error = (0, smithy_client_1.expectString)(data.error);
428
403
  }
429
- if (data.error_description !== undefined && data.error_description !== null) {
404
+ if (data.error_description != null) {
430
405
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
431
406
  }
432
407
  const exception = new models_0_1.InvalidScopeException({
@@ -436,12 +411,12 @@ const deserializeAws_restJson1InvalidScopeExceptionResponse = async (parsedOutpu
436
411
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
437
412
  };
438
413
  const deserializeAws_restJson1SlowDownExceptionResponse = async (parsedOutput, context) => {
439
- const contents = {};
414
+ const contents = map({});
440
415
  const data = parsedOutput.body;
441
- if (data.error !== undefined && data.error !== null) {
416
+ if (data.error != null) {
442
417
  contents.error = (0, smithy_client_1.expectString)(data.error);
443
418
  }
444
- if (data.error_description !== undefined && data.error_description !== null) {
419
+ if (data.error_description != null) {
445
420
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
446
421
  }
447
422
  const exception = new models_0_1.SlowDownException({
@@ -451,12 +426,12 @@ const deserializeAws_restJson1SlowDownExceptionResponse = async (parsedOutput, c
451
426
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
452
427
  };
453
428
  const deserializeAws_restJson1UnauthorizedClientExceptionResponse = async (parsedOutput, context) => {
454
- const contents = {};
429
+ const contents = map({});
455
430
  const data = parsedOutput.body;
456
- if (data.error !== undefined && data.error !== null) {
431
+ if (data.error != null) {
457
432
  contents.error = (0, smithy_client_1.expectString)(data.error);
458
433
  }
459
- if (data.error_description !== undefined && data.error_description !== null) {
434
+ if (data.error_description != null) {
460
435
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
461
436
  }
462
437
  const exception = new models_0_1.UnauthorizedClientException({
@@ -466,12 +441,12 @@ const deserializeAws_restJson1UnauthorizedClientExceptionResponse = async (parse
466
441
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
467
442
  };
468
443
  const deserializeAws_restJson1UnsupportedGrantTypeExceptionResponse = async (parsedOutput, context) => {
469
- const contents = {};
444
+ const contents = map({});
470
445
  const data = parsedOutput.body;
471
- if (data.error !== undefined && data.error !== null) {
446
+ if (data.error != null) {
472
447
  contents.error = (0, smithy_client_1.expectString)(data.error);
473
448
  }
474
- if (data.error_description !== undefined && data.error_description !== null) {
449
+ if (data.error_description != null) {
475
450
  contents.error_description = (0, smithy_client_1.expectString)(data.error_description);
476
451
  }
477
452
  const exception = new models_0_1.UnsupportedGrantTypeException({
@@ -484,9 +459,6 @@ const serializeAws_restJson1Scopes = (input, context) => {
484
459
  return input
485
460
  .filter((e) => e != null)
486
461
  .map((entry) => {
487
- if (entry === null) {
488
- return null;
489
- }
490
462
  return entry;
491
463
  });
492
464
  };
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { CreateTokenRequest, CreateTokenResponse } from "../models/models_0";
4
+ import { CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1CreateTokenCommand, serializeAws_restJson1CreateTokenCommand, } from "../protocols/Aws_restJson1";
6
6
  var CreateTokenCommand = (function (_super) {
7
7
  __extends(CreateTokenCommand, _super);
@@ -20,8 +20,8 @@ var CreateTokenCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: CreateTokenRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: CreateTokenResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: CreateTokenRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: CreateTokenResponseFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { RegisterClientRequest, RegisterClientResponse } from "../models/models_0";
4
+ import { RegisterClientRequestFilterSensitiveLog, RegisterClientResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1RegisterClientCommand, serializeAws_restJson1RegisterClientCommand, } from "../protocols/Aws_restJson1";
6
6
  var RegisterClientCommand = (function (_super) {
7
7
  __extends(RegisterClientCommand, _super);
@@ -20,8 +20,8 @@ var RegisterClientCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: RegisterClientRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: RegisterClientResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: RegisterClientRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: RegisterClientResponseFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { StartDeviceAuthorizationRequest, StartDeviceAuthorizationResponse } from "../models/models_0";
4
+ import { StartDeviceAuthorizationRequestFilterSensitiveLog, StartDeviceAuthorizationResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1StartDeviceAuthorizationCommand, serializeAws_restJson1StartDeviceAuthorizationCommand, } from "../protocols/Aws_restJson1";
6
6
  var StartDeviceAuthorizationCommand = (function (_super) {
7
7
  __extends(StartDeviceAuthorizationCommand, _super);
@@ -20,8 +20,8 @@ var StartDeviceAuthorizationCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: StartDeviceAuthorizationRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: StartDeviceAuthorizationResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: StartDeviceAuthorizationRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: StartDeviceAuthorizationResponseFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {