@aws-sdk/client-finspace-data 3.51.0 → 3.54.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 (90) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist-cjs/FinspaceData.js +165 -0
  3. package/dist-cjs/commands/CreatePermissionGroupCommand.js +36 -0
  4. package/dist-cjs/commands/CreateUserCommand.js +36 -0
  5. package/dist-cjs/commands/DeletePermissionGroupCommand.js +36 -0
  6. package/dist-cjs/commands/DisableUserCommand.js +36 -0
  7. package/dist-cjs/commands/EnableUserCommand.js +36 -0
  8. package/dist-cjs/commands/GetUserCommand.js +36 -0
  9. package/dist-cjs/commands/ListPermissionGroupsCommand.js +36 -0
  10. package/dist-cjs/commands/ListUsersCommand.js +36 -0
  11. package/dist-cjs/commands/ResetUserPasswordCommand.js +36 -0
  12. package/dist-cjs/commands/UpdatePermissionGroupCommand.js +36 -0
  13. package/dist-cjs/commands/UpdateUserCommand.js +36 -0
  14. package/dist-cjs/commands/index.js +11 -0
  15. package/dist-cjs/index.js +3 -0
  16. package/dist-cjs/models/FinspaceDataServiceException.js +11 -0
  17. package/dist-cjs/models/models_0.js +294 -1
  18. package/dist-cjs/pagination/ListPermissionGroupsPaginator.js +35 -0
  19. package/dist-cjs/pagination/ListUsersPaginator.js +35 -0
  20. package/dist-cjs/pagination/index.js +2 -0
  21. package/dist-cjs/protocols/Aws_restJson1.js +1302 -752
  22. package/dist-es/FinspaceData.js +165 -0
  23. package/dist-es/commands/CreatePermissionGroupCommand.js +39 -0
  24. package/dist-es/commands/CreateUserCommand.js +39 -0
  25. package/dist-es/commands/DeletePermissionGroupCommand.js +39 -0
  26. package/dist-es/commands/DisableUserCommand.js +39 -0
  27. package/dist-es/commands/EnableUserCommand.js +39 -0
  28. package/dist-es/commands/GetUserCommand.js +39 -0
  29. package/dist-es/commands/ListPermissionGroupsCommand.js +39 -0
  30. package/dist-es/commands/ListUsersCommand.js +39 -0
  31. package/dist-es/commands/ResetUserPasswordCommand.js +39 -0
  32. package/dist-es/commands/UpdatePermissionGroupCommand.js +39 -0
  33. package/dist-es/commands/UpdateUserCommand.js +39 -0
  34. package/dist-es/commands/index.js +11 -0
  35. package/dist-es/index.js +1 -0
  36. package/dist-es/models/FinspaceDataServiceException.js +12 -0
  37. package/dist-es/models/models_0.js +218 -5
  38. package/dist-es/pagination/ListPermissionGroupsPaginator.js +74 -0
  39. package/dist-es/pagination/ListUsersPaginator.js +74 -0
  40. package/dist-es/pagination/index.js +2 -0
  41. package/dist-es/protocols/Aws_restJson1.js +1953 -1005
  42. package/dist-types/FinspaceData.d.ts +77 -0
  43. package/dist-types/FinspaceDataClient.d.ts +15 -4
  44. package/dist-types/commands/CreatePermissionGroupCommand.d.ts +35 -0
  45. package/dist-types/commands/CreateUserCommand.d.ts +35 -0
  46. package/dist-types/commands/DeletePermissionGroupCommand.d.ts +35 -0
  47. package/dist-types/commands/DisableUserCommand.d.ts +35 -0
  48. package/dist-types/commands/EnableUserCommand.d.ts +35 -0
  49. package/dist-types/commands/GetUserCommand.d.ts +35 -0
  50. package/dist-types/commands/ListPermissionGroupsCommand.d.ts +35 -0
  51. package/dist-types/commands/ListUsersCommand.d.ts +35 -0
  52. package/dist-types/commands/ResetUserPasswordCommand.d.ts +35 -0
  53. package/dist-types/commands/UpdatePermissionGroupCommand.d.ts +35 -0
  54. package/dist-types/commands/UpdateUserCommand.d.ts +35 -0
  55. package/dist-types/commands/index.d.ts +11 -0
  56. package/dist-types/index.d.ts +1 -0
  57. package/dist-types/models/FinspaceDataServiceException.d.ts +10 -0
  58. package/dist-types/models/models_0.d.ts +916 -141
  59. package/dist-types/pagination/ListPermissionGroupsPaginator.d.ts +4 -0
  60. package/dist-types/pagination/ListUsersPaginator.d.ts +4 -0
  61. package/dist-types/pagination/index.d.ts +2 -0
  62. package/dist-types/protocols/Aws_restJson1.d.ts +33 -0
  63. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  64. package/dist-types/runtimeConfig.d.ts +1 -1
  65. package/dist-types/runtimeConfig.native.d.ts +1 -1
  66. package/dist-types/ts3.4/FinspaceData.d.ts +55 -0
  67. package/dist-types/ts3.4/FinspaceDataClient.d.ts +15 -4
  68. package/dist-types/ts3.4/commands/CreatePermissionGroupCommand.d.ts +17 -0
  69. package/dist-types/ts3.4/commands/CreateUserCommand.d.ts +17 -0
  70. package/dist-types/ts3.4/commands/DeletePermissionGroupCommand.d.ts +17 -0
  71. package/dist-types/ts3.4/commands/DisableUserCommand.d.ts +17 -0
  72. package/dist-types/ts3.4/commands/EnableUserCommand.d.ts +17 -0
  73. package/dist-types/ts3.4/commands/GetUserCommand.d.ts +17 -0
  74. package/dist-types/ts3.4/commands/ListPermissionGroupsCommand.d.ts +17 -0
  75. package/dist-types/ts3.4/commands/ListUsersCommand.d.ts +17 -0
  76. package/dist-types/ts3.4/commands/ResetUserPasswordCommand.d.ts +17 -0
  77. package/dist-types/ts3.4/commands/UpdatePermissionGroupCommand.d.ts +17 -0
  78. package/dist-types/ts3.4/commands/UpdateUserCommand.d.ts +17 -0
  79. package/dist-types/ts3.4/commands/index.d.ts +11 -0
  80. package/dist-types/ts3.4/index.d.ts +1 -0
  81. package/dist-types/ts3.4/models/FinspaceDataServiceException.d.ts +6 -0
  82. package/dist-types/ts3.4/models/models_0.d.ts +370 -28
  83. package/dist-types/ts3.4/pagination/ListPermissionGroupsPaginator.d.ts +4 -0
  84. package/dist-types/ts3.4/pagination/ListUsersPaginator.d.ts +4 -0
  85. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  86. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +33 -0
  87. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  88. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  89. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  90. package/package.json +33 -33
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1UpdateDatasetCommand = exports.deserializeAws_restJson1UpdateChangesetCommand = exports.deserializeAws_restJson1ListDataViewsCommand = exports.deserializeAws_restJson1ListDatasetsCommand = exports.deserializeAws_restJson1ListChangesetsCommand = exports.deserializeAws_restJson1GetWorkingLocationCommand = exports.deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = exports.deserializeAws_restJson1GetDataViewCommand = exports.deserializeAws_restJson1GetDatasetCommand = exports.deserializeAws_restJson1GetChangesetCommand = exports.deserializeAws_restJson1DeleteDatasetCommand = exports.deserializeAws_restJson1CreateDataViewCommand = exports.deserializeAws_restJson1CreateDatasetCommand = exports.deserializeAws_restJson1CreateChangesetCommand = exports.serializeAws_restJson1UpdateDatasetCommand = exports.serializeAws_restJson1UpdateChangesetCommand = exports.serializeAws_restJson1ListDataViewsCommand = exports.serializeAws_restJson1ListDatasetsCommand = exports.serializeAws_restJson1ListChangesetsCommand = exports.serializeAws_restJson1GetWorkingLocationCommand = exports.serializeAws_restJson1GetProgrammaticAccessCredentialsCommand = exports.serializeAws_restJson1GetDataViewCommand = exports.serializeAws_restJson1GetDatasetCommand = exports.serializeAws_restJson1GetChangesetCommand = exports.serializeAws_restJson1DeleteDatasetCommand = exports.serializeAws_restJson1CreateDataViewCommand = exports.serializeAws_restJson1CreateDatasetCommand = exports.serializeAws_restJson1CreateChangesetCommand = void 0;
3
+ exports.deserializeAws_restJson1UpdateUserCommand = exports.deserializeAws_restJson1UpdatePermissionGroupCommand = exports.deserializeAws_restJson1UpdateDatasetCommand = exports.deserializeAws_restJson1UpdateChangesetCommand = exports.deserializeAws_restJson1ResetUserPasswordCommand = exports.deserializeAws_restJson1ListUsersCommand = exports.deserializeAws_restJson1ListPermissionGroupsCommand = exports.deserializeAws_restJson1ListDataViewsCommand = exports.deserializeAws_restJson1ListDatasetsCommand = exports.deserializeAws_restJson1ListChangesetsCommand = exports.deserializeAws_restJson1GetWorkingLocationCommand = exports.deserializeAws_restJson1GetUserCommand = exports.deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = exports.deserializeAws_restJson1GetDataViewCommand = exports.deserializeAws_restJson1GetDatasetCommand = exports.deserializeAws_restJson1GetChangesetCommand = exports.deserializeAws_restJson1EnableUserCommand = exports.deserializeAws_restJson1DisableUserCommand = exports.deserializeAws_restJson1DeletePermissionGroupCommand = exports.deserializeAws_restJson1DeleteDatasetCommand = exports.deserializeAws_restJson1CreateUserCommand = exports.deserializeAws_restJson1CreatePermissionGroupCommand = exports.deserializeAws_restJson1CreateDataViewCommand = exports.deserializeAws_restJson1CreateDatasetCommand = exports.deserializeAws_restJson1CreateChangesetCommand = exports.serializeAws_restJson1UpdateUserCommand = exports.serializeAws_restJson1UpdatePermissionGroupCommand = exports.serializeAws_restJson1UpdateDatasetCommand = exports.serializeAws_restJson1UpdateChangesetCommand = exports.serializeAws_restJson1ResetUserPasswordCommand = exports.serializeAws_restJson1ListUsersCommand = exports.serializeAws_restJson1ListPermissionGroupsCommand = exports.serializeAws_restJson1ListDataViewsCommand = exports.serializeAws_restJson1ListDatasetsCommand = exports.serializeAws_restJson1ListChangesetsCommand = exports.serializeAws_restJson1GetWorkingLocationCommand = exports.serializeAws_restJson1GetUserCommand = exports.serializeAws_restJson1GetProgrammaticAccessCredentialsCommand = exports.serializeAws_restJson1GetDataViewCommand = exports.serializeAws_restJson1GetDatasetCommand = exports.serializeAws_restJson1GetChangesetCommand = exports.serializeAws_restJson1EnableUserCommand = exports.serializeAws_restJson1DisableUserCommand = exports.serializeAws_restJson1DeletePermissionGroupCommand = exports.serializeAws_restJson1DeleteDatasetCommand = exports.serializeAws_restJson1CreateUserCommand = exports.serializeAws_restJson1CreatePermissionGroupCommand = exports.serializeAws_restJson1CreateDataViewCommand = exports.serializeAws_restJson1CreateDatasetCommand = exports.serializeAws_restJson1CreateChangesetCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const uuid_1 = require("uuid");
7
+ const FinspaceDataServiceException_1 = require("../models/FinspaceDataServiceException");
8
+ const models_0_1 = require("../models/models_0");
7
9
  const serializeAws_restJson1CreateChangesetCommand = async (input, context) => {
8
10
  var _a;
9
11
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -122,6 +124,63 @@ const serializeAws_restJson1CreateDataViewCommand = async (input, context) => {
122
124
  });
123
125
  };
124
126
  exports.serializeAws_restJson1CreateDataViewCommand = serializeAws_restJson1CreateDataViewCommand;
127
+ const serializeAws_restJson1CreatePermissionGroupCommand = async (input, context) => {
128
+ var _a;
129
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
130
+ const headers = {
131
+ "content-type": "application/json",
132
+ };
133
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/permission-group";
134
+ let body;
135
+ body = JSON.stringify({
136
+ ...(input.applicationPermissions !== undefined &&
137
+ input.applicationPermissions !== null && {
138
+ applicationPermissions: serializeAws_restJson1ApplicationPermissionList(input.applicationPermissions, context),
139
+ }),
140
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
141
+ ...(input.description !== undefined && input.description !== null && { description: input.description }),
142
+ ...(input.name !== undefined && input.name !== null && { name: input.name }),
143
+ });
144
+ return new protocol_http_1.HttpRequest({
145
+ protocol,
146
+ hostname,
147
+ port,
148
+ method: "POST",
149
+ headers,
150
+ path: resolvedPath,
151
+ body,
152
+ });
153
+ };
154
+ exports.serializeAws_restJson1CreatePermissionGroupCommand = serializeAws_restJson1CreatePermissionGroupCommand;
155
+ const serializeAws_restJson1CreateUserCommand = async (input, context) => {
156
+ var _a;
157
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
158
+ const headers = {
159
+ "content-type": "application/json",
160
+ };
161
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user";
162
+ let body;
163
+ body = JSON.stringify({
164
+ ...(input.ApiAccess !== undefined && input.ApiAccess !== null && { ApiAccess: input.ApiAccess }),
165
+ ...(input.apiAccessPrincipalArn !== undefined &&
166
+ input.apiAccessPrincipalArn !== null && { apiAccessPrincipalArn: input.apiAccessPrincipalArn }),
167
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
168
+ ...(input.emailAddress !== undefined && input.emailAddress !== null && { emailAddress: input.emailAddress }),
169
+ ...(input.firstName !== undefined && input.firstName !== null && { firstName: input.firstName }),
170
+ ...(input.lastName !== undefined && input.lastName !== null && { lastName: input.lastName }),
171
+ ...(input.type !== undefined && input.type !== null && { type: input.type }),
172
+ });
173
+ return new protocol_http_1.HttpRequest({
174
+ protocol,
175
+ hostname,
176
+ port,
177
+ method: "POST",
178
+ headers,
179
+ path: resolvedPath,
180
+ body,
181
+ });
182
+ };
183
+ exports.serializeAws_restJson1CreateUserCommand = serializeAws_restJson1CreateUserCommand;
125
184
  const serializeAws_restJson1DeleteDatasetCommand = async (input, context) => {
126
185
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
127
186
  const headers = {};
@@ -152,6 +211,100 @@ const serializeAws_restJson1DeleteDatasetCommand = async (input, context) => {
152
211
  });
153
212
  };
154
213
  exports.serializeAws_restJson1DeleteDatasetCommand = serializeAws_restJson1DeleteDatasetCommand;
214
+ const serializeAws_restJson1DeletePermissionGroupCommand = async (input, context) => {
215
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
216
+ const headers = {};
217
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/permission-group/{permissionGroupId}";
218
+ if (input.permissionGroupId !== undefined) {
219
+ const labelValue = input.permissionGroupId;
220
+ if (labelValue.length <= 0) {
221
+ throw new Error("Empty value provided for input HTTP label: permissionGroupId.");
222
+ }
223
+ resolvedPath = resolvedPath.replace("{permissionGroupId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
224
+ }
225
+ else {
226
+ throw new Error("No value provided for input HTTP label: permissionGroupId.");
227
+ }
228
+ const query = {
229
+ ...(input.clientToken !== undefined && { clientToken: input.clientToken }),
230
+ };
231
+ let body;
232
+ return new protocol_http_1.HttpRequest({
233
+ protocol,
234
+ hostname,
235
+ port,
236
+ method: "DELETE",
237
+ headers,
238
+ path: resolvedPath,
239
+ query,
240
+ body,
241
+ });
242
+ };
243
+ exports.serializeAws_restJson1DeletePermissionGroupCommand = serializeAws_restJson1DeletePermissionGroupCommand;
244
+ const serializeAws_restJson1DisableUserCommand = async (input, context) => {
245
+ var _a;
246
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
247
+ const headers = {
248
+ "content-type": "application/json",
249
+ };
250
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/{userId}/disable";
251
+ if (input.userId !== undefined) {
252
+ const labelValue = input.userId;
253
+ if (labelValue.length <= 0) {
254
+ throw new Error("Empty value provided for input HTTP label: userId.");
255
+ }
256
+ resolvedPath = resolvedPath.replace("{userId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
257
+ }
258
+ else {
259
+ throw new Error("No value provided for input HTTP label: userId.");
260
+ }
261
+ let body;
262
+ body = JSON.stringify({
263
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
264
+ });
265
+ return new protocol_http_1.HttpRequest({
266
+ protocol,
267
+ hostname,
268
+ port,
269
+ method: "POST",
270
+ headers,
271
+ path: resolvedPath,
272
+ body,
273
+ });
274
+ };
275
+ exports.serializeAws_restJson1DisableUserCommand = serializeAws_restJson1DisableUserCommand;
276
+ const serializeAws_restJson1EnableUserCommand = async (input, context) => {
277
+ var _a;
278
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
279
+ const headers = {
280
+ "content-type": "application/json",
281
+ };
282
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/{userId}/enable";
283
+ if (input.userId !== undefined) {
284
+ const labelValue = input.userId;
285
+ if (labelValue.length <= 0) {
286
+ throw new Error("Empty value provided for input HTTP label: userId.");
287
+ }
288
+ resolvedPath = resolvedPath.replace("{userId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
289
+ }
290
+ else {
291
+ throw new Error("No value provided for input HTTP label: userId.");
292
+ }
293
+ let body;
294
+ body = JSON.stringify({
295
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
296
+ });
297
+ return new protocol_http_1.HttpRequest({
298
+ protocol,
299
+ hostname,
300
+ port,
301
+ method: "POST",
302
+ headers,
303
+ path: resolvedPath,
304
+ body,
305
+ });
306
+ };
307
+ exports.serializeAws_restJson1EnableUserCommand = serializeAws_restJson1EnableUserCommand;
155
308
  const serializeAws_restJson1GetChangesetCommand = async (input, context) => {
156
309
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
310
  const headers = {};
@@ -273,6 +426,32 @@ const serializeAws_restJson1GetProgrammaticAccessCredentialsCommand = async (inp
273
426
  });
274
427
  };
275
428
  exports.serializeAws_restJson1GetProgrammaticAccessCredentialsCommand = serializeAws_restJson1GetProgrammaticAccessCredentialsCommand;
429
+ const serializeAws_restJson1GetUserCommand = async (input, context) => {
430
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
431
+ const headers = {};
432
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/{userId}";
433
+ if (input.userId !== undefined) {
434
+ const labelValue = input.userId;
435
+ if (labelValue.length <= 0) {
436
+ throw new Error("Empty value provided for input HTTP label: userId.");
437
+ }
438
+ resolvedPath = resolvedPath.replace("{userId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
439
+ }
440
+ else {
441
+ throw new Error("No value provided for input HTTP label: userId.");
442
+ }
443
+ let body;
444
+ return new protocol_http_1.HttpRequest({
445
+ protocol,
446
+ hostname,
447
+ port,
448
+ method: "GET",
449
+ headers,
450
+ path: resolvedPath,
451
+ body,
452
+ });
453
+ };
454
+ exports.serializeAws_restJson1GetUserCommand = serializeAws_restJson1GetUserCommand;
276
455
  const serializeAws_restJson1GetWorkingLocationCommand = async (input, context) => {
277
456
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
278
457
  const headers = {
@@ -377,6 +556,80 @@ const serializeAws_restJson1ListDataViewsCommand = async (input, context) => {
377
556
  });
378
557
  };
379
558
  exports.serializeAws_restJson1ListDataViewsCommand = serializeAws_restJson1ListDataViewsCommand;
559
+ const serializeAws_restJson1ListPermissionGroupsCommand = async (input, context) => {
560
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
561
+ const headers = {};
562
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/permission-group";
563
+ const query = {
564
+ ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
565
+ ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
566
+ };
567
+ let body;
568
+ return new protocol_http_1.HttpRequest({
569
+ protocol,
570
+ hostname,
571
+ port,
572
+ method: "GET",
573
+ headers,
574
+ path: resolvedPath,
575
+ query,
576
+ body,
577
+ });
578
+ };
579
+ exports.serializeAws_restJson1ListPermissionGroupsCommand = serializeAws_restJson1ListPermissionGroupsCommand;
580
+ const serializeAws_restJson1ListUsersCommand = async (input, context) => {
581
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
582
+ const headers = {};
583
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user";
584
+ const query = {
585
+ ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
586
+ ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
587
+ };
588
+ let body;
589
+ return new protocol_http_1.HttpRequest({
590
+ protocol,
591
+ hostname,
592
+ port,
593
+ method: "GET",
594
+ headers,
595
+ path: resolvedPath,
596
+ query,
597
+ body,
598
+ });
599
+ };
600
+ exports.serializeAws_restJson1ListUsersCommand = serializeAws_restJson1ListUsersCommand;
601
+ const serializeAws_restJson1ResetUserPasswordCommand = async (input, context) => {
602
+ var _a;
603
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
604
+ const headers = {
605
+ "content-type": "application/json",
606
+ };
607
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/{userId}/password";
608
+ if (input.userId !== undefined) {
609
+ const labelValue = input.userId;
610
+ if (labelValue.length <= 0) {
611
+ throw new Error("Empty value provided for input HTTP label: userId.");
612
+ }
613
+ resolvedPath = resolvedPath.replace("{userId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
614
+ }
615
+ else {
616
+ throw new Error("No value provided for input HTTP label: userId.");
617
+ }
618
+ let body;
619
+ body = JSON.stringify({
620
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
621
+ });
622
+ return new protocol_http_1.HttpRequest({
623
+ protocol,
624
+ hostname,
625
+ port,
626
+ method: "POST",
627
+ headers,
628
+ path: resolvedPath,
629
+ body,
630
+ });
631
+ };
632
+ exports.serializeAws_restJson1ResetUserPasswordCommand = serializeAws_restJson1ResetUserPasswordCommand;
380
633
  const serializeAws_restJson1UpdateChangesetCommand = async (input, context) => {
381
634
  var _a;
382
635
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -465,6 +718,82 @@ const serializeAws_restJson1UpdateDatasetCommand = async (input, context) => {
465
718
  });
466
719
  };
467
720
  exports.serializeAws_restJson1UpdateDatasetCommand = serializeAws_restJson1UpdateDatasetCommand;
721
+ const serializeAws_restJson1UpdatePermissionGroupCommand = async (input, context) => {
722
+ var _a;
723
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
724
+ const headers = {
725
+ "content-type": "application/json",
726
+ };
727
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/permission-group/{permissionGroupId}";
728
+ if (input.permissionGroupId !== undefined) {
729
+ const labelValue = input.permissionGroupId;
730
+ if (labelValue.length <= 0) {
731
+ throw new Error("Empty value provided for input HTTP label: permissionGroupId.");
732
+ }
733
+ resolvedPath = resolvedPath.replace("{permissionGroupId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
734
+ }
735
+ else {
736
+ throw new Error("No value provided for input HTTP label: permissionGroupId.");
737
+ }
738
+ let body;
739
+ body = JSON.stringify({
740
+ ...(input.applicationPermissions !== undefined &&
741
+ input.applicationPermissions !== null && {
742
+ applicationPermissions: serializeAws_restJson1ApplicationPermissionList(input.applicationPermissions, context),
743
+ }),
744
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
745
+ ...(input.description !== undefined && input.description !== null && { description: input.description }),
746
+ ...(input.name !== undefined && input.name !== null && { name: input.name }),
747
+ });
748
+ return new protocol_http_1.HttpRequest({
749
+ protocol,
750
+ hostname,
751
+ port,
752
+ method: "PUT",
753
+ headers,
754
+ path: resolvedPath,
755
+ body,
756
+ });
757
+ };
758
+ exports.serializeAws_restJson1UpdatePermissionGroupCommand = serializeAws_restJson1UpdatePermissionGroupCommand;
759
+ const serializeAws_restJson1UpdateUserCommand = async (input, context) => {
760
+ var _a;
761
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
762
+ const headers = {
763
+ "content-type": "application/json",
764
+ };
765
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/{userId}";
766
+ if (input.userId !== undefined) {
767
+ const labelValue = input.userId;
768
+ if (labelValue.length <= 0) {
769
+ throw new Error("Empty value provided for input HTTP label: userId.");
770
+ }
771
+ resolvedPath = resolvedPath.replace("{userId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
772
+ }
773
+ else {
774
+ throw new Error("No value provided for input HTTP label: userId.");
775
+ }
776
+ let body;
777
+ body = JSON.stringify({
778
+ ...(input.apiAccess !== undefined && input.apiAccess !== null && { apiAccess: input.apiAccess }),
779
+ ...(input.apiAccessPrincipalArn !== undefined &&
780
+ input.apiAccessPrincipalArn !== null && { apiAccessPrincipalArn: input.apiAccessPrincipalArn }),
781
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
782
+ ...(input.firstName !== undefined && input.firstName !== null && { firstName: input.firstName }),
783
+ ...(input.lastName !== undefined && input.lastName !== null && { lastName: input.lastName }),
784
+ ...(input.type !== undefined && input.type !== null && { type: input.type }),
785
+ });
786
+ return new protocol_http_1.HttpRequest({
787
+ protocol,
788
+ hostname,
789
+ port,
790
+ method: "PUT",
791
+ headers,
792
+ path: resolvedPath,
793
+ body,
794
+ });
795
+ };
796
+ exports.serializeAws_restJson1UpdateUserCommand = serializeAws_restJson1UpdateUserCommand;
468
797
  const deserializeAws_restJson1CreateChangesetCommand = async (output, context) => {
469
798
  if (output.statusCode !== 200 && output.statusCode >= 300) {
470
799
  return deserializeAws_restJson1CreateChangesetCommandError(output, context);
@@ -495,75 +824,34 @@ const deserializeAws_restJson1CreateChangesetCommandError = async (output, conte
495
824
  switch (errorCode) {
496
825
  case "AccessDeniedException":
497
826
  case "com.amazonaws.finspacedata#AccessDeniedException":
498
- response = {
499
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
500
- name: errorCode,
501
- $metadata: deserializeMetadata(output),
502
- };
503
- break;
827
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
504
828
  case "ConflictException":
505
829
  case "com.amazonaws.finspacedata#ConflictException":
506
- response = {
507
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
508
- name: errorCode,
509
- $metadata: deserializeMetadata(output),
510
- };
511
- break;
830
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
512
831
  case "InternalServerException":
513
832
  case "com.amazonaws.finspacedata#InternalServerException":
514
- response = {
515
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
516
- name: errorCode,
517
- $metadata: deserializeMetadata(output),
518
- };
519
- break;
833
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
520
834
  case "LimitExceededException":
521
835
  case "com.amazonaws.finspacedata#LimitExceededException":
522
- response = {
523
- ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
524
- name: errorCode,
525
- $metadata: deserializeMetadata(output),
526
- };
527
- break;
836
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
528
837
  case "ResourceNotFoundException":
529
838
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
530
- response = {
531
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
532
- name: errorCode,
533
- $metadata: deserializeMetadata(output),
534
- };
535
- break;
839
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
536
840
  case "ThrottlingException":
537
841
  case "com.amazonaws.finspacedata#ThrottlingException":
538
- response = {
539
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
540
- name: errorCode,
541
- $metadata: deserializeMetadata(output),
542
- };
543
- break;
842
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
544
843
  case "ValidationException":
545
844
  case "com.amazonaws.finspacedata#ValidationException":
546
- response = {
547
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
548
- name: errorCode,
549
- $metadata: deserializeMetadata(output),
550
- };
551
- break;
845
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
552
846
  default:
553
847
  const parsedBody = parsedOutput.body;
554
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
555
- response = {
556
- ...parsedBody,
557
- name: `${errorCode}`,
558
- message: parsedBody.message || parsedBody.Message || errorCode,
848
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
849
+ name: parsedBody.code || parsedBody.Code || errorCode,
559
850
  $fault: "client",
560
851
  $metadata: deserializeMetadata(output),
561
- };
852
+ });
853
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
562
854
  }
563
- const message = response.message || response.Message || errorCode;
564
- response.message = message;
565
- delete response.Message;
566
- return Promise.reject(Object.assign(new Error(message), response));
567
855
  };
568
856
  const deserializeAws_restJson1CreateDatasetCommand = async (output, context) => {
569
857
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -591,75 +879,34 @@ const deserializeAws_restJson1CreateDatasetCommandError = async (output, context
591
879
  switch (errorCode) {
592
880
  case "AccessDeniedException":
593
881
  case "com.amazonaws.finspacedata#AccessDeniedException":
594
- response = {
595
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
596
- name: errorCode,
597
- $metadata: deserializeMetadata(output),
598
- };
599
- break;
882
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
600
883
  case "ConflictException":
601
884
  case "com.amazonaws.finspacedata#ConflictException":
602
- response = {
603
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
604
- name: errorCode,
605
- $metadata: deserializeMetadata(output),
606
- };
607
- break;
885
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
608
886
  case "InternalServerException":
609
887
  case "com.amazonaws.finspacedata#InternalServerException":
610
- response = {
611
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
612
- name: errorCode,
613
- $metadata: deserializeMetadata(output),
614
- };
615
- break;
888
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
616
889
  case "LimitExceededException":
617
890
  case "com.amazonaws.finspacedata#LimitExceededException":
618
- response = {
619
- ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
620
- name: errorCode,
621
- $metadata: deserializeMetadata(output),
622
- };
623
- break;
891
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
624
892
  case "ResourceNotFoundException":
625
893
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
626
- response = {
627
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
628
- name: errorCode,
629
- $metadata: deserializeMetadata(output),
630
- };
631
- break;
894
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
632
895
  case "ThrottlingException":
633
896
  case "com.amazonaws.finspacedata#ThrottlingException":
634
- response = {
635
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
636
- name: errorCode,
637
- $metadata: deserializeMetadata(output),
638
- };
639
- break;
897
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
640
898
  case "ValidationException":
641
899
  case "com.amazonaws.finspacedata#ValidationException":
642
- response = {
643
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
644
- name: errorCode,
645
- $metadata: deserializeMetadata(output),
646
- };
647
- break;
900
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
648
901
  default:
649
902
  const parsedBody = parsedOutput.body;
650
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
651
- response = {
652
- ...parsedBody,
653
- name: `${errorCode}`,
654
- message: parsedBody.message || parsedBody.Message || errorCode,
903
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
904
+ name: parsedBody.code || parsedBody.Code || errorCode,
655
905
  $fault: "client",
656
906
  $metadata: deserializeMetadata(output),
657
- };
907
+ });
908
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
658
909
  }
659
- const message = response.message || response.Message || errorCode;
660
- response.message = message;
661
- delete response.Message;
662
- return Promise.reject(Object.assign(new Error(message), response));
663
910
  };
664
911
  const deserializeAws_restJson1CreateDataViewCommand = async (output, context) => {
665
912
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -691,67 +938,135 @@ const deserializeAws_restJson1CreateDataViewCommandError = async (output, contex
691
938
  switch (errorCode) {
692
939
  case "ConflictException":
693
940
  case "com.amazonaws.finspacedata#ConflictException":
694
- response = {
695
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
696
- name: errorCode,
697
- $metadata: deserializeMetadata(output),
698
- };
699
- break;
941
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
700
942
  case "InternalServerException":
701
943
  case "com.amazonaws.finspacedata#InternalServerException":
702
- response = {
703
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
704
- name: errorCode,
705
- $metadata: deserializeMetadata(output),
706
- };
707
- break;
944
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
708
945
  case "LimitExceededException":
709
946
  case "com.amazonaws.finspacedata#LimitExceededException":
710
- response = {
711
- ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
712
- name: errorCode,
713
- $metadata: deserializeMetadata(output),
714
- };
715
- break;
947
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
716
948
  case "ResourceNotFoundException":
717
949
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
718
- response = {
719
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
720
- name: errorCode,
721
- $metadata: deserializeMetadata(output),
722
- };
723
- break;
950
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
724
951
  case "ThrottlingException":
725
952
  case "com.amazonaws.finspacedata#ThrottlingException":
726
- response = {
727
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
728
- name: errorCode,
953
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
954
+ case "ValidationException":
955
+ case "com.amazonaws.finspacedata#ValidationException":
956
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
957
+ default:
958
+ const parsedBody = parsedOutput.body;
959
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
960
+ name: parsedBody.code || parsedBody.Code || errorCode,
961
+ $fault: "client",
729
962
  $metadata: deserializeMetadata(output),
730
- };
731
- break;
963
+ });
964
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
965
+ }
966
+ };
967
+ const deserializeAws_restJson1CreatePermissionGroupCommand = async (output, context) => {
968
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
969
+ return deserializeAws_restJson1CreatePermissionGroupCommandError(output, context);
970
+ }
971
+ const contents = {
972
+ $metadata: deserializeMetadata(output),
973
+ permissionGroupId: undefined,
974
+ };
975
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
976
+ if (data.permissionGroupId !== undefined && data.permissionGroupId !== null) {
977
+ contents.permissionGroupId = smithy_client_1.expectString(data.permissionGroupId);
978
+ }
979
+ return Promise.resolve(contents);
980
+ };
981
+ exports.deserializeAws_restJson1CreatePermissionGroupCommand = deserializeAws_restJson1CreatePermissionGroupCommand;
982
+ const deserializeAws_restJson1CreatePermissionGroupCommandError = async (output, context) => {
983
+ const parsedOutput = {
984
+ ...output,
985
+ body: await parseBody(output.body, context),
986
+ };
987
+ let response;
988
+ let errorCode = "UnknownError";
989
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
990
+ switch (errorCode) {
991
+ case "AccessDeniedException":
992
+ case "com.amazonaws.finspacedata#AccessDeniedException":
993
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
994
+ case "ConflictException":
995
+ case "com.amazonaws.finspacedata#ConflictException":
996
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
997
+ case "InternalServerException":
998
+ case "com.amazonaws.finspacedata#InternalServerException":
999
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1000
+ case "LimitExceededException":
1001
+ case "com.amazonaws.finspacedata#LimitExceededException":
1002
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
1003
+ case "ThrottlingException":
1004
+ case "com.amazonaws.finspacedata#ThrottlingException":
1005
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
732
1006
  case "ValidationException":
733
1007
  case "com.amazonaws.finspacedata#ValidationException":
734
- response = {
735
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
736
- name: errorCode,
1008
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1009
+ default:
1010
+ const parsedBody = parsedOutput.body;
1011
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1012
+ name: parsedBody.code || parsedBody.Code || errorCode,
1013
+ $fault: "client",
737
1014
  $metadata: deserializeMetadata(output),
738
- };
739
- break;
1015
+ });
1016
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1017
+ }
1018
+ };
1019
+ const deserializeAws_restJson1CreateUserCommand = async (output, context) => {
1020
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1021
+ return deserializeAws_restJson1CreateUserCommandError(output, context);
1022
+ }
1023
+ const contents = {
1024
+ $metadata: deserializeMetadata(output),
1025
+ userId: undefined,
1026
+ };
1027
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1028
+ if (data.userId !== undefined && data.userId !== null) {
1029
+ contents.userId = smithy_client_1.expectString(data.userId);
1030
+ }
1031
+ return Promise.resolve(contents);
1032
+ };
1033
+ exports.deserializeAws_restJson1CreateUserCommand = deserializeAws_restJson1CreateUserCommand;
1034
+ const deserializeAws_restJson1CreateUserCommandError = async (output, context) => {
1035
+ const parsedOutput = {
1036
+ ...output,
1037
+ body: await parseBody(output.body, context),
1038
+ };
1039
+ let response;
1040
+ let errorCode = "UnknownError";
1041
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1042
+ switch (errorCode) {
1043
+ case "AccessDeniedException":
1044
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1045
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1046
+ case "ConflictException":
1047
+ case "com.amazonaws.finspacedata#ConflictException":
1048
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1049
+ case "InternalServerException":
1050
+ case "com.amazonaws.finspacedata#InternalServerException":
1051
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1052
+ case "LimitExceededException":
1053
+ case "com.amazonaws.finspacedata#LimitExceededException":
1054
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
1055
+ case "ThrottlingException":
1056
+ case "com.amazonaws.finspacedata#ThrottlingException":
1057
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1058
+ case "ValidationException":
1059
+ case "com.amazonaws.finspacedata#ValidationException":
1060
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
740
1061
  default:
741
1062
  const parsedBody = parsedOutput.body;
742
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
743
- response = {
744
- ...parsedBody,
745
- name: `${errorCode}`,
746
- message: parsedBody.message || parsedBody.Message || errorCode,
1063
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1064
+ name: parsedBody.code || parsedBody.Code || errorCode,
747
1065
  $fault: "client",
748
1066
  $metadata: deserializeMetadata(output),
749
- };
1067
+ });
1068
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
750
1069
  }
751
- const message = response.message || response.Message || errorCode;
752
- response.message = message;
753
- delete response.Message;
754
- return Promise.reject(Object.assign(new Error(message), response));
755
1070
  };
756
1071
  const deserializeAws_restJson1DeleteDatasetCommand = async (output, context) => {
757
1072
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -779,75 +1094,196 @@ const deserializeAws_restJson1DeleteDatasetCommandError = async (output, context
779
1094
  switch (errorCode) {
780
1095
  case "AccessDeniedException":
781
1096
  case "com.amazonaws.finspacedata#AccessDeniedException":
782
- response = {
783
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
784
- name: errorCode,
785
- $metadata: deserializeMetadata(output),
786
- };
787
- break;
1097
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
788
1098
  case "ConflictException":
789
1099
  case "com.amazonaws.finspacedata#ConflictException":
790
- response = {
791
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
792
- name: errorCode,
793
- $metadata: deserializeMetadata(output),
794
- };
795
- break;
1100
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
796
1101
  case "InternalServerException":
797
1102
  case "com.amazonaws.finspacedata#InternalServerException":
798
- response = {
799
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
800
- name: errorCode,
801
- $metadata: deserializeMetadata(output),
802
- };
803
- break;
1103
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
804
1104
  case "LimitExceededException":
805
1105
  case "com.amazonaws.finspacedata#LimitExceededException":
806
- response = {
807
- ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
808
- name: errorCode,
809
- $metadata: deserializeMetadata(output),
810
- };
811
- break;
1106
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
812
1107
  case "ResourceNotFoundException":
813
1108
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
814
- response = {
815
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
816
- name: errorCode,
1109
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1110
+ case "ThrottlingException":
1111
+ case "com.amazonaws.finspacedata#ThrottlingException":
1112
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1113
+ case "ValidationException":
1114
+ case "com.amazonaws.finspacedata#ValidationException":
1115
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1116
+ default:
1117
+ const parsedBody = parsedOutput.body;
1118
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1119
+ name: parsedBody.code || parsedBody.Code || errorCode,
1120
+ $fault: "client",
817
1121
  $metadata: deserializeMetadata(output),
818
- };
819
- break;
1122
+ });
1123
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1124
+ }
1125
+ };
1126
+ const deserializeAws_restJson1DeletePermissionGroupCommand = async (output, context) => {
1127
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1128
+ return deserializeAws_restJson1DeletePermissionGroupCommandError(output, context);
1129
+ }
1130
+ const contents = {
1131
+ $metadata: deserializeMetadata(output),
1132
+ permissionGroupId: undefined,
1133
+ };
1134
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1135
+ if (data.permissionGroupId !== undefined && data.permissionGroupId !== null) {
1136
+ contents.permissionGroupId = smithy_client_1.expectString(data.permissionGroupId);
1137
+ }
1138
+ return Promise.resolve(contents);
1139
+ };
1140
+ exports.deserializeAws_restJson1DeletePermissionGroupCommand = deserializeAws_restJson1DeletePermissionGroupCommand;
1141
+ const deserializeAws_restJson1DeletePermissionGroupCommandError = async (output, context) => {
1142
+ const parsedOutput = {
1143
+ ...output,
1144
+ body: await parseBody(output.body, context),
1145
+ };
1146
+ let response;
1147
+ let errorCode = "UnknownError";
1148
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1149
+ switch (errorCode) {
1150
+ case "AccessDeniedException":
1151
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1152
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1153
+ case "ConflictException":
1154
+ case "com.amazonaws.finspacedata#ConflictException":
1155
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1156
+ case "InternalServerException":
1157
+ case "com.amazonaws.finspacedata#InternalServerException":
1158
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1159
+ case "LimitExceededException":
1160
+ case "com.amazonaws.finspacedata#LimitExceededException":
1161
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
1162
+ case "ResourceNotFoundException":
1163
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1164
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
820
1165
  case "ThrottlingException":
821
1166
  case "com.amazonaws.finspacedata#ThrottlingException":
822
- response = {
823
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
824
- name: errorCode,
1167
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1168
+ case "ValidationException":
1169
+ case "com.amazonaws.finspacedata#ValidationException":
1170
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1171
+ default:
1172
+ const parsedBody = parsedOutput.body;
1173
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1174
+ name: parsedBody.code || parsedBody.Code || errorCode,
1175
+ $fault: "client",
825
1176
  $metadata: deserializeMetadata(output),
826
- };
827
- break;
1177
+ });
1178
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1179
+ }
1180
+ };
1181
+ const deserializeAws_restJson1DisableUserCommand = async (output, context) => {
1182
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1183
+ return deserializeAws_restJson1DisableUserCommandError(output, context);
1184
+ }
1185
+ const contents = {
1186
+ $metadata: deserializeMetadata(output),
1187
+ userId: undefined,
1188
+ };
1189
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1190
+ if (data.userId !== undefined && data.userId !== null) {
1191
+ contents.userId = smithy_client_1.expectString(data.userId);
1192
+ }
1193
+ return Promise.resolve(contents);
1194
+ };
1195
+ exports.deserializeAws_restJson1DisableUserCommand = deserializeAws_restJson1DisableUserCommand;
1196
+ const deserializeAws_restJson1DisableUserCommandError = async (output, context) => {
1197
+ const parsedOutput = {
1198
+ ...output,
1199
+ body: await parseBody(output.body, context),
1200
+ };
1201
+ let response;
1202
+ let errorCode = "UnknownError";
1203
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1204
+ switch (errorCode) {
1205
+ case "AccessDeniedException":
1206
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1207
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1208
+ case "ConflictException":
1209
+ case "com.amazonaws.finspacedata#ConflictException":
1210
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1211
+ case "InternalServerException":
1212
+ case "com.amazonaws.finspacedata#InternalServerException":
1213
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1214
+ case "ResourceNotFoundException":
1215
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1216
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1217
+ case "ThrottlingException":
1218
+ case "com.amazonaws.finspacedata#ThrottlingException":
1219
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
828
1220
  case "ValidationException":
829
1221
  case "com.amazonaws.finspacedata#ValidationException":
830
- response = {
831
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
832
- name: errorCode,
1222
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1223
+ default:
1224
+ const parsedBody = parsedOutput.body;
1225
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1226
+ name: parsedBody.code || parsedBody.Code || errorCode,
1227
+ $fault: "client",
833
1228
  $metadata: deserializeMetadata(output),
834
- };
835
- break;
1229
+ });
1230
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1231
+ }
1232
+ };
1233
+ const deserializeAws_restJson1EnableUserCommand = async (output, context) => {
1234
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1235
+ return deserializeAws_restJson1EnableUserCommandError(output, context);
1236
+ }
1237
+ const contents = {
1238
+ $metadata: deserializeMetadata(output),
1239
+ userId: undefined,
1240
+ };
1241
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1242
+ if (data.userId !== undefined && data.userId !== null) {
1243
+ contents.userId = smithy_client_1.expectString(data.userId);
1244
+ }
1245
+ return Promise.resolve(contents);
1246
+ };
1247
+ exports.deserializeAws_restJson1EnableUserCommand = deserializeAws_restJson1EnableUserCommand;
1248
+ const deserializeAws_restJson1EnableUserCommandError = async (output, context) => {
1249
+ const parsedOutput = {
1250
+ ...output,
1251
+ body: await parseBody(output.body, context),
1252
+ };
1253
+ let response;
1254
+ let errorCode = "UnknownError";
1255
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1256
+ switch (errorCode) {
1257
+ case "AccessDeniedException":
1258
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1259
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1260
+ case "ConflictException":
1261
+ case "com.amazonaws.finspacedata#ConflictException":
1262
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1263
+ case "InternalServerException":
1264
+ case "com.amazonaws.finspacedata#InternalServerException":
1265
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1266
+ case "LimitExceededException":
1267
+ case "com.amazonaws.finspacedata#LimitExceededException":
1268
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
1269
+ case "ResourceNotFoundException":
1270
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1271
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1272
+ case "ThrottlingException":
1273
+ case "com.amazonaws.finspacedata#ThrottlingException":
1274
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1275
+ case "ValidationException":
1276
+ case "com.amazonaws.finspacedata#ValidationException":
1277
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
836
1278
  default:
837
1279
  const parsedBody = parsedOutput.body;
838
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
839
- response = {
840
- ...parsedBody,
841
- name: `${errorCode}`,
842
- message: parsedBody.message || parsedBody.Message || errorCode,
1280
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1281
+ name: parsedBody.code || parsedBody.Code || errorCode,
843
1282
  $fault: "client",
844
1283
  $metadata: deserializeMetadata(output),
845
- };
1284
+ });
1285
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
846
1286
  }
847
- const message = response.message || response.Message || errorCode;
848
- response.message = message;
849
- delete response.Message;
850
- return Promise.reject(Object.assign(new Error(message), response));
851
1287
  };
852
1288
  const deserializeAws_restJson1GetChangesetCommand = async (output, context) => {
853
1289
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -923,67 +1359,31 @@ const deserializeAws_restJson1GetChangesetCommandError = async (output, context)
923
1359
  switch (errorCode) {
924
1360
  case "AccessDeniedException":
925
1361
  case "com.amazonaws.finspacedata#AccessDeniedException":
926
- response = {
927
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
928
- name: errorCode,
929
- $metadata: deserializeMetadata(output),
930
- };
931
- break;
1362
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
932
1363
  case "ConflictException":
933
1364
  case "com.amazonaws.finspacedata#ConflictException":
934
- response = {
935
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
936
- name: errorCode,
937
- $metadata: deserializeMetadata(output),
938
- };
939
- break;
1365
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
940
1366
  case "InternalServerException":
941
1367
  case "com.amazonaws.finspacedata#InternalServerException":
942
- response = {
943
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
944
- name: errorCode,
945
- $metadata: deserializeMetadata(output),
946
- };
947
- break;
1368
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
948
1369
  case "ResourceNotFoundException":
949
1370
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
950
- response = {
951
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
952
- name: errorCode,
953
- $metadata: deserializeMetadata(output),
954
- };
955
- break;
1371
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
956
1372
  case "ThrottlingException":
957
1373
  case "com.amazonaws.finspacedata#ThrottlingException":
958
- response = {
959
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
960
- name: errorCode,
961
- $metadata: deserializeMetadata(output),
962
- };
963
- break;
1374
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
964
1375
  case "ValidationException":
965
1376
  case "com.amazonaws.finspacedata#ValidationException":
966
- response = {
967
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
968
- name: errorCode,
969
- $metadata: deserializeMetadata(output),
970
- };
971
- break;
1377
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
972
1378
  default:
973
1379
  const parsedBody = parsedOutput.body;
974
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
975
- response = {
976
- ...parsedBody,
977
- name: `${errorCode}`,
978
- message: parsedBody.message || parsedBody.Message || errorCode,
1380
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1381
+ name: parsedBody.code || parsedBody.Code || errorCode,
979
1382
  $fault: "client",
980
1383
  $metadata: deserializeMetadata(output),
981
- };
1384
+ });
1385
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
982
1386
  }
983
- const message = response.message || response.Message || errorCode;
984
- response.message = message;
985
- delete response.Message;
986
- return Promise.reject(Object.assign(new Error(message), response));
987
1387
  };
988
1388
  const deserializeAws_restJson1GetDatasetCommand = async (output, context) => {
989
1389
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1047,67 +1447,31 @@ const deserializeAws_restJson1GetDatasetCommandError = async (output, context) =
1047
1447
  switch (errorCode) {
1048
1448
  case "AccessDeniedException":
1049
1449
  case "com.amazonaws.finspacedata#AccessDeniedException":
1050
- response = {
1051
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1052
- name: errorCode,
1053
- $metadata: deserializeMetadata(output),
1054
- };
1055
- break;
1450
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1056
1451
  case "ConflictException":
1057
1452
  case "com.amazonaws.finspacedata#ConflictException":
1058
- response = {
1059
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1060
- name: errorCode,
1061
- $metadata: deserializeMetadata(output),
1062
- };
1063
- break;
1453
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1064
1454
  case "InternalServerException":
1065
1455
  case "com.amazonaws.finspacedata#InternalServerException":
1066
- response = {
1067
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1068
- name: errorCode,
1069
- $metadata: deserializeMetadata(output),
1070
- };
1071
- break;
1456
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1072
1457
  case "ResourceNotFoundException":
1073
1458
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
1074
- response = {
1075
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1076
- name: errorCode,
1077
- $metadata: deserializeMetadata(output),
1078
- };
1079
- break;
1459
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1080
1460
  case "ThrottlingException":
1081
1461
  case "com.amazonaws.finspacedata#ThrottlingException":
1082
- response = {
1083
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1084
- name: errorCode,
1085
- $metadata: deserializeMetadata(output),
1086
- };
1087
- break;
1462
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1088
1463
  case "ValidationException":
1089
1464
  case "com.amazonaws.finspacedata#ValidationException":
1090
- response = {
1091
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1092
- name: errorCode,
1093
- $metadata: deserializeMetadata(output),
1094
- };
1095
- break;
1465
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1096
1466
  default:
1097
1467
  const parsedBody = parsedOutput.body;
1098
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1099
- response = {
1100
- ...parsedBody,
1101
- name: `${errorCode}`,
1102
- message: parsedBody.message || parsedBody.Message || errorCode,
1468
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1469
+ name: parsedBody.code || parsedBody.Code || errorCode,
1103
1470
  $fault: "client",
1104
1471
  $metadata: deserializeMetadata(output),
1105
- };
1472
+ });
1473
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1106
1474
  }
1107
- const message = response.message || response.Message || errorCode;
1108
- response.message = message;
1109
- delete response.Message;
1110
- return Promise.reject(Object.assign(new Error(message), response));
1111
1475
  };
1112
1476
  const deserializeAws_restJson1GetDataViewCommand = async (output, context) => {
1113
1477
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1156,19 +1520,382 @@ const deserializeAws_restJson1GetDataViewCommand = async (output, context) => {
1156
1520
  if (data.lastModifiedTime !== undefined && data.lastModifiedTime !== null) {
1157
1521
  contents.lastModifiedTime = smithy_client_1.expectLong(data.lastModifiedTime);
1158
1522
  }
1159
- if (data.partitionColumns !== undefined && data.partitionColumns !== null) {
1160
- contents.partitionColumns = deserializeAws_restJson1PartitionColumnList(data.partitionColumns, context);
1523
+ if (data.partitionColumns !== undefined && data.partitionColumns !== null) {
1524
+ contents.partitionColumns = deserializeAws_restJson1PartitionColumnList(data.partitionColumns, context);
1525
+ }
1526
+ if (data.sortColumns !== undefined && data.sortColumns !== null) {
1527
+ contents.sortColumns = deserializeAws_restJson1SortColumnList(data.sortColumns, context);
1528
+ }
1529
+ if (data.status !== undefined && data.status !== null) {
1530
+ contents.status = smithy_client_1.expectString(data.status);
1531
+ }
1532
+ return Promise.resolve(contents);
1533
+ };
1534
+ exports.deserializeAws_restJson1GetDataViewCommand = deserializeAws_restJson1GetDataViewCommand;
1535
+ const deserializeAws_restJson1GetDataViewCommandError = async (output, context) => {
1536
+ const parsedOutput = {
1537
+ ...output,
1538
+ body: await parseBody(output.body, context),
1539
+ };
1540
+ let response;
1541
+ let errorCode = "UnknownError";
1542
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1543
+ switch (errorCode) {
1544
+ case "ConflictException":
1545
+ case "com.amazonaws.finspacedata#ConflictException":
1546
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1547
+ case "InternalServerException":
1548
+ case "com.amazonaws.finspacedata#InternalServerException":
1549
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1550
+ case "ResourceNotFoundException":
1551
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1552
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1553
+ case "ThrottlingException":
1554
+ case "com.amazonaws.finspacedata#ThrottlingException":
1555
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1556
+ case "ValidationException":
1557
+ case "com.amazonaws.finspacedata#ValidationException":
1558
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1559
+ default:
1560
+ const parsedBody = parsedOutput.body;
1561
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1562
+ name: parsedBody.code || parsedBody.Code || errorCode,
1563
+ $fault: "client",
1564
+ $metadata: deserializeMetadata(output),
1565
+ });
1566
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1567
+ }
1568
+ };
1569
+ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = async (output, context) => {
1570
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1571
+ return deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError(output, context);
1572
+ }
1573
+ const contents = {
1574
+ $metadata: deserializeMetadata(output),
1575
+ credentials: undefined,
1576
+ durationInMinutes: undefined,
1577
+ };
1578
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1579
+ if (data.credentials !== undefined && data.credentials !== null) {
1580
+ contents.credentials = deserializeAws_restJson1Credentials(data.credentials, context);
1581
+ }
1582
+ if (data.durationInMinutes !== undefined && data.durationInMinutes !== null) {
1583
+ contents.durationInMinutes = smithy_client_1.expectLong(data.durationInMinutes);
1584
+ }
1585
+ return Promise.resolve(contents);
1586
+ };
1587
+ exports.deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand;
1588
+ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = async (output, context) => {
1589
+ const parsedOutput = {
1590
+ ...output,
1591
+ body: await parseBody(output.body, context),
1592
+ };
1593
+ let response;
1594
+ let errorCode = "UnknownError";
1595
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1596
+ switch (errorCode) {
1597
+ case "AccessDeniedException":
1598
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1599
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1600
+ case "InternalServerException":
1601
+ case "com.amazonaws.finspacedata#InternalServerException":
1602
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1603
+ case "ThrottlingException":
1604
+ case "com.amazonaws.finspacedata#ThrottlingException":
1605
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1606
+ case "ValidationException":
1607
+ case "com.amazonaws.finspacedata#ValidationException":
1608
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1609
+ default:
1610
+ const parsedBody = parsedOutput.body;
1611
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1612
+ name: parsedBody.code || parsedBody.Code || errorCode,
1613
+ $fault: "client",
1614
+ $metadata: deserializeMetadata(output),
1615
+ });
1616
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1617
+ }
1618
+ };
1619
+ const deserializeAws_restJson1GetUserCommand = async (output, context) => {
1620
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1621
+ return deserializeAws_restJson1GetUserCommandError(output, context);
1622
+ }
1623
+ const contents = {
1624
+ $metadata: deserializeMetadata(output),
1625
+ apiAccess: undefined,
1626
+ apiAccessPrincipalArn: undefined,
1627
+ createTime: undefined,
1628
+ emailAddress: undefined,
1629
+ firstName: undefined,
1630
+ lastDisabledTime: undefined,
1631
+ lastEnabledTime: undefined,
1632
+ lastLoginTime: undefined,
1633
+ lastModifiedTime: undefined,
1634
+ lastName: undefined,
1635
+ status: undefined,
1636
+ type: undefined,
1637
+ userId: undefined,
1638
+ };
1639
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1640
+ if (data.apiAccess !== undefined && data.apiAccess !== null) {
1641
+ contents.apiAccess = smithy_client_1.expectString(data.apiAccess);
1642
+ }
1643
+ if (data.apiAccessPrincipalArn !== undefined && data.apiAccessPrincipalArn !== null) {
1644
+ contents.apiAccessPrincipalArn = smithy_client_1.expectString(data.apiAccessPrincipalArn);
1645
+ }
1646
+ if (data.createTime !== undefined && data.createTime !== null) {
1647
+ contents.createTime = smithy_client_1.expectLong(data.createTime);
1648
+ }
1649
+ if (data.emailAddress !== undefined && data.emailAddress !== null) {
1650
+ contents.emailAddress = smithy_client_1.expectString(data.emailAddress);
1651
+ }
1652
+ if (data.firstName !== undefined && data.firstName !== null) {
1653
+ contents.firstName = smithy_client_1.expectString(data.firstName);
1654
+ }
1655
+ if (data.lastDisabledTime !== undefined && data.lastDisabledTime !== null) {
1656
+ contents.lastDisabledTime = smithy_client_1.expectLong(data.lastDisabledTime);
1657
+ }
1658
+ if (data.lastEnabledTime !== undefined && data.lastEnabledTime !== null) {
1659
+ contents.lastEnabledTime = smithy_client_1.expectLong(data.lastEnabledTime);
1660
+ }
1661
+ if (data.lastLoginTime !== undefined && data.lastLoginTime !== null) {
1662
+ contents.lastLoginTime = smithy_client_1.expectLong(data.lastLoginTime);
1663
+ }
1664
+ if (data.lastModifiedTime !== undefined && data.lastModifiedTime !== null) {
1665
+ contents.lastModifiedTime = smithy_client_1.expectLong(data.lastModifiedTime);
1666
+ }
1667
+ if (data.lastName !== undefined && data.lastName !== null) {
1668
+ contents.lastName = smithy_client_1.expectString(data.lastName);
1669
+ }
1670
+ if (data.status !== undefined && data.status !== null) {
1671
+ contents.status = smithy_client_1.expectString(data.status);
1672
+ }
1673
+ if (data.type !== undefined && data.type !== null) {
1674
+ contents.type = smithy_client_1.expectString(data.type);
1675
+ }
1676
+ if (data.userId !== undefined && data.userId !== null) {
1677
+ contents.userId = smithy_client_1.expectString(data.userId);
1678
+ }
1679
+ return Promise.resolve(contents);
1680
+ };
1681
+ exports.deserializeAws_restJson1GetUserCommand = deserializeAws_restJson1GetUserCommand;
1682
+ const deserializeAws_restJson1GetUserCommandError = async (output, context) => {
1683
+ const parsedOutput = {
1684
+ ...output,
1685
+ body: await parseBody(output.body, context),
1686
+ };
1687
+ let response;
1688
+ let errorCode = "UnknownError";
1689
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1690
+ switch (errorCode) {
1691
+ case "AccessDeniedException":
1692
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1693
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1694
+ case "InternalServerException":
1695
+ case "com.amazonaws.finspacedata#InternalServerException":
1696
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1697
+ case "ResourceNotFoundException":
1698
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1699
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1700
+ case "ThrottlingException":
1701
+ case "com.amazonaws.finspacedata#ThrottlingException":
1702
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1703
+ case "ValidationException":
1704
+ case "com.amazonaws.finspacedata#ValidationException":
1705
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1706
+ default:
1707
+ const parsedBody = parsedOutput.body;
1708
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1709
+ name: parsedBody.code || parsedBody.Code || errorCode,
1710
+ $fault: "client",
1711
+ $metadata: deserializeMetadata(output),
1712
+ });
1713
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1714
+ }
1715
+ };
1716
+ const deserializeAws_restJson1GetWorkingLocationCommand = async (output, context) => {
1717
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1718
+ return deserializeAws_restJson1GetWorkingLocationCommandError(output, context);
1719
+ }
1720
+ const contents = {
1721
+ $metadata: deserializeMetadata(output),
1722
+ s3Bucket: undefined,
1723
+ s3Path: undefined,
1724
+ s3Uri: undefined,
1725
+ };
1726
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1727
+ if (data.s3Bucket !== undefined && data.s3Bucket !== null) {
1728
+ contents.s3Bucket = smithy_client_1.expectString(data.s3Bucket);
1729
+ }
1730
+ if (data.s3Path !== undefined && data.s3Path !== null) {
1731
+ contents.s3Path = smithy_client_1.expectString(data.s3Path);
1732
+ }
1733
+ if (data.s3Uri !== undefined && data.s3Uri !== null) {
1734
+ contents.s3Uri = smithy_client_1.expectString(data.s3Uri);
1735
+ }
1736
+ return Promise.resolve(contents);
1737
+ };
1738
+ exports.deserializeAws_restJson1GetWorkingLocationCommand = deserializeAws_restJson1GetWorkingLocationCommand;
1739
+ const deserializeAws_restJson1GetWorkingLocationCommandError = async (output, context) => {
1740
+ const parsedOutput = {
1741
+ ...output,
1742
+ body: await parseBody(output.body, context),
1743
+ };
1744
+ let response;
1745
+ let errorCode = "UnknownError";
1746
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1747
+ switch (errorCode) {
1748
+ case "AccessDeniedException":
1749
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1750
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1751
+ case "InternalServerException":
1752
+ case "com.amazonaws.finspacedata#InternalServerException":
1753
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1754
+ case "ThrottlingException":
1755
+ case "com.amazonaws.finspacedata#ThrottlingException":
1756
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1757
+ case "ValidationException":
1758
+ case "com.amazonaws.finspacedata#ValidationException":
1759
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1760
+ default:
1761
+ const parsedBody = parsedOutput.body;
1762
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1763
+ name: parsedBody.code || parsedBody.Code || errorCode,
1764
+ $fault: "client",
1765
+ $metadata: deserializeMetadata(output),
1766
+ });
1767
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1768
+ }
1769
+ };
1770
+ const deserializeAws_restJson1ListChangesetsCommand = async (output, context) => {
1771
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1772
+ return deserializeAws_restJson1ListChangesetsCommandError(output, context);
1773
+ }
1774
+ const contents = {
1775
+ $metadata: deserializeMetadata(output),
1776
+ changesets: undefined,
1777
+ nextToken: undefined,
1778
+ };
1779
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1780
+ if (data.changesets !== undefined && data.changesets !== null) {
1781
+ contents.changesets = deserializeAws_restJson1ChangesetList(data.changesets, context);
1782
+ }
1783
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1784
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
1785
+ }
1786
+ return Promise.resolve(contents);
1787
+ };
1788
+ exports.deserializeAws_restJson1ListChangesetsCommand = deserializeAws_restJson1ListChangesetsCommand;
1789
+ const deserializeAws_restJson1ListChangesetsCommandError = async (output, context) => {
1790
+ const parsedOutput = {
1791
+ ...output,
1792
+ body: await parseBody(output.body, context),
1793
+ };
1794
+ let response;
1795
+ let errorCode = "UnknownError";
1796
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1797
+ switch (errorCode) {
1798
+ case "AccessDeniedException":
1799
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1800
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1801
+ case "ConflictException":
1802
+ case "com.amazonaws.finspacedata#ConflictException":
1803
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1804
+ case "InternalServerException":
1805
+ case "com.amazonaws.finspacedata#InternalServerException":
1806
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1807
+ case "ResourceNotFoundException":
1808
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1809
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1810
+ case "ThrottlingException":
1811
+ case "com.amazonaws.finspacedata#ThrottlingException":
1812
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1813
+ case "ValidationException":
1814
+ case "com.amazonaws.finspacedata#ValidationException":
1815
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1816
+ default:
1817
+ const parsedBody = parsedOutput.body;
1818
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1819
+ name: parsedBody.code || parsedBody.Code || errorCode,
1820
+ $fault: "client",
1821
+ $metadata: deserializeMetadata(output),
1822
+ });
1823
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1824
+ }
1825
+ };
1826
+ const deserializeAws_restJson1ListDatasetsCommand = async (output, context) => {
1827
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1828
+ return deserializeAws_restJson1ListDatasetsCommandError(output, context);
1829
+ }
1830
+ const contents = {
1831
+ $metadata: deserializeMetadata(output),
1832
+ datasets: undefined,
1833
+ nextToken: undefined,
1834
+ };
1835
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1836
+ if (data.datasets !== undefined && data.datasets !== null) {
1837
+ contents.datasets = deserializeAws_restJson1DatasetList(data.datasets, context);
1838
+ }
1839
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1840
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
1841
+ }
1842
+ return Promise.resolve(contents);
1843
+ };
1844
+ exports.deserializeAws_restJson1ListDatasetsCommand = deserializeAws_restJson1ListDatasetsCommand;
1845
+ const deserializeAws_restJson1ListDatasetsCommandError = async (output, context) => {
1846
+ const parsedOutput = {
1847
+ ...output,
1848
+ body: await parseBody(output.body, context),
1849
+ };
1850
+ let response;
1851
+ let errorCode = "UnknownError";
1852
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1853
+ switch (errorCode) {
1854
+ case "ConflictException":
1855
+ case "com.amazonaws.finspacedata#ConflictException":
1856
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1857
+ case "InternalServerException":
1858
+ case "com.amazonaws.finspacedata#InternalServerException":
1859
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1860
+ case "ResourceNotFoundException":
1861
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1862
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1863
+ case "ThrottlingException":
1864
+ case "com.amazonaws.finspacedata#ThrottlingException":
1865
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1866
+ case "ValidationException":
1867
+ case "com.amazonaws.finspacedata#ValidationException":
1868
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1869
+ default:
1870
+ const parsedBody = parsedOutput.body;
1871
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1872
+ name: parsedBody.code || parsedBody.Code || errorCode,
1873
+ $fault: "client",
1874
+ $metadata: deserializeMetadata(output),
1875
+ });
1876
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1877
+ }
1878
+ };
1879
+ const deserializeAws_restJson1ListDataViewsCommand = async (output, context) => {
1880
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1881
+ return deserializeAws_restJson1ListDataViewsCommandError(output, context);
1161
1882
  }
1162
- if (data.sortColumns !== undefined && data.sortColumns !== null) {
1163
- contents.sortColumns = deserializeAws_restJson1SortColumnList(data.sortColumns, context);
1883
+ const contents = {
1884
+ $metadata: deserializeMetadata(output),
1885
+ dataViews: undefined,
1886
+ nextToken: undefined,
1887
+ };
1888
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1889
+ if (data.dataViews !== undefined && data.dataViews !== null) {
1890
+ contents.dataViews = deserializeAws_restJson1DataViewList(data.dataViews, context);
1164
1891
  }
1165
- if (data.status !== undefined && data.status !== null) {
1166
- contents.status = smithy_client_1.expectString(data.status);
1892
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1893
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
1167
1894
  }
1168
1895
  return Promise.resolve(contents);
1169
1896
  };
1170
- exports.deserializeAws_restJson1GetDataViewCommand = deserializeAws_restJson1GetDataViewCommand;
1171
- const deserializeAws_restJson1GetDataViewCommandError = async (output, context) => {
1897
+ exports.deserializeAws_restJson1ListDataViewsCommand = deserializeAws_restJson1ListDataViewsCommand;
1898
+ const deserializeAws_restJson1ListDataViewsCommandError = async (output, context) => {
1172
1899
  const parsedOutput = {
1173
1900
  ...output,
1174
1901
  body: await parseBody(output.body, context),
@@ -1179,80 +1906,49 @@ const deserializeAws_restJson1GetDataViewCommandError = async (output, context)
1179
1906
  switch (errorCode) {
1180
1907
  case "ConflictException":
1181
1908
  case "com.amazonaws.finspacedata#ConflictException":
1182
- response = {
1183
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1184
- name: errorCode,
1185
- $metadata: deserializeMetadata(output),
1186
- };
1187
- break;
1909
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1188
1910
  case "InternalServerException":
1189
1911
  case "com.amazonaws.finspacedata#InternalServerException":
1190
- response = {
1191
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1192
- name: errorCode,
1193
- $metadata: deserializeMetadata(output),
1194
- };
1195
- break;
1912
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1196
1913
  case "ResourceNotFoundException":
1197
1914
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
1198
- response = {
1199
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1200
- name: errorCode,
1201
- $metadata: deserializeMetadata(output),
1202
- };
1203
- break;
1915
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1204
1916
  case "ThrottlingException":
1205
1917
  case "com.amazonaws.finspacedata#ThrottlingException":
1206
- response = {
1207
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1208
- name: errorCode,
1209
- $metadata: deserializeMetadata(output),
1210
- };
1211
- break;
1918
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1212
1919
  case "ValidationException":
1213
1920
  case "com.amazonaws.finspacedata#ValidationException":
1214
- response = {
1215
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1216
- name: errorCode,
1217
- $metadata: deserializeMetadata(output),
1218
- };
1219
- break;
1921
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1220
1922
  default:
1221
1923
  const parsedBody = parsedOutput.body;
1222
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1223
- response = {
1224
- ...parsedBody,
1225
- name: `${errorCode}`,
1226
- message: parsedBody.message || parsedBody.Message || errorCode,
1924
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1925
+ name: parsedBody.code || parsedBody.Code || errorCode,
1227
1926
  $fault: "client",
1228
1927
  $metadata: deserializeMetadata(output),
1229
- };
1928
+ });
1929
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1230
1930
  }
1231
- const message = response.message || response.Message || errorCode;
1232
- response.message = message;
1233
- delete response.Message;
1234
- return Promise.reject(Object.assign(new Error(message), response));
1235
1931
  };
1236
- const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = async (output, context) => {
1932
+ const deserializeAws_restJson1ListPermissionGroupsCommand = async (output, context) => {
1237
1933
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1238
- return deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError(output, context);
1934
+ return deserializeAws_restJson1ListPermissionGroupsCommandError(output, context);
1239
1935
  }
1240
1936
  const contents = {
1241
1937
  $metadata: deserializeMetadata(output),
1242
- credentials: undefined,
1243
- durationInMinutes: undefined,
1938
+ nextToken: undefined,
1939
+ permissionGroups: undefined,
1244
1940
  };
1245
1941
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1246
- if (data.credentials !== undefined && data.credentials !== null) {
1247
- contents.credentials = deserializeAws_restJson1Credentials(data.credentials, context);
1942
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1943
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
1248
1944
  }
1249
- if (data.durationInMinutes !== undefined && data.durationInMinutes !== null) {
1250
- contents.durationInMinutes = smithy_client_1.expectLong(data.durationInMinutes);
1945
+ if (data.permissionGroups !== undefined && data.permissionGroups !== null) {
1946
+ contents.permissionGroups = deserializeAws_restJson1PermissionGroupList(data.permissionGroups, context);
1251
1947
  }
1252
1948
  return Promise.resolve(contents);
1253
1949
  };
1254
- exports.deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand;
1255
- const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = async (output, context) => {
1950
+ exports.deserializeAws_restJson1ListPermissionGroupsCommand = deserializeAws_restJson1ListPermissionGroupsCommand;
1951
+ const deserializeAws_restJson1ListPermissionGroupsCommandError = async (output, context) => {
1256
1952
  const parsedOutput = {
1257
1953
  ...output,
1258
1954
  body: await parseBody(output.body, context),
@@ -1263,76 +1959,46 @@ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = asy
1263
1959
  switch (errorCode) {
1264
1960
  case "AccessDeniedException":
1265
1961
  case "com.amazonaws.finspacedata#AccessDeniedException":
1266
- response = {
1267
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1268
- name: errorCode,
1269
- $metadata: deserializeMetadata(output),
1270
- };
1271
- break;
1962
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1272
1963
  case "InternalServerException":
1273
1964
  case "com.amazonaws.finspacedata#InternalServerException":
1274
- response = {
1275
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1276
- name: errorCode,
1277
- $metadata: deserializeMetadata(output),
1278
- };
1279
- break;
1965
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1280
1966
  case "ThrottlingException":
1281
1967
  case "com.amazonaws.finspacedata#ThrottlingException":
1282
- response = {
1283
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1284
- name: errorCode,
1285
- $metadata: deserializeMetadata(output),
1286
- };
1287
- break;
1968
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1288
1969
  case "ValidationException":
1289
1970
  case "com.amazonaws.finspacedata#ValidationException":
1290
- response = {
1291
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1292
- name: errorCode,
1293
- $metadata: deserializeMetadata(output),
1294
- };
1295
- break;
1971
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1296
1972
  default:
1297
1973
  const parsedBody = parsedOutput.body;
1298
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1299
- response = {
1300
- ...parsedBody,
1301
- name: `${errorCode}`,
1302
- message: parsedBody.message || parsedBody.Message || errorCode,
1974
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1975
+ name: parsedBody.code || parsedBody.Code || errorCode,
1303
1976
  $fault: "client",
1304
1977
  $metadata: deserializeMetadata(output),
1305
- };
1978
+ });
1979
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1306
1980
  }
1307
- const message = response.message || response.Message || errorCode;
1308
- response.message = message;
1309
- delete response.Message;
1310
- return Promise.reject(Object.assign(new Error(message), response));
1311
1981
  };
1312
- const deserializeAws_restJson1GetWorkingLocationCommand = async (output, context) => {
1982
+ const deserializeAws_restJson1ListUsersCommand = async (output, context) => {
1313
1983
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1314
- return deserializeAws_restJson1GetWorkingLocationCommandError(output, context);
1984
+ return deserializeAws_restJson1ListUsersCommandError(output, context);
1315
1985
  }
1316
1986
  const contents = {
1317
1987
  $metadata: deserializeMetadata(output),
1318
- s3Bucket: undefined,
1319
- s3Path: undefined,
1320
- s3Uri: undefined,
1988
+ nextToken: undefined,
1989
+ users: undefined,
1321
1990
  };
1322
1991
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1323
- if (data.s3Bucket !== undefined && data.s3Bucket !== null) {
1324
- contents.s3Bucket = smithy_client_1.expectString(data.s3Bucket);
1325
- }
1326
- if (data.s3Path !== undefined && data.s3Path !== null) {
1327
- contents.s3Path = smithy_client_1.expectString(data.s3Path);
1992
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1993
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
1328
1994
  }
1329
- if (data.s3Uri !== undefined && data.s3Uri !== null) {
1330
- contents.s3Uri = smithy_client_1.expectString(data.s3Uri);
1995
+ if (data.users !== undefined && data.users !== null) {
1996
+ contents.users = deserializeAws_restJson1UserList(data.users, context);
1331
1997
  }
1332
1998
  return Promise.resolve(contents);
1333
1999
  };
1334
- exports.deserializeAws_restJson1GetWorkingLocationCommand = deserializeAws_restJson1GetWorkingLocationCommand;
1335
- const deserializeAws_restJson1GetWorkingLocationCommandError = async (output, context) => {
2000
+ exports.deserializeAws_restJson1ListUsersCommand = deserializeAws_restJson1ListUsersCommand;
2001
+ const deserializeAws_restJson1ListUsersCommandError = async (output, context) => {
1336
2002
  const parsedOutput = {
1337
2003
  ...output,
1338
2004
  body: await parseBody(output.body, context),
@@ -1343,72 +2009,46 @@ const deserializeAws_restJson1GetWorkingLocationCommandError = async (output, co
1343
2009
  switch (errorCode) {
1344
2010
  case "AccessDeniedException":
1345
2011
  case "com.amazonaws.finspacedata#AccessDeniedException":
1346
- response = {
1347
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1348
- name: errorCode,
1349
- $metadata: deserializeMetadata(output),
1350
- };
1351
- break;
2012
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1352
2013
  case "InternalServerException":
1353
2014
  case "com.amazonaws.finspacedata#InternalServerException":
1354
- response = {
1355
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1356
- name: errorCode,
1357
- $metadata: deserializeMetadata(output),
1358
- };
1359
- break;
2015
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1360
2016
  case "ThrottlingException":
1361
2017
  case "com.amazonaws.finspacedata#ThrottlingException":
1362
- response = {
1363
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1364
- name: errorCode,
1365
- $metadata: deserializeMetadata(output),
1366
- };
1367
- break;
2018
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1368
2019
  case "ValidationException":
1369
2020
  case "com.amazonaws.finspacedata#ValidationException":
1370
- response = {
1371
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1372
- name: errorCode,
1373
- $metadata: deserializeMetadata(output),
1374
- };
1375
- break;
2021
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1376
2022
  default:
1377
2023
  const parsedBody = parsedOutput.body;
1378
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1379
- response = {
1380
- ...parsedBody,
1381
- name: `${errorCode}`,
1382
- message: parsedBody.message || parsedBody.Message || errorCode,
2024
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
2025
+ name: parsedBody.code || parsedBody.Code || errorCode,
1383
2026
  $fault: "client",
1384
2027
  $metadata: deserializeMetadata(output),
1385
- };
2028
+ });
2029
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1386
2030
  }
1387
- const message = response.message || response.Message || errorCode;
1388
- response.message = message;
1389
- delete response.Message;
1390
- return Promise.reject(Object.assign(new Error(message), response));
1391
2031
  };
1392
- const deserializeAws_restJson1ListChangesetsCommand = async (output, context) => {
2032
+ const deserializeAws_restJson1ResetUserPasswordCommand = async (output, context) => {
1393
2033
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1394
- return deserializeAws_restJson1ListChangesetsCommandError(output, context);
2034
+ return deserializeAws_restJson1ResetUserPasswordCommandError(output, context);
1395
2035
  }
1396
2036
  const contents = {
1397
2037
  $metadata: deserializeMetadata(output),
1398
- changesets: undefined,
1399
- nextToken: undefined,
2038
+ temporaryPassword: undefined,
2039
+ userId: undefined,
1400
2040
  };
1401
2041
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1402
- if (data.changesets !== undefined && data.changesets !== null) {
1403
- contents.changesets = deserializeAws_restJson1ChangesetList(data.changesets, context);
2042
+ if (data.temporaryPassword !== undefined && data.temporaryPassword !== null) {
2043
+ contents.temporaryPassword = smithy_client_1.expectString(data.temporaryPassword);
1404
2044
  }
1405
- if (data.nextToken !== undefined && data.nextToken !== null) {
1406
- contents.nextToken = smithy_client_1.expectString(data.nextToken);
2045
+ if (data.userId !== undefined && data.userId !== null) {
2046
+ contents.userId = smithy_client_1.expectString(data.userId);
1407
2047
  }
1408
2048
  return Promise.resolve(contents);
1409
2049
  };
1410
- exports.deserializeAws_restJson1ListChangesetsCommand = deserializeAws_restJson1ListChangesetsCommand;
1411
- const deserializeAws_restJson1ListChangesetsCommandError = async (output, context) => {
2050
+ exports.deserializeAws_restJson1ResetUserPasswordCommand = deserializeAws_restJson1ResetUserPasswordCommand;
2051
+ const deserializeAws_restJson1ResetUserPasswordCommandError = async (output, context) => {
1412
2052
  const parsedOutput = {
1413
2053
  ...output,
1414
2054
  body: await parseBody(output.body, context),
@@ -1419,88 +2059,52 @@ const deserializeAws_restJson1ListChangesetsCommandError = async (output, contex
1419
2059
  switch (errorCode) {
1420
2060
  case "AccessDeniedException":
1421
2061
  case "com.amazonaws.finspacedata#AccessDeniedException":
1422
- response = {
1423
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1424
- name: errorCode,
1425
- $metadata: deserializeMetadata(output),
1426
- };
1427
- break;
2062
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1428
2063
  case "ConflictException":
1429
2064
  case "com.amazonaws.finspacedata#ConflictException":
1430
- response = {
1431
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1432
- name: errorCode,
1433
- $metadata: deserializeMetadata(output),
1434
- };
1435
- break;
2065
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1436
2066
  case "InternalServerException":
1437
2067
  case "com.amazonaws.finspacedata#InternalServerException":
1438
- response = {
1439
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1440
- name: errorCode,
1441
- $metadata: deserializeMetadata(output),
1442
- };
1443
- break;
2068
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1444
2069
  case "ResourceNotFoundException":
1445
2070
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
1446
- response = {
1447
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1448
- name: errorCode,
1449
- $metadata: deserializeMetadata(output),
1450
- };
1451
- break;
2071
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1452
2072
  case "ThrottlingException":
1453
2073
  case "com.amazonaws.finspacedata#ThrottlingException":
1454
- response = {
1455
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1456
- name: errorCode,
1457
- $metadata: deserializeMetadata(output),
1458
- };
1459
- break;
2074
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1460
2075
  case "ValidationException":
1461
2076
  case "com.amazonaws.finspacedata#ValidationException":
1462
- response = {
1463
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1464
- name: errorCode,
1465
- $metadata: deserializeMetadata(output),
1466
- };
1467
- break;
2077
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1468
2078
  default:
1469
2079
  const parsedBody = parsedOutput.body;
1470
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1471
- response = {
1472
- ...parsedBody,
1473
- name: `${errorCode}`,
1474
- message: parsedBody.message || parsedBody.Message || errorCode,
2080
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
2081
+ name: parsedBody.code || parsedBody.Code || errorCode,
1475
2082
  $fault: "client",
1476
2083
  $metadata: deserializeMetadata(output),
1477
- };
2084
+ });
2085
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1478
2086
  }
1479
- const message = response.message || response.Message || errorCode;
1480
- response.message = message;
1481
- delete response.Message;
1482
- return Promise.reject(Object.assign(new Error(message), response));
1483
2087
  };
1484
- const deserializeAws_restJson1ListDatasetsCommand = async (output, context) => {
2088
+ const deserializeAws_restJson1UpdateChangesetCommand = async (output, context) => {
1485
2089
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1486
- return deserializeAws_restJson1ListDatasetsCommandError(output, context);
2090
+ return deserializeAws_restJson1UpdateChangesetCommandError(output, context);
1487
2091
  }
1488
2092
  const contents = {
1489
2093
  $metadata: deserializeMetadata(output),
1490
- datasets: undefined,
1491
- nextToken: undefined,
2094
+ changesetId: undefined,
2095
+ datasetId: undefined,
1492
2096
  };
1493
2097
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1494
- if (data.datasets !== undefined && data.datasets !== null) {
1495
- contents.datasets = deserializeAws_restJson1DatasetList(data.datasets, context);
2098
+ if (data.changesetId !== undefined && data.changesetId !== null) {
2099
+ contents.changesetId = smithy_client_1.expectString(data.changesetId);
1496
2100
  }
1497
- if (data.nextToken !== undefined && data.nextToken !== null) {
1498
- contents.nextToken = smithy_client_1.expectString(data.nextToken);
2101
+ if (data.datasetId !== undefined && data.datasetId !== null) {
2102
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
1499
2103
  }
1500
2104
  return Promise.resolve(contents);
1501
2105
  };
1502
- exports.deserializeAws_restJson1ListDatasetsCommand = deserializeAws_restJson1ListDatasetsCommand;
1503
- const deserializeAws_restJson1ListDatasetsCommandError = async (output, context) => {
2106
+ exports.deserializeAws_restJson1UpdateChangesetCommand = deserializeAws_restJson1UpdateChangesetCommand;
2107
+ const deserializeAws_restJson1UpdateChangesetCommandError = async (output, context) => {
1504
2108
  const parsedOutput = {
1505
2109
  ...output,
1506
2110
  body: await parseBody(output.body, context),
@@ -1509,82 +2113,50 @@ const deserializeAws_restJson1ListDatasetsCommandError = async (output, context)
1509
2113
  let errorCode = "UnknownError";
1510
2114
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1511
2115
  switch (errorCode) {
2116
+ case "AccessDeniedException":
2117
+ case "com.amazonaws.finspacedata#AccessDeniedException":
2118
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1512
2119
  case "ConflictException":
1513
2120
  case "com.amazonaws.finspacedata#ConflictException":
1514
- response = {
1515
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1516
- name: errorCode,
1517
- $metadata: deserializeMetadata(output),
1518
- };
1519
- break;
2121
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1520
2122
  case "InternalServerException":
1521
2123
  case "com.amazonaws.finspacedata#InternalServerException":
1522
- response = {
1523
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1524
- name: errorCode,
1525
- $metadata: deserializeMetadata(output),
1526
- };
1527
- break;
2124
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1528
2125
  case "ResourceNotFoundException":
1529
2126
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
1530
- response = {
1531
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1532
- name: errorCode,
1533
- $metadata: deserializeMetadata(output),
1534
- };
1535
- break;
2127
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1536
2128
  case "ThrottlingException":
1537
2129
  case "com.amazonaws.finspacedata#ThrottlingException":
1538
- response = {
1539
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1540
- name: errorCode,
1541
- $metadata: deserializeMetadata(output),
1542
- };
1543
- break;
2130
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1544
2131
  case "ValidationException":
1545
2132
  case "com.amazonaws.finspacedata#ValidationException":
1546
- response = {
1547
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1548
- name: errorCode,
1549
- $metadata: deserializeMetadata(output),
1550
- };
1551
- break;
2133
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1552
2134
  default:
1553
2135
  const parsedBody = parsedOutput.body;
1554
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1555
- response = {
1556
- ...parsedBody,
1557
- name: `${errorCode}`,
1558
- message: parsedBody.message || parsedBody.Message || errorCode,
2136
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
2137
+ name: parsedBody.code || parsedBody.Code || errorCode,
1559
2138
  $fault: "client",
1560
2139
  $metadata: deserializeMetadata(output),
1561
- };
2140
+ });
2141
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1562
2142
  }
1563
- const message = response.message || response.Message || errorCode;
1564
- response.message = message;
1565
- delete response.Message;
1566
- return Promise.reject(Object.assign(new Error(message), response));
1567
2143
  };
1568
- const deserializeAws_restJson1ListDataViewsCommand = async (output, context) => {
2144
+ const deserializeAws_restJson1UpdateDatasetCommand = async (output, context) => {
1569
2145
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1570
- return deserializeAws_restJson1ListDataViewsCommandError(output, context);
2146
+ return deserializeAws_restJson1UpdateDatasetCommandError(output, context);
1571
2147
  }
1572
2148
  const contents = {
1573
2149
  $metadata: deserializeMetadata(output),
1574
- dataViews: undefined,
1575
- nextToken: undefined,
2150
+ datasetId: undefined,
1576
2151
  };
1577
2152
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1578
- if (data.dataViews !== undefined && data.dataViews !== null) {
1579
- contents.dataViews = deserializeAws_restJson1DataViewList(data.dataViews, context);
1580
- }
1581
- if (data.nextToken !== undefined && data.nextToken !== null) {
1582
- contents.nextToken = smithy_client_1.expectString(data.nextToken);
2153
+ if (data.datasetId !== undefined && data.datasetId !== null) {
2154
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
1583
2155
  }
1584
2156
  return Promise.resolve(contents);
1585
2157
  };
1586
- exports.deserializeAws_restJson1ListDataViewsCommand = deserializeAws_restJson1ListDataViewsCommand;
1587
- const deserializeAws_restJson1ListDataViewsCommandError = async (output, context) => {
2158
+ exports.deserializeAws_restJson1UpdateDatasetCommand = deserializeAws_restJson1UpdateDatasetCommand;
2159
+ const deserializeAws_restJson1UpdateDatasetCommandError = async (output, context) => {
1588
2160
  const parsedOutput = {
1589
2161
  ...output,
1590
2162
  body: await parseBody(output.body, context),
@@ -1593,82 +2165,50 @@ const deserializeAws_restJson1ListDataViewsCommandError = async (output, context
1593
2165
  let errorCode = "UnknownError";
1594
2166
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1595
2167
  switch (errorCode) {
2168
+ case "AccessDeniedException":
2169
+ case "com.amazonaws.finspacedata#AccessDeniedException":
2170
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1596
2171
  case "ConflictException":
1597
2172
  case "com.amazonaws.finspacedata#ConflictException":
1598
- response = {
1599
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1600
- name: errorCode,
1601
- $metadata: deserializeMetadata(output),
1602
- };
1603
- break;
2173
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1604
2174
  case "InternalServerException":
1605
2175
  case "com.amazonaws.finspacedata#InternalServerException":
1606
- response = {
1607
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1608
- name: errorCode,
1609
- $metadata: deserializeMetadata(output),
1610
- };
1611
- break;
2176
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1612
2177
  case "ResourceNotFoundException":
1613
2178
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
1614
- response = {
1615
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1616
- name: errorCode,
1617
- $metadata: deserializeMetadata(output),
1618
- };
1619
- break;
2179
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1620
2180
  case "ThrottlingException":
1621
2181
  case "com.amazonaws.finspacedata#ThrottlingException":
1622
- response = {
1623
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1624
- name: errorCode,
1625
- $metadata: deserializeMetadata(output),
1626
- };
1627
- break;
2182
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1628
2183
  case "ValidationException":
1629
2184
  case "com.amazonaws.finspacedata#ValidationException":
1630
- response = {
1631
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1632
- name: errorCode,
1633
- $metadata: deserializeMetadata(output),
1634
- };
1635
- break;
2185
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1636
2186
  default:
1637
2187
  const parsedBody = parsedOutput.body;
1638
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1639
- response = {
1640
- ...parsedBody,
1641
- name: `${errorCode}`,
1642
- message: parsedBody.message || parsedBody.Message || errorCode,
2188
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
2189
+ name: parsedBody.code || parsedBody.Code || errorCode,
1643
2190
  $fault: "client",
1644
2191
  $metadata: deserializeMetadata(output),
1645
- };
2192
+ });
2193
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1646
2194
  }
1647
- const message = response.message || response.Message || errorCode;
1648
- response.message = message;
1649
- delete response.Message;
1650
- return Promise.reject(Object.assign(new Error(message), response));
1651
2195
  };
1652
- const deserializeAws_restJson1UpdateChangesetCommand = async (output, context) => {
2196
+ const deserializeAws_restJson1UpdatePermissionGroupCommand = async (output, context) => {
1653
2197
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1654
- return deserializeAws_restJson1UpdateChangesetCommandError(output, context);
2198
+ return deserializeAws_restJson1UpdatePermissionGroupCommandError(output, context);
1655
2199
  }
1656
2200
  const contents = {
1657
2201
  $metadata: deserializeMetadata(output),
1658
- changesetId: undefined,
1659
- datasetId: undefined,
2202
+ permissionGroupId: undefined,
1660
2203
  };
1661
2204
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1662
- if (data.changesetId !== undefined && data.changesetId !== null) {
1663
- contents.changesetId = smithy_client_1.expectString(data.changesetId);
1664
- }
1665
- if (data.datasetId !== undefined && data.datasetId !== null) {
1666
- contents.datasetId = smithy_client_1.expectString(data.datasetId);
2205
+ if (data.permissionGroupId !== undefined && data.permissionGroupId !== null) {
2206
+ contents.permissionGroupId = smithy_client_1.expectString(data.permissionGroupId);
1667
2207
  }
1668
2208
  return Promise.resolve(contents);
1669
2209
  };
1670
- exports.deserializeAws_restJson1UpdateChangesetCommand = deserializeAws_restJson1UpdateChangesetCommand;
1671
- const deserializeAws_restJson1UpdateChangesetCommandError = async (output, context) => {
2210
+ exports.deserializeAws_restJson1UpdatePermissionGroupCommand = deserializeAws_restJson1UpdatePermissionGroupCommand;
2211
+ const deserializeAws_restJson1UpdatePermissionGroupCommandError = async (output, context) => {
1672
2212
  const parsedOutput = {
1673
2213
  ...output,
1674
2214
  body: await parseBody(output.body, context),
@@ -1679,84 +2219,48 @@ const deserializeAws_restJson1UpdateChangesetCommandError = async (output, conte
1679
2219
  switch (errorCode) {
1680
2220
  case "AccessDeniedException":
1681
2221
  case "com.amazonaws.finspacedata#AccessDeniedException":
1682
- response = {
1683
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1684
- name: errorCode,
1685
- $metadata: deserializeMetadata(output),
1686
- };
1687
- break;
2222
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1688
2223
  case "ConflictException":
1689
2224
  case "com.amazonaws.finspacedata#ConflictException":
1690
- response = {
1691
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1692
- name: errorCode,
1693
- $metadata: deserializeMetadata(output),
1694
- };
1695
- break;
2225
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1696
2226
  case "InternalServerException":
1697
2227
  case "com.amazonaws.finspacedata#InternalServerException":
1698
- response = {
1699
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1700
- name: errorCode,
1701
- $metadata: deserializeMetadata(output),
1702
- };
1703
- break;
2228
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1704
2229
  case "ResourceNotFoundException":
1705
2230
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
1706
- response = {
1707
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1708
- name: errorCode,
1709
- $metadata: deserializeMetadata(output),
1710
- };
1711
- break;
2231
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1712
2232
  case "ThrottlingException":
1713
2233
  case "com.amazonaws.finspacedata#ThrottlingException":
1714
- response = {
1715
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1716
- name: errorCode,
1717
- $metadata: deserializeMetadata(output),
1718
- };
1719
- break;
2234
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1720
2235
  case "ValidationException":
1721
2236
  case "com.amazonaws.finspacedata#ValidationException":
1722
- response = {
1723
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1724
- name: errorCode,
1725
- $metadata: deserializeMetadata(output),
1726
- };
1727
- break;
2237
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1728
2238
  default:
1729
2239
  const parsedBody = parsedOutput.body;
1730
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1731
- response = {
1732
- ...parsedBody,
1733
- name: `${errorCode}`,
1734
- message: parsedBody.message || parsedBody.Message || errorCode,
2240
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
2241
+ name: parsedBody.code || parsedBody.Code || errorCode,
1735
2242
  $fault: "client",
1736
2243
  $metadata: deserializeMetadata(output),
1737
- };
2244
+ });
2245
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1738
2246
  }
1739
- const message = response.message || response.Message || errorCode;
1740
- response.message = message;
1741
- delete response.Message;
1742
- return Promise.reject(Object.assign(new Error(message), response));
1743
2247
  };
1744
- const deserializeAws_restJson1UpdateDatasetCommand = async (output, context) => {
2248
+ const deserializeAws_restJson1UpdateUserCommand = async (output, context) => {
1745
2249
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1746
- return deserializeAws_restJson1UpdateDatasetCommandError(output, context);
2250
+ return deserializeAws_restJson1UpdateUserCommandError(output, context);
1747
2251
  }
1748
2252
  const contents = {
1749
2253
  $metadata: deserializeMetadata(output),
1750
- datasetId: undefined,
2254
+ userId: undefined,
1751
2255
  };
1752
2256
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1753
- if (data.datasetId !== undefined && data.datasetId !== null) {
1754
- contents.datasetId = smithy_client_1.expectString(data.datasetId);
2257
+ if (data.userId !== undefined && data.userId !== null) {
2258
+ contents.userId = smithy_client_1.expectString(data.userId);
1755
2259
  }
1756
2260
  return Promise.resolve(contents);
1757
2261
  };
1758
- exports.deserializeAws_restJson1UpdateDatasetCommand = deserializeAws_restJson1UpdateDatasetCommand;
1759
- const deserializeAws_restJson1UpdateDatasetCommandError = async (output, context) => {
2262
+ exports.deserializeAws_restJson1UpdateUserCommand = deserializeAws_restJson1UpdateUserCommand;
2263
+ const deserializeAws_restJson1UpdateUserCommandError = async (output, context) => {
1760
2264
  const parsedOutput = {
1761
2265
  ...output,
1762
2266
  body: await parseBody(output.body, context),
@@ -1767,154 +2271,131 @@ const deserializeAws_restJson1UpdateDatasetCommandError = async (output, context
1767
2271
  switch (errorCode) {
1768
2272
  case "AccessDeniedException":
1769
2273
  case "com.amazonaws.finspacedata#AccessDeniedException":
1770
- response = {
1771
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1772
- name: errorCode,
1773
- $metadata: deserializeMetadata(output),
1774
- };
1775
- break;
2274
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1776
2275
  case "ConflictException":
1777
2276
  case "com.amazonaws.finspacedata#ConflictException":
1778
- response = {
1779
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1780
- name: errorCode,
1781
- $metadata: deserializeMetadata(output),
1782
- };
1783
- break;
2277
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1784
2278
  case "InternalServerException":
1785
2279
  case "com.amazonaws.finspacedata#InternalServerException":
1786
- response = {
1787
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1788
- name: errorCode,
1789
- $metadata: deserializeMetadata(output),
1790
- };
1791
- break;
2280
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1792
2281
  case "ResourceNotFoundException":
1793
2282
  case "com.amazonaws.finspacedata#ResourceNotFoundException":
1794
- response = {
1795
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1796
- name: errorCode,
1797
- $metadata: deserializeMetadata(output),
1798
- };
1799
- break;
2283
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1800
2284
  case "ThrottlingException":
1801
2285
  case "com.amazonaws.finspacedata#ThrottlingException":
1802
- response = {
1803
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1804
- name: errorCode,
1805
- $metadata: deserializeMetadata(output),
1806
- };
1807
- break;
2286
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1808
2287
  case "ValidationException":
1809
2288
  case "com.amazonaws.finspacedata#ValidationException":
1810
- response = {
1811
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1812
- name: errorCode,
1813
- $metadata: deserializeMetadata(output),
1814
- };
1815
- break;
2289
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1816
2290
  default:
1817
2291
  const parsedBody = parsedOutput.body;
1818
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1819
- response = {
1820
- ...parsedBody,
1821
- name: `${errorCode}`,
1822
- message: parsedBody.message || parsedBody.Message || errorCode,
2292
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
2293
+ name: parsedBody.code || parsedBody.Code || errorCode,
1823
2294
  $fault: "client",
1824
2295
  $metadata: deserializeMetadata(output),
1825
- };
2296
+ });
2297
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1826
2298
  }
1827
- const message = response.message || response.Message || errorCode;
1828
- response.message = message;
1829
- delete response.Message;
1830
- return Promise.reject(Object.assign(new Error(message), response));
1831
2299
  };
1832
2300
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1833
- const contents = {
1834
- name: "AccessDeniedException",
1835
- $fault: "client",
1836
- $metadata: deserializeMetadata(parsedOutput),
1837
- message: undefined,
1838
- };
2301
+ const contents = {};
1839
2302
  const data = parsedOutput.body;
1840
2303
  if (data.message !== undefined && data.message !== null) {
1841
2304
  contents.message = smithy_client_1.expectString(data.message);
1842
2305
  }
1843
- return contents;
2306
+ const exception = new models_0_1.AccessDeniedException({
2307
+ $metadata: deserializeMetadata(parsedOutput),
2308
+ ...contents,
2309
+ });
2310
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1844
2311
  };
1845
2312
  const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
1846
- const contents = {
1847
- name: "ConflictException",
1848
- $fault: "client",
1849
- $metadata: deserializeMetadata(parsedOutput),
1850
- message: undefined,
1851
- };
2313
+ const contents = {};
1852
2314
  const data = parsedOutput.body;
1853
2315
  if (data.message !== undefined && data.message !== null) {
1854
2316
  contents.message = smithy_client_1.expectString(data.message);
1855
2317
  }
1856
- return contents;
2318
+ if (data.reason !== undefined && data.reason !== null) {
2319
+ contents.reason = smithy_client_1.expectString(data.reason);
2320
+ }
2321
+ const exception = new models_0_1.ConflictException({
2322
+ $metadata: deserializeMetadata(parsedOutput),
2323
+ ...contents,
2324
+ });
2325
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1857
2326
  };
1858
2327
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
1859
- const contents = {
1860
- name: "InternalServerException",
1861
- $fault: "server",
1862
- $metadata: deserializeMetadata(parsedOutput),
1863
- message: undefined,
1864
- };
2328
+ const contents = {};
1865
2329
  const data = parsedOutput.body;
1866
2330
  if (data.message !== undefined && data.message !== null) {
1867
2331
  contents.message = smithy_client_1.expectString(data.message);
1868
2332
  }
1869
- return contents;
2333
+ const exception = new models_0_1.InternalServerException({
2334
+ $metadata: deserializeMetadata(parsedOutput),
2335
+ ...contents,
2336
+ });
2337
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1870
2338
  };
1871
2339
  const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => {
1872
- const contents = {
1873
- name: "LimitExceededException",
1874
- $fault: "client",
1875
- $metadata: deserializeMetadata(parsedOutput),
1876
- message: undefined,
1877
- };
2340
+ const contents = {};
1878
2341
  const data = parsedOutput.body;
1879
2342
  if (data.message !== undefined && data.message !== null) {
1880
2343
  contents.message = smithy_client_1.expectString(data.message);
1881
2344
  }
1882
- return contents;
2345
+ const exception = new models_0_1.LimitExceededException({
2346
+ $metadata: deserializeMetadata(parsedOutput),
2347
+ ...contents,
2348
+ });
2349
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1883
2350
  };
1884
2351
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1885
- const contents = {
1886
- name: "ResourceNotFoundException",
1887
- $fault: "client",
1888
- $metadata: deserializeMetadata(parsedOutput),
1889
- message: undefined,
1890
- };
2352
+ const contents = {};
1891
2353
  const data = parsedOutput.body;
1892
2354
  if (data.message !== undefined && data.message !== null) {
1893
2355
  contents.message = smithy_client_1.expectString(data.message);
1894
2356
  }
1895
- return contents;
2357
+ if (data.reason !== undefined && data.reason !== null) {
2358
+ contents.reason = smithy_client_1.expectString(data.reason);
2359
+ }
2360
+ const exception = new models_0_1.ResourceNotFoundException({
2361
+ $metadata: deserializeMetadata(parsedOutput),
2362
+ ...contents,
2363
+ });
2364
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1896
2365
  };
1897
2366
  const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
1898
- const contents = {
1899
- name: "ThrottlingException",
1900
- $fault: "client",
1901
- $metadata: deserializeMetadata(parsedOutput),
1902
- };
2367
+ const contents = {};
1903
2368
  const data = parsedOutput.body;
1904
- return contents;
2369
+ const exception = new models_0_1.ThrottlingException({
2370
+ $metadata: deserializeMetadata(parsedOutput),
2371
+ ...contents,
2372
+ });
2373
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1905
2374
  };
1906
2375
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
1907
- const contents = {
1908
- name: "ValidationException",
1909
- $fault: "client",
1910
- $metadata: deserializeMetadata(parsedOutput),
1911
- message: undefined,
1912
- };
2376
+ const contents = {};
1913
2377
  const data = parsedOutput.body;
1914
2378
  if (data.message !== undefined && data.message !== null) {
1915
2379
  contents.message = smithy_client_1.expectString(data.message);
1916
2380
  }
1917
- return contents;
2381
+ if (data.reason !== undefined && data.reason !== null) {
2382
+ contents.reason = smithy_client_1.expectString(data.reason);
2383
+ }
2384
+ const exception = new models_0_1.ValidationException({
2385
+ $metadata: deserializeMetadata(parsedOutput),
2386
+ ...contents,
2387
+ });
2388
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
2389
+ };
2390
+ const serializeAws_restJson1ApplicationPermissionList = (input, context) => {
2391
+ return input
2392
+ .filter((e) => e != null)
2393
+ .map((entry) => {
2394
+ if (entry === null) {
2395
+ return null;
2396
+ }
2397
+ return entry;
2398
+ });
1918
2399
  };
1919
2400
  const serializeAws_restJson1ColumnDefinition = (input, context) => {
1920
2401
  return {
@@ -2061,6 +2542,17 @@ const serializeAws_restJson1SourceParams = (input, context) => {
2061
2542
  };
2062
2543
  }, {});
2063
2544
  };
2545
+ const deserializeAws_restJson1ApplicationPermissionList = (output, context) => {
2546
+ const retVal = (output || [])
2547
+ .filter((e) => e != null)
2548
+ .map((entry) => {
2549
+ if (entry === null) {
2550
+ return null;
2551
+ }
2552
+ return smithy_client_1.expectString(entry);
2553
+ });
2554
+ return retVal;
2555
+ };
2064
2556
  const deserializeAws_restJson1ChangesetErrorInfo = (output, context) => {
2065
2557
  return {
2066
2558
  errorCategory: smithy_client_1.expectString(output.errorCategory),
@@ -2068,7 +2560,7 @@ const deserializeAws_restJson1ChangesetErrorInfo = (output, context) => {
2068
2560
  };
2069
2561
  };
2070
2562
  const deserializeAws_restJson1ChangesetList = (output, context) => {
2071
- return (output || [])
2563
+ const retVal = (output || [])
2072
2564
  .filter((e) => e != null)
2073
2565
  .map((entry) => {
2074
2566
  if (entry === null) {
@@ -2076,6 +2568,7 @@ const deserializeAws_restJson1ChangesetList = (output, context) => {
2076
2568
  }
2077
2569
  return deserializeAws_restJson1ChangesetSummary(entry, context);
2078
2570
  });
2571
+ return retVal;
2079
2572
  };
2080
2573
  const deserializeAws_restJson1ChangesetSummary = (output, context) => {
2081
2574
  return {
@@ -2108,7 +2601,7 @@ const deserializeAws_restJson1ColumnDefinition = (output, context) => {
2108
2601
  };
2109
2602
  };
2110
2603
  const deserializeAws_restJson1ColumnList = (output, context) => {
2111
- return (output || [])
2604
+ const retVal = (output || [])
2112
2605
  .filter((e) => e != null)
2113
2606
  .map((entry) => {
2114
2607
  if (entry === null) {
@@ -2116,9 +2609,10 @@ const deserializeAws_restJson1ColumnList = (output, context) => {
2116
2609
  }
2117
2610
  return deserializeAws_restJson1ColumnDefinition(entry, context);
2118
2611
  });
2612
+ return retVal;
2119
2613
  };
2120
2614
  const deserializeAws_restJson1ColumnNameList = (output, context) => {
2121
- return (output || [])
2615
+ const retVal = (output || [])
2122
2616
  .filter((e) => e != null)
2123
2617
  .map((entry) => {
2124
2618
  if (entry === null) {
@@ -2126,6 +2620,7 @@ const deserializeAws_restJson1ColumnNameList = (output, context) => {
2126
2620
  }
2127
2621
  return smithy_client_1.expectString(entry);
2128
2622
  });
2623
+ return retVal;
2129
2624
  };
2130
2625
  const deserializeAws_restJson1Credentials = (output, context) => {
2131
2626
  return {
@@ -2153,7 +2648,7 @@ const deserializeAws_restJson1Dataset = (output, context) => {
2153
2648
  };
2154
2649
  };
2155
2650
  const deserializeAws_restJson1DatasetList = (output, context) => {
2156
- return (output || [])
2651
+ const retVal = (output || [])
2157
2652
  .filter((e) => e != null)
2158
2653
  .map((entry) => {
2159
2654
  if (entry === null) {
@@ -2161,6 +2656,7 @@ const deserializeAws_restJson1DatasetList = (output, context) => {
2161
2656
  }
2162
2657
  return deserializeAws_restJson1Dataset(entry, context);
2163
2658
  });
2659
+ return retVal;
2164
2660
  };
2165
2661
  const deserializeAws_restJson1DatasetOwnerInfo = (output, context) => {
2166
2662
  return {
@@ -2185,7 +2681,7 @@ const deserializeAws_restJson1DataViewErrorInfo = (output, context) => {
2185
2681
  };
2186
2682
  };
2187
2683
  const deserializeAws_restJson1DataViewList = (output, context) => {
2188
- return (output || [])
2684
+ const retVal = (output || [])
2189
2685
  .filter((e) => e != null)
2190
2686
  .map((entry) => {
2191
2687
  if (entry === null) {
@@ -2193,6 +2689,7 @@ const deserializeAws_restJson1DataViewList = (output, context) => {
2193
2689
  }
2194
2690
  return deserializeAws_restJson1DataViewSummary(entry, context);
2195
2691
  });
2692
+ return retVal;
2196
2693
  };
2197
2694
  const deserializeAws_restJson1DataViewSummary = (output, context) => {
2198
2695
  return {
@@ -2230,7 +2727,7 @@ const deserializeAws_restJson1FormatParams = (output, context) => {
2230
2727
  }, {});
2231
2728
  };
2232
2729
  const deserializeAws_restJson1PartitionColumnList = (output, context) => {
2233
- return (output || [])
2730
+ const retVal = (output || [])
2234
2731
  .filter((e) => e != null)
2235
2732
  .map((entry) => {
2236
2733
  if (entry === null) {
@@ -2238,6 +2735,30 @@ const deserializeAws_restJson1PartitionColumnList = (output, context) => {
2238
2735
  }
2239
2736
  return smithy_client_1.expectString(entry);
2240
2737
  });
2738
+ return retVal;
2739
+ };
2740
+ const deserializeAws_restJson1PermissionGroup = (output, context) => {
2741
+ return {
2742
+ applicationPermissions: output.applicationPermissions !== undefined && output.applicationPermissions !== null
2743
+ ? deserializeAws_restJson1ApplicationPermissionList(output.applicationPermissions, context)
2744
+ : undefined,
2745
+ createTime: smithy_client_1.expectLong(output.createTime),
2746
+ description: smithy_client_1.expectString(output.description),
2747
+ lastModifiedTime: smithy_client_1.expectLong(output.lastModifiedTime),
2748
+ name: smithy_client_1.expectString(output.name),
2749
+ permissionGroupId: smithy_client_1.expectString(output.permissionGroupId),
2750
+ };
2751
+ };
2752
+ const deserializeAws_restJson1PermissionGroupList = (output, context) => {
2753
+ const retVal = (output || [])
2754
+ .filter((e) => e != null)
2755
+ .map((entry) => {
2756
+ if (entry === null) {
2757
+ return null;
2758
+ }
2759
+ return deserializeAws_restJson1PermissionGroup(entry, context);
2760
+ });
2761
+ return retVal;
2241
2762
  };
2242
2763
  const deserializeAws_restJson1S3DestinationFormatOptions = (output, context) => {
2243
2764
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -2268,7 +2789,7 @@ const deserializeAws_restJson1SchemaUnion = (output, context) => {
2268
2789
  };
2269
2790
  };
2270
2791
  const deserializeAws_restJson1SortColumnList = (output, context) => {
2271
- return (output || [])
2792
+ const retVal = (output || [])
2272
2793
  .filter((e) => e != null)
2273
2794
  .map((entry) => {
2274
2795
  if (entry === null) {
@@ -2276,6 +2797,7 @@ const deserializeAws_restJson1SortColumnList = (output, context) => {
2276
2797
  }
2277
2798
  return smithy_client_1.expectString(entry);
2278
2799
  });
2800
+ return retVal;
2279
2801
  };
2280
2802
  const deserializeAws_restJson1SourceParams = (output, context) => {
2281
2803
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -2288,6 +2810,34 @@ const deserializeAws_restJson1SourceParams = (output, context) => {
2288
2810
  };
2289
2811
  }, {});
2290
2812
  };
2813
+ const deserializeAws_restJson1User = (output, context) => {
2814
+ return {
2815
+ apiAccess: smithy_client_1.expectString(output.apiAccess),
2816
+ apiAccessPrincipalArn: smithy_client_1.expectString(output.apiAccessPrincipalArn),
2817
+ createTime: smithy_client_1.expectLong(output.createTime),
2818
+ emailAddress: smithy_client_1.expectString(output.emailAddress),
2819
+ firstName: smithy_client_1.expectString(output.firstName),
2820
+ lastDisabledTime: smithy_client_1.expectLong(output.lastDisabledTime),
2821
+ lastEnabledTime: smithy_client_1.expectLong(output.lastEnabledTime),
2822
+ lastLoginTime: smithy_client_1.expectLong(output.lastLoginTime),
2823
+ lastModifiedTime: smithy_client_1.expectLong(output.lastModifiedTime),
2824
+ lastName: smithy_client_1.expectString(output.lastName),
2825
+ status: smithy_client_1.expectString(output.status),
2826
+ type: smithy_client_1.expectString(output.type),
2827
+ userId: smithy_client_1.expectString(output.userId),
2828
+ };
2829
+ };
2830
+ const deserializeAws_restJson1UserList = (output, context) => {
2831
+ const retVal = (output || [])
2832
+ .filter((e) => e != null)
2833
+ .map((entry) => {
2834
+ if (entry === null) {
2835
+ return null;
2836
+ }
2837
+ return deserializeAws_restJson1User(entry, context);
2838
+ });
2839
+ return retVal;
2840
+ };
2291
2841
  const deserializeMetadata = (output) => {
2292
2842
  var _a;
2293
2843
  return ({