@aws-sdk/client-identitystore 3.183.0 → 3.186.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +2 -2
  3. package/dist-es/Identitystore.js +85 -78
  4. package/dist-es/IdentitystoreClient.js +28 -22
  5. package/dist-es/commands/CreateGroupCommand.js +28 -21
  6. package/dist-es/commands/CreateGroupMembershipCommand.js +28 -21
  7. package/dist-es/commands/CreateUserCommand.js +28 -21
  8. package/dist-es/commands/DeleteGroupCommand.js +28 -21
  9. package/dist-es/commands/DeleteGroupMembershipCommand.js +28 -21
  10. package/dist-es/commands/DeleteUserCommand.js +28 -21
  11. package/dist-es/commands/DescribeGroupCommand.js +28 -21
  12. package/dist-es/commands/DescribeGroupMembershipCommand.js +28 -21
  13. package/dist-es/commands/DescribeUserCommand.js +28 -21
  14. package/dist-es/commands/GetGroupIdCommand.js +28 -21
  15. package/dist-es/commands/GetGroupMembershipIdCommand.js +28 -21
  16. package/dist-es/commands/GetUserIdCommand.js +28 -21
  17. package/dist-es/commands/IsMemberInGroupsCommand.js +28 -21
  18. package/dist-es/commands/ListGroupMembershipsCommand.js +28 -21
  19. package/dist-es/commands/ListGroupMembershipsForMemberCommand.js +28 -21
  20. package/dist-es/commands/ListGroupsCommand.js +28 -21
  21. package/dist-es/commands/ListUsersCommand.js +28 -21
  22. package/dist-es/commands/UpdateGroupCommand.js +28 -21
  23. package/dist-es/commands/UpdateUserCommand.js +28 -21
  24. package/dist-es/endpoints.js +8 -8
  25. package/dist-es/models/IdentitystoreServiceException.js +10 -5
  26. package/dist-es/models/models_0.js +165 -351
  27. package/dist-es/pagination/ListGroupMembershipsForMemberPaginator.js +68 -25
  28. package/dist-es/pagination/ListGroupMembershipsPaginator.js +68 -25
  29. package/dist-es/pagination/ListGroupsPaginator.js +68 -25
  30. package/dist-es/pagination/ListUsersPaginator.js +68 -25
  31. package/dist-es/protocols/Aws_json1_1.js +1818 -1444
  32. package/dist-es/runtimeConfig.browser.js +12 -26
  33. package/dist-es/runtimeConfig.js +12 -30
  34. package/dist-es/runtimeConfig.native.js +5 -8
  35. package/dist-es/runtimeConfig.shared.js +11 -8
  36. package/package.json +33 -33
@@ -1,1408 +1,1759 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectString as __expectString, expectUnion as __expectUnion, throwDefaultError, } from "@aws-sdk/smithy-client";
3
4
  import { IdentitystoreServiceException as __BaseException } from "../models/IdentitystoreServiceException";
4
5
  import { AccessDeniedException, AlternateIdentifier, ConflictException, InternalServerException, MemberId, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
- export const serializeAws_json1_1CreateGroupCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "AWSIdentityStore.CreateGroup",
9
- };
10
- let body;
11
- body = JSON.stringify(serializeAws_json1_1CreateGroupRequest(input, context));
12
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
- };
14
- export const serializeAws_json1_1CreateGroupMembershipCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "AWSIdentityStore.CreateGroupMembership",
18
- };
19
- let body;
20
- body = JSON.stringify(serializeAws_json1_1CreateGroupMembershipRequest(input, context));
21
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
- };
23
- export const serializeAws_json1_1CreateUserCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "AWSIdentityStore.CreateUser",
27
- };
28
- let body;
29
- body = JSON.stringify(serializeAws_json1_1CreateUserRequest(input, context));
30
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
- };
32
- export const serializeAws_json1_1DeleteGroupCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "AWSIdentityStore.DeleteGroup",
36
- };
37
- let body;
38
- body = JSON.stringify(serializeAws_json1_1DeleteGroupRequest(input, context));
39
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
- };
41
- export const serializeAws_json1_1DeleteGroupMembershipCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "AWSIdentityStore.DeleteGroupMembership",
45
- };
46
- let body;
47
- body = JSON.stringify(serializeAws_json1_1DeleteGroupMembershipRequest(input, context));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- export const serializeAws_json1_1DeleteUserCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "AWSIdentityStore.DeleteUser",
54
- };
55
- let body;
56
- body = JSON.stringify(serializeAws_json1_1DeleteUserRequest(input, context));
57
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
- };
59
- export const serializeAws_json1_1DescribeGroupCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "AWSIdentityStore.DescribeGroup",
63
- };
64
- let body;
65
- body = JSON.stringify(serializeAws_json1_1DescribeGroupRequest(input, context));
66
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
- };
68
- export const serializeAws_json1_1DescribeGroupMembershipCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "AWSIdentityStore.DescribeGroupMembership",
72
- };
73
- let body;
74
- body = JSON.stringify(serializeAws_json1_1DescribeGroupMembershipRequest(input, context));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- export const serializeAws_json1_1DescribeUserCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "AWSIdentityStore.DescribeUser",
81
- };
82
- let body;
83
- body = JSON.stringify(serializeAws_json1_1DescribeUserRequest(input, context));
84
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
- };
86
- export const serializeAws_json1_1GetGroupIdCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "AWSIdentityStore.GetGroupId",
90
- };
91
- let body;
92
- body = JSON.stringify(serializeAws_json1_1GetGroupIdRequest(input, context));
93
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
- };
95
- export const serializeAws_json1_1GetGroupMembershipIdCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "AWSIdentityStore.GetGroupMembershipId",
99
- };
100
- let body;
101
- body = JSON.stringify(serializeAws_json1_1GetGroupMembershipIdRequest(input, context));
102
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
- };
104
- export const serializeAws_json1_1GetUserIdCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "AWSIdentityStore.GetUserId",
108
- };
109
- let body;
110
- body = JSON.stringify(serializeAws_json1_1GetUserIdRequest(input, context));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- export const serializeAws_json1_1IsMemberInGroupsCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "AWSIdentityStore.IsMemberInGroups",
117
- };
118
- let body;
119
- body = JSON.stringify(serializeAws_json1_1IsMemberInGroupsRequest(input, context));
120
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
- };
122
- export const serializeAws_json1_1ListGroupMembershipsCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "AWSIdentityStore.ListGroupMemberships",
126
- };
127
- let body;
128
- body = JSON.stringify(serializeAws_json1_1ListGroupMembershipsRequest(input, context));
129
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
- };
131
- export const serializeAws_json1_1ListGroupMembershipsForMemberCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "AWSIdentityStore.ListGroupMembershipsForMember",
135
- };
136
- let body;
137
- body = JSON.stringify(serializeAws_json1_1ListGroupMembershipsForMemberRequest(input, context));
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
- export const serializeAws_json1_1ListGroupsCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "AWSIdentityStore.ListGroups",
144
- };
145
- let body;
146
- body = JSON.stringify(serializeAws_json1_1ListGroupsRequest(input, context));
147
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
- };
149
- export const serializeAws_json1_1ListUsersCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "AWSIdentityStore.ListUsers",
153
- };
154
- let body;
155
- body = JSON.stringify(serializeAws_json1_1ListUsersRequest(input, context));
156
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
- };
158
- export const serializeAws_json1_1UpdateGroupCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "AWSIdentityStore.UpdateGroup",
162
- };
163
- let body;
164
- body = JSON.stringify(serializeAws_json1_1UpdateGroupRequest(input, context));
165
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
- };
167
- export const serializeAws_json1_1UpdateUserCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "AWSIdentityStore.UpdateUser",
171
- };
172
- let body;
173
- body = JSON.stringify(serializeAws_json1_1UpdateUserRequest(input, context));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- export const deserializeAws_json1_1CreateGroupCommand = async (output, context) => {
177
- if (output.statusCode >= 300) {
178
- return deserializeAws_json1_1CreateGroupCommandError(output, context);
179
- }
180
- const data = await parseBody(output.body, context);
181
- let contents = {};
182
- contents = deserializeAws_json1_1CreateGroupResponse(data, context);
183
- const response = {
184
- $metadata: deserializeMetadata(output),
185
- ...contents,
186
- };
187
- return Promise.resolve(response);
188
- };
189
- const deserializeAws_json1_1CreateGroupCommandError = async (output, context) => {
190
- const parsedOutput = {
191
- ...output,
192
- body: await parseErrorBody(output.body, context),
193
- };
194
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
195
- switch (errorCode) {
196
- case "AccessDeniedException":
197
- case "com.amazonaws.identitystore#AccessDeniedException":
198
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
199
- case "ConflictException":
200
- case "com.amazonaws.identitystore#ConflictException":
201
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
202
- case "InternalServerException":
203
- case "com.amazonaws.identitystore#InternalServerException":
204
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
205
- case "ResourceNotFoundException":
206
- case "com.amazonaws.identitystore#ResourceNotFoundException":
207
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
208
- case "ServiceQuotaExceededException":
209
- case "com.amazonaws.identitystore#ServiceQuotaExceededException":
210
- throw await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
211
- case "ThrottlingException":
212
- case "com.amazonaws.identitystore#ThrottlingException":
213
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
214
- case "ValidationException":
215
- case "com.amazonaws.identitystore#ValidationException":
216
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
217
- default:
218
- const parsedBody = parsedOutput.body;
219
- throwDefaultError({
220
- output,
221
- parsedBody,
222
- exceptionCtor: __BaseException,
223
- errorCode,
224
- });
225
- }
226
- };
227
- export const deserializeAws_json1_1CreateGroupMembershipCommand = async (output, context) => {
228
- if (output.statusCode >= 300) {
229
- return deserializeAws_json1_1CreateGroupMembershipCommandError(output, context);
230
- }
231
- const data = await parseBody(output.body, context);
232
- let contents = {};
233
- contents = deserializeAws_json1_1CreateGroupMembershipResponse(data, context);
234
- const response = {
235
- $metadata: deserializeMetadata(output),
236
- ...contents,
237
- };
238
- return Promise.resolve(response);
239
- };
240
- const deserializeAws_json1_1CreateGroupMembershipCommandError = async (output, context) => {
241
- const parsedOutput = {
242
- ...output,
243
- body: await parseErrorBody(output.body, context),
244
- };
245
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
246
- switch (errorCode) {
247
- case "AccessDeniedException":
248
- case "com.amazonaws.identitystore#AccessDeniedException":
249
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
250
- case "ConflictException":
251
- case "com.amazonaws.identitystore#ConflictException":
252
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
253
- case "InternalServerException":
254
- case "com.amazonaws.identitystore#InternalServerException":
255
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
256
- case "ResourceNotFoundException":
257
- case "com.amazonaws.identitystore#ResourceNotFoundException":
258
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
259
- case "ServiceQuotaExceededException":
260
- case "com.amazonaws.identitystore#ServiceQuotaExceededException":
261
- throw await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
262
- case "ThrottlingException":
263
- case "com.amazonaws.identitystore#ThrottlingException":
264
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
265
- case "ValidationException":
266
- case "com.amazonaws.identitystore#ValidationException":
267
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
268
- default:
269
- const parsedBody = parsedOutput.body;
270
- throwDefaultError({
271
- output,
272
- parsedBody,
273
- exceptionCtor: __BaseException,
274
- errorCode,
275
- });
276
- }
277
- };
278
- export const deserializeAws_json1_1CreateUserCommand = async (output, context) => {
279
- if (output.statusCode >= 300) {
280
- return deserializeAws_json1_1CreateUserCommandError(output, context);
281
- }
282
- const data = await parseBody(output.body, context);
283
- let contents = {};
284
- contents = deserializeAws_json1_1CreateUserResponse(data, context);
285
- const response = {
286
- $metadata: deserializeMetadata(output),
287
- ...contents,
288
- };
289
- return Promise.resolve(response);
290
- };
291
- const deserializeAws_json1_1CreateUserCommandError = async (output, context) => {
292
- const parsedOutput = {
293
- ...output,
294
- body: await parseErrorBody(output.body, context),
295
- };
296
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
297
- switch (errorCode) {
298
- case "AccessDeniedException":
299
- case "com.amazonaws.identitystore#AccessDeniedException":
300
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
301
- case "ConflictException":
302
- case "com.amazonaws.identitystore#ConflictException":
303
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
304
- case "InternalServerException":
305
- case "com.amazonaws.identitystore#InternalServerException":
306
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
307
- case "ResourceNotFoundException":
308
- case "com.amazonaws.identitystore#ResourceNotFoundException":
309
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
310
- case "ServiceQuotaExceededException":
311
- case "com.amazonaws.identitystore#ServiceQuotaExceededException":
312
- throw await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
313
- case "ThrottlingException":
314
- case "com.amazonaws.identitystore#ThrottlingException":
315
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
316
- case "ValidationException":
317
- case "com.amazonaws.identitystore#ValidationException":
318
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
319
- default:
320
- const parsedBody = parsedOutput.body;
321
- throwDefaultError({
322
- output,
323
- parsedBody,
324
- exceptionCtor: __BaseException,
325
- errorCode,
326
- });
327
- }
328
- };
329
- export const deserializeAws_json1_1DeleteGroupCommand = async (output, context) => {
330
- if (output.statusCode >= 300) {
331
- return deserializeAws_json1_1DeleteGroupCommandError(output, context);
332
- }
333
- const data = await parseBody(output.body, context);
334
- let contents = {};
335
- contents = deserializeAws_json1_1DeleteGroupResponse(data, context);
336
- const response = {
337
- $metadata: deserializeMetadata(output),
338
- ...contents,
339
- };
340
- return Promise.resolve(response);
341
- };
342
- const deserializeAws_json1_1DeleteGroupCommandError = async (output, context) => {
343
- const parsedOutput = {
344
- ...output,
345
- body: await parseErrorBody(output.body, context),
346
- };
347
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
348
- switch (errorCode) {
349
- case "AccessDeniedException":
350
- case "com.amazonaws.identitystore#AccessDeniedException":
351
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
352
- case "ConflictException":
353
- case "com.amazonaws.identitystore#ConflictException":
354
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
355
- case "InternalServerException":
356
- case "com.amazonaws.identitystore#InternalServerException":
357
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
358
- case "ResourceNotFoundException":
359
- case "com.amazonaws.identitystore#ResourceNotFoundException":
360
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
361
- case "ThrottlingException":
362
- case "com.amazonaws.identitystore#ThrottlingException":
363
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
364
- case "ValidationException":
365
- case "com.amazonaws.identitystore#ValidationException":
366
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
367
- default:
368
- const parsedBody = parsedOutput.body;
369
- throwDefaultError({
370
- output,
371
- parsedBody,
372
- exceptionCtor: __BaseException,
373
- errorCode,
374
- });
375
- }
376
- };
377
- export const deserializeAws_json1_1DeleteGroupMembershipCommand = async (output, context) => {
378
- if (output.statusCode >= 300) {
379
- return deserializeAws_json1_1DeleteGroupMembershipCommandError(output, context);
380
- }
381
- const data = await parseBody(output.body, context);
382
- let contents = {};
383
- contents = deserializeAws_json1_1DeleteGroupMembershipResponse(data, context);
384
- const response = {
385
- $metadata: deserializeMetadata(output),
386
- ...contents,
387
- };
388
- return Promise.resolve(response);
389
- };
390
- const deserializeAws_json1_1DeleteGroupMembershipCommandError = async (output, context) => {
391
- const parsedOutput = {
392
- ...output,
393
- body: await parseErrorBody(output.body, context),
394
- };
395
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
396
- switch (errorCode) {
397
- case "AccessDeniedException":
398
- case "com.amazonaws.identitystore#AccessDeniedException":
399
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
400
- case "ConflictException":
401
- case "com.amazonaws.identitystore#ConflictException":
402
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
403
- case "InternalServerException":
404
- case "com.amazonaws.identitystore#InternalServerException":
405
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
406
- case "ResourceNotFoundException":
407
- case "com.amazonaws.identitystore#ResourceNotFoundException":
408
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
409
- case "ThrottlingException":
410
- case "com.amazonaws.identitystore#ThrottlingException":
411
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
412
- case "ValidationException":
413
- case "com.amazonaws.identitystore#ValidationException":
414
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
415
- default:
416
- const parsedBody = parsedOutput.body;
417
- throwDefaultError({
418
- output,
419
- parsedBody,
420
- exceptionCtor: __BaseException,
421
- errorCode,
422
- });
423
- }
424
- };
425
- export const deserializeAws_json1_1DeleteUserCommand = async (output, context) => {
426
- if (output.statusCode >= 300) {
427
- return deserializeAws_json1_1DeleteUserCommandError(output, context);
428
- }
429
- const data = await parseBody(output.body, context);
430
- let contents = {};
431
- contents = deserializeAws_json1_1DeleteUserResponse(data, context);
432
- const response = {
433
- $metadata: deserializeMetadata(output),
434
- ...contents,
435
- };
436
- return Promise.resolve(response);
437
- };
438
- const deserializeAws_json1_1DeleteUserCommandError = async (output, context) => {
439
- const parsedOutput = {
440
- ...output,
441
- body: await parseErrorBody(output.body, context),
442
- };
443
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
444
- switch (errorCode) {
445
- case "AccessDeniedException":
446
- case "com.amazonaws.identitystore#AccessDeniedException":
447
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
448
- case "ConflictException":
449
- case "com.amazonaws.identitystore#ConflictException":
450
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
451
- case "InternalServerException":
452
- case "com.amazonaws.identitystore#InternalServerException":
453
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
454
- case "ResourceNotFoundException":
455
- case "com.amazonaws.identitystore#ResourceNotFoundException":
456
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
457
- case "ThrottlingException":
458
- case "com.amazonaws.identitystore#ThrottlingException":
459
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
460
- case "ValidationException":
461
- case "com.amazonaws.identitystore#ValidationException":
462
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
463
- default:
464
- const parsedBody = parsedOutput.body;
465
- throwDefaultError({
466
- output,
467
- parsedBody,
468
- exceptionCtor: __BaseException,
469
- errorCode,
470
- });
471
- }
472
- };
473
- export const deserializeAws_json1_1DescribeGroupCommand = async (output, context) => {
474
- if (output.statusCode >= 300) {
475
- return deserializeAws_json1_1DescribeGroupCommandError(output, context);
476
- }
477
- const data = await parseBody(output.body, context);
478
- let contents = {};
479
- contents = deserializeAws_json1_1DescribeGroupResponse(data, context);
480
- const response = {
481
- $metadata: deserializeMetadata(output),
482
- ...contents,
483
- };
484
- return Promise.resolve(response);
485
- };
486
- const deserializeAws_json1_1DescribeGroupCommandError = async (output, context) => {
487
- const parsedOutput = {
488
- ...output,
489
- body: await parseErrorBody(output.body, context),
490
- };
491
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
492
- switch (errorCode) {
493
- case "AccessDeniedException":
494
- case "com.amazonaws.identitystore#AccessDeniedException":
495
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
496
- case "InternalServerException":
497
- case "com.amazonaws.identitystore#InternalServerException":
498
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
499
- case "ResourceNotFoundException":
500
- case "com.amazonaws.identitystore#ResourceNotFoundException":
501
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
502
- case "ThrottlingException":
503
- case "com.amazonaws.identitystore#ThrottlingException":
504
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
505
- case "ValidationException":
506
- case "com.amazonaws.identitystore#ValidationException":
507
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
508
- default:
509
- const parsedBody = parsedOutput.body;
510
- throwDefaultError({
511
- output,
512
- parsedBody,
513
- exceptionCtor: __BaseException,
514
- errorCode,
515
- });
516
- }
517
- };
518
- export const deserializeAws_json1_1DescribeGroupMembershipCommand = async (output, context) => {
519
- if (output.statusCode >= 300) {
520
- return deserializeAws_json1_1DescribeGroupMembershipCommandError(output, context);
521
- }
522
- const data = await parseBody(output.body, context);
523
- let contents = {};
524
- contents = deserializeAws_json1_1DescribeGroupMembershipResponse(data, context);
525
- const response = {
526
- $metadata: deserializeMetadata(output),
527
- ...contents,
528
- };
529
- return Promise.resolve(response);
530
- };
531
- const deserializeAws_json1_1DescribeGroupMembershipCommandError = async (output, context) => {
532
- const parsedOutput = {
533
- ...output,
534
- body: await parseErrorBody(output.body, context),
535
- };
536
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
537
- switch (errorCode) {
538
- case "AccessDeniedException":
539
- case "com.amazonaws.identitystore#AccessDeniedException":
540
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
541
- case "InternalServerException":
542
- case "com.amazonaws.identitystore#InternalServerException":
543
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
544
- case "ResourceNotFoundException":
545
- case "com.amazonaws.identitystore#ResourceNotFoundException":
546
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
547
- case "ThrottlingException":
548
- case "com.amazonaws.identitystore#ThrottlingException":
549
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
550
- case "ValidationException":
551
- case "com.amazonaws.identitystore#ValidationException":
552
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
553
- default:
554
- const parsedBody = parsedOutput.body;
555
- throwDefaultError({
556
- output,
557
- parsedBody,
558
- exceptionCtor: __BaseException,
559
- errorCode,
560
- });
561
- }
562
- };
563
- export const deserializeAws_json1_1DescribeUserCommand = async (output, context) => {
564
- if (output.statusCode >= 300) {
565
- return deserializeAws_json1_1DescribeUserCommandError(output, context);
566
- }
567
- const data = await parseBody(output.body, context);
568
- let contents = {};
569
- contents = deserializeAws_json1_1DescribeUserResponse(data, context);
570
- const response = {
571
- $metadata: deserializeMetadata(output),
572
- ...contents,
573
- };
574
- return Promise.resolve(response);
575
- };
576
- const deserializeAws_json1_1DescribeUserCommandError = async (output, context) => {
577
- const parsedOutput = {
578
- ...output,
579
- body: await parseErrorBody(output.body, context),
580
- };
581
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
582
- switch (errorCode) {
583
- case "AccessDeniedException":
584
- case "com.amazonaws.identitystore#AccessDeniedException":
585
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
586
- case "InternalServerException":
587
- case "com.amazonaws.identitystore#InternalServerException":
588
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
589
- case "ResourceNotFoundException":
590
- case "com.amazonaws.identitystore#ResourceNotFoundException":
591
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
592
- case "ThrottlingException":
593
- case "com.amazonaws.identitystore#ThrottlingException":
594
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
595
- case "ValidationException":
596
- case "com.amazonaws.identitystore#ValidationException":
597
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
598
- default:
599
- const parsedBody = parsedOutput.body;
600
- throwDefaultError({
601
- output,
602
- parsedBody,
603
- exceptionCtor: __BaseException,
604
- errorCode,
605
- });
606
- }
607
- };
608
- export const deserializeAws_json1_1GetGroupIdCommand = async (output, context) => {
609
- if (output.statusCode >= 300) {
610
- return deserializeAws_json1_1GetGroupIdCommandError(output, context);
611
- }
612
- const data = await parseBody(output.body, context);
613
- let contents = {};
614
- contents = deserializeAws_json1_1GetGroupIdResponse(data, context);
615
- const response = {
616
- $metadata: deserializeMetadata(output),
617
- ...contents,
618
- };
619
- return Promise.resolve(response);
620
- };
621
- const deserializeAws_json1_1GetGroupIdCommandError = async (output, context) => {
622
- const parsedOutput = {
623
- ...output,
624
- body: await parseErrorBody(output.body, context),
625
- };
626
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
627
- switch (errorCode) {
628
- case "AccessDeniedException":
629
- case "com.amazonaws.identitystore#AccessDeniedException":
630
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
631
- case "InternalServerException":
632
- case "com.amazonaws.identitystore#InternalServerException":
633
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
634
- case "ResourceNotFoundException":
635
- case "com.amazonaws.identitystore#ResourceNotFoundException":
636
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
637
- case "ThrottlingException":
638
- case "com.amazonaws.identitystore#ThrottlingException":
639
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
640
- case "ValidationException":
641
- case "com.amazonaws.identitystore#ValidationException":
642
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
643
- default:
644
- const parsedBody = parsedOutput.body;
645
- throwDefaultError({
646
- output,
647
- parsedBody,
648
- exceptionCtor: __BaseException,
649
- errorCode,
650
- });
651
- }
652
- };
653
- export const deserializeAws_json1_1GetGroupMembershipIdCommand = async (output, context) => {
654
- if (output.statusCode >= 300) {
655
- return deserializeAws_json1_1GetGroupMembershipIdCommandError(output, context);
656
- }
657
- const data = await parseBody(output.body, context);
658
- let contents = {};
659
- contents = deserializeAws_json1_1GetGroupMembershipIdResponse(data, context);
660
- const response = {
661
- $metadata: deserializeMetadata(output),
662
- ...contents,
663
- };
664
- return Promise.resolve(response);
665
- };
666
- const deserializeAws_json1_1GetGroupMembershipIdCommandError = async (output, context) => {
667
- const parsedOutput = {
668
- ...output,
669
- body: await parseErrorBody(output.body, context),
670
- };
671
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
672
- switch (errorCode) {
673
- case "AccessDeniedException":
674
- case "com.amazonaws.identitystore#AccessDeniedException":
675
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
676
- case "InternalServerException":
677
- case "com.amazonaws.identitystore#InternalServerException":
678
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
679
- case "ResourceNotFoundException":
680
- case "com.amazonaws.identitystore#ResourceNotFoundException":
681
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
682
- case "ThrottlingException":
683
- case "com.amazonaws.identitystore#ThrottlingException":
684
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
685
- case "ValidationException":
686
- case "com.amazonaws.identitystore#ValidationException":
687
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
688
- default:
689
- const parsedBody = parsedOutput.body;
690
- throwDefaultError({
691
- output,
692
- parsedBody,
693
- exceptionCtor: __BaseException,
694
- errorCode,
695
- });
696
- }
697
- };
698
- export const deserializeAws_json1_1GetUserIdCommand = async (output, context) => {
699
- if (output.statusCode >= 300) {
700
- return deserializeAws_json1_1GetUserIdCommandError(output, context);
701
- }
702
- const data = await parseBody(output.body, context);
703
- let contents = {};
704
- contents = deserializeAws_json1_1GetUserIdResponse(data, context);
705
- const response = {
706
- $metadata: deserializeMetadata(output),
707
- ...contents,
708
- };
709
- return Promise.resolve(response);
710
- };
711
- const deserializeAws_json1_1GetUserIdCommandError = async (output, context) => {
712
- const parsedOutput = {
713
- ...output,
714
- body: await parseErrorBody(output.body, context),
715
- };
716
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
717
- switch (errorCode) {
718
- case "AccessDeniedException":
719
- case "com.amazonaws.identitystore#AccessDeniedException":
720
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
721
- case "InternalServerException":
722
- case "com.amazonaws.identitystore#InternalServerException":
723
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
724
- case "ResourceNotFoundException":
725
- case "com.amazonaws.identitystore#ResourceNotFoundException":
726
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
727
- case "ThrottlingException":
728
- case "com.amazonaws.identitystore#ThrottlingException":
729
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
730
- case "ValidationException":
731
- case "com.amazonaws.identitystore#ValidationException":
732
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
733
- default:
734
- const parsedBody = parsedOutput.body;
735
- throwDefaultError({
736
- output,
737
- parsedBody,
738
- exceptionCtor: __BaseException,
739
- errorCode,
740
- });
741
- }
742
- };
743
- export const deserializeAws_json1_1IsMemberInGroupsCommand = async (output, context) => {
744
- if (output.statusCode >= 300) {
745
- return deserializeAws_json1_1IsMemberInGroupsCommandError(output, context);
746
- }
747
- const data = await parseBody(output.body, context);
748
- let contents = {};
749
- contents = deserializeAws_json1_1IsMemberInGroupsResponse(data, context);
750
- const response = {
751
- $metadata: deserializeMetadata(output),
752
- ...contents,
753
- };
754
- return Promise.resolve(response);
755
- };
756
- const deserializeAws_json1_1IsMemberInGroupsCommandError = async (output, context) => {
757
- const parsedOutput = {
758
- ...output,
759
- body: await parseErrorBody(output.body, context),
760
- };
761
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
762
- switch (errorCode) {
763
- case "AccessDeniedException":
764
- case "com.amazonaws.identitystore#AccessDeniedException":
765
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
766
- case "InternalServerException":
767
- case "com.amazonaws.identitystore#InternalServerException":
768
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
769
- case "ResourceNotFoundException":
770
- case "com.amazonaws.identitystore#ResourceNotFoundException":
771
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
772
- case "ThrottlingException":
773
- case "com.amazonaws.identitystore#ThrottlingException":
774
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
775
- case "ValidationException":
776
- case "com.amazonaws.identitystore#ValidationException":
777
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
778
- default:
779
- const parsedBody = parsedOutput.body;
780
- throwDefaultError({
781
- output,
782
- parsedBody,
783
- exceptionCtor: __BaseException,
784
- errorCode,
785
- });
786
- }
787
- };
788
- export const deserializeAws_json1_1ListGroupMembershipsCommand = async (output, context) => {
789
- if (output.statusCode >= 300) {
790
- return deserializeAws_json1_1ListGroupMembershipsCommandError(output, context);
791
- }
792
- const data = await parseBody(output.body, context);
793
- let contents = {};
794
- contents = deserializeAws_json1_1ListGroupMembershipsResponse(data, context);
795
- const response = {
796
- $metadata: deserializeMetadata(output),
797
- ...contents,
798
- };
799
- return Promise.resolve(response);
800
- };
801
- const deserializeAws_json1_1ListGroupMembershipsCommandError = async (output, context) => {
802
- const parsedOutput = {
803
- ...output,
804
- body: await parseErrorBody(output.body, context),
805
- };
806
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
807
- switch (errorCode) {
808
- case "AccessDeniedException":
809
- case "com.amazonaws.identitystore#AccessDeniedException":
810
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
811
- case "InternalServerException":
812
- case "com.amazonaws.identitystore#InternalServerException":
813
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
814
- case "ResourceNotFoundException":
815
- case "com.amazonaws.identitystore#ResourceNotFoundException":
816
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
817
- case "ThrottlingException":
818
- case "com.amazonaws.identitystore#ThrottlingException":
819
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
820
- case "ValidationException":
821
- case "com.amazonaws.identitystore#ValidationException":
822
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
823
- default:
824
- const parsedBody = parsedOutput.body;
825
- throwDefaultError({
826
- output,
827
- parsedBody,
828
- exceptionCtor: __BaseException,
829
- errorCode,
830
- });
831
- }
832
- };
833
- export const deserializeAws_json1_1ListGroupMembershipsForMemberCommand = async (output, context) => {
834
- if (output.statusCode >= 300) {
835
- return deserializeAws_json1_1ListGroupMembershipsForMemberCommandError(output, context);
836
- }
837
- const data = await parseBody(output.body, context);
838
- let contents = {};
839
- contents = deserializeAws_json1_1ListGroupMembershipsForMemberResponse(data, context);
840
- const response = {
841
- $metadata: deserializeMetadata(output),
842
- ...contents,
843
- };
844
- return Promise.resolve(response);
845
- };
846
- const deserializeAws_json1_1ListGroupMembershipsForMemberCommandError = async (output, context) => {
847
- const parsedOutput = {
848
- ...output,
849
- body: await parseErrorBody(output.body, context),
850
- };
851
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
852
- switch (errorCode) {
853
- case "AccessDeniedException":
854
- case "com.amazonaws.identitystore#AccessDeniedException":
855
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
856
- case "InternalServerException":
857
- case "com.amazonaws.identitystore#InternalServerException":
858
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
859
- case "ResourceNotFoundException":
860
- case "com.amazonaws.identitystore#ResourceNotFoundException":
861
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
862
- case "ThrottlingException":
863
- case "com.amazonaws.identitystore#ThrottlingException":
864
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
865
- case "ValidationException":
866
- case "com.amazonaws.identitystore#ValidationException":
867
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
868
- default:
869
- const parsedBody = parsedOutput.body;
870
- throwDefaultError({
871
- output,
872
- parsedBody,
873
- exceptionCtor: __BaseException,
874
- errorCode,
875
- });
876
- }
877
- };
878
- export const deserializeAws_json1_1ListGroupsCommand = async (output, context) => {
879
- if (output.statusCode >= 300) {
880
- return deserializeAws_json1_1ListGroupsCommandError(output, context);
881
- }
882
- const data = await parseBody(output.body, context);
883
- let contents = {};
884
- contents = deserializeAws_json1_1ListGroupsResponse(data, context);
885
- const response = {
886
- $metadata: deserializeMetadata(output),
887
- ...contents,
888
- };
889
- return Promise.resolve(response);
890
- };
891
- const deserializeAws_json1_1ListGroupsCommandError = async (output, context) => {
892
- const parsedOutput = {
893
- ...output,
894
- body: await parseErrorBody(output.body, context),
895
- };
896
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
897
- switch (errorCode) {
898
- case "AccessDeniedException":
899
- case "com.amazonaws.identitystore#AccessDeniedException":
900
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
901
- case "InternalServerException":
902
- case "com.amazonaws.identitystore#InternalServerException":
903
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
904
- case "ResourceNotFoundException":
905
- case "com.amazonaws.identitystore#ResourceNotFoundException":
906
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
907
- case "ThrottlingException":
908
- case "com.amazonaws.identitystore#ThrottlingException":
909
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
910
- case "ValidationException":
911
- case "com.amazonaws.identitystore#ValidationException":
912
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
913
- default:
914
- const parsedBody = parsedOutput.body;
915
- throwDefaultError({
916
- output,
917
- parsedBody,
918
- exceptionCtor: __BaseException,
919
- errorCode,
920
- });
921
- }
922
- };
923
- export const deserializeAws_json1_1ListUsersCommand = async (output, context) => {
924
- if (output.statusCode >= 300) {
925
- return deserializeAws_json1_1ListUsersCommandError(output, context);
926
- }
927
- const data = await parseBody(output.body, context);
928
- let contents = {};
929
- contents = deserializeAws_json1_1ListUsersResponse(data, context);
930
- const response = {
931
- $metadata: deserializeMetadata(output),
932
- ...contents,
933
- };
934
- return Promise.resolve(response);
935
- };
936
- const deserializeAws_json1_1ListUsersCommandError = async (output, context) => {
937
- const parsedOutput = {
938
- ...output,
939
- body: await parseErrorBody(output.body, context),
940
- };
941
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
942
- switch (errorCode) {
943
- case "AccessDeniedException":
944
- case "com.amazonaws.identitystore#AccessDeniedException":
945
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
946
- case "InternalServerException":
947
- case "com.amazonaws.identitystore#InternalServerException":
948
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
949
- case "ResourceNotFoundException":
950
- case "com.amazonaws.identitystore#ResourceNotFoundException":
951
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
952
- case "ThrottlingException":
953
- case "com.amazonaws.identitystore#ThrottlingException":
954
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
955
- case "ValidationException":
956
- case "com.amazonaws.identitystore#ValidationException":
957
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
958
- default:
959
- const parsedBody = parsedOutput.body;
960
- throwDefaultError({
961
- output,
962
- parsedBody,
963
- exceptionCtor: __BaseException,
964
- errorCode,
965
- });
966
- }
967
- };
968
- export const deserializeAws_json1_1UpdateGroupCommand = async (output, context) => {
969
- if (output.statusCode >= 300) {
970
- return deserializeAws_json1_1UpdateGroupCommandError(output, context);
971
- }
972
- const data = await parseBody(output.body, context);
973
- let contents = {};
974
- contents = deserializeAws_json1_1UpdateGroupResponse(data, context);
975
- const response = {
976
- $metadata: deserializeMetadata(output),
977
- ...contents,
978
- };
979
- return Promise.resolve(response);
980
- };
981
- const deserializeAws_json1_1UpdateGroupCommandError = async (output, context) => {
982
- const parsedOutput = {
983
- ...output,
984
- body: await parseErrorBody(output.body, context),
985
- };
986
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
987
- switch (errorCode) {
988
- case "AccessDeniedException":
989
- case "com.amazonaws.identitystore#AccessDeniedException":
990
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
991
- case "ConflictException":
992
- case "com.amazonaws.identitystore#ConflictException":
993
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
994
- case "InternalServerException":
995
- case "com.amazonaws.identitystore#InternalServerException":
996
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
997
- case "ResourceNotFoundException":
998
- case "com.amazonaws.identitystore#ResourceNotFoundException":
999
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1000
- case "ServiceQuotaExceededException":
1001
- case "com.amazonaws.identitystore#ServiceQuotaExceededException":
1002
- throw await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1003
- case "ThrottlingException":
1004
- case "com.amazonaws.identitystore#ThrottlingException":
1005
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1006
- case "ValidationException":
1007
- case "com.amazonaws.identitystore#ValidationException":
1008
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1009
- default:
1010
- const parsedBody = parsedOutput.body;
1011
- throwDefaultError({
1012
- output,
1013
- parsedBody,
1014
- exceptionCtor: __BaseException,
1015
- errorCode,
1016
- });
1017
- }
1018
- };
1019
- export const deserializeAws_json1_1UpdateUserCommand = async (output, context) => {
1020
- if (output.statusCode >= 300) {
1021
- return deserializeAws_json1_1UpdateUserCommandError(output, context);
1022
- }
1023
- const data = await parseBody(output.body, context);
1024
- let contents = {};
1025
- contents = deserializeAws_json1_1UpdateUserResponse(data, context);
1026
- const response = {
1027
- $metadata: deserializeMetadata(output),
1028
- ...contents,
1029
- };
1030
- return Promise.resolve(response);
1031
- };
1032
- const deserializeAws_json1_1UpdateUserCommandError = async (output, context) => {
1033
- const parsedOutput = {
1034
- ...output,
1035
- body: await parseErrorBody(output.body, context),
1036
- };
1037
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1038
- switch (errorCode) {
1039
- case "AccessDeniedException":
1040
- case "com.amazonaws.identitystore#AccessDeniedException":
1041
- throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
1042
- case "ConflictException":
1043
- case "com.amazonaws.identitystore#ConflictException":
1044
- throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
1045
- case "InternalServerException":
1046
- case "com.amazonaws.identitystore#InternalServerException":
1047
- throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
1048
- case "ResourceNotFoundException":
1049
- case "com.amazonaws.identitystore#ResourceNotFoundException":
1050
- throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1051
- case "ServiceQuotaExceededException":
1052
- case "com.amazonaws.identitystore#ServiceQuotaExceededException":
1053
- throw await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1054
- case "ThrottlingException":
1055
- case "com.amazonaws.identitystore#ThrottlingException":
1056
- throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
1057
- case "ValidationException":
1058
- case "com.amazonaws.identitystore#ValidationException":
1059
- throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1060
- default:
1061
- const parsedBody = parsedOutput.body;
1062
- throwDefaultError({
1063
- output,
1064
- parsedBody,
1065
- exceptionCtor: __BaseException,
1066
- errorCode,
1067
- });
1068
- }
1069
- };
1070
- const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1071
- const body = parsedOutput.body;
1072
- const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1073
- const exception = new AccessDeniedException({
1074
- $metadata: deserializeMetadata(parsedOutput),
1075
- ...deserialized,
1076
- });
1077
- return __decorateServiceException(exception, body);
1078
- };
1079
- const deserializeAws_json1_1ConflictExceptionResponse = async (parsedOutput, context) => {
1080
- const body = parsedOutput.body;
1081
- const deserialized = deserializeAws_json1_1ConflictException(body, context);
1082
- const exception = new ConflictException({
1083
- $metadata: deserializeMetadata(parsedOutput),
1084
- ...deserialized,
1085
- });
1086
- return __decorateServiceException(exception, body);
1087
- };
1088
- const deserializeAws_json1_1InternalServerExceptionResponse = async (parsedOutput, context) => {
1089
- const body = parsedOutput.body;
1090
- const deserialized = deserializeAws_json1_1InternalServerException(body, context);
1091
- const exception = new InternalServerException({
1092
- $metadata: deserializeMetadata(parsedOutput),
1093
- ...deserialized,
1094
- });
1095
- return __decorateServiceException(exception, body);
1096
- };
1097
- const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1098
- const body = parsedOutput.body;
1099
- const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1100
- const exception = new ResourceNotFoundException({
1101
- $metadata: deserializeMetadata(parsedOutput),
1102
- ...deserialized,
1103
- });
1104
- return __decorateServiceException(exception, body);
1105
- };
1106
- const deserializeAws_json1_1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
1107
- const body = parsedOutput.body;
1108
- const deserialized = deserializeAws_json1_1ServiceQuotaExceededException(body, context);
1109
- const exception = new ServiceQuotaExceededException({
1110
- $metadata: deserializeMetadata(parsedOutput),
1111
- ...deserialized,
1112
- });
1113
- return __decorateServiceException(exception, body);
1114
- };
1115
- const deserializeAws_json1_1ThrottlingExceptionResponse = async (parsedOutput, context) => {
1116
- const body = parsedOutput.body;
1117
- const deserialized = deserializeAws_json1_1ThrottlingException(body, context);
1118
- const exception = new ThrottlingException({
1119
- $metadata: deserializeMetadata(parsedOutput),
1120
- ...deserialized,
1121
- });
1122
- return __decorateServiceException(exception, body);
1123
- };
1124
- const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
1125
- const body = parsedOutput.body;
1126
- const deserialized = deserializeAws_json1_1ValidationException(body, context);
1127
- const exception = new ValidationException({
1128
- $metadata: deserializeMetadata(parsedOutput),
1129
- ...deserialized,
1130
- });
1131
- return __decorateServiceException(exception, body);
1132
- };
1133
- const serializeAws_json1_1Address = (input, context) => {
1134
- return {
1135
- ...(input.Country != null && { Country: input.Country }),
1136
- ...(input.Formatted != null && { Formatted: input.Formatted }),
1137
- ...(input.Locality != null && { Locality: input.Locality }),
1138
- ...(input.PostalCode != null && { PostalCode: input.PostalCode }),
1139
- ...(input.Primary != null && { Primary: input.Primary }),
1140
- ...(input.Region != null && { Region: input.Region }),
1141
- ...(input.StreetAddress != null && { StreetAddress: input.StreetAddress }),
1142
- ...(input.Type != null && { Type: input.Type }),
1143
- };
6
+ export var serializeAws_json1_1CreateGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
+ var headers, body;
8
+ return __generator(this, function (_a) {
9
+ headers = {
10
+ "content-type": "application/x-amz-json-1.1",
11
+ "x-amz-target": "AWSIdentityStore.CreateGroup",
12
+ };
13
+ body = JSON.stringify(serializeAws_json1_1CreateGroupRequest(input, context));
14
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
+ });
16
+ }); };
17
+ export var serializeAws_json1_1CreateGroupMembershipCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
+ var headers, body;
19
+ return __generator(this, function (_a) {
20
+ headers = {
21
+ "content-type": "application/x-amz-json-1.1",
22
+ "x-amz-target": "AWSIdentityStore.CreateGroupMembership",
23
+ };
24
+ body = JSON.stringify(serializeAws_json1_1CreateGroupMembershipRequest(input, context));
25
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
+ });
27
+ }); };
28
+ export var serializeAws_json1_1CreateUserCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
29
+ var headers, body;
30
+ return __generator(this, function (_a) {
31
+ headers = {
32
+ "content-type": "application/x-amz-json-1.1",
33
+ "x-amz-target": "AWSIdentityStore.CreateUser",
34
+ };
35
+ body = JSON.stringify(serializeAws_json1_1CreateUserRequest(input, context));
36
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
+ });
38
+ }); };
39
+ export var serializeAws_json1_1DeleteGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var headers, body;
41
+ return __generator(this, function (_a) {
42
+ headers = {
43
+ "content-type": "application/x-amz-json-1.1",
44
+ "x-amz-target": "AWSIdentityStore.DeleteGroup",
45
+ };
46
+ body = JSON.stringify(serializeAws_json1_1DeleteGroupRequest(input, context));
47
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
+ });
49
+ }); };
50
+ export var serializeAws_json1_1DeleteGroupMembershipCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
51
+ var headers, body;
52
+ return __generator(this, function (_a) {
53
+ headers = {
54
+ "content-type": "application/x-amz-json-1.1",
55
+ "x-amz-target": "AWSIdentityStore.DeleteGroupMembership",
56
+ };
57
+ body = JSON.stringify(serializeAws_json1_1DeleteGroupMembershipRequest(input, context));
58
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
+ });
60
+ }); };
61
+ export var serializeAws_json1_1DeleteUserCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
+ var headers, body;
63
+ return __generator(this, function (_a) {
64
+ headers = {
65
+ "content-type": "application/x-amz-json-1.1",
66
+ "x-amz-target": "AWSIdentityStore.DeleteUser",
67
+ };
68
+ body = JSON.stringify(serializeAws_json1_1DeleteUserRequest(input, context));
69
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
+ });
71
+ }); };
72
+ export var serializeAws_json1_1DescribeGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
73
+ var headers, body;
74
+ return __generator(this, function (_a) {
75
+ headers = {
76
+ "content-type": "application/x-amz-json-1.1",
77
+ "x-amz-target": "AWSIdentityStore.DescribeGroup",
78
+ };
79
+ body = JSON.stringify(serializeAws_json1_1DescribeGroupRequest(input, context));
80
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
+ });
82
+ }); };
83
+ export var serializeAws_json1_1DescribeGroupMembershipCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
84
+ var headers, body;
85
+ return __generator(this, function (_a) {
86
+ headers = {
87
+ "content-type": "application/x-amz-json-1.1",
88
+ "x-amz-target": "AWSIdentityStore.DescribeGroupMembership",
89
+ };
90
+ body = JSON.stringify(serializeAws_json1_1DescribeGroupMembershipRequest(input, context));
91
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
+ });
93
+ }); };
94
+ export var serializeAws_json1_1DescribeUserCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
95
+ var headers, body;
96
+ return __generator(this, function (_a) {
97
+ headers = {
98
+ "content-type": "application/x-amz-json-1.1",
99
+ "x-amz-target": "AWSIdentityStore.DescribeUser",
100
+ };
101
+ body = JSON.stringify(serializeAws_json1_1DescribeUserRequest(input, context));
102
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
+ });
104
+ }); };
105
+ export var serializeAws_json1_1GetGroupIdCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
106
+ var headers, body;
107
+ return __generator(this, function (_a) {
108
+ headers = {
109
+ "content-type": "application/x-amz-json-1.1",
110
+ "x-amz-target": "AWSIdentityStore.GetGroupId",
111
+ };
112
+ body = JSON.stringify(serializeAws_json1_1GetGroupIdRequest(input, context));
113
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
+ });
115
+ }); };
116
+ export var serializeAws_json1_1GetGroupMembershipIdCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
117
+ var headers, body;
118
+ return __generator(this, function (_a) {
119
+ headers = {
120
+ "content-type": "application/x-amz-json-1.1",
121
+ "x-amz-target": "AWSIdentityStore.GetGroupMembershipId",
122
+ };
123
+ body = JSON.stringify(serializeAws_json1_1GetGroupMembershipIdRequest(input, context));
124
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
+ });
126
+ }); };
127
+ export var serializeAws_json1_1GetUserIdCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
128
+ var headers, body;
129
+ return __generator(this, function (_a) {
130
+ headers = {
131
+ "content-type": "application/x-amz-json-1.1",
132
+ "x-amz-target": "AWSIdentityStore.GetUserId",
133
+ };
134
+ body = JSON.stringify(serializeAws_json1_1GetUserIdRequest(input, context));
135
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
+ });
137
+ }); };
138
+ export var serializeAws_json1_1IsMemberInGroupsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
139
+ var headers, body;
140
+ return __generator(this, function (_a) {
141
+ headers = {
142
+ "content-type": "application/x-amz-json-1.1",
143
+ "x-amz-target": "AWSIdentityStore.IsMemberInGroups",
144
+ };
145
+ body = JSON.stringify(serializeAws_json1_1IsMemberInGroupsRequest(input, context));
146
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
+ });
148
+ }); };
149
+ export var serializeAws_json1_1ListGroupMembershipsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
150
+ var headers, body;
151
+ return __generator(this, function (_a) {
152
+ headers = {
153
+ "content-type": "application/x-amz-json-1.1",
154
+ "x-amz-target": "AWSIdentityStore.ListGroupMemberships",
155
+ };
156
+ body = JSON.stringify(serializeAws_json1_1ListGroupMembershipsRequest(input, context));
157
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
+ });
159
+ }); };
160
+ export var serializeAws_json1_1ListGroupMembershipsForMemberCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
161
+ var headers, body;
162
+ return __generator(this, function (_a) {
163
+ headers = {
164
+ "content-type": "application/x-amz-json-1.1",
165
+ "x-amz-target": "AWSIdentityStore.ListGroupMembershipsForMember",
166
+ };
167
+ body = JSON.stringify(serializeAws_json1_1ListGroupMembershipsForMemberRequest(input, context));
168
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
+ });
170
+ }); };
171
+ export var serializeAws_json1_1ListGroupsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
172
+ var headers, body;
173
+ return __generator(this, function (_a) {
174
+ headers = {
175
+ "content-type": "application/x-amz-json-1.1",
176
+ "x-amz-target": "AWSIdentityStore.ListGroups",
177
+ };
178
+ body = JSON.stringify(serializeAws_json1_1ListGroupsRequest(input, context));
179
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
180
+ });
181
+ }); };
182
+ export var serializeAws_json1_1ListUsersCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
183
+ var headers, body;
184
+ return __generator(this, function (_a) {
185
+ headers = {
186
+ "content-type": "application/x-amz-json-1.1",
187
+ "x-amz-target": "AWSIdentityStore.ListUsers",
188
+ };
189
+ body = JSON.stringify(serializeAws_json1_1ListUsersRequest(input, context));
190
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
191
+ });
192
+ }); };
193
+ export var serializeAws_json1_1UpdateGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
194
+ var headers, body;
195
+ return __generator(this, function (_a) {
196
+ headers = {
197
+ "content-type": "application/x-amz-json-1.1",
198
+ "x-amz-target": "AWSIdentityStore.UpdateGroup",
199
+ };
200
+ body = JSON.stringify(serializeAws_json1_1UpdateGroupRequest(input, context));
201
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
202
+ });
203
+ }); };
204
+ export var serializeAws_json1_1UpdateUserCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
205
+ var headers, body;
206
+ return __generator(this, function (_a) {
207
+ headers = {
208
+ "content-type": "application/x-amz-json-1.1",
209
+ "x-amz-target": "AWSIdentityStore.UpdateUser",
210
+ };
211
+ body = JSON.stringify(serializeAws_json1_1UpdateUserRequest(input, context));
212
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
213
+ });
214
+ }); };
215
+ export var deserializeAws_json1_1CreateGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
216
+ var data, contents, response;
217
+ return __generator(this, function (_a) {
218
+ switch (_a.label) {
219
+ case 0:
220
+ if (output.statusCode >= 300) {
221
+ return [2, deserializeAws_json1_1CreateGroupCommandError(output, context)];
222
+ }
223
+ return [4, parseBody(output.body, context)];
224
+ case 1:
225
+ data = _a.sent();
226
+ contents = {};
227
+ contents = deserializeAws_json1_1CreateGroupResponse(data, context);
228
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
229
+ return [2, Promise.resolve(response)];
230
+ }
231
+ });
232
+ }); };
233
+ var deserializeAws_json1_1CreateGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
234
+ var parsedOutput, _a, errorCode, _b, parsedBody;
235
+ var _c;
236
+ return __generator(this, function (_d) {
237
+ switch (_d.label) {
238
+ case 0:
239
+ _a = [__assign({}, output)];
240
+ _c = {};
241
+ return [4, parseErrorBody(output.body, context)];
242
+ case 1:
243
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
244
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
245
+ _b = errorCode;
246
+ switch (_b) {
247
+ case "AccessDeniedException": return [3, 2];
248
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
249
+ case "ConflictException": return [3, 4];
250
+ case "com.amazonaws.identitystore#ConflictException": return [3, 4];
251
+ case "InternalServerException": return [3, 6];
252
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 6];
253
+ case "ResourceNotFoundException": return [3, 8];
254
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 8];
255
+ case "ServiceQuotaExceededException": return [3, 10];
256
+ case "com.amazonaws.identitystore#ServiceQuotaExceededException": return [3, 10];
257
+ case "ThrottlingException": return [3, 12];
258
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 12];
259
+ case "ValidationException": return [3, 14];
260
+ case "com.amazonaws.identitystore#ValidationException": return [3, 14];
261
+ }
262
+ return [3, 16];
263
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
264
+ case 3: throw _d.sent();
265
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
266
+ case 5: throw _d.sent();
267
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
268
+ case 7: throw _d.sent();
269
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
270
+ case 9: throw _d.sent();
271
+ case 10: return [4, deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
272
+ case 11: throw _d.sent();
273
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
274
+ case 13: throw _d.sent();
275
+ case 14: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
276
+ case 15: throw _d.sent();
277
+ case 16:
278
+ parsedBody = parsedOutput.body;
279
+ throwDefaultError({
280
+ output: output,
281
+ parsedBody: parsedBody,
282
+ exceptionCtor: __BaseException,
283
+ errorCode: errorCode,
284
+ });
285
+ _d.label = 17;
286
+ case 17: return [2];
287
+ }
288
+ });
289
+ }); };
290
+ export var deserializeAws_json1_1CreateGroupMembershipCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
291
+ var data, contents, response;
292
+ return __generator(this, function (_a) {
293
+ switch (_a.label) {
294
+ case 0:
295
+ if (output.statusCode >= 300) {
296
+ return [2, deserializeAws_json1_1CreateGroupMembershipCommandError(output, context)];
297
+ }
298
+ return [4, parseBody(output.body, context)];
299
+ case 1:
300
+ data = _a.sent();
301
+ contents = {};
302
+ contents = deserializeAws_json1_1CreateGroupMembershipResponse(data, context);
303
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
304
+ return [2, Promise.resolve(response)];
305
+ }
306
+ });
307
+ }); };
308
+ var deserializeAws_json1_1CreateGroupMembershipCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
309
+ var parsedOutput, _a, errorCode, _b, parsedBody;
310
+ var _c;
311
+ return __generator(this, function (_d) {
312
+ switch (_d.label) {
313
+ case 0:
314
+ _a = [__assign({}, output)];
315
+ _c = {};
316
+ return [4, parseErrorBody(output.body, context)];
317
+ case 1:
318
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
319
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
320
+ _b = errorCode;
321
+ switch (_b) {
322
+ case "AccessDeniedException": return [3, 2];
323
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
324
+ case "ConflictException": return [3, 4];
325
+ case "com.amazonaws.identitystore#ConflictException": return [3, 4];
326
+ case "InternalServerException": return [3, 6];
327
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 6];
328
+ case "ResourceNotFoundException": return [3, 8];
329
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 8];
330
+ case "ServiceQuotaExceededException": return [3, 10];
331
+ case "com.amazonaws.identitystore#ServiceQuotaExceededException": return [3, 10];
332
+ case "ThrottlingException": return [3, 12];
333
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 12];
334
+ case "ValidationException": return [3, 14];
335
+ case "com.amazonaws.identitystore#ValidationException": return [3, 14];
336
+ }
337
+ return [3, 16];
338
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
339
+ case 3: throw _d.sent();
340
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
341
+ case 5: throw _d.sent();
342
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
343
+ case 7: throw _d.sent();
344
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
345
+ case 9: throw _d.sent();
346
+ case 10: return [4, deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
347
+ case 11: throw _d.sent();
348
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
349
+ case 13: throw _d.sent();
350
+ case 14: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
351
+ case 15: throw _d.sent();
352
+ case 16:
353
+ parsedBody = parsedOutput.body;
354
+ throwDefaultError({
355
+ output: output,
356
+ parsedBody: parsedBody,
357
+ exceptionCtor: __BaseException,
358
+ errorCode: errorCode,
359
+ });
360
+ _d.label = 17;
361
+ case 17: return [2];
362
+ }
363
+ });
364
+ }); };
365
+ export var deserializeAws_json1_1CreateUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
366
+ var data, contents, response;
367
+ return __generator(this, function (_a) {
368
+ switch (_a.label) {
369
+ case 0:
370
+ if (output.statusCode >= 300) {
371
+ return [2, deserializeAws_json1_1CreateUserCommandError(output, context)];
372
+ }
373
+ return [4, parseBody(output.body, context)];
374
+ case 1:
375
+ data = _a.sent();
376
+ contents = {};
377
+ contents = deserializeAws_json1_1CreateUserResponse(data, context);
378
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
379
+ return [2, Promise.resolve(response)];
380
+ }
381
+ });
382
+ }); };
383
+ var deserializeAws_json1_1CreateUserCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
384
+ var parsedOutput, _a, errorCode, _b, parsedBody;
385
+ var _c;
386
+ return __generator(this, function (_d) {
387
+ switch (_d.label) {
388
+ case 0:
389
+ _a = [__assign({}, output)];
390
+ _c = {};
391
+ return [4, parseErrorBody(output.body, context)];
392
+ case 1:
393
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
394
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
395
+ _b = errorCode;
396
+ switch (_b) {
397
+ case "AccessDeniedException": return [3, 2];
398
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
399
+ case "ConflictException": return [3, 4];
400
+ case "com.amazonaws.identitystore#ConflictException": return [3, 4];
401
+ case "InternalServerException": return [3, 6];
402
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 6];
403
+ case "ResourceNotFoundException": return [3, 8];
404
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 8];
405
+ case "ServiceQuotaExceededException": return [3, 10];
406
+ case "com.amazonaws.identitystore#ServiceQuotaExceededException": return [3, 10];
407
+ case "ThrottlingException": return [3, 12];
408
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 12];
409
+ case "ValidationException": return [3, 14];
410
+ case "com.amazonaws.identitystore#ValidationException": return [3, 14];
411
+ }
412
+ return [3, 16];
413
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
414
+ case 3: throw _d.sent();
415
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
416
+ case 5: throw _d.sent();
417
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
418
+ case 7: throw _d.sent();
419
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
420
+ case 9: throw _d.sent();
421
+ case 10: return [4, deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
422
+ case 11: throw _d.sent();
423
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
424
+ case 13: throw _d.sent();
425
+ case 14: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
426
+ case 15: throw _d.sent();
427
+ case 16:
428
+ parsedBody = parsedOutput.body;
429
+ throwDefaultError({
430
+ output: output,
431
+ parsedBody: parsedBody,
432
+ exceptionCtor: __BaseException,
433
+ errorCode: errorCode,
434
+ });
435
+ _d.label = 17;
436
+ case 17: return [2];
437
+ }
438
+ });
439
+ }); };
440
+ export var deserializeAws_json1_1DeleteGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
441
+ var data, contents, response;
442
+ return __generator(this, function (_a) {
443
+ switch (_a.label) {
444
+ case 0:
445
+ if (output.statusCode >= 300) {
446
+ return [2, deserializeAws_json1_1DeleteGroupCommandError(output, context)];
447
+ }
448
+ return [4, parseBody(output.body, context)];
449
+ case 1:
450
+ data = _a.sent();
451
+ contents = {};
452
+ contents = deserializeAws_json1_1DeleteGroupResponse(data, context);
453
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
454
+ return [2, Promise.resolve(response)];
455
+ }
456
+ });
457
+ }); };
458
+ var deserializeAws_json1_1DeleteGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
459
+ var parsedOutput, _a, errorCode, _b, parsedBody;
460
+ var _c;
461
+ return __generator(this, function (_d) {
462
+ switch (_d.label) {
463
+ case 0:
464
+ _a = [__assign({}, output)];
465
+ _c = {};
466
+ return [4, parseErrorBody(output.body, context)];
467
+ case 1:
468
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
469
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
470
+ _b = errorCode;
471
+ switch (_b) {
472
+ case "AccessDeniedException": return [3, 2];
473
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
474
+ case "ConflictException": return [3, 4];
475
+ case "com.amazonaws.identitystore#ConflictException": return [3, 4];
476
+ case "InternalServerException": return [3, 6];
477
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 6];
478
+ case "ResourceNotFoundException": return [3, 8];
479
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 8];
480
+ case "ThrottlingException": return [3, 10];
481
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 10];
482
+ case "ValidationException": return [3, 12];
483
+ case "com.amazonaws.identitystore#ValidationException": return [3, 12];
484
+ }
485
+ return [3, 14];
486
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
487
+ case 3: throw _d.sent();
488
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
489
+ case 5: throw _d.sent();
490
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
491
+ case 7: throw _d.sent();
492
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
493
+ case 9: throw _d.sent();
494
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
495
+ case 11: throw _d.sent();
496
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
497
+ case 13: throw _d.sent();
498
+ case 14:
499
+ parsedBody = parsedOutput.body;
500
+ throwDefaultError({
501
+ output: output,
502
+ parsedBody: parsedBody,
503
+ exceptionCtor: __BaseException,
504
+ errorCode: errorCode,
505
+ });
506
+ _d.label = 15;
507
+ case 15: return [2];
508
+ }
509
+ });
510
+ }); };
511
+ export var deserializeAws_json1_1DeleteGroupMembershipCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
512
+ var data, contents, response;
513
+ return __generator(this, function (_a) {
514
+ switch (_a.label) {
515
+ case 0:
516
+ if (output.statusCode >= 300) {
517
+ return [2, deserializeAws_json1_1DeleteGroupMembershipCommandError(output, context)];
518
+ }
519
+ return [4, parseBody(output.body, context)];
520
+ case 1:
521
+ data = _a.sent();
522
+ contents = {};
523
+ contents = deserializeAws_json1_1DeleteGroupMembershipResponse(data, context);
524
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
525
+ return [2, Promise.resolve(response)];
526
+ }
527
+ });
528
+ }); };
529
+ var deserializeAws_json1_1DeleteGroupMembershipCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
530
+ var parsedOutput, _a, errorCode, _b, parsedBody;
531
+ var _c;
532
+ return __generator(this, function (_d) {
533
+ switch (_d.label) {
534
+ case 0:
535
+ _a = [__assign({}, output)];
536
+ _c = {};
537
+ return [4, parseErrorBody(output.body, context)];
538
+ case 1:
539
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
540
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
541
+ _b = errorCode;
542
+ switch (_b) {
543
+ case "AccessDeniedException": return [3, 2];
544
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
545
+ case "ConflictException": return [3, 4];
546
+ case "com.amazonaws.identitystore#ConflictException": return [3, 4];
547
+ case "InternalServerException": return [3, 6];
548
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 6];
549
+ case "ResourceNotFoundException": return [3, 8];
550
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 8];
551
+ case "ThrottlingException": return [3, 10];
552
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 10];
553
+ case "ValidationException": return [3, 12];
554
+ case "com.amazonaws.identitystore#ValidationException": return [3, 12];
555
+ }
556
+ return [3, 14];
557
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
558
+ case 3: throw _d.sent();
559
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
560
+ case 5: throw _d.sent();
561
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
562
+ case 7: throw _d.sent();
563
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
564
+ case 9: throw _d.sent();
565
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
566
+ case 11: throw _d.sent();
567
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
568
+ case 13: throw _d.sent();
569
+ case 14:
570
+ parsedBody = parsedOutput.body;
571
+ throwDefaultError({
572
+ output: output,
573
+ parsedBody: parsedBody,
574
+ exceptionCtor: __BaseException,
575
+ errorCode: errorCode,
576
+ });
577
+ _d.label = 15;
578
+ case 15: return [2];
579
+ }
580
+ });
581
+ }); };
582
+ export var deserializeAws_json1_1DeleteUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
583
+ var data, contents, response;
584
+ return __generator(this, function (_a) {
585
+ switch (_a.label) {
586
+ case 0:
587
+ if (output.statusCode >= 300) {
588
+ return [2, deserializeAws_json1_1DeleteUserCommandError(output, context)];
589
+ }
590
+ return [4, parseBody(output.body, context)];
591
+ case 1:
592
+ data = _a.sent();
593
+ contents = {};
594
+ contents = deserializeAws_json1_1DeleteUserResponse(data, context);
595
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
596
+ return [2, Promise.resolve(response)];
597
+ }
598
+ });
599
+ }); };
600
+ var deserializeAws_json1_1DeleteUserCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
601
+ var parsedOutput, _a, errorCode, _b, parsedBody;
602
+ var _c;
603
+ return __generator(this, function (_d) {
604
+ switch (_d.label) {
605
+ case 0:
606
+ _a = [__assign({}, output)];
607
+ _c = {};
608
+ return [4, parseErrorBody(output.body, context)];
609
+ case 1:
610
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
611
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
612
+ _b = errorCode;
613
+ switch (_b) {
614
+ case "AccessDeniedException": return [3, 2];
615
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
616
+ case "ConflictException": return [3, 4];
617
+ case "com.amazonaws.identitystore#ConflictException": return [3, 4];
618
+ case "InternalServerException": return [3, 6];
619
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 6];
620
+ case "ResourceNotFoundException": return [3, 8];
621
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 8];
622
+ case "ThrottlingException": return [3, 10];
623
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 10];
624
+ case "ValidationException": return [3, 12];
625
+ case "com.amazonaws.identitystore#ValidationException": return [3, 12];
626
+ }
627
+ return [3, 14];
628
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
629
+ case 3: throw _d.sent();
630
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
631
+ case 5: throw _d.sent();
632
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
633
+ case 7: throw _d.sent();
634
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
635
+ case 9: throw _d.sent();
636
+ case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
637
+ case 11: throw _d.sent();
638
+ case 12: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
639
+ case 13: throw _d.sent();
640
+ case 14:
641
+ parsedBody = parsedOutput.body;
642
+ throwDefaultError({
643
+ output: output,
644
+ parsedBody: parsedBody,
645
+ exceptionCtor: __BaseException,
646
+ errorCode: errorCode,
647
+ });
648
+ _d.label = 15;
649
+ case 15: return [2];
650
+ }
651
+ });
652
+ }); };
653
+ export var deserializeAws_json1_1DescribeGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
654
+ var data, contents, response;
655
+ return __generator(this, function (_a) {
656
+ switch (_a.label) {
657
+ case 0:
658
+ if (output.statusCode >= 300) {
659
+ return [2, deserializeAws_json1_1DescribeGroupCommandError(output, context)];
660
+ }
661
+ return [4, parseBody(output.body, context)];
662
+ case 1:
663
+ data = _a.sent();
664
+ contents = {};
665
+ contents = deserializeAws_json1_1DescribeGroupResponse(data, context);
666
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
667
+ return [2, Promise.resolve(response)];
668
+ }
669
+ });
670
+ }); };
671
+ var deserializeAws_json1_1DescribeGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
672
+ var parsedOutput, _a, errorCode, _b, parsedBody;
673
+ var _c;
674
+ return __generator(this, function (_d) {
675
+ switch (_d.label) {
676
+ case 0:
677
+ _a = [__assign({}, output)];
678
+ _c = {};
679
+ return [4, parseErrorBody(output.body, context)];
680
+ case 1:
681
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
682
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
683
+ _b = errorCode;
684
+ switch (_b) {
685
+ case "AccessDeniedException": return [3, 2];
686
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
687
+ case "InternalServerException": return [3, 4];
688
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
689
+ case "ResourceNotFoundException": return [3, 6];
690
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
691
+ case "ThrottlingException": return [3, 8];
692
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
693
+ case "ValidationException": return [3, 10];
694
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
695
+ }
696
+ return [3, 12];
697
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
698
+ case 3: throw _d.sent();
699
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
700
+ case 5: throw _d.sent();
701
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
702
+ case 7: throw _d.sent();
703
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
704
+ case 9: throw _d.sent();
705
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
706
+ case 11: throw _d.sent();
707
+ case 12:
708
+ parsedBody = parsedOutput.body;
709
+ throwDefaultError({
710
+ output: output,
711
+ parsedBody: parsedBody,
712
+ exceptionCtor: __BaseException,
713
+ errorCode: errorCode,
714
+ });
715
+ _d.label = 13;
716
+ case 13: return [2];
717
+ }
718
+ });
719
+ }); };
720
+ export var deserializeAws_json1_1DescribeGroupMembershipCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
721
+ var data, contents, response;
722
+ return __generator(this, function (_a) {
723
+ switch (_a.label) {
724
+ case 0:
725
+ if (output.statusCode >= 300) {
726
+ return [2, deserializeAws_json1_1DescribeGroupMembershipCommandError(output, context)];
727
+ }
728
+ return [4, parseBody(output.body, context)];
729
+ case 1:
730
+ data = _a.sent();
731
+ contents = {};
732
+ contents = deserializeAws_json1_1DescribeGroupMembershipResponse(data, context);
733
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
734
+ return [2, Promise.resolve(response)];
735
+ }
736
+ });
737
+ }); };
738
+ var deserializeAws_json1_1DescribeGroupMembershipCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
739
+ var parsedOutput, _a, errorCode, _b, parsedBody;
740
+ var _c;
741
+ return __generator(this, function (_d) {
742
+ switch (_d.label) {
743
+ case 0:
744
+ _a = [__assign({}, output)];
745
+ _c = {};
746
+ return [4, parseErrorBody(output.body, context)];
747
+ case 1:
748
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
749
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
750
+ _b = errorCode;
751
+ switch (_b) {
752
+ case "AccessDeniedException": return [3, 2];
753
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
754
+ case "InternalServerException": return [3, 4];
755
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
756
+ case "ResourceNotFoundException": return [3, 6];
757
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
758
+ case "ThrottlingException": return [3, 8];
759
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
760
+ case "ValidationException": return [3, 10];
761
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
762
+ }
763
+ return [3, 12];
764
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
765
+ case 3: throw _d.sent();
766
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
767
+ case 5: throw _d.sent();
768
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
769
+ case 7: throw _d.sent();
770
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
771
+ case 9: throw _d.sent();
772
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
773
+ case 11: throw _d.sent();
774
+ case 12:
775
+ parsedBody = parsedOutput.body;
776
+ throwDefaultError({
777
+ output: output,
778
+ parsedBody: parsedBody,
779
+ exceptionCtor: __BaseException,
780
+ errorCode: errorCode,
781
+ });
782
+ _d.label = 13;
783
+ case 13: return [2];
784
+ }
785
+ });
786
+ }); };
787
+ export var deserializeAws_json1_1DescribeUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
788
+ var data, contents, response;
789
+ return __generator(this, function (_a) {
790
+ switch (_a.label) {
791
+ case 0:
792
+ if (output.statusCode >= 300) {
793
+ return [2, deserializeAws_json1_1DescribeUserCommandError(output, context)];
794
+ }
795
+ return [4, parseBody(output.body, context)];
796
+ case 1:
797
+ data = _a.sent();
798
+ contents = {};
799
+ contents = deserializeAws_json1_1DescribeUserResponse(data, context);
800
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
801
+ return [2, Promise.resolve(response)];
802
+ }
803
+ });
804
+ }); };
805
+ var deserializeAws_json1_1DescribeUserCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
806
+ var parsedOutput, _a, errorCode, _b, parsedBody;
807
+ var _c;
808
+ return __generator(this, function (_d) {
809
+ switch (_d.label) {
810
+ case 0:
811
+ _a = [__assign({}, output)];
812
+ _c = {};
813
+ return [4, parseErrorBody(output.body, context)];
814
+ case 1:
815
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
816
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
817
+ _b = errorCode;
818
+ switch (_b) {
819
+ case "AccessDeniedException": return [3, 2];
820
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
821
+ case "InternalServerException": return [3, 4];
822
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
823
+ case "ResourceNotFoundException": return [3, 6];
824
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
825
+ case "ThrottlingException": return [3, 8];
826
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
827
+ case "ValidationException": return [3, 10];
828
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
829
+ }
830
+ return [3, 12];
831
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
832
+ case 3: throw _d.sent();
833
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
834
+ case 5: throw _d.sent();
835
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
836
+ case 7: throw _d.sent();
837
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
838
+ case 9: throw _d.sent();
839
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
840
+ case 11: throw _d.sent();
841
+ case 12:
842
+ parsedBody = parsedOutput.body;
843
+ throwDefaultError({
844
+ output: output,
845
+ parsedBody: parsedBody,
846
+ exceptionCtor: __BaseException,
847
+ errorCode: errorCode,
848
+ });
849
+ _d.label = 13;
850
+ case 13: return [2];
851
+ }
852
+ });
853
+ }); };
854
+ export var deserializeAws_json1_1GetGroupIdCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
855
+ var data, contents, response;
856
+ return __generator(this, function (_a) {
857
+ switch (_a.label) {
858
+ case 0:
859
+ if (output.statusCode >= 300) {
860
+ return [2, deserializeAws_json1_1GetGroupIdCommandError(output, context)];
861
+ }
862
+ return [4, parseBody(output.body, context)];
863
+ case 1:
864
+ data = _a.sent();
865
+ contents = {};
866
+ contents = deserializeAws_json1_1GetGroupIdResponse(data, context);
867
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
868
+ return [2, Promise.resolve(response)];
869
+ }
870
+ });
871
+ }); };
872
+ var deserializeAws_json1_1GetGroupIdCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
873
+ var parsedOutput, _a, errorCode, _b, parsedBody;
874
+ var _c;
875
+ return __generator(this, function (_d) {
876
+ switch (_d.label) {
877
+ case 0:
878
+ _a = [__assign({}, output)];
879
+ _c = {};
880
+ return [4, parseErrorBody(output.body, context)];
881
+ case 1:
882
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
883
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
884
+ _b = errorCode;
885
+ switch (_b) {
886
+ case "AccessDeniedException": return [3, 2];
887
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
888
+ case "InternalServerException": return [3, 4];
889
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
890
+ case "ResourceNotFoundException": return [3, 6];
891
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
892
+ case "ThrottlingException": return [3, 8];
893
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
894
+ case "ValidationException": return [3, 10];
895
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
896
+ }
897
+ return [3, 12];
898
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
899
+ case 3: throw _d.sent();
900
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
901
+ case 5: throw _d.sent();
902
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
903
+ case 7: throw _d.sent();
904
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
905
+ case 9: throw _d.sent();
906
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
907
+ case 11: throw _d.sent();
908
+ case 12:
909
+ parsedBody = parsedOutput.body;
910
+ throwDefaultError({
911
+ output: output,
912
+ parsedBody: parsedBody,
913
+ exceptionCtor: __BaseException,
914
+ errorCode: errorCode,
915
+ });
916
+ _d.label = 13;
917
+ case 13: return [2];
918
+ }
919
+ });
920
+ }); };
921
+ export var deserializeAws_json1_1GetGroupMembershipIdCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
922
+ var data, contents, response;
923
+ return __generator(this, function (_a) {
924
+ switch (_a.label) {
925
+ case 0:
926
+ if (output.statusCode >= 300) {
927
+ return [2, deserializeAws_json1_1GetGroupMembershipIdCommandError(output, context)];
928
+ }
929
+ return [4, parseBody(output.body, context)];
930
+ case 1:
931
+ data = _a.sent();
932
+ contents = {};
933
+ contents = deserializeAws_json1_1GetGroupMembershipIdResponse(data, context);
934
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
935
+ return [2, Promise.resolve(response)];
936
+ }
937
+ });
938
+ }); };
939
+ var deserializeAws_json1_1GetGroupMembershipIdCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
940
+ var parsedOutput, _a, errorCode, _b, parsedBody;
941
+ var _c;
942
+ return __generator(this, function (_d) {
943
+ switch (_d.label) {
944
+ case 0:
945
+ _a = [__assign({}, output)];
946
+ _c = {};
947
+ return [4, parseErrorBody(output.body, context)];
948
+ case 1:
949
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
950
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
951
+ _b = errorCode;
952
+ switch (_b) {
953
+ case "AccessDeniedException": return [3, 2];
954
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
955
+ case "InternalServerException": return [3, 4];
956
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
957
+ case "ResourceNotFoundException": return [3, 6];
958
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
959
+ case "ThrottlingException": return [3, 8];
960
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
961
+ case "ValidationException": return [3, 10];
962
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
963
+ }
964
+ return [3, 12];
965
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
966
+ case 3: throw _d.sent();
967
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
968
+ case 5: throw _d.sent();
969
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
970
+ case 7: throw _d.sent();
971
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
972
+ case 9: throw _d.sent();
973
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
974
+ case 11: throw _d.sent();
975
+ case 12:
976
+ parsedBody = parsedOutput.body;
977
+ throwDefaultError({
978
+ output: output,
979
+ parsedBody: parsedBody,
980
+ exceptionCtor: __BaseException,
981
+ errorCode: errorCode,
982
+ });
983
+ _d.label = 13;
984
+ case 13: return [2];
985
+ }
986
+ });
987
+ }); };
988
+ export var deserializeAws_json1_1GetUserIdCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
989
+ var data, contents, response;
990
+ return __generator(this, function (_a) {
991
+ switch (_a.label) {
992
+ case 0:
993
+ if (output.statusCode >= 300) {
994
+ return [2, deserializeAws_json1_1GetUserIdCommandError(output, context)];
995
+ }
996
+ return [4, parseBody(output.body, context)];
997
+ case 1:
998
+ data = _a.sent();
999
+ contents = {};
1000
+ contents = deserializeAws_json1_1GetUserIdResponse(data, context);
1001
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1002
+ return [2, Promise.resolve(response)];
1003
+ }
1004
+ });
1005
+ }); };
1006
+ var deserializeAws_json1_1GetUserIdCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1007
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1008
+ var _c;
1009
+ return __generator(this, function (_d) {
1010
+ switch (_d.label) {
1011
+ case 0:
1012
+ _a = [__assign({}, output)];
1013
+ _c = {};
1014
+ return [4, parseErrorBody(output.body, context)];
1015
+ case 1:
1016
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1017
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1018
+ _b = errorCode;
1019
+ switch (_b) {
1020
+ case "AccessDeniedException": return [3, 2];
1021
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
1022
+ case "InternalServerException": return [3, 4];
1023
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
1024
+ case "ResourceNotFoundException": return [3, 6];
1025
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
1026
+ case "ThrottlingException": return [3, 8];
1027
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
1028
+ case "ValidationException": return [3, 10];
1029
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
1030
+ }
1031
+ return [3, 12];
1032
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1033
+ case 3: throw _d.sent();
1034
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1035
+ case 5: throw _d.sent();
1036
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1037
+ case 7: throw _d.sent();
1038
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1039
+ case 9: throw _d.sent();
1040
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1041
+ case 11: throw _d.sent();
1042
+ case 12:
1043
+ parsedBody = parsedOutput.body;
1044
+ throwDefaultError({
1045
+ output: output,
1046
+ parsedBody: parsedBody,
1047
+ exceptionCtor: __BaseException,
1048
+ errorCode: errorCode,
1049
+ });
1050
+ _d.label = 13;
1051
+ case 13: return [2];
1052
+ }
1053
+ });
1054
+ }); };
1055
+ export var deserializeAws_json1_1IsMemberInGroupsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1056
+ var data, contents, response;
1057
+ return __generator(this, function (_a) {
1058
+ switch (_a.label) {
1059
+ case 0:
1060
+ if (output.statusCode >= 300) {
1061
+ return [2, deserializeAws_json1_1IsMemberInGroupsCommandError(output, context)];
1062
+ }
1063
+ return [4, parseBody(output.body, context)];
1064
+ case 1:
1065
+ data = _a.sent();
1066
+ contents = {};
1067
+ contents = deserializeAws_json1_1IsMemberInGroupsResponse(data, context);
1068
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1069
+ return [2, Promise.resolve(response)];
1070
+ }
1071
+ });
1072
+ }); };
1073
+ var deserializeAws_json1_1IsMemberInGroupsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1074
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1075
+ var _c;
1076
+ return __generator(this, function (_d) {
1077
+ switch (_d.label) {
1078
+ case 0:
1079
+ _a = [__assign({}, output)];
1080
+ _c = {};
1081
+ return [4, parseErrorBody(output.body, context)];
1082
+ case 1:
1083
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1084
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1085
+ _b = errorCode;
1086
+ switch (_b) {
1087
+ case "AccessDeniedException": return [3, 2];
1088
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
1089
+ case "InternalServerException": return [3, 4];
1090
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
1091
+ case "ResourceNotFoundException": return [3, 6];
1092
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
1093
+ case "ThrottlingException": return [3, 8];
1094
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
1095
+ case "ValidationException": return [3, 10];
1096
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
1097
+ }
1098
+ return [3, 12];
1099
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1100
+ case 3: throw _d.sent();
1101
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1102
+ case 5: throw _d.sent();
1103
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1104
+ case 7: throw _d.sent();
1105
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1106
+ case 9: throw _d.sent();
1107
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1108
+ case 11: throw _d.sent();
1109
+ case 12:
1110
+ parsedBody = parsedOutput.body;
1111
+ throwDefaultError({
1112
+ output: output,
1113
+ parsedBody: parsedBody,
1114
+ exceptionCtor: __BaseException,
1115
+ errorCode: errorCode,
1116
+ });
1117
+ _d.label = 13;
1118
+ case 13: return [2];
1119
+ }
1120
+ });
1121
+ }); };
1122
+ export var deserializeAws_json1_1ListGroupMembershipsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1123
+ var data, contents, response;
1124
+ return __generator(this, function (_a) {
1125
+ switch (_a.label) {
1126
+ case 0:
1127
+ if (output.statusCode >= 300) {
1128
+ return [2, deserializeAws_json1_1ListGroupMembershipsCommandError(output, context)];
1129
+ }
1130
+ return [4, parseBody(output.body, context)];
1131
+ case 1:
1132
+ data = _a.sent();
1133
+ contents = {};
1134
+ contents = deserializeAws_json1_1ListGroupMembershipsResponse(data, context);
1135
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1136
+ return [2, Promise.resolve(response)];
1137
+ }
1138
+ });
1139
+ }); };
1140
+ var deserializeAws_json1_1ListGroupMembershipsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1141
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1142
+ var _c;
1143
+ return __generator(this, function (_d) {
1144
+ switch (_d.label) {
1145
+ case 0:
1146
+ _a = [__assign({}, output)];
1147
+ _c = {};
1148
+ return [4, parseErrorBody(output.body, context)];
1149
+ case 1:
1150
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1151
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1152
+ _b = errorCode;
1153
+ switch (_b) {
1154
+ case "AccessDeniedException": return [3, 2];
1155
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
1156
+ case "InternalServerException": return [3, 4];
1157
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
1158
+ case "ResourceNotFoundException": return [3, 6];
1159
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
1160
+ case "ThrottlingException": return [3, 8];
1161
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
1162
+ case "ValidationException": return [3, 10];
1163
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
1164
+ }
1165
+ return [3, 12];
1166
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1167
+ case 3: throw _d.sent();
1168
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1169
+ case 5: throw _d.sent();
1170
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1171
+ case 7: throw _d.sent();
1172
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1173
+ case 9: throw _d.sent();
1174
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1175
+ case 11: throw _d.sent();
1176
+ case 12:
1177
+ parsedBody = parsedOutput.body;
1178
+ throwDefaultError({
1179
+ output: output,
1180
+ parsedBody: parsedBody,
1181
+ exceptionCtor: __BaseException,
1182
+ errorCode: errorCode,
1183
+ });
1184
+ _d.label = 13;
1185
+ case 13: return [2];
1186
+ }
1187
+ });
1188
+ }); };
1189
+ export var deserializeAws_json1_1ListGroupMembershipsForMemberCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1190
+ var data, contents, response;
1191
+ return __generator(this, function (_a) {
1192
+ switch (_a.label) {
1193
+ case 0:
1194
+ if (output.statusCode >= 300) {
1195
+ return [2, deserializeAws_json1_1ListGroupMembershipsForMemberCommandError(output, context)];
1196
+ }
1197
+ return [4, parseBody(output.body, context)];
1198
+ case 1:
1199
+ data = _a.sent();
1200
+ contents = {};
1201
+ contents = deserializeAws_json1_1ListGroupMembershipsForMemberResponse(data, context);
1202
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1203
+ return [2, Promise.resolve(response)];
1204
+ }
1205
+ });
1206
+ }); };
1207
+ var deserializeAws_json1_1ListGroupMembershipsForMemberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1208
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1209
+ var _c;
1210
+ return __generator(this, function (_d) {
1211
+ switch (_d.label) {
1212
+ case 0:
1213
+ _a = [__assign({}, output)];
1214
+ _c = {};
1215
+ return [4, parseErrorBody(output.body, context)];
1216
+ case 1:
1217
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1218
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1219
+ _b = errorCode;
1220
+ switch (_b) {
1221
+ case "AccessDeniedException": return [3, 2];
1222
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
1223
+ case "InternalServerException": return [3, 4];
1224
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
1225
+ case "ResourceNotFoundException": return [3, 6];
1226
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
1227
+ case "ThrottlingException": return [3, 8];
1228
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
1229
+ case "ValidationException": return [3, 10];
1230
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
1231
+ }
1232
+ return [3, 12];
1233
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1234
+ case 3: throw _d.sent();
1235
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1236
+ case 5: throw _d.sent();
1237
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1238
+ case 7: throw _d.sent();
1239
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1240
+ case 9: throw _d.sent();
1241
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1242
+ case 11: throw _d.sent();
1243
+ case 12:
1244
+ parsedBody = parsedOutput.body;
1245
+ throwDefaultError({
1246
+ output: output,
1247
+ parsedBody: parsedBody,
1248
+ exceptionCtor: __BaseException,
1249
+ errorCode: errorCode,
1250
+ });
1251
+ _d.label = 13;
1252
+ case 13: return [2];
1253
+ }
1254
+ });
1255
+ }); };
1256
+ export var deserializeAws_json1_1ListGroupsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1257
+ var data, contents, response;
1258
+ return __generator(this, function (_a) {
1259
+ switch (_a.label) {
1260
+ case 0:
1261
+ if (output.statusCode >= 300) {
1262
+ return [2, deserializeAws_json1_1ListGroupsCommandError(output, context)];
1263
+ }
1264
+ return [4, parseBody(output.body, context)];
1265
+ case 1:
1266
+ data = _a.sent();
1267
+ contents = {};
1268
+ contents = deserializeAws_json1_1ListGroupsResponse(data, context);
1269
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1270
+ return [2, Promise.resolve(response)];
1271
+ }
1272
+ });
1273
+ }); };
1274
+ var deserializeAws_json1_1ListGroupsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1275
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1276
+ var _c;
1277
+ return __generator(this, function (_d) {
1278
+ switch (_d.label) {
1279
+ case 0:
1280
+ _a = [__assign({}, output)];
1281
+ _c = {};
1282
+ return [4, parseErrorBody(output.body, context)];
1283
+ case 1:
1284
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1285
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1286
+ _b = errorCode;
1287
+ switch (_b) {
1288
+ case "AccessDeniedException": return [3, 2];
1289
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
1290
+ case "InternalServerException": return [3, 4];
1291
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
1292
+ case "ResourceNotFoundException": return [3, 6];
1293
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
1294
+ case "ThrottlingException": return [3, 8];
1295
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
1296
+ case "ValidationException": return [3, 10];
1297
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
1298
+ }
1299
+ return [3, 12];
1300
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1301
+ case 3: throw _d.sent();
1302
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1303
+ case 5: throw _d.sent();
1304
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1305
+ case 7: throw _d.sent();
1306
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1307
+ case 9: throw _d.sent();
1308
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1309
+ case 11: throw _d.sent();
1310
+ case 12:
1311
+ parsedBody = parsedOutput.body;
1312
+ throwDefaultError({
1313
+ output: output,
1314
+ parsedBody: parsedBody,
1315
+ exceptionCtor: __BaseException,
1316
+ errorCode: errorCode,
1317
+ });
1318
+ _d.label = 13;
1319
+ case 13: return [2];
1320
+ }
1321
+ });
1322
+ }); };
1323
+ export var deserializeAws_json1_1ListUsersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1324
+ var data, contents, response;
1325
+ return __generator(this, function (_a) {
1326
+ switch (_a.label) {
1327
+ case 0:
1328
+ if (output.statusCode >= 300) {
1329
+ return [2, deserializeAws_json1_1ListUsersCommandError(output, context)];
1330
+ }
1331
+ return [4, parseBody(output.body, context)];
1332
+ case 1:
1333
+ data = _a.sent();
1334
+ contents = {};
1335
+ contents = deserializeAws_json1_1ListUsersResponse(data, context);
1336
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1337
+ return [2, Promise.resolve(response)];
1338
+ }
1339
+ });
1340
+ }); };
1341
+ var deserializeAws_json1_1ListUsersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1342
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1343
+ var _c;
1344
+ return __generator(this, function (_d) {
1345
+ switch (_d.label) {
1346
+ case 0:
1347
+ _a = [__assign({}, output)];
1348
+ _c = {};
1349
+ return [4, parseErrorBody(output.body, context)];
1350
+ case 1:
1351
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1352
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1353
+ _b = errorCode;
1354
+ switch (_b) {
1355
+ case "AccessDeniedException": return [3, 2];
1356
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
1357
+ case "InternalServerException": return [3, 4];
1358
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 4];
1359
+ case "ResourceNotFoundException": return [3, 6];
1360
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 6];
1361
+ case "ThrottlingException": return [3, 8];
1362
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 8];
1363
+ case "ValidationException": return [3, 10];
1364
+ case "com.amazonaws.identitystore#ValidationException": return [3, 10];
1365
+ }
1366
+ return [3, 12];
1367
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1368
+ case 3: throw _d.sent();
1369
+ case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1370
+ case 5: throw _d.sent();
1371
+ case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1372
+ case 7: throw _d.sent();
1373
+ case 8: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1374
+ case 9: throw _d.sent();
1375
+ case 10: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1376
+ case 11: throw _d.sent();
1377
+ case 12:
1378
+ parsedBody = parsedOutput.body;
1379
+ throwDefaultError({
1380
+ output: output,
1381
+ parsedBody: parsedBody,
1382
+ exceptionCtor: __BaseException,
1383
+ errorCode: errorCode,
1384
+ });
1385
+ _d.label = 13;
1386
+ case 13: return [2];
1387
+ }
1388
+ });
1389
+ }); };
1390
+ export var deserializeAws_json1_1UpdateGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1391
+ var data, contents, response;
1392
+ return __generator(this, function (_a) {
1393
+ switch (_a.label) {
1394
+ case 0:
1395
+ if (output.statusCode >= 300) {
1396
+ return [2, deserializeAws_json1_1UpdateGroupCommandError(output, context)];
1397
+ }
1398
+ return [4, parseBody(output.body, context)];
1399
+ case 1:
1400
+ data = _a.sent();
1401
+ contents = {};
1402
+ contents = deserializeAws_json1_1UpdateGroupResponse(data, context);
1403
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1404
+ return [2, Promise.resolve(response)];
1405
+ }
1406
+ });
1407
+ }); };
1408
+ var deserializeAws_json1_1UpdateGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1409
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1410
+ var _c;
1411
+ return __generator(this, function (_d) {
1412
+ switch (_d.label) {
1413
+ case 0:
1414
+ _a = [__assign({}, output)];
1415
+ _c = {};
1416
+ return [4, parseErrorBody(output.body, context)];
1417
+ case 1:
1418
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1419
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1420
+ _b = errorCode;
1421
+ switch (_b) {
1422
+ case "AccessDeniedException": return [3, 2];
1423
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
1424
+ case "ConflictException": return [3, 4];
1425
+ case "com.amazonaws.identitystore#ConflictException": return [3, 4];
1426
+ case "InternalServerException": return [3, 6];
1427
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 6];
1428
+ case "ResourceNotFoundException": return [3, 8];
1429
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 8];
1430
+ case "ServiceQuotaExceededException": return [3, 10];
1431
+ case "com.amazonaws.identitystore#ServiceQuotaExceededException": return [3, 10];
1432
+ case "ThrottlingException": return [3, 12];
1433
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 12];
1434
+ case "ValidationException": return [3, 14];
1435
+ case "com.amazonaws.identitystore#ValidationException": return [3, 14];
1436
+ }
1437
+ return [3, 16];
1438
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1439
+ case 3: throw _d.sent();
1440
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
1441
+ case 5: throw _d.sent();
1442
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1443
+ case 7: throw _d.sent();
1444
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1445
+ case 9: throw _d.sent();
1446
+ case 10: return [4, deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
1447
+ case 11: throw _d.sent();
1448
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1449
+ case 13: throw _d.sent();
1450
+ case 14: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1451
+ case 15: throw _d.sent();
1452
+ case 16:
1453
+ parsedBody = parsedOutput.body;
1454
+ throwDefaultError({
1455
+ output: output,
1456
+ parsedBody: parsedBody,
1457
+ exceptionCtor: __BaseException,
1458
+ errorCode: errorCode,
1459
+ });
1460
+ _d.label = 17;
1461
+ case 17: return [2];
1462
+ }
1463
+ });
1464
+ }); };
1465
+ export var deserializeAws_json1_1UpdateUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1466
+ var data, contents, response;
1467
+ return __generator(this, function (_a) {
1468
+ switch (_a.label) {
1469
+ case 0:
1470
+ if (output.statusCode >= 300) {
1471
+ return [2, deserializeAws_json1_1UpdateUserCommandError(output, context)];
1472
+ }
1473
+ return [4, parseBody(output.body, context)];
1474
+ case 1:
1475
+ data = _a.sent();
1476
+ contents = {};
1477
+ contents = deserializeAws_json1_1UpdateUserResponse(data, context);
1478
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1479
+ return [2, Promise.resolve(response)];
1480
+ }
1481
+ });
1482
+ }); };
1483
+ var deserializeAws_json1_1UpdateUserCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1484
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1485
+ var _c;
1486
+ return __generator(this, function (_d) {
1487
+ switch (_d.label) {
1488
+ case 0:
1489
+ _a = [__assign({}, output)];
1490
+ _c = {};
1491
+ return [4, parseErrorBody(output.body, context)];
1492
+ case 1:
1493
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1494
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1495
+ _b = errorCode;
1496
+ switch (_b) {
1497
+ case "AccessDeniedException": return [3, 2];
1498
+ case "com.amazonaws.identitystore#AccessDeniedException": return [3, 2];
1499
+ case "ConflictException": return [3, 4];
1500
+ case "com.amazonaws.identitystore#ConflictException": return [3, 4];
1501
+ case "InternalServerException": return [3, 6];
1502
+ case "com.amazonaws.identitystore#InternalServerException": return [3, 6];
1503
+ case "ResourceNotFoundException": return [3, 8];
1504
+ case "com.amazonaws.identitystore#ResourceNotFoundException": return [3, 8];
1505
+ case "ServiceQuotaExceededException": return [3, 10];
1506
+ case "com.amazonaws.identitystore#ServiceQuotaExceededException": return [3, 10];
1507
+ case "ThrottlingException": return [3, 12];
1508
+ case "com.amazonaws.identitystore#ThrottlingException": return [3, 12];
1509
+ case "ValidationException": return [3, 14];
1510
+ case "com.amazonaws.identitystore#ValidationException": return [3, 14];
1511
+ }
1512
+ return [3, 16];
1513
+ case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
1514
+ case 3: throw _d.sent();
1515
+ case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
1516
+ case 5: throw _d.sent();
1517
+ case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
1518
+ case 7: throw _d.sent();
1519
+ case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1520
+ case 9: throw _d.sent();
1521
+ case 10: return [4, deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
1522
+ case 11: throw _d.sent();
1523
+ case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
1524
+ case 13: throw _d.sent();
1525
+ case 14: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
1526
+ case 15: throw _d.sent();
1527
+ case 16:
1528
+ parsedBody = parsedOutput.body;
1529
+ throwDefaultError({
1530
+ output: output,
1531
+ parsedBody: parsedBody,
1532
+ exceptionCtor: __BaseException,
1533
+ errorCode: errorCode,
1534
+ });
1535
+ _d.label = 17;
1536
+ case 17: return [2];
1537
+ }
1538
+ });
1539
+ }); };
1540
+ var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1541
+ var body, deserialized, exception;
1542
+ return __generator(this, function (_a) {
1543
+ body = parsedOutput.body;
1544
+ deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1545
+ exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1546
+ return [2, __decorateServiceException(exception, body)];
1547
+ });
1548
+ }); };
1549
+ var deserializeAws_json1_1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1550
+ var body, deserialized, exception;
1551
+ return __generator(this, function (_a) {
1552
+ body = parsedOutput.body;
1553
+ deserialized = deserializeAws_json1_1ConflictException(body, context);
1554
+ exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1555
+ return [2, __decorateServiceException(exception, body)];
1556
+ });
1557
+ }); };
1558
+ var deserializeAws_json1_1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1559
+ var body, deserialized, exception;
1560
+ return __generator(this, function (_a) {
1561
+ body = parsedOutput.body;
1562
+ deserialized = deserializeAws_json1_1InternalServerException(body, context);
1563
+ exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1564
+ return [2, __decorateServiceException(exception, body)];
1565
+ });
1566
+ }); };
1567
+ var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1568
+ var body, deserialized, exception;
1569
+ return __generator(this, function (_a) {
1570
+ body = parsedOutput.body;
1571
+ deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1572
+ exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1573
+ return [2, __decorateServiceException(exception, body)];
1574
+ });
1575
+ }); };
1576
+ var deserializeAws_json1_1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1577
+ var body, deserialized, exception;
1578
+ return __generator(this, function (_a) {
1579
+ body = parsedOutput.body;
1580
+ deserialized = deserializeAws_json1_1ServiceQuotaExceededException(body, context);
1581
+ exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1582
+ return [2, __decorateServiceException(exception, body)];
1583
+ });
1584
+ }); };
1585
+ var deserializeAws_json1_1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1586
+ var body, deserialized, exception;
1587
+ return __generator(this, function (_a) {
1588
+ body = parsedOutput.body;
1589
+ deserialized = deserializeAws_json1_1ThrottlingException(body, context);
1590
+ exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1591
+ return [2, __decorateServiceException(exception, body)];
1592
+ });
1593
+ }); };
1594
+ var deserializeAws_json1_1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1595
+ var body, deserialized, exception;
1596
+ return __generator(this, function (_a) {
1597
+ body = parsedOutput.body;
1598
+ deserialized = deserializeAws_json1_1ValidationException(body, context);
1599
+ exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1600
+ return [2, __decorateServiceException(exception, body)];
1601
+ });
1602
+ }); };
1603
+ var serializeAws_json1_1Address = function (input, context) {
1604
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Country != null && { Country: input.Country })), (input.Formatted != null && { Formatted: input.Formatted })), (input.Locality != null && { Locality: input.Locality })), (input.PostalCode != null && { PostalCode: input.PostalCode })), (input.Primary != null && { Primary: input.Primary })), (input.Region != null && { Region: input.Region })), (input.StreetAddress != null && { StreetAddress: input.StreetAddress })), (input.Type != null && { Type: input.Type }));
1144
1605
  };
1145
- const serializeAws_json1_1Addresses = (input, context) => {
1606
+ var serializeAws_json1_1Addresses = function (input, context) {
1146
1607
  return input
1147
- .filter((e) => e != null)
1148
- .map((entry) => {
1608
+ .filter(function (e) { return e != null; })
1609
+ .map(function (entry) {
1149
1610
  return serializeAws_json1_1Address(entry, context);
1150
1611
  });
1151
1612
  };
1152
- const serializeAws_json1_1AlternateIdentifier = (input, context) => {
1613
+ var serializeAws_json1_1AlternateIdentifier = function (input, context) {
1153
1614
  return AlternateIdentifier.visit(input, {
1154
- ExternalId: (value) => ({ ExternalId: serializeAws_json1_1ExternalId(value, context) }),
1155
- UniqueAttribute: (value) => ({ UniqueAttribute: serializeAws_json1_1UniqueAttribute(value, context) }),
1156
- _: (name, value) => ({ name: value }),
1615
+ ExternalId: function (value) { return ({ ExternalId: serializeAws_json1_1ExternalId(value, context) }); },
1616
+ UniqueAttribute: function (value) { return ({ UniqueAttribute: serializeAws_json1_1UniqueAttribute(value, context) }); },
1617
+ _: function (name, value) { return ({ name: value }); },
1157
1618
  });
1158
1619
  };
1159
- const serializeAws_json1_1AttributeOperation = (input, context) => {
1160
- return {
1161
- ...(input.AttributePath != null && { AttributePath: input.AttributePath }),
1162
- ...(input.AttributeValue != null && {
1163
- AttributeValue: serializeAws_json1_1AttributeValue(input.AttributeValue, context),
1164
- }),
1165
- };
1620
+ var serializeAws_json1_1AttributeOperation = function (input, context) {
1621
+ return __assign(__assign({}, (input.AttributePath != null && { AttributePath: input.AttributePath })), (input.AttributeValue != null && {
1622
+ AttributeValue: serializeAws_json1_1AttributeValue(input.AttributeValue, context),
1623
+ }));
1166
1624
  };
1167
- const serializeAws_json1_1AttributeOperations = (input, context) => {
1625
+ var serializeAws_json1_1AttributeOperations = function (input, context) {
1168
1626
  return input
1169
- .filter((e) => e != null)
1170
- .map((entry) => {
1627
+ .filter(function (e) { return e != null; })
1628
+ .map(function (entry) {
1171
1629
  return serializeAws_json1_1AttributeOperation(entry, context);
1172
1630
  });
1173
1631
  };
1174
- const serializeAws_json1_1AttributeValue = (input, context) => {
1632
+ var serializeAws_json1_1AttributeValue = function (input, context) {
1175
1633
  return input;
1176
1634
  };
1177
- const serializeAws_json1_1CreateGroupMembershipRequest = (input, context) => {
1178
- return {
1179
- ...(input.GroupId != null && { GroupId: input.GroupId }),
1180
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1181
- ...(input.MemberId != null && { MemberId: serializeAws_json1_1MemberId(input.MemberId, context) }),
1182
- };
1635
+ var serializeAws_json1_1CreateGroupMembershipRequest = function (input, context) {
1636
+ return __assign(__assign(__assign({}, (input.GroupId != null && { GroupId: input.GroupId })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.MemberId != null && { MemberId: serializeAws_json1_1MemberId(input.MemberId, context) }));
1183
1637
  };
1184
- const serializeAws_json1_1CreateGroupRequest = (input, context) => {
1185
- return {
1186
- ...(input.Description != null && { Description: input.Description }),
1187
- ...(input.DisplayName != null && { DisplayName: input.DisplayName }),
1188
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1189
- };
1638
+ var serializeAws_json1_1CreateGroupRequest = function (input, context) {
1639
+ return __assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.DisplayName != null && { DisplayName: input.DisplayName })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }));
1190
1640
  };
1191
- const serializeAws_json1_1CreateUserRequest = (input, context) => {
1192
- return {
1193
- ...(input.Addresses != null && { Addresses: serializeAws_json1_1Addresses(input.Addresses, context) }),
1194
- ...(input.DisplayName != null && { DisplayName: input.DisplayName }),
1195
- ...(input.Emails != null && { Emails: serializeAws_json1_1Emails(input.Emails, context) }),
1196
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1197
- ...(input.Locale != null && { Locale: input.Locale }),
1198
- ...(input.Name != null && { Name: serializeAws_json1_1Name(input.Name, context) }),
1199
- ...(input.NickName != null && { NickName: input.NickName }),
1200
- ...(input.PhoneNumbers != null && { PhoneNumbers: serializeAws_json1_1PhoneNumbers(input.PhoneNumbers, context) }),
1201
- ...(input.PreferredLanguage != null && { PreferredLanguage: input.PreferredLanguage }),
1202
- ...(input.ProfileUrl != null && { ProfileUrl: input.ProfileUrl }),
1203
- ...(input.Timezone != null && { Timezone: input.Timezone }),
1204
- ...(input.Title != null && { Title: input.Title }),
1205
- ...(input.UserName != null && { UserName: input.UserName }),
1206
- ...(input.UserType != null && { UserType: input.UserType }),
1207
- };
1641
+ var serializeAws_json1_1CreateUserRequest = function (input, context) {
1642
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Addresses != null && { Addresses: serializeAws_json1_1Addresses(input.Addresses, context) })), (input.DisplayName != null && { DisplayName: input.DisplayName })), (input.Emails != null && { Emails: serializeAws_json1_1Emails(input.Emails, context) })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.Locale != null && { Locale: input.Locale })), (input.Name != null && { Name: serializeAws_json1_1Name(input.Name, context) })), (input.NickName != null && { NickName: input.NickName })), (input.PhoneNumbers != null && { PhoneNumbers: serializeAws_json1_1PhoneNumbers(input.PhoneNumbers, context) })), (input.PreferredLanguage != null && { PreferredLanguage: input.PreferredLanguage })), (input.ProfileUrl != null && { ProfileUrl: input.ProfileUrl })), (input.Timezone != null && { Timezone: input.Timezone })), (input.Title != null && { Title: input.Title })), (input.UserName != null && { UserName: input.UserName })), (input.UserType != null && { UserType: input.UserType }));
1208
1643
  };
1209
- const serializeAws_json1_1DeleteGroupMembershipRequest = (input, context) => {
1210
- return {
1211
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1212
- ...(input.MembershipId != null && { MembershipId: input.MembershipId }),
1213
- };
1644
+ var serializeAws_json1_1DeleteGroupMembershipRequest = function (input, context) {
1645
+ return __assign(__assign({}, (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.MembershipId != null && { MembershipId: input.MembershipId }));
1214
1646
  };
1215
- const serializeAws_json1_1DeleteGroupRequest = (input, context) => {
1216
- return {
1217
- ...(input.GroupId != null && { GroupId: input.GroupId }),
1218
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1219
- };
1647
+ var serializeAws_json1_1DeleteGroupRequest = function (input, context) {
1648
+ return __assign(__assign({}, (input.GroupId != null && { GroupId: input.GroupId })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }));
1220
1649
  };
1221
- const serializeAws_json1_1DeleteUserRequest = (input, context) => {
1222
- return {
1223
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1224
- ...(input.UserId != null && { UserId: input.UserId }),
1225
- };
1650
+ var serializeAws_json1_1DeleteUserRequest = function (input, context) {
1651
+ return __assign(__assign({}, (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.UserId != null && { UserId: input.UserId }));
1226
1652
  };
1227
- const serializeAws_json1_1DescribeGroupMembershipRequest = (input, context) => {
1228
- return {
1229
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1230
- ...(input.MembershipId != null && { MembershipId: input.MembershipId }),
1231
- };
1653
+ var serializeAws_json1_1DescribeGroupMembershipRequest = function (input, context) {
1654
+ return __assign(__assign({}, (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.MembershipId != null && { MembershipId: input.MembershipId }));
1232
1655
  };
1233
- const serializeAws_json1_1DescribeGroupRequest = (input, context) => {
1234
- return {
1235
- ...(input.GroupId != null && { GroupId: input.GroupId }),
1236
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1237
- };
1656
+ var serializeAws_json1_1DescribeGroupRequest = function (input, context) {
1657
+ return __assign(__assign({}, (input.GroupId != null && { GroupId: input.GroupId })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }));
1238
1658
  };
1239
- const serializeAws_json1_1DescribeUserRequest = (input, context) => {
1240
- return {
1241
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1242
- ...(input.UserId != null && { UserId: input.UserId }),
1243
- };
1659
+ var serializeAws_json1_1DescribeUserRequest = function (input, context) {
1660
+ return __assign(__assign({}, (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.UserId != null && { UserId: input.UserId }));
1244
1661
  };
1245
- const serializeAws_json1_1Email = (input, context) => {
1246
- return {
1247
- ...(input.Primary != null && { Primary: input.Primary }),
1248
- ...(input.Type != null && { Type: input.Type }),
1249
- ...(input.Value != null && { Value: input.Value }),
1250
- };
1662
+ var serializeAws_json1_1Email = function (input, context) {
1663
+ return __assign(__assign(__assign({}, (input.Primary != null && { Primary: input.Primary })), (input.Type != null && { Type: input.Type })), (input.Value != null && { Value: input.Value }));
1251
1664
  };
1252
- const serializeAws_json1_1Emails = (input, context) => {
1665
+ var serializeAws_json1_1Emails = function (input, context) {
1253
1666
  return input
1254
- .filter((e) => e != null)
1255
- .map((entry) => {
1667
+ .filter(function (e) { return e != null; })
1668
+ .map(function (entry) {
1256
1669
  return serializeAws_json1_1Email(entry, context);
1257
1670
  });
1258
1671
  };
1259
- const serializeAws_json1_1ExternalId = (input, context) => {
1260
- return {
1261
- ...(input.Id != null && { Id: input.Id }),
1262
- ...(input.Issuer != null && { Issuer: input.Issuer }),
1263
- };
1672
+ var serializeAws_json1_1ExternalId = function (input, context) {
1673
+ return __assign(__assign({}, (input.Id != null && { Id: input.Id })), (input.Issuer != null && { Issuer: input.Issuer }));
1264
1674
  };
1265
- const serializeAws_json1_1Filter = (input, context) => {
1266
- return {
1267
- ...(input.AttributePath != null && { AttributePath: input.AttributePath }),
1268
- ...(input.AttributeValue != null && { AttributeValue: input.AttributeValue }),
1269
- };
1675
+ var serializeAws_json1_1Filter = function (input, context) {
1676
+ return __assign(__assign({}, (input.AttributePath != null && { AttributePath: input.AttributePath })), (input.AttributeValue != null && { AttributeValue: input.AttributeValue }));
1270
1677
  };
1271
- const serializeAws_json1_1Filters = (input, context) => {
1678
+ var serializeAws_json1_1Filters = function (input, context) {
1272
1679
  return input
1273
- .filter((e) => e != null)
1274
- .map((entry) => {
1680
+ .filter(function (e) { return e != null; })
1681
+ .map(function (entry) {
1275
1682
  return serializeAws_json1_1Filter(entry, context);
1276
1683
  });
1277
1684
  };
1278
- const serializeAws_json1_1GetGroupIdRequest = (input, context) => {
1279
- return {
1280
- ...(input.AlternateIdentifier != null && {
1281
- AlternateIdentifier: serializeAws_json1_1AlternateIdentifier(input.AlternateIdentifier, context),
1282
- }),
1283
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1284
- };
1685
+ var serializeAws_json1_1GetGroupIdRequest = function (input, context) {
1686
+ return __assign(__assign({}, (input.AlternateIdentifier != null && {
1687
+ AlternateIdentifier: serializeAws_json1_1AlternateIdentifier(input.AlternateIdentifier, context),
1688
+ })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }));
1285
1689
  };
1286
- const serializeAws_json1_1GetGroupMembershipIdRequest = (input, context) => {
1287
- return {
1288
- ...(input.GroupId != null && { GroupId: input.GroupId }),
1289
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1290
- ...(input.MemberId != null && { MemberId: serializeAws_json1_1MemberId(input.MemberId, context) }),
1291
- };
1690
+ var serializeAws_json1_1GetGroupMembershipIdRequest = function (input, context) {
1691
+ return __assign(__assign(__assign({}, (input.GroupId != null && { GroupId: input.GroupId })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.MemberId != null && { MemberId: serializeAws_json1_1MemberId(input.MemberId, context) }));
1292
1692
  };
1293
- const serializeAws_json1_1GetUserIdRequest = (input, context) => {
1294
- return {
1295
- ...(input.AlternateIdentifier != null && {
1296
- AlternateIdentifier: serializeAws_json1_1AlternateIdentifier(input.AlternateIdentifier, context),
1297
- }),
1298
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1299
- };
1693
+ var serializeAws_json1_1GetUserIdRequest = function (input, context) {
1694
+ return __assign(__assign({}, (input.AlternateIdentifier != null && {
1695
+ AlternateIdentifier: serializeAws_json1_1AlternateIdentifier(input.AlternateIdentifier, context),
1696
+ })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }));
1300
1697
  };
1301
- const serializeAws_json1_1GroupIds = (input, context) => {
1698
+ var serializeAws_json1_1GroupIds = function (input, context) {
1302
1699
  return input
1303
- .filter((e) => e != null)
1304
- .map((entry) => {
1700
+ .filter(function (e) { return e != null; })
1701
+ .map(function (entry) {
1305
1702
  return entry;
1306
1703
  });
1307
1704
  };
1308
- const serializeAws_json1_1IsMemberInGroupsRequest = (input, context) => {
1309
- return {
1310
- ...(input.GroupIds != null && { GroupIds: serializeAws_json1_1GroupIds(input.GroupIds, context) }),
1311
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1312
- ...(input.MemberId != null && { MemberId: serializeAws_json1_1MemberId(input.MemberId, context) }),
1313
- };
1705
+ var serializeAws_json1_1IsMemberInGroupsRequest = function (input, context) {
1706
+ return __assign(__assign(__assign({}, (input.GroupIds != null && { GroupIds: serializeAws_json1_1GroupIds(input.GroupIds, context) })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.MemberId != null && { MemberId: serializeAws_json1_1MemberId(input.MemberId, context) }));
1314
1707
  };
1315
- const serializeAws_json1_1ListGroupMembershipsForMemberRequest = (input, context) => {
1316
- return {
1317
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1318
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1319
- ...(input.MemberId != null && { MemberId: serializeAws_json1_1MemberId(input.MemberId, context) }),
1320
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1321
- };
1708
+ var serializeAws_json1_1ListGroupMembershipsForMemberRequest = function (input, context) {
1709
+ return __assign(__assign(__assign(__assign({}, (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.MemberId != null && { MemberId: serializeAws_json1_1MemberId(input.MemberId, context) })), (input.NextToken != null && { NextToken: input.NextToken }));
1322
1710
  };
1323
- const serializeAws_json1_1ListGroupMembershipsRequest = (input, context) => {
1324
- return {
1325
- ...(input.GroupId != null && { GroupId: input.GroupId }),
1326
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1327
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1328
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1329
- };
1711
+ var serializeAws_json1_1ListGroupMembershipsRequest = function (input, context) {
1712
+ return __assign(__assign(__assign(__assign({}, (input.GroupId != null && { GroupId: input.GroupId })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1330
1713
  };
1331
- const serializeAws_json1_1ListGroupsRequest = (input, context) => {
1332
- return {
1333
- ...(input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) }),
1334
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1335
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1336
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1337
- };
1714
+ var serializeAws_json1_1ListGroupsRequest = function (input, context) {
1715
+ return __assign(__assign(__assign(__assign({}, (input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1338
1716
  };
1339
- const serializeAws_json1_1ListUsersRequest = (input, context) => {
1340
- return {
1341
- ...(input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) }),
1342
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1343
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1344
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1345
- };
1717
+ var serializeAws_json1_1ListUsersRequest = function (input, context) {
1718
+ return __assign(__assign(__assign(__assign({}, (input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1346
1719
  };
1347
- const serializeAws_json1_1MemberId = (input, context) => {
1720
+ var serializeAws_json1_1MemberId = function (input, context) {
1348
1721
  return MemberId.visit(input, {
1349
- UserId: (value) => ({ UserId: value }),
1350
- _: (name, value) => ({ name: value }),
1722
+ UserId: function (value) { return ({ UserId: value }); },
1723
+ _: function (name, value) { return ({ name: value }); },
1351
1724
  });
1352
1725
  };
1353
- const serializeAws_json1_1Name = (input, context) => {
1354
- return {
1355
- ...(input.FamilyName != null && { FamilyName: input.FamilyName }),
1356
- ...(input.Formatted != null && { Formatted: input.Formatted }),
1357
- ...(input.GivenName != null && { GivenName: input.GivenName }),
1358
- ...(input.HonorificPrefix != null && { HonorificPrefix: input.HonorificPrefix }),
1359
- ...(input.HonorificSuffix != null && { HonorificSuffix: input.HonorificSuffix }),
1360
- ...(input.MiddleName != null && { MiddleName: input.MiddleName }),
1361
- };
1726
+ var serializeAws_json1_1Name = function (input, context) {
1727
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.FamilyName != null && { FamilyName: input.FamilyName })), (input.Formatted != null && { Formatted: input.Formatted })), (input.GivenName != null && { GivenName: input.GivenName })), (input.HonorificPrefix != null && { HonorificPrefix: input.HonorificPrefix })), (input.HonorificSuffix != null && { HonorificSuffix: input.HonorificSuffix })), (input.MiddleName != null && { MiddleName: input.MiddleName }));
1362
1728
  };
1363
- const serializeAws_json1_1PhoneNumber = (input, context) => {
1364
- return {
1365
- ...(input.Primary != null && { Primary: input.Primary }),
1366
- ...(input.Type != null && { Type: input.Type }),
1367
- ...(input.Value != null && { Value: input.Value }),
1368
- };
1729
+ var serializeAws_json1_1PhoneNumber = function (input, context) {
1730
+ return __assign(__assign(__assign({}, (input.Primary != null && { Primary: input.Primary })), (input.Type != null && { Type: input.Type })), (input.Value != null && { Value: input.Value }));
1369
1731
  };
1370
- const serializeAws_json1_1PhoneNumbers = (input, context) => {
1732
+ var serializeAws_json1_1PhoneNumbers = function (input, context) {
1371
1733
  return input
1372
- .filter((e) => e != null)
1373
- .map((entry) => {
1734
+ .filter(function (e) { return e != null; })
1735
+ .map(function (entry) {
1374
1736
  return serializeAws_json1_1PhoneNumber(entry, context);
1375
1737
  });
1376
1738
  };
1377
- const serializeAws_json1_1UniqueAttribute = (input, context) => {
1378
- return {
1379
- ...(input.AttributePath != null && { AttributePath: input.AttributePath }),
1380
- ...(input.AttributeValue != null && {
1381
- AttributeValue: serializeAws_json1_1AttributeValue(input.AttributeValue, context),
1382
- }),
1383
- };
1739
+ var serializeAws_json1_1UniqueAttribute = function (input, context) {
1740
+ return __assign(__assign({}, (input.AttributePath != null && { AttributePath: input.AttributePath })), (input.AttributeValue != null && {
1741
+ AttributeValue: serializeAws_json1_1AttributeValue(input.AttributeValue, context),
1742
+ }));
1384
1743
  };
1385
- const serializeAws_json1_1UpdateGroupRequest = (input, context) => {
1386
- return {
1387
- ...(input.GroupId != null && { GroupId: input.GroupId }),
1388
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1389
- ...(input.Operations != null && { Operations: serializeAws_json1_1AttributeOperations(input.Operations, context) }),
1390
- };
1744
+ var serializeAws_json1_1UpdateGroupRequest = function (input, context) {
1745
+ return __assign(__assign(__assign({}, (input.GroupId != null && { GroupId: input.GroupId })), (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.Operations != null && { Operations: serializeAws_json1_1AttributeOperations(input.Operations, context) }));
1391
1746
  };
1392
- const serializeAws_json1_1UpdateUserRequest = (input, context) => {
1393
- return {
1394
- ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }),
1395
- ...(input.Operations != null && { Operations: serializeAws_json1_1AttributeOperations(input.Operations, context) }),
1396
- ...(input.UserId != null && { UserId: input.UserId }),
1397
- };
1747
+ var serializeAws_json1_1UpdateUserRequest = function (input, context) {
1748
+ return __assign(__assign(__assign({}, (input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId })), (input.Operations != null && { Operations: serializeAws_json1_1AttributeOperations(input.Operations, context) })), (input.UserId != null && { UserId: input.UserId }));
1398
1749
  };
1399
- const deserializeAws_json1_1AccessDeniedException = (output, context) => {
1750
+ var deserializeAws_json1_1AccessDeniedException = function (output, context) {
1400
1751
  return {
1401
1752
  Message: __expectString(output.Message),
1402
1753
  RequestId: __expectString(output.RequestId),
1403
1754
  };
1404
1755
  };
1405
- const deserializeAws_json1_1Address = (output, context) => {
1756
+ var deserializeAws_json1_1Address = function (output, context) {
1406
1757
  return {
1407
1758
  Country: __expectString(output.Country),
1408
1759
  Formatted: __expectString(output.Formatted),
@@ -1414,10 +1765,10 @@ const deserializeAws_json1_1Address = (output, context) => {
1414
1765
  Type: __expectString(output.Type),
1415
1766
  };
1416
1767
  };
1417
- const deserializeAws_json1_1Addresses = (output, context) => {
1418
- const retVal = (output || [])
1419
- .filter((e) => e != null)
1420
- .map((entry) => {
1768
+ var deserializeAws_json1_1Addresses = function (output, context) {
1769
+ var retVal = (output || [])
1770
+ .filter(function (e) { return e != null; })
1771
+ .map(function (entry) {
1421
1772
  if (entry === null) {
1422
1773
  return null;
1423
1774
  }
@@ -1425,41 +1776,41 @@ const deserializeAws_json1_1Addresses = (output, context) => {
1425
1776
  });
1426
1777
  return retVal;
1427
1778
  };
1428
- const deserializeAws_json1_1ConflictException = (output, context) => {
1779
+ var deserializeAws_json1_1ConflictException = function (output, context) {
1429
1780
  return {
1430
1781
  Message: __expectString(output.Message),
1431
1782
  Reason: __expectString(output.Reason),
1432
1783
  RequestId: __expectString(output.RequestId),
1433
1784
  };
1434
1785
  };
1435
- const deserializeAws_json1_1CreateGroupMembershipResponse = (output, context) => {
1786
+ var deserializeAws_json1_1CreateGroupMembershipResponse = function (output, context) {
1436
1787
  return {
1437
1788
  IdentityStoreId: __expectString(output.IdentityStoreId),
1438
1789
  MembershipId: __expectString(output.MembershipId),
1439
1790
  };
1440
1791
  };
1441
- const deserializeAws_json1_1CreateGroupResponse = (output, context) => {
1792
+ var deserializeAws_json1_1CreateGroupResponse = function (output, context) {
1442
1793
  return {
1443
1794
  GroupId: __expectString(output.GroupId),
1444
1795
  IdentityStoreId: __expectString(output.IdentityStoreId),
1445
1796
  };
1446
1797
  };
1447
- const deserializeAws_json1_1CreateUserResponse = (output, context) => {
1798
+ var deserializeAws_json1_1CreateUserResponse = function (output, context) {
1448
1799
  return {
1449
1800
  IdentityStoreId: __expectString(output.IdentityStoreId),
1450
1801
  UserId: __expectString(output.UserId),
1451
1802
  };
1452
1803
  };
1453
- const deserializeAws_json1_1DeleteGroupMembershipResponse = (output, context) => {
1804
+ var deserializeAws_json1_1DeleteGroupMembershipResponse = function (output, context) {
1454
1805
  return {};
1455
1806
  };
1456
- const deserializeAws_json1_1DeleteGroupResponse = (output, context) => {
1807
+ var deserializeAws_json1_1DeleteGroupResponse = function (output, context) {
1457
1808
  return {};
1458
1809
  };
1459
- const deserializeAws_json1_1DeleteUserResponse = (output, context) => {
1810
+ var deserializeAws_json1_1DeleteUserResponse = function (output, context) {
1460
1811
  return {};
1461
1812
  };
1462
- const deserializeAws_json1_1DescribeGroupMembershipResponse = (output, context) => {
1813
+ var deserializeAws_json1_1DescribeGroupMembershipResponse = function (output, context) {
1463
1814
  return {
1464
1815
  GroupId: __expectString(output.GroupId),
1465
1816
  IdentityStoreId: __expectString(output.IdentityStoreId),
@@ -1467,7 +1818,7 @@ const deserializeAws_json1_1DescribeGroupMembershipResponse = (output, context)
1467
1818
  MembershipId: __expectString(output.MembershipId),
1468
1819
  };
1469
1820
  };
1470
- const deserializeAws_json1_1DescribeGroupResponse = (output, context) => {
1821
+ var deserializeAws_json1_1DescribeGroupResponse = function (output, context) {
1471
1822
  return {
1472
1823
  Description: __expectString(output.Description),
1473
1824
  DisplayName: __expectString(output.DisplayName),
@@ -1476,7 +1827,7 @@ const deserializeAws_json1_1DescribeGroupResponse = (output, context) => {
1476
1827
  IdentityStoreId: __expectString(output.IdentityStoreId),
1477
1828
  };
1478
1829
  };
1479
- const deserializeAws_json1_1DescribeUserResponse = (output, context) => {
1830
+ var deserializeAws_json1_1DescribeUserResponse = function (output, context) {
1480
1831
  return {
1481
1832
  Addresses: output.Addresses != null ? deserializeAws_json1_1Addresses(output.Addresses, context) : undefined,
1482
1833
  DisplayName: __expectString(output.DisplayName),
@@ -1496,17 +1847,17 @@ const deserializeAws_json1_1DescribeUserResponse = (output, context) => {
1496
1847
  UserType: __expectString(output.UserType),
1497
1848
  };
1498
1849
  };
1499
- const deserializeAws_json1_1Email = (output, context) => {
1850
+ var deserializeAws_json1_1Email = function (output, context) {
1500
1851
  return {
1501
1852
  Primary: __expectBoolean(output.Primary),
1502
1853
  Type: __expectString(output.Type),
1503
1854
  Value: __expectString(output.Value),
1504
1855
  };
1505
1856
  };
1506
- const deserializeAws_json1_1Emails = (output, context) => {
1507
- const retVal = (output || [])
1508
- .filter((e) => e != null)
1509
- .map((entry) => {
1857
+ var deserializeAws_json1_1Emails = function (output, context) {
1858
+ var retVal = (output || [])
1859
+ .filter(function (e) { return e != null; })
1860
+ .map(function (entry) {
1510
1861
  if (entry === null) {
1511
1862
  return null;
1512
1863
  }
@@ -1514,16 +1865,16 @@ const deserializeAws_json1_1Emails = (output, context) => {
1514
1865
  });
1515
1866
  return retVal;
1516
1867
  };
1517
- const deserializeAws_json1_1ExternalId = (output, context) => {
1868
+ var deserializeAws_json1_1ExternalId = function (output, context) {
1518
1869
  return {
1519
1870
  Id: __expectString(output.Id),
1520
1871
  Issuer: __expectString(output.Issuer),
1521
1872
  };
1522
1873
  };
1523
- const deserializeAws_json1_1ExternalIds = (output, context) => {
1524
- const retVal = (output || [])
1525
- .filter((e) => e != null)
1526
- .map((entry) => {
1874
+ var deserializeAws_json1_1ExternalIds = function (output, context) {
1875
+ var retVal = (output || [])
1876
+ .filter(function (e) { return e != null; })
1877
+ .map(function (entry) {
1527
1878
  if (entry === null) {
1528
1879
  return null;
1529
1880
  }
@@ -1531,25 +1882,25 @@ const deserializeAws_json1_1ExternalIds = (output, context) => {
1531
1882
  });
1532
1883
  return retVal;
1533
1884
  };
1534
- const deserializeAws_json1_1GetGroupIdResponse = (output, context) => {
1885
+ var deserializeAws_json1_1GetGroupIdResponse = function (output, context) {
1535
1886
  return {
1536
1887
  GroupId: __expectString(output.GroupId),
1537
1888
  IdentityStoreId: __expectString(output.IdentityStoreId),
1538
1889
  };
1539
1890
  };
1540
- const deserializeAws_json1_1GetGroupMembershipIdResponse = (output, context) => {
1891
+ var deserializeAws_json1_1GetGroupMembershipIdResponse = function (output, context) {
1541
1892
  return {
1542
1893
  IdentityStoreId: __expectString(output.IdentityStoreId),
1543
1894
  MembershipId: __expectString(output.MembershipId),
1544
1895
  };
1545
1896
  };
1546
- const deserializeAws_json1_1GetUserIdResponse = (output, context) => {
1897
+ var deserializeAws_json1_1GetUserIdResponse = function (output, context) {
1547
1898
  return {
1548
1899
  IdentityStoreId: __expectString(output.IdentityStoreId),
1549
1900
  UserId: __expectString(output.UserId),
1550
1901
  };
1551
1902
  };
1552
- const deserializeAws_json1_1Group = (output, context) => {
1903
+ var deserializeAws_json1_1Group = function (output, context) {
1553
1904
  return {
1554
1905
  Description: __expectString(output.Description),
1555
1906
  DisplayName: __expectString(output.DisplayName),
@@ -1558,7 +1909,7 @@ const deserializeAws_json1_1Group = (output, context) => {
1558
1909
  IdentityStoreId: __expectString(output.IdentityStoreId),
1559
1910
  };
1560
1911
  };
1561
- const deserializeAws_json1_1GroupMembership = (output, context) => {
1912
+ var deserializeAws_json1_1GroupMembership = function (output, context) {
1562
1913
  return {
1563
1914
  GroupId: __expectString(output.GroupId),
1564
1915
  IdentityStoreId: __expectString(output.IdentityStoreId),
@@ -1566,17 +1917,17 @@ const deserializeAws_json1_1GroupMembership = (output, context) => {
1566
1917
  MembershipId: __expectString(output.MembershipId),
1567
1918
  };
1568
1919
  };
1569
- const deserializeAws_json1_1GroupMembershipExistenceResult = (output, context) => {
1920
+ var deserializeAws_json1_1GroupMembershipExistenceResult = function (output, context) {
1570
1921
  return {
1571
1922
  GroupId: __expectString(output.GroupId),
1572
1923
  MemberId: output.MemberId != null ? deserializeAws_json1_1MemberId(__expectUnion(output.MemberId), context) : undefined,
1573
1924
  MembershipExists: __expectBoolean(output.MembershipExists),
1574
1925
  };
1575
1926
  };
1576
- const deserializeAws_json1_1GroupMembershipExistenceResults = (output, context) => {
1577
- const retVal = (output || [])
1578
- .filter((e) => e != null)
1579
- .map((entry) => {
1927
+ var deserializeAws_json1_1GroupMembershipExistenceResults = function (output, context) {
1928
+ var retVal = (output || [])
1929
+ .filter(function (e) { return e != null; })
1930
+ .map(function (entry) {
1580
1931
  if (entry === null) {
1581
1932
  return null;
1582
1933
  }
@@ -1584,10 +1935,10 @@ const deserializeAws_json1_1GroupMembershipExistenceResults = (output, context)
1584
1935
  });
1585
1936
  return retVal;
1586
1937
  };
1587
- const deserializeAws_json1_1GroupMemberships = (output, context) => {
1588
- const retVal = (output || [])
1589
- .filter((e) => e != null)
1590
- .map((entry) => {
1938
+ var deserializeAws_json1_1GroupMemberships = function (output, context) {
1939
+ var retVal = (output || [])
1940
+ .filter(function (e) { return e != null; })
1941
+ .map(function (entry) {
1591
1942
  if (entry === null) {
1592
1943
  return null;
1593
1944
  }
@@ -1595,10 +1946,10 @@ const deserializeAws_json1_1GroupMemberships = (output, context) => {
1595
1946
  });
1596
1947
  return retVal;
1597
1948
  };
1598
- const deserializeAws_json1_1Groups = (output, context) => {
1599
- const retVal = (output || [])
1600
- .filter((e) => e != null)
1601
- .map((entry) => {
1949
+ var deserializeAws_json1_1Groups = function (output, context) {
1950
+ var retVal = (output || [])
1951
+ .filter(function (e) { return e != null; })
1952
+ .map(function (entry) {
1602
1953
  if (entry === null) {
1603
1954
  return null;
1604
1955
  }
@@ -1606,21 +1957,21 @@ const deserializeAws_json1_1Groups = (output, context) => {
1606
1957
  });
1607
1958
  return retVal;
1608
1959
  };
1609
- const deserializeAws_json1_1InternalServerException = (output, context) => {
1960
+ var deserializeAws_json1_1InternalServerException = function (output, context) {
1610
1961
  return {
1611
1962
  Message: __expectString(output.Message),
1612
1963
  RequestId: __expectString(output.RequestId),
1613
1964
  RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds),
1614
1965
  };
1615
1966
  };
1616
- const deserializeAws_json1_1IsMemberInGroupsResponse = (output, context) => {
1967
+ var deserializeAws_json1_1IsMemberInGroupsResponse = function (output, context) {
1617
1968
  return {
1618
1969
  Results: output.Results != null
1619
1970
  ? deserializeAws_json1_1GroupMembershipExistenceResults(output.Results, context)
1620
1971
  : undefined,
1621
1972
  };
1622
1973
  };
1623
- const deserializeAws_json1_1ListGroupMembershipsForMemberResponse = (output, context) => {
1974
+ var deserializeAws_json1_1ListGroupMembershipsForMemberResponse = function (output, context) {
1624
1975
  return {
1625
1976
  GroupMemberships: output.GroupMemberships != null
1626
1977
  ? deserializeAws_json1_1GroupMemberships(output.GroupMemberships, context)
@@ -1628,7 +1979,7 @@ const deserializeAws_json1_1ListGroupMembershipsForMemberResponse = (output, con
1628
1979
  NextToken: __expectString(output.NextToken),
1629
1980
  };
1630
1981
  };
1631
- const deserializeAws_json1_1ListGroupMembershipsResponse = (output, context) => {
1982
+ var deserializeAws_json1_1ListGroupMembershipsResponse = function (output, context) {
1632
1983
  return {
1633
1984
  GroupMemberships: output.GroupMemberships != null
1634
1985
  ? deserializeAws_json1_1GroupMemberships(output.GroupMemberships, context)
@@ -1636,25 +1987,25 @@ const deserializeAws_json1_1ListGroupMembershipsResponse = (output, context) =>
1636
1987
  NextToken: __expectString(output.NextToken),
1637
1988
  };
1638
1989
  };
1639
- const deserializeAws_json1_1ListGroupsResponse = (output, context) => {
1990
+ var deserializeAws_json1_1ListGroupsResponse = function (output, context) {
1640
1991
  return {
1641
1992
  Groups: output.Groups != null ? deserializeAws_json1_1Groups(output.Groups, context) : undefined,
1642
1993
  NextToken: __expectString(output.NextToken),
1643
1994
  };
1644
1995
  };
1645
- const deserializeAws_json1_1ListUsersResponse = (output, context) => {
1996
+ var deserializeAws_json1_1ListUsersResponse = function (output, context) {
1646
1997
  return {
1647
1998
  NextToken: __expectString(output.NextToken),
1648
1999
  Users: output.Users != null ? deserializeAws_json1_1Users(output.Users, context) : undefined,
1649
2000
  };
1650
2001
  };
1651
- const deserializeAws_json1_1MemberId = (output, context) => {
2002
+ var deserializeAws_json1_1MemberId = function (output, context) {
1652
2003
  if (__expectString(output.UserId) !== undefined) {
1653
2004
  return { UserId: __expectString(output.UserId) };
1654
2005
  }
1655
2006
  return { $unknown: Object.entries(output)[0] };
1656
2007
  };
1657
- const deserializeAws_json1_1Name = (output, context) => {
2008
+ var deserializeAws_json1_1Name = function (output, context) {
1658
2009
  return {
1659
2010
  FamilyName: __expectString(output.FamilyName),
1660
2011
  Formatted: __expectString(output.Formatted),
@@ -1664,17 +2015,17 @@ const deserializeAws_json1_1Name = (output, context) => {
1664
2015
  MiddleName: __expectString(output.MiddleName),
1665
2016
  };
1666
2017
  };
1667
- const deserializeAws_json1_1PhoneNumber = (output, context) => {
2018
+ var deserializeAws_json1_1PhoneNumber = function (output, context) {
1668
2019
  return {
1669
2020
  Primary: __expectBoolean(output.Primary),
1670
2021
  Type: __expectString(output.Type),
1671
2022
  Value: __expectString(output.Value),
1672
2023
  };
1673
2024
  };
1674
- const deserializeAws_json1_1PhoneNumbers = (output, context) => {
1675
- const retVal = (output || [])
1676
- .filter((e) => e != null)
1677
- .map((entry) => {
2025
+ var deserializeAws_json1_1PhoneNumbers = function (output, context) {
2026
+ var retVal = (output || [])
2027
+ .filter(function (e) { return e != null; })
2028
+ .map(function (entry) {
1678
2029
  if (entry === null) {
1679
2030
  return null;
1680
2031
  }
@@ -1682,7 +2033,7 @@ const deserializeAws_json1_1PhoneNumbers = (output, context) => {
1682
2033
  });
1683
2034
  return retVal;
1684
2035
  };
1685
- const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
2036
+ var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
1686
2037
  return {
1687
2038
  Message: __expectString(output.Message),
1688
2039
  RequestId: __expectString(output.RequestId),
@@ -1690,26 +2041,26 @@ const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
1690
2041
  ResourceType: __expectString(output.ResourceType),
1691
2042
  };
1692
2043
  };
1693
- const deserializeAws_json1_1ServiceQuotaExceededException = (output, context) => {
2044
+ var deserializeAws_json1_1ServiceQuotaExceededException = function (output, context) {
1694
2045
  return {
1695
2046
  Message: __expectString(output.Message),
1696
2047
  RequestId: __expectString(output.RequestId),
1697
2048
  };
1698
2049
  };
1699
- const deserializeAws_json1_1ThrottlingException = (output, context) => {
2050
+ var deserializeAws_json1_1ThrottlingException = function (output, context) {
1700
2051
  return {
1701
2052
  Message: __expectString(output.Message),
1702
2053
  RequestId: __expectString(output.RequestId),
1703
2054
  RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds),
1704
2055
  };
1705
2056
  };
1706
- const deserializeAws_json1_1UpdateGroupResponse = (output, context) => {
2057
+ var deserializeAws_json1_1UpdateGroupResponse = function (output, context) {
1707
2058
  return {};
1708
2059
  };
1709
- const deserializeAws_json1_1UpdateUserResponse = (output, context) => {
2060
+ var deserializeAws_json1_1UpdateUserResponse = function (output, context) {
1710
2061
  return {};
1711
2062
  };
1712
- const deserializeAws_json1_1User = (output, context) => {
2063
+ var deserializeAws_json1_1User = function (output, context) {
1713
2064
  return {
1714
2065
  Addresses: output.Addresses != null ? deserializeAws_json1_1Addresses(output.Addresses, context) : undefined,
1715
2066
  DisplayName: __expectString(output.DisplayName),
@@ -1729,10 +2080,10 @@ const deserializeAws_json1_1User = (output, context) => {
1729
2080
  UserType: __expectString(output.UserType),
1730
2081
  };
1731
2082
  };
1732
- const deserializeAws_json1_1Users = (output, context) => {
1733
- const retVal = (output || [])
1734
- .filter((e) => e != null)
1735
- .map((entry) => {
2083
+ var deserializeAws_json1_1Users = function (output, context) {
2084
+ var retVal = (output || [])
2085
+ .filter(function (e) { return e != null; })
2086
+ .map(function (entry) {
1736
2087
  if (entry === null) {
1737
2088
  return null;
1738
2089
  }
@@ -1740,58 +2091,81 @@ const deserializeAws_json1_1Users = (output, context) => {
1740
2091
  });
1741
2092
  return retVal;
1742
2093
  };
1743
- const deserializeAws_json1_1ValidationException = (output, context) => {
2094
+ var deserializeAws_json1_1ValidationException = function (output, context) {
1744
2095
  return {
1745
2096
  Message: __expectString(output.Message),
1746
2097
  RequestId: __expectString(output.RequestId),
1747
2098
  };
1748
2099
  };
1749
- const deserializeMetadata = (output) => ({
1750
- httpStatusCode: output.statusCode,
1751
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
1752
- extendedRequestId: output.headers["x-amz-id-2"],
1753
- cfId: output.headers["x-amz-cf-id"],
1754
- });
1755
- const collectBody = (streamBody = new Uint8Array(), context) => {
2100
+ var deserializeMetadata = function (output) {
2101
+ var _a, _b;
2102
+ return ({
2103
+ httpStatusCode: output.statusCode,
2104
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
2105
+ extendedRequestId: output.headers["x-amz-id-2"],
2106
+ cfId: output.headers["x-amz-cf-id"],
2107
+ });
2108
+ };
2109
+ var collectBody = function (streamBody, context) {
2110
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
1756
2111
  if (streamBody instanceof Uint8Array) {
1757
2112
  return Promise.resolve(streamBody);
1758
2113
  }
1759
2114
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1760
2115
  };
1761
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1762
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1763
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1764
- const contents = {
1765
- protocol,
1766
- hostname,
1767
- port,
1768
- method: "POST",
1769
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1770
- headers,
1771
- };
1772
- if (resolvedHostname !== undefined) {
1773
- contents.hostname = resolvedHostname;
1774
- }
1775
- if (body !== undefined) {
1776
- contents.body = body;
1777
- }
1778
- return new __HttpRequest(contents);
2116
+ var collectBodyString = function (streamBody, context) {
2117
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2118
+ };
2119
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2120
+ var _a, hostname, _b, protocol, port, basePath, contents;
2121
+ return __generator(this, function (_c) {
2122
+ switch (_c.label) {
2123
+ case 0: return [4, context.endpoint()];
2124
+ case 1:
2125
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2126
+ contents = {
2127
+ protocol: protocol,
2128
+ hostname: hostname,
2129
+ port: port,
2130
+ method: "POST",
2131
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2132
+ headers: headers,
2133
+ };
2134
+ if (resolvedHostname !== undefined) {
2135
+ contents.hostname = resolvedHostname;
2136
+ }
2137
+ if (body !== undefined) {
2138
+ contents.body = body;
2139
+ }
2140
+ return [2, new __HttpRequest(contents)];
2141
+ }
2142
+ });
2143
+ }); };
2144
+ var parseBody = function (streamBody, context) {
2145
+ return collectBodyString(streamBody, context).then(function (encoded) {
2146
+ if (encoded.length) {
2147
+ return JSON.parse(encoded);
2148
+ }
2149
+ return {};
2150
+ });
1779
2151
  };
1780
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1781
- if (encoded.length) {
1782
- return JSON.parse(encoded);
1783
- }
1784
- return {};
1785
- });
1786
- const parseErrorBody = async (errorBody, context) => {
1787
- const value = await parseBody(errorBody, context);
1788
- value.message = value.message ?? value.Message;
1789
- return value;
1790
- };
1791
- const loadRestJsonErrorCode = (output, data) => {
1792
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1793
- const sanitizeErrorCode = (rawValue) => {
1794
- let cleanValue = rawValue;
2152
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2153
+ var value;
2154
+ var _a;
2155
+ return __generator(this, function (_b) {
2156
+ switch (_b.label) {
2157
+ case 0: return [4, parseBody(errorBody, context)];
2158
+ case 1:
2159
+ value = _b.sent();
2160
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2161
+ return [2, value];
2162
+ }
2163
+ });
2164
+ }); };
2165
+ var loadRestJsonErrorCode = function (output, data) {
2166
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2167
+ var sanitizeErrorCode = function (rawValue) {
2168
+ var cleanValue = rawValue;
1795
2169
  if (typeof cleanValue === "number") {
1796
2170
  cleanValue = cleanValue.toString();
1797
2171
  }
@@ -1806,7 +2180,7 @@ const loadRestJsonErrorCode = (output, data) => {
1806
2180
  }
1807
2181
  return cleanValue;
1808
2182
  };
1809
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2183
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
1810
2184
  if (headerKey !== undefined) {
1811
2185
  return sanitizeErrorCode(output.headers[headerKey]);
1812
2186
  }