@aws-sdk/client-finspace-data 3.53.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 (82) hide show
  1. package/CHANGELOG.md +11 -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/models/models_0.js +202 -2
  16. package/dist-cjs/pagination/ListPermissionGroupsPaginator.js +35 -0
  17. package/dist-cjs/pagination/ListUsersPaginator.js +35 -0
  18. package/dist-cjs/pagination/index.js +2 -0
  19. package/dist-cjs/protocols/Aws_restJson1.js +1184 -153
  20. package/dist-es/FinspaceData.js +165 -0
  21. package/dist-es/commands/CreatePermissionGroupCommand.js +39 -0
  22. package/dist-es/commands/CreateUserCommand.js +39 -0
  23. package/dist-es/commands/DeletePermissionGroupCommand.js +39 -0
  24. package/dist-es/commands/DisableUserCommand.js +39 -0
  25. package/dist-es/commands/EnableUserCommand.js +39 -0
  26. package/dist-es/commands/GetUserCommand.js +39 -0
  27. package/dist-es/commands/ListPermissionGroupsCommand.js +39 -0
  28. package/dist-es/commands/ListUsersCommand.js +39 -0
  29. package/dist-es/commands/ResetUserPasswordCommand.js +39 -0
  30. package/dist-es/commands/UpdatePermissionGroupCommand.js +39 -0
  31. package/dist-es/commands/UpdateUserCommand.js +39 -0
  32. package/dist-es/commands/index.js +11 -0
  33. package/dist-es/models/models_0.js +132 -4
  34. package/dist-es/pagination/ListPermissionGroupsPaginator.js +74 -0
  35. package/dist-es/pagination/ListUsersPaginator.js +74 -0
  36. package/dist-es/pagination/index.js +2 -0
  37. package/dist-es/protocols/Aws_restJson1.js +1622 -308
  38. package/dist-types/FinspaceData.d.ts +77 -0
  39. package/dist-types/FinspaceDataClient.d.ts +15 -4
  40. package/dist-types/commands/CreatePermissionGroupCommand.d.ts +35 -0
  41. package/dist-types/commands/CreateUserCommand.d.ts +35 -0
  42. package/dist-types/commands/DeletePermissionGroupCommand.d.ts +35 -0
  43. package/dist-types/commands/DisableUserCommand.d.ts +35 -0
  44. package/dist-types/commands/EnableUserCommand.d.ts +35 -0
  45. package/dist-types/commands/GetUserCommand.d.ts +35 -0
  46. package/dist-types/commands/ListPermissionGroupsCommand.d.ts +35 -0
  47. package/dist-types/commands/ListUsersCommand.d.ts +35 -0
  48. package/dist-types/commands/ResetUserPasswordCommand.d.ts +35 -0
  49. package/dist-types/commands/UpdatePermissionGroupCommand.d.ts +35 -0
  50. package/dist-types/commands/UpdateUserCommand.d.ts +35 -0
  51. package/dist-types/commands/index.d.ts +11 -0
  52. package/dist-types/models/models_0.d.ts +865 -113
  53. package/dist-types/pagination/ListPermissionGroupsPaginator.d.ts +4 -0
  54. package/dist-types/pagination/ListUsersPaginator.d.ts +4 -0
  55. package/dist-types/pagination/index.d.ts +2 -0
  56. package/dist-types/protocols/Aws_restJson1.d.ts +33 -0
  57. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  58. package/dist-types/runtimeConfig.d.ts +1 -1
  59. package/dist-types/runtimeConfig.native.d.ts +1 -1
  60. package/dist-types/ts3.4/FinspaceData.d.ts +55 -0
  61. package/dist-types/ts3.4/FinspaceDataClient.d.ts +15 -4
  62. package/dist-types/ts3.4/commands/CreatePermissionGroupCommand.d.ts +17 -0
  63. package/dist-types/ts3.4/commands/CreateUserCommand.d.ts +17 -0
  64. package/dist-types/ts3.4/commands/DeletePermissionGroupCommand.d.ts +17 -0
  65. package/dist-types/ts3.4/commands/DisableUserCommand.d.ts +17 -0
  66. package/dist-types/ts3.4/commands/EnableUserCommand.d.ts +17 -0
  67. package/dist-types/ts3.4/commands/GetUserCommand.d.ts +17 -0
  68. package/dist-types/ts3.4/commands/ListPermissionGroupsCommand.d.ts +17 -0
  69. package/dist-types/ts3.4/commands/ListUsersCommand.d.ts +17 -0
  70. package/dist-types/ts3.4/commands/ResetUserPasswordCommand.d.ts +17 -0
  71. package/dist-types/ts3.4/commands/UpdatePermissionGroupCommand.d.ts +17 -0
  72. package/dist-types/ts3.4/commands/UpdateUserCommand.d.ts +17 -0
  73. package/dist-types/ts3.4/commands/index.d.ts +11 -0
  74. package/dist-types/ts3.4/models/models_0.d.ts +333 -0
  75. package/dist-types/ts3.4/pagination/ListPermissionGroupsPaginator.d.ts +4 -0
  76. package/dist-types/ts3.4/pagination/ListUsersPaginator.d.ts +4 -0
  77. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  78. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +33 -0
  79. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  80. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  81. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  82. package/package.json +27 -27
@@ -1,6 +1,6 @@
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");
@@ -124,6 +124,63 @@ const serializeAws_restJson1CreateDataViewCommand = async (input, context) => {
124
124
  });
125
125
  };
126
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;
127
184
  const serializeAws_restJson1DeleteDatasetCommand = async (input, context) => {
128
185
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
129
186
  const headers = {};
@@ -154,6 +211,100 @@ const serializeAws_restJson1DeleteDatasetCommand = async (input, context) => {
154
211
  });
155
212
  };
156
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;
157
308
  const serializeAws_restJson1GetChangesetCommand = async (input, context) => {
158
309
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
159
310
  const headers = {};
@@ -275,6 +426,32 @@ const serializeAws_restJson1GetProgrammaticAccessCredentialsCommand = async (inp
275
426
  });
276
427
  };
277
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;
278
455
  const serializeAws_restJson1GetWorkingLocationCommand = async (input, context) => {
279
456
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
280
457
  const headers = {
@@ -379,6 +556,80 @@ const serializeAws_restJson1ListDataViewsCommand = async (input, context) => {
379
556
  });
380
557
  };
381
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;
382
633
  const serializeAws_restJson1UpdateChangesetCommand = async (input, context) => {
383
634
  var _a;
384
635
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -467,6 +718,82 @@ const serializeAws_restJson1UpdateDatasetCommand = async (input, context) => {
467
718
  });
468
719
  };
469
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;
470
797
  const deserializeAws_restJson1CreateChangesetCommand = async (output, context) => {
471
798
  if (output.statusCode !== 200 && output.statusCode >= 300) {
472
799
  return deserializeAws_restJson1CreateChangesetCommandError(output, context);
@@ -637,22 +964,22 @@ const deserializeAws_restJson1CreateDataViewCommandError = async (output, contex
637
964
  throw smithy_client_1.decorateServiceException(response, parsedBody);
638
965
  }
639
966
  };
640
- const deserializeAws_restJson1DeleteDatasetCommand = async (output, context) => {
967
+ const deserializeAws_restJson1CreatePermissionGroupCommand = async (output, context) => {
641
968
  if (output.statusCode !== 200 && output.statusCode >= 300) {
642
- return deserializeAws_restJson1DeleteDatasetCommandError(output, context);
969
+ return deserializeAws_restJson1CreatePermissionGroupCommandError(output, context);
643
970
  }
644
971
  const contents = {
645
972
  $metadata: deserializeMetadata(output),
646
- datasetId: undefined,
973
+ permissionGroupId: undefined,
647
974
  };
648
975
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
649
- if (data.datasetId !== undefined && data.datasetId !== null) {
650
- contents.datasetId = smithy_client_1.expectString(data.datasetId);
976
+ if (data.permissionGroupId !== undefined && data.permissionGroupId !== null) {
977
+ contents.permissionGroupId = smithy_client_1.expectString(data.permissionGroupId);
651
978
  }
652
979
  return Promise.resolve(contents);
653
980
  };
654
- exports.deserializeAws_restJson1DeleteDatasetCommand = deserializeAws_restJson1DeleteDatasetCommand;
655
- const deserializeAws_restJson1DeleteDatasetCommandError = async (output, context) => {
981
+ exports.deserializeAws_restJson1CreatePermissionGroupCommand = deserializeAws_restJson1CreatePermissionGroupCommand;
982
+ const deserializeAws_restJson1CreatePermissionGroupCommandError = async (output, context) => {
656
983
  const parsedOutput = {
657
984
  ...output,
658
985
  body: await parseBody(output.body, context),
@@ -673,9 +1000,6 @@ const deserializeAws_restJson1DeleteDatasetCommandError = async (output, context
673
1000
  case "LimitExceededException":
674
1001
  case "com.amazonaws.finspacedata#LimitExceededException":
675
1002
  throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
676
- case "ResourceNotFoundException":
677
- case "com.amazonaws.finspacedata#ResourceNotFoundException":
678
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
679
1003
  case "ThrottlingException":
680
1004
  case "com.amazonaws.finspacedata#ThrottlingException":
681
1005
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
@@ -692,18 +1016,287 @@ const deserializeAws_restJson1DeleteDatasetCommandError = async (output, context
692
1016
  throw smithy_client_1.decorateServiceException(response, parsedBody);
693
1017
  }
694
1018
  };
695
- const deserializeAws_restJson1GetChangesetCommand = async (output, context) => {
1019
+ const deserializeAws_restJson1CreateUserCommand = async (output, context) => {
696
1020
  if (output.statusCode !== 200 && output.statusCode >= 300) {
697
- return deserializeAws_restJson1GetChangesetCommandError(output, context);
1021
+ return deserializeAws_restJson1CreateUserCommandError(output, context);
698
1022
  }
699
1023
  const contents = {
700
1024
  $metadata: deserializeMetadata(output),
701
- activeFromTimestamp: undefined,
702
- activeUntilTimestamp: undefined,
703
- changeType: undefined,
704
- changesetArn: undefined,
705
- changesetId: undefined,
706
- createTime: undefined,
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);
1061
+ default:
1062
+ const parsedBody = parsedOutput.body;
1063
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1064
+ name: parsedBody.code || parsedBody.Code || errorCode,
1065
+ $fault: "client",
1066
+ $metadata: deserializeMetadata(output),
1067
+ });
1068
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1069
+ }
1070
+ };
1071
+ const deserializeAws_restJson1DeleteDatasetCommand = async (output, context) => {
1072
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1073
+ return deserializeAws_restJson1DeleteDatasetCommandError(output, context);
1074
+ }
1075
+ const contents = {
1076
+ $metadata: deserializeMetadata(output),
1077
+ datasetId: undefined,
1078
+ };
1079
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1080
+ if (data.datasetId !== undefined && data.datasetId !== null) {
1081
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
1082
+ }
1083
+ return Promise.resolve(contents);
1084
+ };
1085
+ exports.deserializeAws_restJson1DeleteDatasetCommand = deserializeAws_restJson1DeleteDatasetCommand;
1086
+ const deserializeAws_restJson1DeleteDatasetCommandError = async (output, context) => {
1087
+ const parsedOutput = {
1088
+ ...output,
1089
+ body: await parseBody(output.body, context),
1090
+ };
1091
+ let response;
1092
+ let errorCode = "UnknownError";
1093
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1094
+ switch (errorCode) {
1095
+ case "AccessDeniedException":
1096
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1097
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1098
+ case "ConflictException":
1099
+ case "com.amazonaws.finspacedata#ConflictException":
1100
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1101
+ case "InternalServerException":
1102
+ case "com.amazonaws.finspacedata#InternalServerException":
1103
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1104
+ case "LimitExceededException":
1105
+ case "com.amazonaws.finspacedata#LimitExceededException":
1106
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
1107
+ case "ResourceNotFoundException":
1108
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
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",
1121
+ $metadata: deserializeMetadata(output),
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);
1165
+ case "ThrottlingException":
1166
+ case "com.amazonaws.finspacedata#ThrottlingException":
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",
1176
+ $metadata: deserializeMetadata(output),
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);
1220
+ case "ValidationException":
1221
+ case "com.amazonaws.finspacedata#ValidationException":
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",
1228
+ $metadata: deserializeMetadata(output),
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);
1278
+ default:
1279
+ const parsedBody = parsedOutput.body;
1280
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1281
+ name: parsedBody.code || parsedBody.Code || errorCode,
1282
+ $fault: "client",
1283
+ $metadata: deserializeMetadata(output),
1284
+ });
1285
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1286
+ }
1287
+ };
1288
+ const deserializeAws_restJson1GetChangesetCommand = async (output, context) => {
1289
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1290
+ return deserializeAws_restJson1GetChangesetCommandError(output, context);
1291
+ }
1292
+ const contents = {
1293
+ $metadata: deserializeMetadata(output),
1294
+ activeFromTimestamp: undefined,
1295
+ activeUntilTimestamp: undefined,
1296
+ changeType: undefined,
1297
+ changesetArn: undefined,
1298
+ changesetId: undefined,
1299
+ createTime: undefined,
707
1300
  datasetId: undefined,
708
1301
  errorInfo: undefined,
709
1302
  formatParams: undefined,
@@ -831,19 +1424,425 @@ const deserializeAws_restJson1GetDatasetCommand = async (output, context) => {
831
1424
  if (data.kind !== undefined && data.kind !== null) {
832
1425
  contents.kind = smithy_client_1.expectString(data.kind);
833
1426
  }
834
- if (data.lastModifiedTime !== undefined && data.lastModifiedTime !== null) {
835
- contents.lastModifiedTime = smithy_client_1.expectLong(data.lastModifiedTime);
1427
+ if (data.lastModifiedTime !== undefined && data.lastModifiedTime !== null) {
1428
+ contents.lastModifiedTime = smithy_client_1.expectLong(data.lastModifiedTime);
1429
+ }
1430
+ if (data.schemaDefinition !== undefined && data.schemaDefinition !== null) {
1431
+ contents.schemaDefinition = deserializeAws_restJson1SchemaUnion(data.schemaDefinition, context);
1432
+ }
1433
+ if (data.status !== undefined && data.status !== null) {
1434
+ contents.status = smithy_client_1.expectString(data.status);
1435
+ }
1436
+ return Promise.resolve(contents);
1437
+ };
1438
+ exports.deserializeAws_restJson1GetDatasetCommand = deserializeAws_restJson1GetDatasetCommand;
1439
+ const deserializeAws_restJson1GetDatasetCommandError = async (output, context) => {
1440
+ const parsedOutput = {
1441
+ ...output,
1442
+ body: await parseBody(output.body, context),
1443
+ };
1444
+ let response;
1445
+ let errorCode = "UnknownError";
1446
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1447
+ switch (errorCode) {
1448
+ case "AccessDeniedException":
1449
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1450
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1451
+ case "ConflictException":
1452
+ case "com.amazonaws.finspacedata#ConflictException":
1453
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1454
+ case "InternalServerException":
1455
+ case "com.amazonaws.finspacedata#InternalServerException":
1456
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1457
+ case "ResourceNotFoundException":
1458
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1459
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1460
+ case "ThrottlingException":
1461
+ case "com.amazonaws.finspacedata#ThrottlingException":
1462
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1463
+ case "ValidationException":
1464
+ case "com.amazonaws.finspacedata#ValidationException":
1465
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1466
+ default:
1467
+ const parsedBody = parsedOutput.body;
1468
+ response = new FinspaceDataServiceException_1.FinspaceDataServiceException({
1469
+ name: parsedBody.code || parsedBody.Code || errorCode,
1470
+ $fault: "client",
1471
+ $metadata: deserializeMetadata(output),
1472
+ });
1473
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1474
+ }
1475
+ };
1476
+ const deserializeAws_restJson1GetDataViewCommand = async (output, context) => {
1477
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1478
+ return deserializeAws_restJson1GetDataViewCommandError(output, context);
1479
+ }
1480
+ const contents = {
1481
+ $metadata: deserializeMetadata(output),
1482
+ asOfTimestamp: undefined,
1483
+ autoUpdate: undefined,
1484
+ createTime: undefined,
1485
+ dataViewArn: undefined,
1486
+ dataViewId: undefined,
1487
+ datasetId: undefined,
1488
+ destinationTypeParams: undefined,
1489
+ errorInfo: undefined,
1490
+ lastModifiedTime: undefined,
1491
+ partitionColumns: undefined,
1492
+ sortColumns: undefined,
1493
+ status: undefined,
1494
+ };
1495
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1496
+ if (data.asOfTimestamp !== undefined && data.asOfTimestamp !== null) {
1497
+ contents.asOfTimestamp = smithy_client_1.expectLong(data.asOfTimestamp);
1498
+ }
1499
+ if (data.autoUpdate !== undefined && data.autoUpdate !== null) {
1500
+ contents.autoUpdate = smithy_client_1.expectBoolean(data.autoUpdate);
1501
+ }
1502
+ if (data.createTime !== undefined && data.createTime !== null) {
1503
+ contents.createTime = smithy_client_1.expectLong(data.createTime);
1504
+ }
1505
+ if (data.dataViewArn !== undefined && data.dataViewArn !== null) {
1506
+ contents.dataViewArn = smithy_client_1.expectString(data.dataViewArn);
1507
+ }
1508
+ if (data.dataViewId !== undefined && data.dataViewId !== null) {
1509
+ contents.dataViewId = smithy_client_1.expectString(data.dataViewId);
1510
+ }
1511
+ if (data.datasetId !== undefined && data.datasetId !== null) {
1512
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
1513
+ }
1514
+ if (data.destinationTypeParams !== undefined && data.destinationTypeParams !== null) {
1515
+ contents.destinationTypeParams = deserializeAws_restJson1DataViewDestinationTypeParams(data.destinationTypeParams, context);
1516
+ }
1517
+ if (data.errorInfo !== undefined && data.errorInfo !== null) {
1518
+ contents.errorInfo = deserializeAws_restJson1DataViewErrorInfo(data.errorInfo, context);
1519
+ }
1520
+ if (data.lastModifiedTime !== undefined && data.lastModifiedTime !== null) {
1521
+ contents.lastModifiedTime = smithy_client_1.expectLong(data.lastModifiedTime);
1522
+ }
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);
836
1829
  }
837
- if (data.schemaDefinition !== undefined && data.schemaDefinition !== null) {
838
- contents.schemaDefinition = deserializeAws_restJson1SchemaUnion(data.schemaDefinition, context);
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);
839
1838
  }
840
- if (data.status !== undefined && data.status !== null) {
841
- contents.status = smithy_client_1.expectString(data.status);
1839
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1840
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
842
1841
  }
843
1842
  return Promise.resolve(contents);
844
1843
  };
845
- exports.deserializeAws_restJson1GetDatasetCommand = deserializeAws_restJson1GetDatasetCommand;
846
- const deserializeAws_restJson1GetDatasetCommandError = async (output, context) => {
1844
+ exports.deserializeAws_restJson1ListDatasetsCommand = deserializeAws_restJson1ListDatasetsCommand;
1845
+ const deserializeAws_restJson1ListDatasetsCommandError = async (output, context) => {
847
1846
  const parsedOutput = {
848
1847
  ...output,
849
1848
  body: await parseBody(output.body, context),
@@ -852,9 +1851,6 @@ const deserializeAws_restJson1GetDatasetCommandError = async (output, context) =
852
1851
  let errorCode = "UnknownError";
853
1852
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
854
1853
  switch (errorCode) {
855
- case "AccessDeniedException":
856
- case "com.amazonaws.finspacedata#AccessDeniedException":
857
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
858
1854
  case "ConflictException":
859
1855
  case "com.amazonaws.finspacedata#ConflictException":
860
1856
  throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
@@ -880,66 +1876,26 @@ const deserializeAws_restJson1GetDatasetCommandError = async (output, context) =
880
1876
  throw smithy_client_1.decorateServiceException(response, parsedBody);
881
1877
  }
882
1878
  };
883
- const deserializeAws_restJson1GetDataViewCommand = async (output, context) => {
1879
+ const deserializeAws_restJson1ListDataViewsCommand = async (output, context) => {
884
1880
  if (output.statusCode !== 200 && output.statusCode >= 300) {
885
- return deserializeAws_restJson1GetDataViewCommandError(output, context);
1881
+ return deserializeAws_restJson1ListDataViewsCommandError(output, context);
886
1882
  }
887
1883
  const contents = {
888
1884
  $metadata: deserializeMetadata(output),
889
- asOfTimestamp: undefined,
890
- autoUpdate: undefined,
891
- createTime: undefined,
892
- dataViewArn: undefined,
893
- dataViewId: undefined,
894
- datasetId: undefined,
895
- destinationTypeParams: undefined,
896
- errorInfo: undefined,
897
- lastModifiedTime: undefined,
898
- partitionColumns: undefined,
899
- sortColumns: undefined,
900
- status: undefined,
1885
+ dataViews: undefined,
1886
+ nextToken: undefined,
901
1887
  };
902
1888
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
903
- if (data.asOfTimestamp !== undefined && data.asOfTimestamp !== null) {
904
- contents.asOfTimestamp = smithy_client_1.expectLong(data.asOfTimestamp);
905
- }
906
- if (data.autoUpdate !== undefined && data.autoUpdate !== null) {
907
- contents.autoUpdate = smithy_client_1.expectBoolean(data.autoUpdate);
908
- }
909
- if (data.createTime !== undefined && data.createTime !== null) {
910
- contents.createTime = smithy_client_1.expectLong(data.createTime);
911
- }
912
- if (data.dataViewArn !== undefined && data.dataViewArn !== null) {
913
- contents.dataViewArn = smithy_client_1.expectString(data.dataViewArn);
914
- }
915
- if (data.dataViewId !== undefined && data.dataViewId !== null) {
916
- contents.dataViewId = smithy_client_1.expectString(data.dataViewId);
917
- }
918
- if (data.datasetId !== undefined && data.datasetId !== null) {
919
- contents.datasetId = smithy_client_1.expectString(data.datasetId);
920
- }
921
- if (data.destinationTypeParams !== undefined && data.destinationTypeParams !== null) {
922
- contents.destinationTypeParams = deserializeAws_restJson1DataViewDestinationTypeParams(data.destinationTypeParams, context);
923
- }
924
- if (data.errorInfo !== undefined && data.errorInfo !== null) {
925
- contents.errorInfo = deserializeAws_restJson1DataViewErrorInfo(data.errorInfo, context);
926
- }
927
- if (data.lastModifiedTime !== undefined && data.lastModifiedTime !== null) {
928
- contents.lastModifiedTime = smithy_client_1.expectLong(data.lastModifiedTime);
929
- }
930
- if (data.partitionColumns !== undefined && data.partitionColumns !== null) {
931
- contents.partitionColumns = deserializeAws_restJson1PartitionColumnList(data.partitionColumns, context);
932
- }
933
- if (data.sortColumns !== undefined && data.sortColumns !== null) {
934
- contents.sortColumns = deserializeAws_restJson1SortColumnList(data.sortColumns, context);
1889
+ if (data.dataViews !== undefined && data.dataViews !== null) {
1890
+ contents.dataViews = deserializeAws_restJson1DataViewList(data.dataViews, context);
935
1891
  }
936
- if (data.status !== undefined && data.status !== null) {
937
- 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);
938
1894
  }
939
1895
  return Promise.resolve(contents);
940
1896
  };
941
- exports.deserializeAws_restJson1GetDataViewCommand = deserializeAws_restJson1GetDataViewCommand;
942
- const deserializeAws_restJson1GetDataViewCommandError = async (output, context) => {
1897
+ exports.deserializeAws_restJson1ListDataViewsCommand = deserializeAws_restJson1ListDataViewsCommand;
1898
+ const deserializeAws_restJson1ListDataViewsCommandError = async (output, context) => {
943
1899
  const parsedOutput = {
944
1900
  ...output,
945
1901
  body: await parseBody(output.body, context),
@@ -973,26 +1929,26 @@ const deserializeAws_restJson1GetDataViewCommandError = async (output, context)
973
1929
  throw smithy_client_1.decorateServiceException(response, parsedBody);
974
1930
  }
975
1931
  };
976
- const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = async (output, context) => {
1932
+ const deserializeAws_restJson1ListPermissionGroupsCommand = async (output, context) => {
977
1933
  if (output.statusCode !== 200 && output.statusCode >= 300) {
978
- return deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError(output, context);
1934
+ return deserializeAws_restJson1ListPermissionGroupsCommandError(output, context);
979
1935
  }
980
1936
  const contents = {
981
1937
  $metadata: deserializeMetadata(output),
982
- credentials: undefined,
983
- durationInMinutes: undefined,
1938
+ nextToken: undefined,
1939
+ permissionGroups: undefined,
984
1940
  };
985
1941
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
986
- if (data.credentials !== undefined && data.credentials !== null) {
987
- contents.credentials = deserializeAws_restJson1Credentials(data.credentials, context);
1942
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1943
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
988
1944
  }
989
- if (data.durationInMinutes !== undefined && data.durationInMinutes !== null) {
990
- contents.durationInMinutes = smithy_client_1.expectLong(data.durationInMinutes);
1945
+ if (data.permissionGroups !== undefined && data.permissionGroups !== null) {
1946
+ contents.permissionGroups = deserializeAws_restJson1PermissionGroupList(data.permissionGroups, context);
991
1947
  }
992
1948
  return Promise.resolve(contents);
993
1949
  };
994
- exports.deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand;
995
- const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = async (output, context) => {
1950
+ exports.deserializeAws_restJson1ListPermissionGroupsCommand = deserializeAws_restJson1ListPermissionGroupsCommand;
1951
+ const deserializeAws_restJson1ListPermissionGroupsCommandError = async (output, context) => {
996
1952
  const parsedOutput = {
997
1953
  ...output,
998
1954
  body: await parseBody(output.body, context),
@@ -1023,30 +1979,26 @@ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = asy
1023
1979
  throw smithy_client_1.decorateServiceException(response, parsedBody);
1024
1980
  }
1025
1981
  };
1026
- const deserializeAws_restJson1GetWorkingLocationCommand = async (output, context) => {
1982
+ const deserializeAws_restJson1ListUsersCommand = async (output, context) => {
1027
1983
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1028
- return deserializeAws_restJson1GetWorkingLocationCommandError(output, context);
1984
+ return deserializeAws_restJson1ListUsersCommandError(output, context);
1029
1985
  }
1030
1986
  const contents = {
1031
1987
  $metadata: deserializeMetadata(output),
1032
- s3Bucket: undefined,
1033
- s3Path: undefined,
1034
- s3Uri: undefined,
1988
+ nextToken: undefined,
1989
+ users: undefined,
1035
1990
  };
1036
1991
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1037
- if (data.s3Bucket !== undefined && data.s3Bucket !== null) {
1038
- contents.s3Bucket = smithy_client_1.expectString(data.s3Bucket);
1039
- }
1040
- if (data.s3Path !== undefined && data.s3Path !== null) {
1041
- 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);
1042
1994
  }
1043
- if (data.s3Uri !== undefined && data.s3Uri !== null) {
1044
- contents.s3Uri = smithy_client_1.expectString(data.s3Uri);
1995
+ if (data.users !== undefined && data.users !== null) {
1996
+ contents.users = deserializeAws_restJson1UserList(data.users, context);
1045
1997
  }
1046
1998
  return Promise.resolve(contents);
1047
1999
  };
1048
- exports.deserializeAws_restJson1GetWorkingLocationCommand = deserializeAws_restJson1GetWorkingLocationCommand;
1049
- const deserializeAws_restJson1GetWorkingLocationCommandError = async (output, context) => {
2000
+ exports.deserializeAws_restJson1ListUsersCommand = deserializeAws_restJson1ListUsersCommand;
2001
+ const deserializeAws_restJson1ListUsersCommandError = async (output, context) => {
1050
2002
  const parsedOutput = {
1051
2003
  ...output,
1052
2004
  body: await parseBody(output.body, context),
@@ -1077,26 +2029,26 @@ const deserializeAws_restJson1GetWorkingLocationCommandError = async (output, co
1077
2029
  throw smithy_client_1.decorateServiceException(response, parsedBody);
1078
2030
  }
1079
2031
  };
1080
- const deserializeAws_restJson1ListChangesetsCommand = async (output, context) => {
2032
+ const deserializeAws_restJson1ResetUserPasswordCommand = async (output, context) => {
1081
2033
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1082
- return deserializeAws_restJson1ListChangesetsCommandError(output, context);
2034
+ return deserializeAws_restJson1ResetUserPasswordCommandError(output, context);
1083
2035
  }
1084
2036
  const contents = {
1085
2037
  $metadata: deserializeMetadata(output),
1086
- changesets: undefined,
1087
- nextToken: undefined,
2038
+ temporaryPassword: undefined,
2039
+ userId: undefined,
1088
2040
  };
1089
2041
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1090
- if (data.changesets !== undefined && data.changesets !== null) {
1091
- contents.changesets = deserializeAws_restJson1ChangesetList(data.changesets, context);
2042
+ if (data.temporaryPassword !== undefined && data.temporaryPassword !== null) {
2043
+ contents.temporaryPassword = smithy_client_1.expectString(data.temporaryPassword);
1092
2044
  }
1093
- if (data.nextToken !== undefined && data.nextToken !== null) {
1094
- 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);
1095
2047
  }
1096
2048
  return Promise.resolve(contents);
1097
2049
  };
1098
- exports.deserializeAws_restJson1ListChangesetsCommand = deserializeAws_restJson1ListChangesetsCommand;
1099
- const deserializeAws_restJson1ListChangesetsCommandError = async (output, context) => {
2050
+ exports.deserializeAws_restJson1ResetUserPasswordCommand = deserializeAws_restJson1ResetUserPasswordCommand;
2051
+ const deserializeAws_restJson1ResetUserPasswordCommandError = async (output, context) => {
1100
2052
  const parsedOutput = {
1101
2053
  ...output,
1102
2054
  body: await parseBody(output.body, context),
@@ -1133,26 +2085,26 @@ const deserializeAws_restJson1ListChangesetsCommandError = async (output, contex
1133
2085
  throw smithy_client_1.decorateServiceException(response, parsedBody);
1134
2086
  }
1135
2087
  };
1136
- const deserializeAws_restJson1ListDatasetsCommand = async (output, context) => {
2088
+ const deserializeAws_restJson1UpdateChangesetCommand = async (output, context) => {
1137
2089
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1138
- return deserializeAws_restJson1ListDatasetsCommandError(output, context);
2090
+ return deserializeAws_restJson1UpdateChangesetCommandError(output, context);
1139
2091
  }
1140
2092
  const contents = {
1141
2093
  $metadata: deserializeMetadata(output),
1142
- datasets: undefined,
1143
- nextToken: undefined,
2094
+ changesetId: undefined,
2095
+ datasetId: undefined,
1144
2096
  };
1145
2097
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1146
- if (data.datasets !== undefined && data.datasets !== null) {
1147
- contents.datasets = deserializeAws_restJson1DatasetList(data.datasets, context);
2098
+ if (data.changesetId !== undefined && data.changesetId !== null) {
2099
+ contents.changesetId = smithy_client_1.expectString(data.changesetId);
1148
2100
  }
1149
- if (data.nextToken !== undefined && data.nextToken !== null) {
1150
- 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);
1151
2103
  }
1152
2104
  return Promise.resolve(contents);
1153
2105
  };
1154
- exports.deserializeAws_restJson1ListDatasetsCommand = deserializeAws_restJson1ListDatasetsCommand;
1155
- const deserializeAws_restJson1ListDatasetsCommandError = async (output, context) => {
2106
+ exports.deserializeAws_restJson1UpdateChangesetCommand = deserializeAws_restJson1UpdateChangesetCommand;
2107
+ const deserializeAws_restJson1UpdateChangesetCommandError = async (output, context) => {
1156
2108
  const parsedOutput = {
1157
2109
  ...output,
1158
2110
  body: await parseBody(output.body, context),
@@ -1161,6 +2113,9 @@ const deserializeAws_restJson1ListDatasetsCommandError = async (output, context)
1161
2113
  let errorCode = "UnknownError";
1162
2114
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1163
2115
  switch (errorCode) {
2116
+ case "AccessDeniedException":
2117
+ case "com.amazonaws.finspacedata#AccessDeniedException":
2118
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1164
2119
  case "ConflictException":
1165
2120
  case "com.amazonaws.finspacedata#ConflictException":
1166
2121
  throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
@@ -1186,26 +2141,22 @@ const deserializeAws_restJson1ListDatasetsCommandError = async (output, context)
1186
2141
  throw smithy_client_1.decorateServiceException(response, parsedBody);
1187
2142
  }
1188
2143
  };
1189
- const deserializeAws_restJson1ListDataViewsCommand = async (output, context) => {
2144
+ const deserializeAws_restJson1UpdateDatasetCommand = async (output, context) => {
1190
2145
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1191
- return deserializeAws_restJson1ListDataViewsCommandError(output, context);
2146
+ return deserializeAws_restJson1UpdateDatasetCommandError(output, context);
1192
2147
  }
1193
2148
  const contents = {
1194
2149
  $metadata: deserializeMetadata(output),
1195
- dataViews: undefined,
1196
- nextToken: undefined,
2150
+ datasetId: undefined,
1197
2151
  };
1198
2152
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1199
- if (data.dataViews !== undefined && data.dataViews !== null) {
1200
- contents.dataViews = deserializeAws_restJson1DataViewList(data.dataViews, context);
1201
- }
1202
- if (data.nextToken !== undefined && data.nextToken !== null) {
1203
- 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);
1204
2155
  }
1205
2156
  return Promise.resolve(contents);
1206
2157
  };
1207
- exports.deserializeAws_restJson1ListDataViewsCommand = deserializeAws_restJson1ListDataViewsCommand;
1208
- const deserializeAws_restJson1ListDataViewsCommandError = async (output, context) => {
2158
+ exports.deserializeAws_restJson1UpdateDatasetCommand = deserializeAws_restJson1UpdateDatasetCommand;
2159
+ const deserializeAws_restJson1UpdateDatasetCommandError = async (output, context) => {
1209
2160
  const parsedOutput = {
1210
2161
  ...output,
1211
2162
  body: await parseBody(output.body, context),
@@ -1214,6 +2165,9 @@ const deserializeAws_restJson1ListDataViewsCommandError = async (output, context
1214
2165
  let errorCode = "UnknownError";
1215
2166
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1216
2167
  switch (errorCode) {
2168
+ case "AccessDeniedException":
2169
+ case "com.amazonaws.finspacedata#AccessDeniedException":
2170
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1217
2171
  case "ConflictException":
1218
2172
  case "com.amazonaws.finspacedata#ConflictException":
1219
2173
  throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
@@ -1239,26 +2193,22 @@ const deserializeAws_restJson1ListDataViewsCommandError = async (output, context
1239
2193
  throw smithy_client_1.decorateServiceException(response, parsedBody);
1240
2194
  }
1241
2195
  };
1242
- const deserializeAws_restJson1UpdateChangesetCommand = async (output, context) => {
2196
+ const deserializeAws_restJson1UpdatePermissionGroupCommand = async (output, context) => {
1243
2197
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1244
- return deserializeAws_restJson1UpdateChangesetCommandError(output, context);
2198
+ return deserializeAws_restJson1UpdatePermissionGroupCommandError(output, context);
1245
2199
  }
1246
2200
  const contents = {
1247
2201
  $metadata: deserializeMetadata(output),
1248
- changesetId: undefined,
1249
- datasetId: undefined,
2202
+ permissionGroupId: undefined,
1250
2203
  };
1251
2204
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1252
- if (data.changesetId !== undefined && data.changesetId !== null) {
1253
- contents.changesetId = smithy_client_1.expectString(data.changesetId);
1254
- }
1255
- if (data.datasetId !== undefined && data.datasetId !== null) {
1256
- 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);
1257
2207
  }
1258
2208
  return Promise.resolve(contents);
1259
2209
  };
1260
- exports.deserializeAws_restJson1UpdateChangesetCommand = deserializeAws_restJson1UpdateChangesetCommand;
1261
- const deserializeAws_restJson1UpdateChangesetCommandError = async (output, context) => {
2210
+ exports.deserializeAws_restJson1UpdatePermissionGroupCommand = deserializeAws_restJson1UpdatePermissionGroupCommand;
2211
+ const deserializeAws_restJson1UpdatePermissionGroupCommandError = async (output, context) => {
1262
2212
  const parsedOutput = {
1263
2213
  ...output,
1264
2214
  body: await parseBody(output.body, context),
@@ -1295,22 +2245,22 @@ const deserializeAws_restJson1UpdateChangesetCommandError = async (output, conte
1295
2245
  throw smithy_client_1.decorateServiceException(response, parsedBody);
1296
2246
  }
1297
2247
  };
1298
- const deserializeAws_restJson1UpdateDatasetCommand = async (output, context) => {
2248
+ const deserializeAws_restJson1UpdateUserCommand = async (output, context) => {
1299
2249
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1300
- return deserializeAws_restJson1UpdateDatasetCommandError(output, context);
2250
+ return deserializeAws_restJson1UpdateUserCommandError(output, context);
1301
2251
  }
1302
2252
  const contents = {
1303
2253
  $metadata: deserializeMetadata(output),
1304
- datasetId: undefined,
2254
+ userId: undefined,
1305
2255
  };
1306
2256
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1307
- if (data.datasetId !== undefined && data.datasetId !== null) {
1308
- 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);
1309
2259
  }
1310
2260
  return Promise.resolve(contents);
1311
2261
  };
1312
- exports.deserializeAws_restJson1UpdateDatasetCommand = deserializeAws_restJson1UpdateDatasetCommand;
1313
- const deserializeAws_restJson1UpdateDatasetCommandError = async (output, context) => {
2262
+ exports.deserializeAws_restJson1UpdateUserCommand = deserializeAws_restJson1UpdateUserCommand;
2263
+ const deserializeAws_restJson1UpdateUserCommandError = async (output, context) => {
1314
2264
  const parsedOutput = {
1315
2265
  ...output,
1316
2266
  body: await parseBody(output.body, context),
@@ -1365,6 +2315,9 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
1365
2315
  if (data.message !== undefined && data.message !== null) {
1366
2316
  contents.message = smithy_client_1.expectString(data.message);
1367
2317
  }
2318
+ if (data.reason !== undefined && data.reason !== null) {
2319
+ contents.reason = smithy_client_1.expectString(data.reason);
2320
+ }
1368
2321
  const exception = new models_0_1.ConflictException({
1369
2322
  $metadata: deserializeMetadata(parsedOutput),
1370
2323
  ...contents,
@@ -1401,6 +2354,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
1401
2354
  if (data.message !== undefined && data.message !== null) {
1402
2355
  contents.message = smithy_client_1.expectString(data.message);
1403
2356
  }
2357
+ if (data.reason !== undefined && data.reason !== null) {
2358
+ contents.reason = smithy_client_1.expectString(data.reason);
2359
+ }
1404
2360
  const exception = new models_0_1.ResourceNotFoundException({
1405
2361
  $metadata: deserializeMetadata(parsedOutput),
1406
2362
  ...contents,
@@ -1422,12 +2378,25 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
1422
2378
  if (data.message !== undefined && data.message !== null) {
1423
2379
  contents.message = smithy_client_1.expectString(data.message);
1424
2380
  }
2381
+ if (data.reason !== undefined && data.reason !== null) {
2382
+ contents.reason = smithy_client_1.expectString(data.reason);
2383
+ }
1425
2384
  const exception = new models_0_1.ValidationException({
1426
2385
  $metadata: deserializeMetadata(parsedOutput),
1427
2386
  ...contents,
1428
2387
  });
1429
2388
  return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1430
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
+ });
2399
+ };
1431
2400
  const serializeAws_restJson1ColumnDefinition = (input, context) => {
1432
2401
  return {
1433
2402
  ...(input.columnDescription !== undefined &&
@@ -1573,6 +2542,17 @@ const serializeAws_restJson1SourceParams = (input, context) => {
1573
2542
  };
1574
2543
  }, {});
1575
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
+ };
1576
2556
  const deserializeAws_restJson1ChangesetErrorInfo = (output, context) => {
1577
2557
  return {
1578
2558
  errorCategory: smithy_client_1.expectString(output.errorCategory),
@@ -1757,6 +2737,29 @@ const deserializeAws_restJson1PartitionColumnList = (output, context) => {
1757
2737
  });
1758
2738
  return retVal;
1759
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;
2762
+ };
1760
2763
  const deserializeAws_restJson1S3DestinationFormatOptions = (output, context) => {
1761
2764
  return Object.entries(output).reduce((acc, [key, value]) => {
1762
2765
  if (value === null) {
@@ -1807,6 +2810,34 @@ const deserializeAws_restJson1SourceParams = (output, context) => {
1807
2810
  };
1808
2811
  }, {});
1809
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
+ };
1810
2841
  const deserializeMetadata = (output) => {
1811
2842
  var _a;
1812
2843
  return ({