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