@aws-sdk/client-finspace-data 3.39.0 → 3.43.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 (104) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +1 -1
  3. package/dist-cjs/FinspaceData.js +165 -0
  4. package/dist-cjs/commands/CreateDataViewCommand.js +36 -0
  5. package/dist-cjs/commands/CreateDatasetCommand.js +36 -0
  6. package/dist-cjs/commands/DeleteDatasetCommand.js +36 -0
  7. package/dist-cjs/commands/GetChangesetCommand.js +36 -0
  8. package/dist-cjs/commands/GetDataViewCommand.js +36 -0
  9. package/dist-cjs/commands/GetDatasetCommand.js +36 -0
  10. package/dist-cjs/commands/ListChangesetsCommand.js +36 -0
  11. package/dist-cjs/commands/ListDataViewsCommand.js +36 -0
  12. package/dist-cjs/commands/ListDatasetsCommand.js +36 -0
  13. package/dist-cjs/commands/UpdateChangesetCommand.js +36 -0
  14. package/dist-cjs/commands/UpdateDatasetCommand.js +36 -0
  15. package/dist-cjs/commands/index.js +11 -0
  16. package/dist-cjs/endpoints.js +74 -5
  17. package/dist-cjs/index.js +1 -0
  18. package/dist-cjs/models/models_0.js +275 -43
  19. package/dist-cjs/pagination/Interfaces.js +2 -0
  20. package/dist-cjs/pagination/ListChangesetsPaginator.js +35 -0
  21. package/dist-cjs/pagination/ListDataViewsPaginator.js +35 -0
  22. package/dist-cjs/pagination/ListDatasetsPaginator.js +35 -0
  23. package/dist-cjs/pagination/index.js +7 -0
  24. package/dist-cjs/protocols/Aws_restJson1.js +1873 -60
  25. package/dist-cjs/runtimeConfig.browser.js +6 -3
  26. package/dist-cjs/runtimeConfig.js +5 -3
  27. package/dist-es/FinspaceData.js +165 -0
  28. package/dist-es/commands/CreateDataViewCommand.js +39 -0
  29. package/dist-es/commands/CreateDatasetCommand.js +39 -0
  30. package/dist-es/commands/DeleteDatasetCommand.js +39 -0
  31. package/dist-es/commands/GetChangesetCommand.js +39 -0
  32. package/dist-es/commands/GetDataViewCommand.js +39 -0
  33. package/dist-es/commands/GetDatasetCommand.js +39 -0
  34. package/dist-es/commands/ListChangesetsCommand.js +39 -0
  35. package/dist-es/commands/ListDataViewsCommand.js +39 -0
  36. package/dist-es/commands/ListDatasetsCommand.js +39 -0
  37. package/dist-es/commands/UpdateChangesetCommand.js +39 -0
  38. package/dist-es/commands/UpdateDatasetCommand.js +39 -0
  39. package/dist-es/commands/index.js +11 -0
  40. package/dist-es/endpoints.js +74 -5
  41. package/dist-es/index.js +1 -0
  42. package/dist-es/models/models_0.js +201 -38
  43. package/dist-es/pagination/Interfaces.js +1 -0
  44. package/dist-es/pagination/ListChangesetsPaginator.js +74 -0
  45. package/dist-es/pagination/ListDataViewsPaginator.js +74 -0
  46. package/dist-es/pagination/ListDatasetsPaginator.js +74 -0
  47. package/dist-es/pagination/index.js +4 -0
  48. package/dist-es/protocols/Aws_restJson1.js +2074 -104
  49. package/dist-es/runtimeConfig.browser.js +3 -2
  50. package/dist-es/runtimeConfig.js +3 -3
  51. package/dist-types/FinspaceData.d.ts +82 -5
  52. package/dist-types/FinspaceDataClient.d.ts +22 -3
  53. package/dist-types/commands/CreateChangesetCommand.d.ts +2 -2
  54. package/dist-types/commands/CreateDataViewCommand.d.ts +35 -0
  55. package/dist-types/commands/CreateDatasetCommand.d.ts +35 -0
  56. package/dist-types/commands/DeleteDatasetCommand.d.ts +35 -0
  57. package/dist-types/commands/GetChangesetCommand.d.ts +35 -0
  58. package/dist-types/commands/GetDataViewCommand.d.ts +35 -0
  59. package/dist-types/commands/GetDatasetCommand.d.ts +35 -0
  60. package/dist-types/commands/GetProgrammaticAccessCredentialsCommand.d.ts +2 -2
  61. package/dist-types/commands/GetWorkingLocationCommand.d.ts +3 -3
  62. package/dist-types/commands/ListChangesetsCommand.d.ts +35 -0
  63. package/dist-types/commands/ListDataViewsCommand.d.ts +35 -0
  64. package/dist-types/commands/ListDatasetsCommand.d.ts +35 -0
  65. package/dist-types/commands/UpdateChangesetCommand.d.ts +35 -0
  66. package/dist-types/commands/UpdateDatasetCommand.d.ts +35 -0
  67. package/dist-types/commands/index.d.ts +11 -0
  68. package/dist-types/index.d.ts +1 -0
  69. package/dist-types/models/models_0.d.ts +1419 -242
  70. package/dist-types/pagination/Interfaces.d.ts +6 -0
  71. package/dist-types/pagination/ListChangesetsPaginator.d.ts +4 -0
  72. package/dist-types/pagination/ListDataViewsPaginator.d.ts +4 -0
  73. package/dist-types/pagination/ListDatasetsPaginator.d.ts +4 -0
  74. package/dist-types/pagination/index.d.ts +4 -0
  75. package/dist-types/protocols/Aws_restJson1.d.ts +33 -0
  76. package/dist-types/runtimeConfig.browser.d.ts +2 -0
  77. package/dist-types/runtimeConfig.d.ts +2 -0
  78. package/dist-types/runtimeConfig.native.d.ts +2 -0
  79. package/dist-types/ts3.4/FinspaceData.d.ts +55 -0
  80. package/dist-types/ts3.4/FinspaceDataClient.d.ts +17 -2
  81. package/dist-types/ts3.4/commands/CreateDataViewCommand.d.ts +17 -0
  82. package/dist-types/ts3.4/commands/CreateDatasetCommand.d.ts +17 -0
  83. package/dist-types/ts3.4/commands/DeleteDatasetCommand.d.ts +17 -0
  84. package/dist-types/ts3.4/commands/GetChangesetCommand.d.ts +17 -0
  85. package/dist-types/ts3.4/commands/GetDataViewCommand.d.ts +17 -0
  86. package/dist-types/ts3.4/commands/GetDatasetCommand.d.ts +17 -0
  87. package/dist-types/ts3.4/commands/ListChangesetsCommand.d.ts +17 -0
  88. package/dist-types/ts3.4/commands/ListDataViewsCommand.d.ts +17 -0
  89. package/dist-types/ts3.4/commands/ListDatasetsCommand.d.ts +17 -0
  90. package/dist-types/ts3.4/commands/UpdateChangesetCommand.d.ts +17 -0
  91. package/dist-types/ts3.4/commands/UpdateDatasetCommand.d.ts +17 -0
  92. package/dist-types/ts3.4/commands/index.d.ts +11 -0
  93. package/dist-types/ts3.4/index.d.ts +1 -0
  94. package/dist-types/ts3.4/models/models_0.d.ts +594 -72
  95. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  96. package/dist-types/ts3.4/pagination/ListChangesetsPaginator.d.ts +4 -0
  97. package/dist-types/ts3.4/pagination/ListDataViewsPaginator.d.ts +4 -0
  98. package/dist-types/ts3.4/pagination/ListDatasetsPaginator.d.ts +4 -0
  99. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  100. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +33 -0
  101. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  102. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  103. package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  104. package/package.json +26 -24
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1GetWorkingLocationCommand = exports.deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = exports.deserializeAws_restJson1CreateChangesetCommand = exports.serializeAws_restJson1GetWorkingLocationCommand = exports.serializeAws_restJson1GetProgrammaticAccessCredentialsCommand = exports.serializeAws_restJson1CreateChangesetCommand = void 0;
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;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const uuid_1 = require("uuid");
6
7
  const serializeAws_restJson1CreateChangesetCommand = async (input, context) => {
8
+ var _a;
7
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
10
  const headers = {
9
11
  "content-type": "application/json",
10
12
  };
11
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{datasetId}/changesets";
13
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{datasetId}/changesetsv2";
12
14
  if (input.datasetId !== undefined) {
13
15
  const labelValue = input.datasetId;
14
16
  if (labelValue.length <= 0) {
@@ -22,14 +24,11 @@ const serializeAws_restJson1CreateChangesetCommand = async (input, context) => {
22
24
  let body;
23
25
  body = JSON.stringify({
24
26
  ...(input.changeType !== undefined && input.changeType !== null && { changeType: input.changeType }),
27
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
25
28
  ...(input.formatParams !== undefined &&
26
- input.formatParams !== null && { formatParams: serializeAws_restJson1stringMap(input.formatParams, context) }),
27
- ...(input.formatType !== undefined && input.formatType !== null && { formatType: input.formatType }),
29
+ input.formatParams !== null && { formatParams: serializeAws_restJson1FormatParams(input.formatParams, context) }),
28
30
  ...(input.sourceParams !== undefined &&
29
- input.sourceParams !== null && { sourceParams: serializeAws_restJson1stringMap(input.sourceParams, context) }),
30
- ...(input.sourceType !== undefined && input.sourceType !== null && { sourceType: input.sourceType }),
31
- ...(input.tags !== undefined &&
32
- input.tags !== null && { tags: serializeAws_restJson1stringMap(input.tags, context) }),
31
+ input.sourceParams !== null && { sourceParams: serializeAws_restJson1SourceParams(input.sourceParams, context) }),
33
32
  });
34
33
  return new protocol_http_1.HttpRequest({
35
34
  protocol,
@@ -42,6 +41,217 @@ const serializeAws_restJson1CreateChangesetCommand = async (input, context) => {
42
41
  });
43
42
  };
44
43
  exports.serializeAws_restJson1CreateChangesetCommand = serializeAws_restJson1CreateChangesetCommand;
44
+ const serializeAws_restJson1CreateDatasetCommand = async (input, context) => {
45
+ var _a;
46
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
47
+ const headers = {
48
+ "content-type": "application/json",
49
+ };
50
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasetsv2";
51
+ let body;
52
+ body = JSON.stringify({
53
+ ...(input.alias !== undefined && input.alias !== null && { alias: input.alias }),
54
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
55
+ ...(input.datasetDescription !== undefined &&
56
+ input.datasetDescription !== null && { datasetDescription: input.datasetDescription }),
57
+ ...(input.datasetTitle !== undefined && input.datasetTitle !== null && { datasetTitle: input.datasetTitle }),
58
+ ...(input.kind !== undefined && input.kind !== null && { kind: input.kind }),
59
+ ...(input.ownerInfo !== undefined &&
60
+ input.ownerInfo !== null && { ownerInfo: serializeAws_restJson1DatasetOwnerInfo(input.ownerInfo, context) }),
61
+ ...(input.permissionGroupParams !== undefined &&
62
+ input.permissionGroupParams !== null && {
63
+ permissionGroupParams: serializeAws_restJson1PermissionGroupParams(input.permissionGroupParams, context),
64
+ }),
65
+ ...(input.schemaDefinition !== undefined &&
66
+ input.schemaDefinition !== null && {
67
+ schemaDefinition: serializeAws_restJson1SchemaUnion(input.schemaDefinition, context),
68
+ }),
69
+ });
70
+ return new protocol_http_1.HttpRequest({
71
+ protocol,
72
+ hostname,
73
+ port,
74
+ method: "POST",
75
+ headers,
76
+ path: resolvedPath,
77
+ body,
78
+ });
79
+ };
80
+ exports.serializeAws_restJson1CreateDatasetCommand = serializeAws_restJson1CreateDatasetCommand;
81
+ const serializeAws_restJson1CreateDataViewCommand = async (input, context) => {
82
+ var _a;
83
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const headers = {
85
+ "content-type": "application/json",
86
+ };
87
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{datasetId}/dataviewsv2";
88
+ if (input.datasetId !== undefined) {
89
+ const labelValue = input.datasetId;
90
+ if (labelValue.length <= 0) {
91
+ throw new Error("Empty value provided for input HTTP label: datasetId.");
92
+ }
93
+ resolvedPath = resolvedPath.replace("{datasetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
94
+ }
95
+ else {
96
+ throw new Error("No value provided for input HTTP label: datasetId.");
97
+ }
98
+ let body;
99
+ body = JSON.stringify({
100
+ ...(input.asOfTimestamp !== undefined && input.asOfTimestamp !== null && { asOfTimestamp: input.asOfTimestamp }),
101
+ ...(input.autoUpdate !== undefined && input.autoUpdate !== null && { autoUpdate: input.autoUpdate }),
102
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
103
+ ...(input.destinationTypeParams !== undefined &&
104
+ input.destinationTypeParams !== null && {
105
+ destinationTypeParams: serializeAws_restJson1DataViewDestinationTypeParams(input.destinationTypeParams, context),
106
+ }),
107
+ ...(input.partitionColumns !== undefined &&
108
+ input.partitionColumns !== null && {
109
+ partitionColumns: serializeAws_restJson1PartitionColumnList(input.partitionColumns, context),
110
+ }),
111
+ ...(input.sortColumns !== undefined &&
112
+ input.sortColumns !== null && { sortColumns: serializeAws_restJson1SortColumnList(input.sortColumns, context) }),
113
+ });
114
+ return new protocol_http_1.HttpRequest({
115
+ protocol,
116
+ hostname,
117
+ port,
118
+ method: "POST",
119
+ headers,
120
+ path: resolvedPath,
121
+ body,
122
+ });
123
+ };
124
+ exports.serializeAws_restJson1CreateDataViewCommand = serializeAws_restJson1CreateDataViewCommand;
125
+ const serializeAws_restJson1DeleteDatasetCommand = async (input, context) => {
126
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
127
+ const headers = {};
128
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasetsv2/{datasetId}";
129
+ if (input.datasetId !== undefined) {
130
+ const labelValue = input.datasetId;
131
+ if (labelValue.length <= 0) {
132
+ throw new Error("Empty value provided for input HTTP label: datasetId.");
133
+ }
134
+ resolvedPath = resolvedPath.replace("{datasetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
135
+ }
136
+ else {
137
+ throw new Error("No value provided for input HTTP label: datasetId.");
138
+ }
139
+ const query = {
140
+ ...(input.clientToken !== undefined && { clientToken: input.clientToken }),
141
+ };
142
+ let body;
143
+ return new protocol_http_1.HttpRequest({
144
+ protocol,
145
+ hostname,
146
+ port,
147
+ method: "DELETE",
148
+ headers,
149
+ path: resolvedPath,
150
+ query,
151
+ body,
152
+ });
153
+ };
154
+ exports.serializeAws_restJson1DeleteDatasetCommand = serializeAws_restJson1DeleteDatasetCommand;
155
+ const serializeAws_restJson1GetChangesetCommand = async (input, context) => {
156
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const headers = {};
158
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
159
+ "/datasets/{datasetId}/changesetsv2/{changesetId}";
160
+ if (input.datasetId !== undefined) {
161
+ const labelValue = input.datasetId;
162
+ if (labelValue.length <= 0) {
163
+ throw new Error("Empty value provided for input HTTP label: datasetId.");
164
+ }
165
+ resolvedPath = resolvedPath.replace("{datasetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
166
+ }
167
+ else {
168
+ throw new Error("No value provided for input HTTP label: datasetId.");
169
+ }
170
+ if (input.changesetId !== undefined) {
171
+ const labelValue = input.changesetId;
172
+ if (labelValue.length <= 0) {
173
+ throw new Error("Empty value provided for input HTTP label: changesetId.");
174
+ }
175
+ resolvedPath = resolvedPath.replace("{changesetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
176
+ }
177
+ else {
178
+ throw new Error("No value provided for input HTTP label: changesetId.");
179
+ }
180
+ let body;
181
+ return new protocol_http_1.HttpRequest({
182
+ protocol,
183
+ hostname,
184
+ port,
185
+ method: "GET",
186
+ headers,
187
+ path: resolvedPath,
188
+ body,
189
+ });
190
+ };
191
+ exports.serializeAws_restJson1GetChangesetCommand = serializeAws_restJson1GetChangesetCommand;
192
+ const serializeAws_restJson1GetDatasetCommand = async (input, context) => {
193
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
194
+ const headers = {};
195
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasetsv2/{datasetId}";
196
+ if (input.datasetId !== undefined) {
197
+ const labelValue = input.datasetId;
198
+ if (labelValue.length <= 0) {
199
+ throw new Error("Empty value provided for input HTTP label: datasetId.");
200
+ }
201
+ resolvedPath = resolvedPath.replace("{datasetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
202
+ }
203
+ else {
204
+ throw new Error("No value provided for input HTTP label: datasetId.");
205
+ }
206
+ let body;
207
+ return new protocol_http_1.HttpRequest({
208
+ protocol,
209
+ hostname,
210
+ port,
211
+ method: "GET",
212
+ headers,
213
+ path: resolvedPath,
214
+ body,
215
+ });
216
+ };
217
+ exports.serializeAws_restJson1GetDatasetCommand = serializeAws_restJson1GetDatasetCommand;
218
+ const serializeAws_restJson1GetDataViewCommand = async (input, context) => {
219
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
220
+ const headers = {};
221
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
222
+ "/datasets/{datasetId}/dataviewsv2/{dataViewId}";
223
+ if (input.dataViewId !== undefined) {
224
+ const labelValue = input.dataViewId;
225
+ if (labelValue.length <= 0) {
226
+ throw new Error("Empty value provided for input HTTP label: dataViewId.");
227
+ }
228
+ resolvedPath = resolvedPath.replace("{dataViewId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
229
+ }
230
+ else {
231
+ throw new Error("No value provided for input HTTP label: dataViewId.");
232
+ }
233
+ if (input.datasetId !== undefined) {
234
+ const labelValue = input.datasetId;
235
+ if (labelValue.length <= 0) {
236
+ throw new Error("Empty value provided for input HTTP label: datasetId.");
237
+ }
238
+ resolvedPath = resolvedPath.replace("{datasetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
239
+ }
240
+ else {
241
+ throw new Error("No value provided for input HTTP label: datasetId.");
242
+ }
243
+ let body;
244
+ return new protocol_http_1.HttpRequest({
245
+ protocol,
246
+ hostname,
247
+ port,
248
+ method: "GET",
249
+ headers,
250
+ path: resolvedPath,
251
+ body,
252
+ });
253
+ };
254
+ exports.serializeAws_restJson1GetDataViewCommand = serializeAws_restJson1GetDataViewCommand;
45
255
  const serializeAws_restJson1GetProgrammaticAccessCredentialsCommand = async (input, context) => {
46
256
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
47
257
  const headers = {};
@@ -83,23 +293,1294 @@ const serializeAws_restJson1GetWorkingLocationCommand = async (input, context) =
83
293
  body,
84
294
  });
85
295
  };
86
- exports.serializeAws_restJson1GetWorkingLocationCommand = serializeAws_restJson1GetWorkingLocationCommand;
87
- const deserializeAws_restJson1CreateChangesetCommand = async (output, context) => {
296
+ exports.serializeAws_restJson1GetWorkingLocationCommand = serializeAws_restJson1GetWorkingLocationCommand;
297
+ const serializeAws_restJson1ListChangesetsCommand = async (input, context) => {
298
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
299
+ const headers = {};
300
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{datasetId}/changesetsv2";
301
+ if (input.datasetId !== undefined) {
302
+ const labelValue = input.datasetId;
303
+ if (labelValue.length <= 0) {
304
+ throw new Error("Empty value provided for input HTTP label: datasetId.");
305
+ }
306
+ resolvedPath = resolvedPath.replace("{datasetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
307
+ }
308
+ else {
309
+ throw new Error("No value provided for input HTTP label: datasetId.");
310
+ }
311
+ const query = {
312
+ ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
313
+ ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
314
+ };
315
+ let body;
316
+ return new protocol_http_1.HttpRequest({
317
+ protocol,
318
+ hostname,
319
+ port,
320
+ method: "GET",
321
+ headers,
322
+ path: resolvedPath,
323
+ query,
324
+ body,
325
+ });
326
+ };
327
+ exports.serializeAws_restJson1ListChangesetsCommand = serializeAws_restJson1ListChangesetsCommand;
328
+ const serializeAws_restJson1ListDatasetsCommand = async (input, context) => {
329
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
330
+ const headers = {};
331
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasetsv2";
332
+ const query = {
333
+ ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
334
+ ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
335
+ };
336
+ let body;
337
+ return new protocol_http_1.HttpRequest({
338
+ protocol,
339
+ hostname,
340
+ port,
341
+ method: "GET",
342
+ headers,
343
+ path: resolvedPath,
344
+ query,
345
+ body,
346
+ });
347
+ };
348
+ exports.serializeAws_restJson1ListDatasetsCommand = serializeAws_restJson1ListDatasetsCommand;
349
+ const serializeAws_restJson1ListDataViewsCommand = async (input, context) => {
350
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
351
+ const headers = {};
352
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{datasetId}/dataviewsv2";
353
+ if (input.datasetId !== undefined) {
354
+ const labelValue = input.datasetId;
355
+ if (labelValue.length <= 0) {
356
+ throw new Error("Empty value provided for input HTTP label: datasetId.");
357
+ }
358
+ resolvedPath = resolvedPath.replace("{datasetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
359
+ }
360
+ else {
361
+ throw new Error("No value provided for input HTTP label: datasetId.");
362
+ }
363
+ const query = {
364
+ ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
365
+ ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
366
+ };
367
+ let body;
368
+ return new protocol_http_1.HttpRequest({
369
+ protocol,
370
+ hostname,
371
+ port,
372
+ method: "GET",
373
+ headers,
374
+ path: resolvedPath,
375
+ query,
376
+ body,
377
+ });
378
+ };
379
+ exports.serializeAws_restJson1ListDataViewsCommand = serializeAws_restJson1ListDataViewsCommand;
380
+ const serializeAws_restJson1UpdateChangesetCommand = async (input, context) => {
381
+ var _a;
382
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
383
+ const headers = {
384
+ "content-type": "application/json",
385
+ };
386
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
387
+ "/datasets/{datasetId}/changesetsv2/{changesetId}";
388
+ if (input.datasetId !== undefined) {
389
+ const labelValue = input.datasetId;
390
+ if (labelValue.length <= 0) {
391
+ throw new Error("Empty value provided for input HTTP label: datasetId.");
392
+ }
393
+ resolvedPath = resolvedPath.replace("{datasetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
394
+ }
395
+ else {
396
+ throw new Error("No value provided for input HTTP label: datasetId.");
397
+ }
398
+ if (input.changesetId !== undefined) {
399
+ const labelValue = input.changesetId;
400
+ if (labelValue.length <= 0) {
401
+ throw new Error("Empty value provided for input HTTP label: changesetId.");
402
+ }
403
+ resolvedPath = resolvedPath.replace("{changesetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
404
+ }
405
+ else {
406
+ throw new Error("No value provided for input HTTP label: changesetId.");
407
+ }
408
+ let body;
409
+ body = JSON.stringify({
410
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
411
+ ...(input.formatParams !== undefined &&
412
+ input.formatParams !== null && { formatParams: serializeAws_restJson1FormatParams(input.formatParams, context) }),
413
+ ...(input.sourceParams !== undefined &&
414
+ input.sourceParams !== null && { sourceParams: serializeAws_restJson1SourceParams(input.sourceParams, context) }),
415
+ });
416
+ return new protocol_http_1.HttpRequest({
417
+ protocol,
418
+ hostname,
419
+ port,
420
+ method: "PUT",
421
+ headers,
422
+ path: resolvedPath,
423
+ body,
424
+ });
425
+ };
426
+ exports.serializeAws_restJson1UpdateChangesetCommand = serializeAws_restJson1UpdateChangesetCommand;
427
+ const serializeAws_restJson1UpdateDatasetCommand = async (input, context) => {
428
+ var _a;
429
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
430
+ const headers = {
431
+ "content-type": "application/json",
432
+ };
433
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/datasetsv2/{datasetId}";
434
+ if (input.datasetId !== undefined) {
435
+ const labelValue = input.datasetId;
436
+ if (labelValue.length <= 0) {
437
+ throw new Error("Empty value provided for input HTTP label: datasetId.");
438
+ }
439
+ resolvedPath = resolvedPath.replace("{datasetId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
440
+ }
441
+ else {
442
+ throw new Error("No value provided for input HTTP label: datasetId.");
443
+ }
444
+ let body;
445
+ body = JSON.stringify({
446
+ ...(input.alias !== undefined && input.alias !== null && { alias: input.alias }),
447
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
448
+ ...(input.datasetDescription !== undefined &&
449
+ input.datasetDescription !== null && { datasetDescription: input.datasetDescription }),
450
+ ...(input.datasetTitle !== undefined && input.datasetTitle !== null && { datasetTitle: input.datasetTitle }),
451
+ ...(input.kind !== undefined && input.kind !== null && { kind: input.kind }),
452
+ ...(input.schemaDefinition !== undefined &&
453
+ input.schemaDefinition !== null && {
454
+ schemaDefinition: serializeAws_restJson1SchemaUnion(input.schemaDefinition, context),
455
+ }),
456
+ });
457
+ return new protocol_http_1.HttpRequest({
458
+ protocol,
459
+ hostname,
460
+ port,
461
+ method: "PUT",
462
+ headers,
463
+ path: resolvedPath,
464
+ body,
465
+ });
466
+ };
467
+ exports.serializeAws_restJson1UpdateDatasetCommand = serializeAws_restJson1UpdateDatasetCommand;
468
+ const deserializeAws_restJson1CreateChangesetCommand = async (output, context) => {
469
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
470
+ return deserializeAws_restJson1CreateChangesetCommandError(output, context);
471
+ }
472
+ const contents = {
473
+ $metadata: deserializeMetadata(output),
474
+ changesetId: undefined,
475
+ datasetId: undefined,
476
+ };
477
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
478
+ if (data.changesetId !== undefined && data.changesetId !== null) {
479
+ contents.changesetId = smithy_client_1.expectString(data.changesetId);
480
+ }
481
+ if (data.datasetId !== undefined && data.datasetId !== null) {
482
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
483
+ }
484
+ return Promise.resolve(contents);
485
+ };
486
+ exports.deserializeAws_restJson1CreateChangesetCommand = deserializeAws_restJson1CreateChangesetCommand;
487
+ const deserializeAws_restJson1CreateChangesetCommandError = async (output, context) => {
488
+ const parsedOutput = {
489
+ ...output,
490
+ body: await parseBody(output.body, context),
491
+ };
492
+ let response;
493
+ let errorCode = "UnknownError";
494
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
495
+ switch (errorCode) {
496
+ case "AccessDeniedException":
497
+ case "com.amazonaws.finspacedata#AccessDeniedException":
498
+ response = {
499
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
500
+ name: errorCode,
501
+ $metadata: deserializeMetadata(output),
502
+ };
503
+ break;
504
+ case "ConflictException":
505
+ case "com.amazonaws.finspacedata#ConflictException":
506
+ response = {
507
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
508
+ name: errorCode,
509
+ $metadata: deserializeMetadata(output),
510
+ };
511
+ break;
512
+ case "InternalServerException":
513
+ case "com.amazonaws.finspacedata#InternalServerException":
514
+ response = {
515
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
516
+ name: errorCode,
517
+ $metadata: deserializeMetadata(output),
518
+ };
519
+ break;
520
+ case "LimitExceededException":
521
+ case "com.amazonaws.finspacedata#LimitExceededException":
522
+ response = {
523
+ ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
524
+ name: errorCode,
525
+ $metadata: deserializeMetadata(output),
526
+ };
527
+ break;
528
+ case "ResourceNotFoundException":
529
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
530
+ response = {
531
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
532
+ name: errorCode,
533
+ $metadata: deserializeMetadata(output),
534
+ };
535
+ break;
536
+ case "ThrottlingException":
537
+ case "com.amazonaws.finspacedata#ThrottlingException":
538
+ response = {
539
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
540
+ name: errorCode,
541
+ $metadata: deserializeMetadata(output),
542
+ };
543
+ break;
544
+ case "ValidationException":
545
+ case "com.amazonaws.finspacedata#ValidationException":
546
+ response = {
547
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
548
+ name: errorCode,
549
+ $metadata: deserializeMetadata(output),
550
+ };
551
+ break;
552
+ default:
553
+ const parsedBody = parsedOutput.body;
554
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
555
+ response = {
556
+ ...parsedBody,
557
+ name: `${errorCode}`,
558
+ message: parsedBody.message || parsedBody.Message || errorCode,
559
+ $fault: "client",
560
+ $metadata: deserializeMetadata(output),
561
+ };
562
+ }
563
+ const message = response.message || response.Message || errorCode;
564
+ response.message = message;
565
+ delete response.Message;
566
+ return Promise.reject(Object.assign(new Error(message), response));
567
+ };
568
+ const deserializeAws_restJson1CreateDatasetCommand = async (output, context) => {
569
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
570
+ return deserializeAws_restJson1CreateDatasetCommandError(output, context);
571
+ }
572
+ const contents = {
573
+ $metadata: deserializeMetadata(output),
574
+ datasetId: undefined,
575
+ };
576
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
577
+ if (data.datasetId !== undefined && data.datasetId !== null) {
578
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
579
+ }
580
+ return Promise.resolve(contents);
581
+ };
582
+ exports.deserializeAws_restJson1CreateDatasetCommand = deserializeAws_restJson1CreateDatasetCommand;
583
+ const deserializeAws_restJson1CreateDatasetCommandError = async (output, context) => {
584
+ const parsedOutput = {
585
+ ...output,
586
+ body: await parseBody(output.body, context),
587
+ };
588
+ let response;
589
+ let errorCode = "UnknownError";
590
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
591
+ switch (errorCode) {
592
+ case "AccessDeniedException":
593
+ case "com.amazonaws.finspacedata#AccessDeniedException":
594
+ response = {
595
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
596
+ name: errorCode,
597
+ $metadata: deserializeMetadata(output),
598
+ };
599
+ break;
600
+ case "ConflictException":
601
+ case "com.amazonaws.finspacedata#ConflictException":
602
+ response = {
603
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
604
+ name: errorCode,
605
+ $metadata: deserializeMetadata(output),
606
+ };
607
+ break;
608
+ case "InternalServerException":
609
+ case "com.amazonaws.finspacedata#InternalServerException":
610
+ response = {
611
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
612
+ name: errorCode,
613
+ $metadata: deserializeMetadata(output),
614
+ };
615
+ break;
616
+ case "LimitExceededException":
617
+ case "com.amazonaws.finspacedata#LimitExceededException":
618
+ response = {
619
+ ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
620
+ name: errorCode,
621
+ $metadata: deserializeMetadata(output),
622
+ };
623
+ break;
624
+ case "ResourceNotFoundException":
625
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
626
+ response = {
627
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
628
+ name: errorCode,
629
+ $metadata: deserializeMetadata(output),
630
+ };
631
+ break;
632
+ case "ThrottlingException":
633
+ case "com.amazonaws.finspacedata#ThrottlingException":
634
+ response = {
635
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
636
+ name: errorCode,
637
+ $metadata: deserializeMetadata(output),
638
+ };
639
+ break;
640
+ case "ValidationException":
641
+ case "com.amazonaws.finspacedata#ValidationException":
642
+ response = {
643
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
644
+ name: errorCode,
645
+ $metadata: deserializeMetadata(output),
646
+ };
647
+ break;
648
+ default:
649
+ const parsedBody = parsedOutput.body;
650
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
651
+ response = {
652
+ ...parsedBody,
653
+ name: `${errorCode}`,
654
+ message: parsedBody.message || parsedBody.Message || errorCode,
655
+ $fault: "client",
656
+ $metadata: deserializeMetadata(output),
657
+ };
658
+ }
659
+ const message = response.message || response.Message || errorCode;
660
+ response.message = message;
661
+ delete response.Message;
662
+ return Promise.reject(Object.assign(new Error(message), response));
663
+ };
664
+ const deserializeAws_restJson1CreateDataViewCommand = async (output, context) => {
665
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
666
+ return deserializeAws_restJson1CreateDataViewCommandError(output, context);
667
+ }
668
+ const contents = {
669
+ $metadata: deserializeMetadata(output),
670
+ dataViewId: undefined,
671
+ datasetId: undefined,
672
+ };
673
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
674
+ if (data.dataViewId !== undefined && data.dataViewId !== null) {
675
+ contents.dataViewId = smithy_client_1.expectString(data.dataViewId);
676
+ }
677
+ if (data.datasetId !== undefined && data.datasetId !== null) {
678
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
679
+ }
680
+ return Promise.resolve(contents);
681
+ };
682
+ exports.deserializeAws_restJson1CreateDataViewCommand = deserializeAws_restJson1CreateDataViewCommand;
683
+ const deserializeAws_restJson1CreateDataViewCommandError = async (output, context) => {
684
+ const parsedOutput = {
685
+ ...output,
686
+ body: await parseBody(output.body, context),
687
+ };
688
+ let response;
689
+ let errorCode = "UnknownError";
690
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
691
+ switch (errorCode) {
692
+ case "ConflictException":
693
+ case "com.amazonaws.finspacedata#ConflictException":
694
+ response = {
695
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
696
+ name: errorCode,
697
+ $metadata: deserializeMetadata(output),
698
+ };
699
+ break;
700
+ case "InternalServerException":
701
+ case "com.amazonaws.finspacedata#InternalServerException":
702
+ response = {
703
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
704
+ name: errorCode,
705
+ $metadata: deserializeMetadata(output),
706
+ };
707
+ break;
708
+ case "LimitExceededException":
709
+ case "com.amazonaws.finspacedata#LimitExceededException":
710
+ response = {
711
+ ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
712
+ name: errorCode,
713
+ $metadata: deserializeMetadata(output),
714
+ };
715
+ break;
716
+ case "ResourceNotFoundException":
717
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
718
+ response = {
719
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
720
+ name: errorCode,
721
+ $metadata: deserializeMetadata(output),
722
+ };
723
+ break;
724
+ case "ThrottlingException":
725
+ case "com.amazonaws.finspacedata#ThrottlingException":
726
+ response = {
727
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
728
+ name: errorCode,
729
+ $metadata: deserializeMetadata(output),
730
+ };
731
+ break;
732
+ case "ValidationException":
733
+ case "com.amazonaws.finspacedata#ValidationException":
734
+ response = {
735
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
736
+ name: errorCode,
737
+ $metadata: deserializeMetadata(output),
738
+ };
739
+ break;
740
+ default:
741
+ const parsedBody = parsedOutput.body;
742
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
743
+ response = {
744
+ ...parsedBody,
745
+ name: `${errorCode}`,
746
+ message: parsedBody.message || parsedBody.Message || errorCode,
747
+ $fault: "client",
748
+ $metadata: deserializeMetadata(output),
749
+ };
750
+ }
751
+ const message = response.message || response.Message || errorCode;
752
+ response.message = message;
753
+ delete response.Message;
754
+ return Promise.reject(Object.assign(new Error(message), response));
755
+ };
756
+ const deserializeAws_restJson1DeleteDatasetCommand = async (output, context) => {
757
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
758
+ return deserializeAws_restJson1DeleteDatasetCommandError(output, context);
759
+ }
760
+ const contents = {
761
+ $metadata: deserializeMetadata(output),
762
+ datasetId: undefined,
763
+ };
764
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
765
+ if (data.datasetId !== undefined && data.datasetId !== null) {
766
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
767
+ }
768
+ return Promise.resolve(contents);
769
+ };
770
+ exports.deserializeAws_restJson1DeleteDatasetCommand = deserializeAws_restJson1DeleteDatasetCommand;
771
+ const deserializeAws_restJson1DeleteDatasetCommandError = async (output, context) => {
772
+ const parsedOutput = {
773
+ ...output,
774
+ body: await parseBody(output.body, context),
775
+ };
776
+ let response;
777
+ let errorCode = "UnknownError";
778
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
779
+ switch (errorCode) {
780
+ case "AccessDeniedException":
781
+ case "com.amazonaws.finspacedata#AccessDeniedException":
782
+ response = {
783
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
784
+ name: errorCode,
785
+ $metadata: deserializeMetadata(output),
786
+ };
787
+ break;
788
+ case "ConflictException":
789
+ case "com.amazonaws.finspacedata#ConflictException":
790
+ response = {
791
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
792
+ name: errorCode,
793
+ $metadata: deserializeMetadata(output),
794
+ };
795
+ break;
796
+ case "InternalServerException":
797
+ case "com.amazonaws.finspacedata#InternalServerException":
798
+ response = {
799
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
800
+ name: errorCode,
801
+ $metadata: deserializeMetadata(output),
802
+ };
803
+ break;
804
+ case "LimitExceededException":
805
+ case "com.amazonaws.finspacedata#LimitExceededException":
806
+ response = {
807
+ ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
808
+ name: errorCode,
809
+ $metadata: deserializeMetadata(output),
810
+ };
811
+ break;
812
+ case "ResourceNotFoundException":
813
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
814
+ response = {
815
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
816
+ name: errorCode,
817
+ $metadata: deserializeMetadata(output),
818
+ };
819
+ break;
820
+ case "ThrottlingException":
821
+ case "com.amazonaws.finspacedata#ThrottlingException":
822
+ response = {
823
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
824
+ name: errorCode,
825
+ $metadata: deserializeMetadata(output),
826
+ };
827
+ break;
828
+ case "ValidationException":
829
+ case "com.amazonaws.finspacedata#ValidationException":
830
+ response = {
831
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
832
+ name: errorCode,
833
+ $metadata: deserializeMetadata(output),
834
+ };
835
+ break;
836
+ default:
837
+ const parsedBody = parsedOutput.body;
838
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
839
+ response = {
840
+ ...parsedBody,
841
+ name: `${errorCode}`,
842
+ message: parsedBody.message || parsedBody.Message || errorCode,
843
+ $fault: "client",
844
+ $metadata: deserializeMetadata(output),
845
+ };
846
+ }
847
+ const message = response.message || response.Message || errorCode;
848
+ response.message = message;
849
+ delete response.Message;
850
+ return Promise.reject(Object.assign(new Error(message), response));
851
+ };
852
+ const deserializeAws_restJson1GetChangesetCommand = async (output, context) => {
853
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
854
+ return deserializeAws_restJson1GetChangesetCommandError(output, context);
855
+ }
856
+ const contents = {
857
+ $metadata: deserializeMetadata(output),
858
+ activeUntilTimestamp: undefined,
859
+ changeType: undefined,
860
+ changesetArn: undefined,
861
+ changesetId: undefined,
862
+ createTime: undefined,
863
+ datasetId: undefined,
864
+ errorInfo: undefined,
865
+ formatParams: undefined,
866
+ sourceParams: undefined,
867
+ status: undefined,
868
+ updatedByChangesetId: undefined,
869
+ updatesChangesetId: undefined,
870
+ };
871
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
872
+ if (data.activeUntilTimestamp !== undefined && data.activeUntilTimestamp !== null) {
873
+ contents.activeUntilTimestamp = smithy_client_1.expectLong(data.activeUntilTimestamp);
874
+ }
875
+ if (data.changeType !== undefined && data.changeType !== null) {
876
+ contents.changeType = smithy_client_1.expectString(data.changeType);
877
+ }
878
+ if (data.changesetArn !== undefined && data.changesetArn !== null) {
879
+ contents.changesetArn = smithy_client_1.expectString(data.changesetArn);
880
+ }
881
+ if (data.changesetId !== undefined && data.changesetId !== null) {
882
+ contents.changesetId = smithy_client_1.expectString(data.changesetId);
883
+ }
884
+ if (data.createTime !== undefined && data.createTime !== null) {
885
+ contents.createTime = smithy_client_1.expectLong(data.createTime);
886
+ }
887
+ if (data.datasetId !== undefined && data.datasetId !== null) {
888
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
889
+ }
890
+ if (data.errorInfo !== undefined && data.errorInfo !== null) {
891
+ contents.errorInfo = deserializeAws_restJson1ChangesetErrorInfo(data.errorInfo, context);
892
+ }
893
+ if (data.formatParams !== undefined && data.formatParams !== null) {
894
+ contents.formatParams = deserializeAws_restJson1FormatParams(data.formatParams, context);
895
+ }
896
+ if (data.sourceParams !== undefined && data.sourceParams !== null) {
897
+ contents.sourceParams = deserializeAws_restJson1SourceParams(data.sourceParams, context);
898
+ }
899
+ if (data.status !== undefined && data.status !== null) {
900
+ contents.status = smithy_client_1.expectString(data.status);
901
+ }
902
+ if (data.updatedByChangesetId !== undefined && data.updatedByChangesetId !== null) {
903
+ contents.updatedByChangesetId = smithy_client_1.expectString(data.updatedByChangesetId);
904
+ }
905
+ if (data.updatesChangesetId !== undefined && data.updatesChangesetId !== null) {
906
+ contents.updatesChangesetId = smithy_client_1.expectString(data.updatesChangesetId);
907
+ }
908
+ return Promise.resolve(contents);
909
+ };
910
+ exports.deserializeAws_restJson1GetChangesetCommand = deserializeAws_restJson1GetChangesetCommand;
911
+ const deserializeAws_restJson1GetChangesetCommandError = async (output, context) => {
912
+ const parsedOutput = {
913
+ ...output,
914
+ body: await parseBody(output.body, context),
915
+ };
916
+ let response;
917
+ let errorCode = "UnknownError";
918
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
919
+ switch (errorCode) {
920
+ case "AccessDeniedException":
921
+ case "com.amazonaws.finspacedata#AccessDeniedException":
922
+ response = {
923
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
924
+ name: errorCode,
925
+ $metadata: deserializeMetadata(output),
926
+ };
927
+ break;
928
+ case "ConflictException":
929
+ case "com.amazonaws.finspacedata#ConflictException":
930
+ response = {
931
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
932
+ name: errorCode,
933
+ $metadata: deserializeMetadata(output),
934
+ };
935
+ break;
936
+ case "InternalServerException":
937
+ case "com.amazonaws.finspacedata#InternalServerException":
938
+ response = {
939
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
940
+ name: errorCode,
941
+ $metadata: deserializeMetadata(output),
942
+ };
943
+ break;
944
+ case "ResourceNotFoundException":
945
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
946
+ response = {
947
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
948
+ name: errorCode,
949
+ $metadata: deserializeMetadata(output),
950
+ };
951
+ break;
952
+ case "ThrottlingException":
953
+ case "com.amazonaws.finspacedata#ThrottlingException":
954
+ response = {
955
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
956
+ name: errorCode,
957
+ $metadata: deserializeMetadata(output),
958
+ };
959
+ break;
960
+ case "ValidationException":
961
+ case "com.amazonaws.finspacedata#ValidationException":
962
+ response = {
963
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
964
+ name: errorCode,
965
+ $metadata: deserializeMetadata(output),
966
+ };
967
+ break;
968
+ default:
969
+ const parsedBody = parsedOutput.body;
970
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
971
+ response = {
972
+ ...parsedBody,
973
+ name: `${errorCode}`,
974
+ message: parsedBody.message || parsedBody.Message || errorCode,
975
+ $fault: "client",
976
+ $metadata: deserializeMetadata(output),
977
+ };
978
+ }
979
+ const message = response.message || response.Message || errorCode;
980
+ response.message = message;
981
+ delete response.Message;
982
+ return Promise.reject(Object.assign(new Error(message), response));
983
+ };
984
+ const deserializeAws_restJson1GetDatasetCommand = async (output, context) => {
985
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
986
+ return deserializeAws_restJson1GetDatasetCommandError(output, context);
987
+ }
988
+ const contents = {
989
+ $metadata: deserializeMetadata(output),
990
+ alias: undefined,
991
+ createTime: undefined,
992
+ datasetArn: undefined,
993
+ datasetDescription: undefined,
994
+ datasetId: undefined,
995
+ datasetTitle: undefined,
996
+ kind: undefined,
997
+ lastModifiedTime: undefined,
998
+ schemaDefinition: undefined,
999
+ status: undefined,
1000
+ };
1001
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1002
+ if (data.alias !== undefined && data.alias !== null) {
1003
+ contents.alias = smithy_client_1.expectString(data.alias);
1004
+ }
1005
+ if (data.createTime !== undefined && data.createTime !== null) {
1006
+ contents.createTime = smithy_client_1.expectLong(data.createTime);
1007
+ }
1008
+ if (data.datasetArn !== undefined && data.datasetArn !== null) {
1009
+ contents.datasetArn = smithy_client_1.expectString(data.datasetArn);
1010
+ }
1011
+ if (data.datasetDescription !== undefined && data.datasetDescription !== null) {
1012
+ contents.datasetDescription = smithy_client_1.expectString(data.datasetDescription);
1013
+ }
1014
+ if (data.datasetId !== undefined && data.datasetId !== null) {
1015
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
1016
+ }
1017
+ if (data.datasetTitle !== undefined && data.datasetTitle !== null) {
1018
+ contents.datasetTitle = smithy_client_1.expectString(data.datasetTitle);
1019
+ }
1020
+ if (data.kind !== undefined && data.kind !== null) {
1021
+ contents.kind = smithy_client_1.expectString(data.kind);
1022
+ }
1023
+ if (data.lastModifiedTime !== undefined && data.lastModifiedTime !== null) {
1024
+ contents.lastModifiedTime = smithy_client_1.expectLong(data.lastModifiedTime);
1025
+ }
1026
+ if (data.schemaDefinition !== undefined && data.schemaDefinition !== null) {
1027
+ contents.schemaDefinition = deserializeAws_restJson1SchemaUnion(data.schemaDefinition, context);
1028
+ }
1029
+ if (data.status !== undefined && data.status !== null) {
1030
+ contents.status = smithy_client_1.expectString(data.status);
1031
+ }
1032
+ return Promise.resolve(contents);
1033
+ };
1034
+ exports.deserializeAws_restJson1GetDatasetCommand = deserializeAws_restJson1GetDatasetCommand;
1035
+ const deserializeAws_restJson1GetDatasetCommandError = async (output, context) => {
1036
+ const parsedOutput = {
1037
+ ...output,
1038
+ body: await parseBody(output.body, context),
1039
+ };
1040
+ let response;
1041
+ let errorCode = "UnknownError";
1042
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1043
+ switch (errorCode) {
1044
+ case "AccessDeniedException":
1045
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1046
+ response = {
1047
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1048
+ name: errorCode,
1049
+ $metadata: deserializeMetadata(output),
1050
+ };
1051
+ break;
1052
+ case "ConflictException":
1053
+ case "com.amazonaws.finspacedata#ConflictException":
1054
+ response = {
1055
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1056
+ name: errorCode,
1057
+ $metadata: deserializeMetadata(output),
1058
+ };
1059
+ break;
1060
+ case "InternalServerException":
1061
+ case "com.amazonaws.finspacedata#InternalServerException":
1062
+ response = {
1063
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1064
+ name: errorCode,
1065
+ $metadata: deserializeMetadata(output),
1066
+ };
1067
+ break;
1068
+ case "ResourceNotFoundException":
1069
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1070
+ response = {
1071
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1072
+ name: errorCode,
1073
+ $metadata: deserializeMetadata(output),
1074
+ };
1075
+ break;
1076
+ case "ThrottlingException":
1077
+ case "com.amazonaws.finspacedata#ThrottlingException":
1078
+ response = {
1079
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1080
+ name: errorCode,
1081
+ $metadata: deserializeMetadata(output),
1082
+ };
1083
+ break;
1084
+ case "ValidationException":
1085
+ case "com.amazonaws.finspacedata#ValidationException":
1086
+ response = {
1087
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1088
+ name: errorCode,
1089
+ $metadata: deserializeMetadata(output),
1090
+ };
1091
+ break;
1092
+ default:
1093
+ const parsedBody = parsedOutput.body;
1094
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1095
+ response = {
1096
+ ...parsedBody,
1097
+ name: `${errorCode}`,
1098
+ message: parsedBody.message || parsedBody.Message || errorCode,
1099
+ $fault: "client",
1100
+ $metadata: deserializeMetadata(output),
1101
+ };
1102
+ }
1103
+ const message = response.message || response.Message || errorCode;
1104
+ response.message = message;
1105
+ delete response.Message;
1106
+ return Promise.reject(Object.assign(new Error(message), response));
1107
+ };
1108
+ const deserializeAws_restJson1GetDataViewCommand = async (output, context) => {
1109
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1110
+ return deserializeAws_restJson1GetDataViewCommandError(output, context);
1111
+ }
1112
+ const contents = {
1113
+ $metadata: deserializeMetadata(output),
1114
+ asOfTimestamp: undefined,
1115
+ autoUpdate: undefined,
1116
+ createTime: undefined,
1117
+ dataViewArn: undefined,
1118
+ dataViewId: undefined,
1119
+ datasetId: undefined,
1120
+ destinationTypeParams: undefined,
1121
+ errorInfo: undefined,
1122
+ lastModifiedTime: undefined,
1123
+ partitionColumns: undefined,
1124
+ sortColumns: undefined,
1125
+ status: undefined,
1126
+ };
1127
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1128
+ if (data.asOfTimestamp !== undefined && data.asOfTimestamp !== null) {
1129
+ contents.asOfTimestamp = smithy_client_1.expectLong(data.asOfTimestamp);
1130
+ }
1131
+ if (data.autoUpdate !== undefined && data.autoUpdate !== null) {
1132
+ contents.autoUpdate = smithy_client_1.expectBoolean(data.autoUpdate);
1133
+ }
1134
+ if (data.createTime !== undefined && data.createTime !== null) {
1135
+ contents.createTime = smithy_client_1.expectLong(data.createTime);
1136
+ }
1137
+ if (data.dataViewArn !== undefined && data.dataViewArn !== null) {
1138
+ contents.dataViewArn = smithy_client_1.expectString(data.dataViewArn);
1139
+ }
1140
+ if (data.dataViewId !== undefined && data.dataViewId !== null) {
1141
+ contents.dataViewId = smithy_client_1.expectString(data.dataViewId);
1142
+ }
1143
+ if (data.datasetId !== undefined && data.datasetId !== null) {
1144
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
1145
+ }
1146
+ if (data.destinationTypeParams !== undefined && data.destinationTypeParams !== null) {
1147
+ contents.destinationTypeParams = deserializeAws_restJson1DataViewDestinationTypeParams(data.destinationTypeParams, context);
1148
+ }
1149
+ if (data.errorInfo !== undefined && data.errorInfo !== null) {
1150
+ contents.errorInfo = deserializeAws_restJson1DataViewErrorInfo(data.errorInfo, context);
1151
+ }
1152
+ if (data.lastModifiedTime !== undefined && data.lastModifiedTime !== null) {
1153
+ contents.lastModifiedTime = smithy_client_1.expectLong(data.lastModifiedTime);
1154
+ }
1155
+ if (data.partitionColumns !== undefined && data.partitionColumns !== null) {
1156
+ contents.partitionColumns = deserializeAws_restJson1PartitionColumnList(data.partitionColumns, context);
1157
+ }
1158
+ if (data.sortColumns !== undefined && data.sortColumns !== null) {
1159
+ contents.sortColumns = deserializeAws_restJson1SortColumnList(data.sortColumns, context);
1160
+ }
1161
+ if (data.status !== undefined && data.status !== null) {
1162
+ contents.status = smithy_client_1.expectString(data.status);
1163
+ }
1164
+ return Promise.resolve(contents);
1165
+ };
1166
+ exports.deserializeAws_restJson1GetDataViewCommand = deserializeAws_restJson1GetDataViewCommand;
1167
+ const deserializeAws_restJson1GetDataViewCommandError = async (output, context) => {
1168
+ const parsedOutput = {
1169
+ ...output,
1170
+ body: await parseBody(output.body, context),
1171
+ };
1172
+ let response;
1173
+ let errorCode = "UnknownError";
1174
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1175
+ switch (errorCode) {
1176
+ case "ConflictException":
1177
+ case "com.amazonaws.finspacedata#ConflictException":
1178
+ response = {
1179
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1180
+ name: errorCode,
1181
+ $metadata: deserializeMetadata(output),
1182
+ };
1183
+ break;
1184
+ case "InternalServerException":
1185
+ case "com.amazonaws.finspacedata#InternalServerException":
1186
+ response = {
1187
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1188
+ name: errorCode,
1189
+ $metadata: deserializeMetadata(output),
1190
+ };
1191
+ break;
1192
+ case "ResourceNotFoundException":
1193
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1194
+ response = {
1195
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1196
+ name: errorCode,
1197
+ $metadata: deserializeMetadata(output),
1198
+ };
1199
+ break;
1200
+ case "ThrottlingException":
1201
+ case "com.amazonaws.finspacedata#ThrottlingException":
1202
+ response = {
1203
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1204
+ name: errorCode,
1205
+ $metadata: deserializeMetadata(output),
1206
+ };
1207
+ break;
1208
+ case "ValidationException":
1209
+ case "com.amazonaws.finspacedata#ValidationException":
1210
+ response = {
1211
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1212
+ name: errorCode,
1213
+ $metadata: deserializeMetadata(output),
1214
+ };
1215
+ break;
1216
+ default:
1217
+ const parsedBody = parsedOutput.body;
1218
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1219
+ response = {
1220
+ ...parsedBody,
1221
+ name: `${errorCode}`,
1222
+ message: parsedBody.message || parsedBody.Message || errorCode,
1223
+ $fault: "client",
1224
+ $metadata: deserializeMetadata(output),
1225
+ };
1226
+ }
1227
+ const message = response.message || response.Message || errorCode;
1228
+ response.message = message;
1229
+ delete response.Message;
1230
+ return Promise.reject(Object.assign(new Error(message), response));
1231
+ };
1232
+ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = async (output, context) => {
1233
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1234
+ return deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError(output, context);
1235
+ }
1236
+ const contents = {
1237
+ $metadata: deserializeMetadata(output),
1238
+ credentials: undefined,
1239
+ durationInMinutes: undefined,
1240
+ };
1241
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1242
+ if (data.credentials !== undefined && data.credentials !== null) {
1243
+ contents.credentials = deserializeAws_restJson1Credentials(data.credentials, context);
1244
+ }
1245
+ if (data.durationInMinutes !== undefined && data.durationInMinutes !== null) {
1246
+ contents.durationInMinutes = smithy_client_1.expectLong(data.durationInMinutes);
1247
+ }
1248
+ return Promise.resolve(contents);
1249
+ };
1250
+ exports.deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand;
1251
+ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = async (output, context) => {
1252
+ const parsedOutput = {
1253
+ ...output,
1254
+ body: await parseBody(output.body, context),
1255
+ };
1256
+ let response;
1257
+ let errorCode = "UnknownError";
1258
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1259
+ switch (errorCode) {
1260
+ case "AccessDeniedException":
1261
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1262
+ response = {
1263
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1264
+ name: errorCode,
1265
+ $metadata: deserializeMetadata(output),
1266
+ };
1267
+ break;
1268
+ case "InternalServerException":
1269
+ case "com.amazonaws.finspacedata#InternalServerException":
1270
+ response = {
1271
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1272
+ name: errorCode,
1273
+ $metadata: deserializeMetadata(output),
1274
+ };
1275
+ break;
1276
+ case "ThrottlingException":
1277
+ case "com.amazonaws.finspacedata#ThrottlingException":
1278
+ response = {
1279
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1280
+ name: errorCode,
1281
+ $metadata: deserializeMetadata(output),
1282
+ };
1283
+ break;
1284
+ case "ValidationException":
1285
+ case "com.amazonaws.finspacedata#ValidationException":
1286
+ response = {
1287
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1288
+ name: errorCode,
1289
+ $metadata: deserializeMetadata(output),
1290
+ };
1291
+ break;
1292
+ default:
1293
+ const parsedBody = parsedOutput.body;
1294
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1295
+ response = {
1296
+ ...parsedBody,
1297
+ name: `${errorCode}`,
1298
+ message: parsedBody.message || parsedBody.Message || errorCode,
1299
+ $fault: "client",
1300
+ $metadata: deserializeMetadata(output),
1301
+ };
1302
+ }
1303
+ const message = response.message || response.Message || errorCode;
1304
+ response.message = message;
1305
+ delete response.Message;
1306
+ return Promise.reject(Object.assign(new Error(message), response));
1307
+ };
1308
+ const deserializeAws_restJson1GetWorkingLocationCommand = async (output, context) => {
1309
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1310
+ return deserializeAws_restJson1GetWorkingLocationCommandError(output, context);
1311
+ }
1312
+ const contents = {
1313
+ $metadata: deserializeMetadata(output),
1314
+ s3Bucket: undefined,
1315
+ s3Path: undefined,
1316
+ s3Uri: undefined,
1317
+ };
1318
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1319
+ if (data.s3Bucket !== undefined && data.s3Bucket !== null) {
1320
+ contents.s3Bucket = smithy_client_1.expectString(data.s3Bucket);
1321
+ }
1322
+ if (data.s3Path !== undefined && data.s3Path !== null) {
1323
+ contents.s3Path = smithy_client_1.expectString(data.s3Path);
1324
+ }
1325
+ if (data.s3Uri !== undefined && data.s3Uri !== null) {
1326
+ contents.s3Uri = smithy_client_1.expectString(data.s3Uri);
1327
+ }
1328
+ return Promise.resolve(contents);
1329
+ };
1330
+ exports.deserializeAws_restJson1GetWorkingLocationCommand = deserializeAws_restJson1GetWorkingLocationCommand;
1331
+ const deserializeAws_restJson1GetWorkingLocationCommandError = async (output, context) => {
1332
+ const parsedOutput = {
1333
+ ...output,
1334
+ body: await parseBody(output.body, context),
1335
+ };
1336
+ let response;
1337
+ let errorCode = "UnknownError";
1338
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1339
+ switch (errorCode) {
1340
+ case "AccessDeniedException":
1341
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1342
+ response = {
1343
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1344
+ name: errorCode,
1345
+ $metadata: deserializeMetadata(output),
1346
+ };
1347
+ break;
1348
+ case "InternalServerException":
1349
+ case "com.amazonaws.finspacedata#InternalServerException":
1350
+ response = {
1351
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1352
+ name: errorCode,
1353
+ $metadata: deserializeMetadata(output),
1354
+ };
1355
+ break;
1356
+ case "ThrottlingException":
1357
+ case "com.amazonaws.finspacedata#ThrottlingException":
1358
+ response = {
1359
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1360
+ name: errorCode,
1361
+ $metadata: deserializeMetadata(output),
1362
+ };
1363
+ break;
1364
+ case "ValidationException":
1365
+ case "com.amazonaws.finspacedata#ValidationException":
1366
+ response = {
1367
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1368
+ name: errorCode,
1369
+ $metadata: deserializeMetadata(output),
1370
+ };
1371
+ break;
1372
+ default:
1373
+ const parsedBody = parsedOutput.body;
1374
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1375
+ response = {
1376
+ ...parsedBody,
1377
+ name: `${errorCode}`,
1378
+ message: parsedBody.message || parsedBody.Message || errorCode,
1379
+ $fault: "client",
1380
+ $metadata: deserializeMetadata(output),
1381
+ };
1382
+ }
1383
+ const message = response.message || response.Message || errorCode;
1384
+ response.message = message;
1385
+ delete response.Message;
1386
+ return Promise.reject(Object.assign(new Error(message), response));
1387
+ };
1388
+ const deserializeAws_restJson1ListChangesetsCommand = async (output, context) => {
1389
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1390
+ return deserializeAws_restJson1ListChangesetsCommandError(output, context);
1391
+ }
1392
+ const contents = {
1393
+ $metadata: deserializeMetadata(output),
1394
+ changesets: undefined,
1395
+ nextToken: undefined,
1396
+ };
1397
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1398
+ if (data.changesets !== undefined && data.changesets !== null) {
1399
+ contents.changesets = deserializeAws_restJson1ChangesetList(data.changesets, context);
1400
+ }
1401
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1402
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
1403
+ }
1404
+ return Promise.resolve(contents);
1405
+ };
1406
+ exports.deserializeAws_restJson1ListChangesetsCommand = deserializeAws_restJson1ListChangesetsCommand;
1407
+ const deserializeAws_restJson1ListChangesetsCommandError = async (output, context) => {
1408
+ const parsedOutput = {
1409
+ ...output,
1410
+ body: await parseBody(output.body, context),
1411
+ };
1412
+ let response;
1413
+ let errorCode = "UnknownError";
1414
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1415
+ switch (errorCode) {
1416
+ case "AccessDeniedException":
1417
+ case "com.amazonaws.finspacedata#AccessDeniedException":
1418
+ response = {
1419
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1420
+ name: errorCode,
1421
+ $metadata: deserializeMetadata(output),
1422
+ };
1423
+ break;
1424
+ case "ConflictException":
1425
+ case "com.amazonaws.finspacedata#ConflictException":
1426
+ response = {
1427
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1428
+ name: errorCode,
1429
+ $metadata: deserializeMetadata(output),
1430
+ };
1431
+ break;
1432
+ case "InternalServerException":
1433
+ case "com.amazonaws.finspacedata#InternalServerException":
1434
+ response = {
1435
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1436
+ name: errorCode,
1437
+ $metadata: deserializeMetadata(output),
1438
+ };
1439
+ break;
1440
+ case "ResourceNotFoundException":
1441
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1442
+ response = {
1443
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1444
+ name: errorCode,
1445
+ $metadata: deserializeMetadata(output),
1446
+ };
1447
+ break;
1448
+ case "ThrottlingException":
1449
+ case "com.amazonaws.finspacedata#ThrottlingException":
1450
+ response = {
1451
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1452
+ name: errorCode,
1453
+ $metadata: deserializeMetadata(output),
1454
+ };
1455
+ break;
1456
+ case "ValidationException":
1457
+ case "com.amazonaws.finspacedata#ValidationException":
1458
+ response = {
1459
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1460
+ name: errorCode,
1461
+ $metadata: deserializeMetadata(output),
1462
+ };
1463
+ break;
1464
+ default:
1465
+ const parsedBody = parsedOutput.body;
1466
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1467
+ response = {
1468
+ ...parsedBody,
1469
+ name: `${errorCode}`,
1470
+ message: parsedBody.message || parsedBody.Message || errorCode,
1471
+ $fault: "client",
1472
+ $metadata: deserializeMetadata(output),
1473
+ };
1474
+ }
1475
+ const message = response.message || response.Message || errorCode;
1476
+ response.message = message;
1477
+ delete response.Message;
1478
+ return Promise.reject(Object.assign(new Error(message), response));
1479
+ };
1480
+ const deserializeAws_restJson1ListDatasetsCommand = async (output, context) => {
1481
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1482
+ return deserializeAws_restJson1ListDatasetsCommandError(output, context);
1483
+ }
1484
+ const contents = {
1485
+ $metadata: deserializeMetadata(output),
1486
+ datasets: undefined,
1487
+ nextToken: undefined,
1488
+ };
1489
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1490
+ if (data.datasets !== undefined && data.datasets !== null) {
1491
+ contents.datasets = deserializeAws_restJson1DatasetList(data.datasets, context);
1492
+ }
1493
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1494
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
1495
+ }
1496
+ return Promise.resolve(contents);
1497
+ };
1498
+ exports.deserializeAws_restJson1ListDatasetsCommand = deserializeAws_restJson1ListDatasetsCommand;
1499
+ const deserializeAws_restJson1ListDatasetsCommandError = async (output, context) => {
1500
+ const parsedOutput = {
1501
+ ...output,
1502
+ body: await parseBody(output.body, context),
1503
+ };
1504
+ let response;
1505
+ let errorCode = "UnknownError";
1506
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1507
+ switch (errorCode) {
1508
+ case "ConflictException":
1509
+ case "com.amazonaws.finspacedata#ConflictException":
1510
+ response = {
1511
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1512
+ name: errorCode,
1513
+ $metadata: deserializeMetadata(output),
1514
+ };
1515
+ break;
1516
+ case "InternalServerException":
1517
+ case "com.amazonaws.finspacedata#InternalServerException":
1518
+ response = {
1519
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1520
+ name: errorCode,
1521
+ $metadata: deserializeMetadata(output),
1522
+ };
1523
+ break;
1524
+ case "ResourceNotFoundException":
1525
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1526
+ response = {
1527
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1528
+ name: errorCode,
1529
+ $metadata: deserializeMetadata(output),
1530
+ };
1531
+ break;
1532
+ case "ThrottlingException":
1533
+ case "com.amazonaws.finspacedata#ThrottlingException":
1534
+ response = {
1535
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1536
+ name: errorCode,
1537
+ $metadata: deserializeMetadata(output),
1538
+ };
1539
+ break;
1540
+ case "ValidationException":
1541
+ case "com.amazonaws.finspacedata#ValidationException":
1542
+ response = {
1543
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1544
+ name: errorCode,
1545
+ $metadata: deserializeMetadata(output),
1546
+ };
1547
+ break;
1548
+ default:
1549
+ const parsedBody = parsedOutput.body;
1550
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1551
+ response = {
1552
+ ...parsedBody,
1553
+ name: `${errorCode}`,
1554
+ message: parsedBody.message || parsedBody.Message || errorCode,
1555
+ $fault: "client",
1556
+ $metadata: deserializeMetadata(output),
1557
+ };
1558
+ }
1559
+ const message = response.message || response.Message || errorCode;
1560
+ response.message = message;
1561
+ delete response.Message;
1562
+ return Promise.reject(Object.assign(new Error(message), response));
1563
+ };
1564
+ const deserializeAws_restJson1ListDataViewsCommand = async (output, context) => {
88
1565
  if (output.statusCode !== 200 && output.statusCode >= 300) {
89
- return deserializeAws_restJson1CreateChangesetCommandError(output, context);
1566
+ return deserializeAws_restJson1ListDataViewsCommandError(output, context);
90
1567
  }
91
1568
  const contents = {
92
1569
  $metadata: deserializeMetadata(output),
93
- changeset: undefined,
1570
+ dataViews: undefined,
1571
+ nextToken: undefined,
94
1572
  };
95
1573
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
96
- if (data.changeset !== undefined && data.changeset !== null) {
97
- contents.changeset = deserializeAws_restJson1ChangesetInfo(data.changeset, context);
1574
+ if (data.dataViews !== undefined && data.dataViews !== null) {
1575
+ contents.dataViews = deserializeAws_restJson1DataViewList(data.dataViews, context);
1576
+ }
1577
+ if (data.nextToken !== undefined && data.nextToken !== null) {
1578
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
98
1579
  }
99
1580
  return Promise.resolve(contents);
100
1581
  };
101
- exports.deserializeAws_restJson1CreateChangesetCommand = deserializeAws_restJson1CreateChangesetCommand;
102
- const deserializeAws_restJson1CreateChangesetCommandError = async (output, context) => {
1582
+ exports.deserializeAws_restJson1ListDataViewsCommand = deserializeAws_restJson1ListDataViewsCommand;
1583
+ const deserializeAws_restJson1ListDataViewsCommandError = async (output, context) => {
103
1584
  const parsedOutput = {
104
1585
  ...output,
105
1586
  body: await parseBody(output.body, context),
@@ -108,10 +1589,10 @@ const deserializeAws_restJson1CreateChangesetCommandError = async (output, conte
108
1589
  let errorCode = "UnknownError";
109
1590
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
110
1591
  switch (errorCode) {
111
- case "AccessDeniedException":
112
- case "com.amazonaws.finspacedata#AccessDeniedException":
1592
+ case "ConflictException":
1593
+ case "com.amazonaws.finspacedata#ConflictException":
113
1594
  response = {
114
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1595
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
115
1596
  name: errorCode,
116
1597
  $metadata: deserializeMetadata(output),
117
1598
  };
@@ -164,26 +1645,26 @@ const deserializeAws_restJson1CreateChangesetCommandError = async (output, conte
164
1645
  delete response.Message;
165
1646
  return Promise.reject(Object.assign(new Error(message), response));
166
1647
  };
167
- const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = async (output, context) => {
1648
+ const deserializeAws_restJson1UpdateChangesetCommand = async (output, context) => {
168
1649
  if (output.statusCode !== 200 && output.statusCode >= 300) {
169
- return deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError(output, context);
1650
+ return deserializeAws_restJson1UpdateChangesetCommandError(output, context);
170
1651
  }
171
1652
  const contents = {
172
1653
  $metadata: deserializeMetadata(output),
173
- credentials: undefined,
174
- durationInMinutes: undefined,
1654
+ changesetId: undefined,
1655
+ datasetId: undefined,
175
1656
  };
176
1657
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
177
- if (data.credentials !== undefined && data.credentials !== null) {
178
- contents.credentials = deserializeAws_restJson1Credentials(data.credentials, context);
1658
+ if (data.changesetId !== undefined && data.changesetId !== null) {
1659
+ contents.changesetId = smithy_client_1.expectString(data.changesetId);
179
1660
  }
180
- if (data.durationInMinutes !== undefined && data.durationInMinutes !== null) {
181
- contents.durationInMinutes = smithy_client_1.expectLong(data.durationInMinutes);
1661
+ if (data.datasetId !== undefined && data.datasetId !== null) {
1662
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
182
1663
  }
183
1664
  return Promise.resolve(contents);
184
1665
  };
185
- exports.deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand = deserializeAws_restJson1GetProgrammaticAccessCredentialsCommand;
186
- const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = async (output, context) => {
1666
+ exports.deserializeAws_restJson1UpdateChangesetCommand = deserializeAws_restJson1UpdateChangesetCommand;
1667
+ const deserializeAws_restJson1UpdateChangesetCommandError = async (output, context) => {
187
1668
  const parsedOutput = {
188
1669
  ...output,
189
1670
  body: await parseBody(output.body, context),
@@ -200,6 +1681,14 @@ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = asy
200
1681
  $metadata: deserializeMetadata(output),
201
1682
  };
202
1683
  break;
1684
+ case "ConflictException":
1685
+ case "com.amazonaws.finspacedata#ConflictException":
1686
+ response = {
1687
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1688
+ name: errorCode,
1689
+ $metadata: deserializeMetadata(output),
1690
+ };
1691
+ break;
203
1692
  case "InternalServerException":
204
1693
  case "com.amazonaws.finspacedata#InternalServerException":
205
1694
  response = {
@@ -208,6 +1697,14 @@ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = asy
208
1697
  $metadata: deserializeMetadata(output),
209
1698
  };
210
1699
  break;
1700
+ case "ResourceNotFoundException":
1701
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1702
+ response = {
1703
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1704
+ name: errorCode,
1705
+ $metadata: deserializeMetadata(output),
1706
+ };
1707
+ break;
211
1708
  case "ThrottlingException":
212
1709
  case "com.amazonaws.finspacedata#ThrottlingException":
213
1710
  response = {
@@ -216,6 +1713,14 @@ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = asy
216
1713
  $metadata: deserializeMetadata(output),
217
1714
  };
218
1715
  break;
1716
+ case "ValidationException":
1717
+ case "com.amazonaws.finspacedata#ValidationException":
1718
+ response = {
1719
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1720
+ name: errorCode,
1721
+ $metadata: deserializeMetadata(output),
1722
+ };
1723
+ break;
219
1724
  default:
220
1725
  const parsedBody = parsedOutput.body;
221
1726
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -232,30 +1737,22 @@ const deserializeAws_restJson1GetProgrammaticAccessCredentialsCommandError = asy
232
1737
  delete response.Message;
233
1738
  return Promise.reject(Object.assign(new Error(message), response));
234
1739
  };
235
- const deserializeAws_restJson1GetWorkingLocationCommand = async (output, context) => {
1740
+ const deserializeAws_restJson1UpdateDatasetCommand = async (output, context) => {
236
1741
  if (output.statusCode !== 200 && output.statusCode >= 300) {
237
- return deserializeAws_restJson1GetWorkingLocationCommandError(output, context);
1742
+ return deserializeAws_restJson1UpdateDatasetCommandError(output, context);
238
1743
  }
239
1744
  const contents = {
240
1745
  $metadata: deserializeMetadata(output),
241
- s3Bucket: undefined,
242
- s3Path: undefined,
243
- s3Uri: undefined,
1746
+ datasetId: undefined,
244
1747
  };
245
1748
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
246
- if (data.s3Bucket !== undefined && data.s3Bucket !== null) {
247
- contents.s3Bucket = smithy_client_1.expectString(data.s3Bucket);
248
- }
249
- if (data.s3Path !== undefined && data.s3Path !== null) {
250
- contents.s3Path = smithy_client_1.expectString(data.s3Path);
251
- }
252
- if (data.s3Uri !== undefined && data.s3Uri !== null) {
253
- contents.s3Uri = smithy_client_1.expectString(data.s3Uri);
1749
+ if (data.datasetId !== undefined && data.datasetId !== null) {
1750
+ contents.datasetId = smithy_client_1.expectString(data.datasetId);
254
1751
  }
255
1752
  return Promise.resolve(contents);
256
1753
  };
257
- exports.deserializeAws_restJson1GetWorkingLocationCommand = deserializeAws_restJson1GetWorkingLocationCommand;
258
- const deserializeAws_restJson1GetWorkingLocationCommandError = async (output, context) => {
1754
+ exports.deserializeAws_restJson1UpdateDatasetCommand = deserializeAws_restJson1UpdateDatasetCommand;
1755
+ const deserializeAws_restJson1UpdateDatasetCommandError = async (output, context) => {
259
1756
  const parsedOutput = {
260
1757
  ...output,
261
1758
  body: await parseBody(output.body, context),
@@ -272,6 +1769,14 @@ const deserializeAws_restJson1GetWorkingLocationCommandError = async (output, co
272
1769
  $metadata: deserializeMetadata(output),
273
1770
  };
274
1771
  break;
1772
+ case "ConflictException":
1773
+ case "com.amazonaws.finspacedata#ConflictException":
1774
+ response = {
1775
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1776
+ name: errorCode,
1777
+ $metadata: deserializeMetadata(output),
1778
+ };
1779
+ break;
275
1780
  case "InternalServerException":
276
1781
  case "com.amazonaws.finspacedata#InternalServerException":
277
1782
  response = {
@@ -280,6 +1785,14 @@ const deserializeAws_restJson1GetWorkingLocationCommandError = async (output, co
280
1785
  $metadata: deserializeMetadata(output),
281
1786
  };
282
1787
  break;
1788
+ case "ResourceNotFoundException":
1789
+ case "com.amazonaws.finspacedata#ResourceNotFoundException":
1790
+ response = {
1791
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1792
+ name: errorCode,
1793
+ $metadata: deserializeMetadata(output),
1794
+ };
1795
+ break;
283
1796
  case "ThrottlingException":
284
1797
  case "com.amazonaws.finspacedata#ThrottlingException":
285
1798
  response = {
@@ -325,6 +1838,19 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
325
1838
  }
326
1839
  return contents;
327
1840
  };
1841
+ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
1842
+ const contents = {
1843
+ name: "ConflictException",
1844
+ $fault: "client",
1845
+ $metadata: deserializeMetadata(parsedOutput),
1846
+ message: undefined,
1847
+ };
1848
+ const data = parsedOutput.body;
1849
+ if (data.message !== undefined && data.message !== null) {
1850
+ contents.message = smithy_client_1.expectString(data.message);
1851
+ }
1852
+ return contents;
1853
+ };
328
1854
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
329
1855
  const contents = {
330
1856
  name: "InternalServerException",
@@ -338,6 +1864,19 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
338
1864
  }
339
1865
  return contents;
340
1866
  };
1867
+ const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => {
1868
+ const contents = {
1869
+ name: "LimitExceededException",
1870
+ $fault: "client",
1871
+ $metadata: deserializeMetadata(parsedOutput),
1872
+ message: undefined,
1873
+ };
1874
+ const data = parsedOutput.body;
1875
+ if (data.message !== undefined && data.message !== null) {
1876
+ contents.message = smithy_client_1.expectString(data.message);
1877
+ }
1878
+ return contents;
1879
+ };
341
1880
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
342
1881
  const contents = {
343
1882
  name: "ResourceNotFoundException",
@@ -373,7 +1912,122 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
373
1912
  }
374
1913
  return contents;
375
1914
  };
376
- const serializeAws_restJson1stringMap = (input, context) => {
1915
+ const serializeAws_restJson1ColumnDefinition = (input, context) => {
1916
+ return {
1917
+ ...(input.columnDescription !== undefined &&
1918
+ input.columnDescription !== null && { columnDescription: input.columnDescription }),
1919
+ ...(input.columnName !== undefined && input.columnName !== null && { columnName: input.columnName }),
1920
+ ...(input.dataType !== undefined && input.dataType !== null && { dataType: input.dataType }),
1921
+ };
1922
+ };
1923
+ const serializeAws_restJson1ColumnList = (input, context) => {
1924
+ return input
1925
+ .filter((e) => e != null)
1926
+ .map((entry) => {
1927
+ if (entry === null) {
1928
+ return null;
1929
+ }
1930
+ return serializeAws_restJson1ColumnDefinition(entry, context);
1931
+ });
1932
+ };
1933
+ const serializeAws_restJson1ColumnNameList = (input, context) => {
1934
+ return input
1935
+ .filter((e) => e != null)
1936
+ .map((entry) => {
1937
+ if (entry === null) {
1938
+ return null;
1939
+ }
1940
+ return entry;
1941
+ });
1942
+ };
1943
+ const serializeAws_restJson1DatasetOwnerInfo = (input, context) => {
1944
+ return {
1945
+ ...(input.email !== undefined && input.email !== null && { email: input.email }),
1946
+ ...(input.name !== undefined && input.name !== null && { name: input.name }),
1947
+ ...(input.phoneNumber !== undefined && input.phoneNumber !== null && { phoneNumber: input.phoneNumber }),
1948
+ };
1949
+ };
1950
+ const serializeAws_restJson1DataViewDestinationTypeParams = (input, context) => {
1951
+ return {
1952
+ ...(input.destinationType !== undefined &&
1953
+ input.destinationType !== null && { destinationType: input.destinationType }),
1954
+ };
1955
+ };
1956
+ const serializeAws_restJson1FormatParams = (input, context) => {
1957
+ return Object.entries(input).reduce((acc, [key, value]) => {
1958
+ if (value === null) {
1959
+ return acc;
1960
+ }
1961
+ return {
1962
+ ...acc,
1963
+ [key]: value,
1964
+ };
1965
+ }, {});
1966
+ };
1967
+ const serializeAws_restJson1PartitionColumnList = (input, context) => {
1968
+ return input
1969
+ .filter((e) => e != null)
1970
+ .map((entry) => {
1971
+ if (entry === null) {
1972
+ return null;
1973
+ }
1974
+ return entry;
1975
+ });
1976
+ };
1977
+ const serializeAws_restJson1PermissionGroupParams = (input, context) => {
1978
+ return {
1979
+ ...(input.datasetPermissions !== undefined &&
1980
+ input.datasetPermissions !== null && {
1981
+ datasetPermissions: serializeAws_restJson1ResourcePermissionsList(input.datasetPermissions, context),
1982
+ }),
1983
+ ...(input.permissionGroupId !== undefined &&
1984
+ input.permissionGroupId !== null && { permissionGroupId: input.permissionGroupId }),
1985
+ };
1986
+ };
1987
+ const serializeAws_restJson1ResourcePermission = (input, context) => {
1988
+ return {
1989
+ ...(input.permission !== undefined && input.permission !== null && { permission: input.permission }),
1990
+ };
1991
+ };
1992
+ const serializeAws_restJson1ResourcePermissionsList = (input, context) => {
1993
+ return input
1994
+ .filter((e) => e != null)
1995
+ .map((entry) => {
1996
+ if (entry === null) {
1997
+ return null;
1998
+ }
1999
+ return serializeAws_restJson1ResourcePermission(entry, context);
2000
+ });
2001
+ };
2002
+ const serializeAws_restJson1SchemaDefinition = (input, context) => {
2003
+ return {
2004
+ ...(input.columns !== undefined &&
2005
+ input.columns !== null && { columns: serializeAws_restJson1ColumnList(input.columns, context) }),
2006
+ ...(input.primaryKeyColumns !== undefined &&
2007
+ input.primaryKeyColumns !== null && {
2008
+ primaryKeyColumns: serializeAws_restJson1ColumnNameList(input.primaryKeyColumns, context),
2009
+ }),
2010
+ };
2011
+ };
2012
+ const serializeAws_restJson1SchemaUnion = (input, context) => {
2013
+ return {
2014
+ ...(input.tabularSchemaConfig !== undefined &&
2015
+ input.tabularSchemaConfig !== null && {
2016
+ tabularSchemaConfig: serializeAws_restJson1SchemaDefinition(input.tabularSchemaConfig, context),
2017
+ }),
2018
+ };
2019
+ };
2020
+ const serializeAws_restJson1SortColumnList = (input, context) => {
2021
+ return input
2022
+ .filter((e) => e != null)
2023
+ .map((entry) => {
2024
+ if (entry === null) {
2025
+ return null;
2026
+ }
2027
+ return entry;
2028
+ });
2029
+ };
2030
+ const serializeAws_restJson1SourceParams = (input, context) => {
377
2031
  return Object.entries(input).reduce((acc, [key, value]) => {
378
2032
  if (value === null) {
379
2033
  return acc;
@@ -384,34 +2038,71 @@ const serializeAws_restJson1stringMap = (input, context) => {
384
2038
  };
385
2039
  }, {});
386
2040
  };
387
- const deserializeAws_restJson1ChangesetInfo = (output, context) => {
2041
+ const deserializeAws_restJson1ChangesetErrorInfo = (output, context) => {
2042
+ return {
2043
+ errorCategory: smithy_client_1.expectString(output.errorCategory),
2044
+ errorMessage: smithy_client_1.expectString(output.errorMessage),
2045
+ };
2046
+ };
2047
+ const deserializeAws_restJson1ChangesetList = (output, context) => {
2048
+ return (output || [])
2049
+ .filter((e) => e != null)
2050
+ .map((entry) => {
2051
+ if (entry === null) {
2052
+ return null;
2053
+ }
2054
+ return deserializeAws_restJson1ChangesetSummary(entry, context);
2055
+ });
2056
+ };
2057
+ const deserializeAws_restJson1ChangesetSummary = (output, context) => {
388
2058
  return {
2059
+ activeUntilTimestamp: smithy_client_1.expectLong(output.activeUntilTimestamp),
389
2060
  changeType: smithy_client_1.expectString(output.changeType),
390
2061
  changesetArn: smithy_client_1.expectString(output.changesetArn),
391
- changesetLabels: output.changesetLabels !== undefined && output.changesetLabels !== null
392
- ? deserializeAws_restJson1stringMap(output.changesetLabels, context)
393
- : undefined,
394
- createTimestamp: output.createTimestamp !== undefined && output.createTimestamp !== null
395
- ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createTimestamp)))
396
- : undefined,
2062
+ changesetId: smithy_client_1.expectString(output.changesetId),
2063
+ createTime: smithy_client_1.expectLong(output.createTime),
397
2064
  datasetId: smithy_client_1.expectString(output.datasetId),
398
2065
  errorInfo: output.errorInfo !== undefined && output.errorInfo !== null
399
- ? deserializeAws_restJson1ErrorInfo(output.errorInfo, context)
2066
+ ? deserializeAws_restJson1ChangesetErrorInfo(output.errorInfo, context)
400
2067
  : undefined,
401
2068
  formatParams: output.formatParams !== undefined && output.formatParams !== null
402
- ? deserializeAws_restJson1stringMap(output.formatParams, context)
2069
+ ? deserializeAws_restJson1FormatParams(output.formatParams, context)
403
2070
  : undefined,
404
- formatType: smithy_client_1.expectString(output.formatType),
405
- id: smithy_client_1.expectString(output.id),
406
2071
  sourceParams: output.sourceParams !== undefined && output.sourceParams !== null
407
- ? deserializeAws_restJson1stringMap(output.sourceParams, context)
2072
+ ? deserializeAws_restJson1SourceParams(output.sourceParams, context)
408
2073
  : undefined,
409
- sourceType: smithy_client_1.expectString(output.sourceType),
410
2074
  status: smithy_client_1.expectString(output.status),
411
2075
  updatedByChangesetId: smithy_client_1.expectString(output.updatedByChangesetId),
412
2076
  updatesChangesetId: smithy_client_1.expectString(output.updatesChangesetId),
413
2077
  };
414
2078
  };
2079
+ const deserializeAws_restJson1ColumnDefinition = (output, context) => {
2080
+ return {
2081
+ columnDescription: smithy_client_1.expectString(output.columnDescription),
2082
+ columnName: smithy_client_1.expectString(output.columnName),
2083
+ dataType: smithy_client_1.expectString(output.dataType),
2084
+ };
2085
+ };
2086
+ const deserializeAws_restJson1ColumnList = (output, context) => {
2087
+ return (output || [])
2088
+ .filter((e) => e != null)
2089
+ .map((entry) => {
2090
+ if (entry === null) {
2091
+ return null;
2092
+ }
2093
+ return deserializeAws_restJson1ColumnDefinition(entry, context);
2094
+ });
2095
+ };
2096
+ const deserializeAws_restJson1ColumnNameList = (output, context) => {
2097
+ return (output || [])
2098
+ .filter((e) => e != null)
2099
+ .map((entry) => {
2100
+ if (entry === null) {
2101
+ return null;
2102
+ }
2103
+ return smithy_client_1.expectString(entry);
2104
+ });
2105
+ };
415
2106
  const deserializeAws_restJson1Credentials = (output, context) => {
416
2107
  return {
417
2108
  accessKeyId: smithy_client_1.expectString(output.accessKeyId),
@@ -419,13 +2110,135 @@ const deserializeAws_restJson1Credentials = (output, context) => {
419
2110
  sessionToken: smithy_client_1.expectString(output.sessionToken),
420
2111
  };
421
2112
  };
422
- const deserializeAws_restJson1ErrorInfo = (output, context) => {
2113
+ const deserializeAws_restJson1Dataset = (output, context) => {
2114
+ return {
2115
+ alias: smithy_client_1.expectString(output.alias),
2116
+ createTime: smithy_client_1.expectLong(output.createTime),
2117
+ datasetArn: smithy_client_1.expectString(output.datasetArn),
2118
+ datasetDescription: smithy_client_1.expectString(output.datasetDescription),
2119
+ datasetId: smithy_client_1.expectString(output.datasetId),
2120
+ datasetTitle: smithy_client_1.expectString(output.datasetTitle),
2121
+ kind: smithy_client_1.expectString(output.kind),
2122
+ lastModifiedTime: smithy_client_1.expectLong(output.lastModifiedTime),
2123
+ ownerInfo: output.ownerInfo !== undefined && output.ownerInfo !== null
2124
+ ? deserializeAws_restJson1DatasetOwnerInfo(output.ownerInfo, context)
2125
+ : undefined,
2126
+ schemaDefinition: output.schemaDefinition !== undefined && output.schemaDefinition !== null
2127
+ ? deserializeAws_restJson1SchemaUnion(output.schemaDefinition, context)
2128
+ : undefined,
2129
+ };
2130
+ };
2131
+ const deserializeAws_restJson1DatasetList = (output, context) => {
2132
+ return (output || [])
2133
+ .filter((e) => e != null)
2134
+ .map((entry) => {
2135
+ if (entry === null) {
2136
+ return null;
2137
+ }
2138
+ return deserializeAws_restJson1Dataset(entry, context);
2139
+ });
2140
+ };
2141
+ const deserializeAws_restJson1DatasetOwnerInfo = (output, context) => {
2142
+ return {
2143
+ email: smithy_client_1.expectString(output.email),
2144
+ name: smithy_client_1.expectString(output.name),
2145
+ phoneNumber: smithy_client_1.expectString(output.phoneNumber),
2146
+ };
2147
+ };
2148
+ const deserializeAws_restJson1DataViewDestinationTypeParams = (output, context) => {
2149
+ return {
2150
+ destinationType: smithy_client_1.expectString(output.destinationType),
2151
+ };
2152
+ };
2153
+ const deserializeAws_restJson1DataViewErrorInfo = (output, context) => {
423
2154
  return {
424
2155
  errorCategory: smithy_client_1.expectString(output.errorCategory),
425
2156
  errorMessage: smithy_client_1.expectString(output.errorMessage),
426
2157
  };
427
2158
  };
428
- const deserializeAws_restJson1stringMap = (output, context) => {
2159
+ const deserializeAws_restJson1DataViewList = (output, context) => {
2160
+ return (output || [])
2161
+ .filter((e) => e != null)
2162
+ .map((entry) => {
2163
+ if (entry === null) {
2164
+ return null;
2165
+ }
2166
+ return deserializeAws_restJson1DataViewSummary(entry, context);
2167
+ });
2168
+ };
2169
+ const deserializeAws_restJson1DataViewSummary = (output, context) => {
2170
+ return {
2171
+ asOfTimestamp: smithy_client_1.expectLong(output.asOfTimestamp),
2172
+ autoUpdate: smithy_client_1.expectBoolean(output.autoUpdate),
2173
+ createTime: smithy_client_1.expectLong(output.createTime),
2174
+ dataViewArn: smithy_client_1.expectString(output.dataViewArn),
2175
+ dataViewId: smithy_client_1.expectString(output.dataViewId),
2176
+ datasetId: smithy_client_1.expectString(output.datasetId),
2177
+ destinationTypeProperties: output.destinationTypeProperties !== undefined && output.destinationTypeProperties !== null
2178
+ ? deserializeAws_restJson1DataViewDestinationTypeParams(output.destinationTypeProperties, context)
2179
+ : undefined,
2180
+ errorInfo: output.errorInfo !== undefined && output.errorInfo !== null
2181
+ ? deserializeAws_restJson1DataViewErrorInfo(output.errorInfo, context)
2182
+ : undefined,
2183
+ lastModifiedTime: smithy_client_1.expectLong(output.lastModifiedTime),
2184
+ partitionColumns: output.partitionColumns !== undefined && output.partitionColumns !== null
2185
+ ? deserializeAws_restJson1PartitionColumnList(output.partitionColumns, context)
2186
+ : undefined,
2187
+ sortColumns: output.sortColumns !== undefined && output.sortColumns !== null
2188
+ ? deserializeAws_restJson1SortColumnList(output.sortColumns, context)
2189
+ : undefined,
2190
+ status: smithy_client_1.expectString(output.status),
2191
+ };
2192
+ };
2193
+ const deserializeAws_restJson1FormatParams = (output, context) => {
2194
+ return Object.entries(output).reduce((acc, [key, value]) => {
2195
+ if (value === null) {
2196
+ return acc;
2197
+ }
2198
+ return {
2199
+ ...acc,
2200
+ [key]: smithy_client_1.expectString(value),
2201
+ };
2202
+ }, {});
2203
+ };
2204
+ const deserializeAws_restJson1PartitionColumnList = (output, context) => {
2205
+ return (output || [])
2206
+ .filter((e) => e != null)
2207
+ .map((entry) => {
2208
+ if (entry === null) {
2209
+ return null;
2210
+ }
2211
+ return smithy_client_1.expectString(entry);
2212
+ });
2213
+ };
2214
+ const deserializeAws_restJson1SchemaDefinition = (output, context) => {
2215
+ return {
2216
+ columns: output.columns !== undefined && output.columns !== null
2217
+ ? deserializeAws_restJson1ColumnList(output.columns, context)
2218
+ : undefined,
2219
+ primaryKeyColumns: output.primaryKeyColumns !== undefined && output.primaryKeyColumns !== null
2220
+ ? deserializeAws_restJson1ColumnNameList(output.primaryKeyColumns, context)
2221
+ : undefined,
2222
+ };
2223
+ };
2224
+ const deserializeAws_restJson1SchemaUnion = (output, context) => {
2225
+ return {
2226
+ tabularSchemaConfig: output.tabularSchemaConfig !== undefined && output.tabularSchemaConfig !== null
2227
+ ? deserializeAws_restJson1SchemaDefinition(output.tabularSchemaConfig, context)
2228
+ : undefined,
2229
+ };
2230
+ };
2231
+ const deserializeAws_restJson1SortColumnList = (output, context) => {
2232
+ return (output || [])
2233
+ .filter((e) => e != null)
2234
+ .map((entry) => {
2235
+ if (entry === null) {
2236
+ return null;
2237
+ }
2238
+ return smithy_client_1.expectString(entry);
2239
+ });
2240
+ };
2241
+ const deserializeAws_restJson1SourceParams = (output, context) => {
429
2242
  return Object.entries(output).reduce((acc, [key, value]) => {
430
2243
  if (value === null) {
431
2244
  return acc;