@aws-sdk/client-dataexchange 3.928.0 → 3.929.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 (58) hide show
  1. package/dist-cjs/index.js +1900 -1839
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/DataExchangeClient.js +2 -0
  4. package/dist-es/commands/AcceptDataGrantCommand.js +3 -9
  5. package/dist-es/commands/CancelJobCommand.js +3 -9
  6. package/dist-es/commands/CreateDataGrantCommand.js +3 -9
  7. package/dist-es/commands/CreateDataSetCommand.js +3 -9
  8. package/dist-es/commands/CreateEventActionCommand.js +3 -9
  9. package/dist-es/commands/CreateJobCommand.js +3 -9
  10. package/dist-es/commands/CreateRevisionCommand.js +3 -9
  11. package/dist-es/commands/DeleteAssetCommand.js +3 -9
  12. package/dist-es/commands/DeleteDataGrantCommand.js +3 -9
  13. package/dist-es/commands/DeleteDataSetCommand.js +3 -9
  14. package/dist-es/commands/DeleteEventActionCommand.js +3 -9
  15. package/dist-es/commands/DeleteRevisionCommand.js +3 -9
  16. package/dist-es/commands/GetAssetCommand.js +3 -9
  17. package/dist-es/commands/GetDataGrantCommand.js +3 -9
  18. package/dist-es/commands/GetDataSetCommand.js +3 -9
  19. package/dist-es/commands/GetEventActionCommand.js +3 -9
  20. package/dist-es/commands/GetJobCommand.js +3 -9
  21. package/dist-es/commands/GetReceivedDataGrantCommand.js +3 -9
  22. package/dist-es/commands/GetRevisionCommand.js +3 -9
  23. package/dist-es/commands/ListDataGrantsCommand.js +3 -9
  24. package/dist-es/commands/ListDataSetRevisionsCommand.js +3 -9
  25. package/dist-es/commands/ListDataSetsCommand.js +3 -9
  26. package/dist-es/commands/ListEventActionsCommand.js +3 -9
  27. package/dist-es/commands/ListJobsCommand.js +3 -9
  28. package/dist-es/commands/ListReceivedDataGrantsCommand.js +3 -9
  29. package/dist-es/commands/ListRevisionAssetsCommand.js +3 -9
  30. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  31. package/dist-es/commands/RevokeRevisionCommand.js +3 -9
  32. package/dist-es/commands/SendApiAssetCommand.js +3 -9
  33. package/dist-es/commands/SendDataSetNotificationCommand.js +3 -9
  34. package/dist-es/commands/StartJobCommand.js +3 -9
  35. package/dist-es/commands/TagResourceCommand.js +3 -9
  36. package/dist-es/commands/UntagResourceCommand.js +3 -9
  37. package/dist-es/commands/UpdateAssetCommand.js +3 -9
  38. package/dist-es/commands/UpdateDataSetCommand.js +3 -9
  39. package/dist-es/commands/UpdateEventActionCommand.js +3 -9
  40. package/dist-es/commands/UpdateRevisionCommand.js +3 -9
  41. package/dist-es/runtimeConfig.shared.js +2 -0
  42. package/dist-es/schemas/schemas_0.js +1830 -0
  43. package/dist-types/DataExchangeClient.d.ts +10 -1
  44. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  45. package/dist-types/runtimeConfig.d.ts +1 -0
  46. package/dist-types/runtimeConfig.native.d.ts +1 -0
  47. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  48. package/dist-types/schemas/schemas_0.d.ts +204 -0
  49. package/dist-types/ts3.4/DataExchangeClient.d.ts +4 -0
  50. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  51. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  52. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  53. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  54. package/dist-types/ts3.4/schemas/schemas_0.d.ts +209 -0
  55. package/package.json +2 -3
  56. package/dist-es/protocols/Aws_restJson1.js +0 -1580
  57. package/dist-types/protocols/Aws_restJson1.d.ts +0 -335
  58. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -449
@@ -1,1580 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
4
- import { _json, collectBody, convertMap, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, take, withBaseException, } from "@smithy/smithy-client";
5
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
6
- import { DataExchangeServiceException as __BaseException } from "../models/DataExchangeServiceException";
7
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
8
- export const se_AcceptDataGrantCommand = async (input, context) => {
9
- const b = rb(input, context);
10
- const headers = {};
11
- b.bp("/v1/data-grants/{DataGrantArn}/accept");
12
- b.p("DataGrantArn", () => input.DataGrantArn, "{DataGrantArn}", false);
13
- let body;
14
- b.m("POST").h(headers).b(body);
15
- return b.build();
16
- };
17
- export const se_CancelJobCommand = async (input, context) => {
18
- const b = rb(input, context);
19
- const headers = {};
20
- b.bp("/v1/jobs/{JobId}");
21
- b.p("JobId", () => input.JobId, "{JobId}", false);
22
- let body;
23
- b.m("DELETE").h(headers).b(body);
24
- return b.build();
25
- };
26
- export const se_CreateDataGrantCommand = async (input, context) => {
27
- const b = rb(input, context);
28
- const headers = {
29
- "content-type": "application/json",
30
- };
31
- b.bp("/v1/data-grants");
32
- let body;
33
- body = JSON.stringify(take(input, {
34
- Description: [],
35
- EndsAt: (_) => __serializeDateTime(_),
36
- GrantDistributionScope: [],
37
- Name: [],
38
- ReceiverPrincipal: [],
39
- SourceDataSetId: [],
40
- Tags: (_) => _json(_),
41
- }));
42
- b.m("POST").h(headers).b(body);
43
- return b.build();
44
- };
45
- export const se_CreateDataSetCommand = async (input, context) => {
46
- const b = rb(input, context);
47
- const headers = {
48
- "content-type": "application/json",
49
- };
50
- b.bp("/v1/data-sets");
51
- let body;
52
- body = JSON.stringify(take(input, {
53
- AssetType: [],
54
- Description: [],
55
- Name: [],
56
- Tags: (_) => _json(_),
57
- }));
58
- b.m("POST").h(headers).b(body);
59
- return b.build();
60
- };
61
- export const se_CreateEventActionCommand = async (input, context) => {
62
- const b = rb(input, context);
63
- const headers = {
64
- "content-type": "application/json",
65
- };
66
- b.bp("/v1/event-actions");
67
- let body;
68
- body = JSON.stringify(take(input, {
69
- Action: (_) => _json(_),
70
- Event: (_) => _json(_),
71
- Tags: (_) => _json(_),
72
- }));
73
- b.m("POST").h(headers).b(body);
74
- return b.build();
75
- };
76
- export const se_CreateJobCommand = async (input, context) => {
77
- const b = rb(input, context);
78
- const headers = {
79
- "content-type": "application/json",
80
- };
81
- b.bp("/v1/jobs");
82
- let body;
83
- body = JSON.stringify(take(input, {
84
- Details: (_) => _json(_),
85
- Type: [],
86
- }));
87
- b.m("POST").h(headers).b(body);
88
- return b.build();
89
- };
90
- export const se_CreateRevisionCommand = async (input, context) => {
91
- const b = rb(input, context);
92
- const headers = {
93
- "content-type": "application/json",
94
- };
95
- b.bp("/v1/data-sets/{DataSetId}/revisions");
96
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
97
- let body;
98
- body = JSON.stringify(take(input, {
99
- Comment: [],
100
- Tags: (_) => _json(_),
101
- }));
102
- b.m("POST").h(headers).b(body);
103
- return b.build();
104
- };
105
- export const se_DeleteAssetCommand = async (input, context) => {
106
- const b = rb(input, context);
107
- const headers = {};
108
- b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}");
109
- b.p("AssetId", () => input.AssetId, "{AssetId}", false);
110
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
111
- b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
112
- let body;
113
- b.m("DELETE").h(headers).b(body);
114
- return b.build();
115
- };
116
- export const se_DeleteDataGrantCommand = async (input, context) => {
117
- const b = rb(input, context);
118
- const headers = {};
119
- b.bp("/v1/data-grants/{DataGrantId}");
120
- b.p("DataGrantId", () => input.DataGrantId, "{DataGrantId}", false);
121
- let body;
122
- b.m("DELETE").h(headers).b(body);
123
- return b.build();
124
- };
125
- export const se_DeleteDataSetCommand = async (input, context) => {
126
- const b = rb(input, context);
127
- const headers = {};
128
- b.bp("/v1/data-sets/{DataSetId}");
129
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
130
- let body;
131
- b.m("DELETE").h(headers).b(body);
132
- return b.build();
133
- };
134
- export const se_DeleteEventActionCommand = async (input, context) => {
135
- const b = rb(input, context);
136
- const headers = {};
137
- b.bp("/v1/event-actions/{EventActionId}");
138
- b.p("EventActionId", () => input.EventActionId, "{EventActionId}", false);
139
- let body;
140
- b.m("DELETE").h(headers).b(body);
141
- return b.build();
142
- };
143
- export const se_DeleteRevisionCommand = async (input, context) => {
144
- const b = rb(input, context);
145
- const headers = {};
146
- b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}");
147
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
148
- b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
149
- let body;
150
- b.m("DELETE").h(headers).b(body);
151
- return b.build();
152
- };
153
- export const se_GetAssetCommand = async (input, context) => {
154
- const b = rb(input, context);
155
- const headers = {};
156
- b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}");
157
- b.p("AssetId", () => input.AssetId, "{AssetId}", false);
158
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
159
- b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
160
- let body;
161
- b.m("GET").h(headers).b(body);
162
- return b.build();
163
- };
164
- export const se_GetDataGrantCommand = async (input, context) => {
165
- const b = rb(input, context);
166
- const headers = {};
167
- b.bp("/v1/data-grants/{DataGrantId}");
168
- b.p("DataGrantId", () => input.DataGrantId, "{DataGrantId}", false);
169
- let body;
170
- b.m("GET").h(headers).b(body);
171
- return b.build();
172
- };
173
- export const se_GetDataSetCommand = async (input, context) => {
174
- const b = rb(input, context);
175
- const headers = {};
176
- b.bp("/v1/data-sets/{DataSetId}");
177
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
178
- let body;
179
- b.m("GET").h(headers).b(body);
180
- return b.build();
181
- };
182
- export const se_GetEventActionCommand = async (input, context) => {
183
- const b = rb(input, context);
184
- const headers = {};
185
- b.bp("/v1/event-actions/{EventActionId}");
186
- b.p("EventActionId", () => input.EventActionId, "{EventActionId}", false);
187
- let body;
188
- b.m("GET").h(headers).b(body);
189
- return b.build();
190
- };
191
- export const se_GetJobCommand = async (input, context) => {
192
- const b = rb(input, context);
193
- const headers = {};
194
- b.bp("/v1/jobs/{JobId}");
195
- b.p("JobId", () => input.JobId, "{JobId}", false);
196
- let body;
197
- b.m("GET").h(headers).b(body);
198
- return b.build();
199
- };
200
- export const se_GetReceivedDataGrantCommand = async (input, context) => {
201
- const b = rb(input, context);
202
- const headers = {};
203
- b.bp("/v1/received-data-grants/{DataGrantArn}");
204
- b.p("DataGrantArn", () => input.DataGrantArn, "{DataGrantArn}", false);
205
- let body;
206
- b.m("GET").h(headers).b(body);
207
- return b.build();
208
- };
209
- export const se_GetRevisionCommand = async (input, context) => {
210
- const b = rb(input, context);
211
- const headers = {};
212
- b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}");
213
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
214
- b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
215
- let body;
216
- b.m("GET").h(headers).b(body);
217
- return b.build();
218
- };
219
- export const se_ListDataGrantsCommand = async (input, context) => {
220
- const b = rb(input, context);
221
- const headers = {};
222
- b.bp("/v1/data-grants");
223
- const query = map({
224
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
225
- [_nT]: [, input[_NT]],
226
- });
227
- let body;
228
- b.m("GET").h(headers).q(query).b(body);
229
- return b.build();
230
- };
231
- export const se_ListDataSetRevisionsCommand = async (input, context) => {
232
- const b = rb(input, context);
233
- const headers = {};
234
- b.bp("/v1/data-sets/{DataSetId}/revisions");
235
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
236
- const query = map({
237
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
238
- [_nT]: [, input[_NT]],
239
- });
240
- let body;
241
- b.m("GET").h(headers).q(query).b(body);
242
- return b.build();
243
- };
244
- export const se_ListDataSetsCommand = async (input, context) => {
245
- const b = rb(input, context);
246
- const headers = {};
247
- b.bp("/v1/data-sets");
248
- const query = map({
249
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
250
- [_nT]: [, input[_NT]],
251
- [_o]: [, input[_O]],
252
- });
253
- let body;
254
- b.m("GET").h(headers).q(query).b(body);
255
- return b.build();
256
- };
257
- export const se_ListEventActionsCommand = async (input, context) => {
258
- const b = rb(input, context);
259
- const headers = {};
260
- b.bp("/v1/event-actions");
261
- const query = map({
262
- [_eSI]: [, input[_ESI]],
263
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
264
- [_nT]: [, input[_NT]],
265
- });
266
- let body;
267
- b.m("GET").h(headers).q(query).b(body);
268
- return b.build();
269
- };
270
- export const se_ListJobsCommand = async (input, context) => {
271
- const b = rb(input, context);
272
- const headers = {};
273
- b.bp("/v1/jobs");
274
- const query = map({
275
- [_dSI]: [, input[_DSI]],
276
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
277
- [_nT]: [, input[_NT]],
278
- [_rI]: [, input[_RI]],
279
- });
280
- let body;
281
- b.m("GET").h(headers).q(query).b(body);
282
- return b.build();
283
- };
284
- export const se_ListReceivedDataGrantsCommand = async (input, context) => {
285
- const b = rb(input, context);
286
- const headers = {};
287
- b.bp("/v1/received-data-grants");
288
- const query = map({
289
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
290
- [_nT]: [, input[_NT]],
291
- [_aS]: [() => input.AcceptanceState !== void 0, () => input[_AS] || []],
292
- });
293
- let body;
294
- b.m("GET").h(headers).q(query).b(body);
295
- return b.build();
296
- };
297
- export const se_ListRevisionAssetsCommand = async (input, context) => {
298
- const b = rb(input, context);
299
- const headers = {};
300
- b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets");
301
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
302
- b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
303
- const query = map({
304
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
305
- [_nT]: [, input[_NT]],
306
- });
307
- let body;
308
- b.m("GET").h(headers).q(query).b(body);
309
- return b.build();
310
- };
311
- export const se_ListTagsForResourceCommand = async (input, context) => {
312
- const b = rb(input, context);
313
- const headers = {};
314
- b.bp("/tags/{ResourceArn}");
315
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
316
- let body;
317
- b.m("GET").h(headers).b(body);
318
- return b.build();
319
- };
320
- export const se_RevokeRevisionCommand = async (input, context) => {
321
- const b = rb(input, context);
322
- const headers = {
323
- "content-type": "application/json",
324
- };
325
- b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/revoke");
326
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
327
- b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
328
- let body;
329
- body = JSON.stringify(take(input, {
330
- RevocationComment: [],
331
- }));
332
- b.m("POST").h(headers).b(body);
333
- return b.build();
334
- };
335
- export const se_SendApiAssetCommand = async (input, context) => {
336
- const b = rb(input, context);
337
- const headers = map({}, isSerializableHeaderValue, {
338
- ...(input.RequestHeaders !== undefined &&
339
- Object.keys(input.RequestHeaders).reduce((acc, suffix) => {
340
- acc[`x-amzn-dataexchange-header-${suffix.toLowerCase()}`] = input.RequestHeaders[suffix];
341
- return acc;
342
- }, {})),
343
- "content-type": "text/plain",
344
- [_xadai]: input[_AI],
345
- [_xaddsi]: input[_DSI],
346
- [_xadhm]: input[_M],
347
- [_xadp]: input[_P],
348
- [_xadri]: input[_RI],
349
- });
350
- b.bp("/v1");
351
- const query = map({
352
- ...convertMap(input.QueryStringParameters),
353
- });
354
- let body;
355
- if (input.Body !== undefined) {
356
- body = input.Body;
357
- }
358
- let { hostname: resolvedHostname } = await context.endpoint();
359
- if (context.disableHostPrefix !== true) {
360
- resolvedHostname = "api-fulfill." + resolvedHostname;
361
- if (!__isValidHostname(resolvedHostname)) {
362
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
363
- }
364
- }
365
- b.hn(resolvedHostname);
366
- b.m("POST").h(headers).q(query).b(body);
367
- return b.build();
368
- };
369
- export const se_SendDataSetNotificationCommand = async (input, context) => {
370
- const b = rb(input, context);
371
- const headers = {
372
- "content-type": "application/json",
373
- };
374
- b.bp("/v1/data-sets/{DataSetId}/notification");
375
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
376
- let body;
377
- body = JSON.stringify(take(input, {
378
- ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
379
- Comment: [],
380
- Details: (_) => se_NotificationDetails(_, context),
381
- Scope: (_) => _json(_),
382
- Type: [],
383
- }));
384
- b.m("POST").h(headers).b(body);
385
- return b.build();
386
- };
387
- export const se_StartJobCommand = async (input, context) => {
388
- const b = rb(input, context);
389
- const headers = {};
390
- b.bp("/v1/jobs/{JobId}");
391
- b.p("JobId", () => input.JobId, "{JobId}", false);
392
- let body;
393
- b.m("PATCH").h(headers).b(body);
394
- return b.build();
395
- };
396
- export const se_TagResourceCommand = async (input, context) => {
397
- const b = rb(input, context);
398
- const headers = {
399
- "content-type": "application/json",
400
- };
401
- b.bp("/tags/{ResourceArn}");
402
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
403
- let body;
404
- body = JSON.stringify(take(input, {
405
- tags: [, (_) => _json(_), `Tags`],
406
- }));
407
- b.m("POST").h(headers).b(body);
408
- return b.build();
409
- };
410
- export const se_UntagResourceCommand = async (input, context) => {
411
- const b = rb(input, context);
412
- const headers = {};
413
- b.bp("/tags/{ResourceArn}");
414
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
415
- const query = map({
416
- [_tK]: [__expectNonNull(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []],
417
- });
418
- let body;
419
- b.m("DELETE").h(headers).q(query).b(body);
420
- return b.build();
421
- };
422
- export const se_UpdateAssetCommand = async (input, context) => {
423
- const b = rb(input, context);
424
- const headers = {
425
- "content-type": "application/json",
426
- };
427
- b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}");
428
- b.p("AssetId", () => input.AssetId, "{AssetId}", false);
429
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
430
- b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
431
- let body;
432
- body = JSON.stringify(take(input, {
433
- Name: [],
434
- }));
435
- b.m("PATCH").h(headers).b(body);
436
- return b.build();
437
- };
438
- export const se_UpdateDataSetCommand = async (input, context) => {
439
- const b = rb(input, context);
440
- const headers = {
441
- "content-type": "application/json",
442
- };
443
- b.bp("/v1/data-sets/{DataSetId}");
444
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
445
- let body;
446
- body = JSON.stringify(take(input, {
447
- Description: [],
448
- Name: [],
449
- }));
450
- b.m("PATCH").h(headers).b(body);
451
- return b.build();
452
- };
453
- export const se_UpdateEventActionCommand = async (input, context) => {
454
- const b = rb(input, context);
455
- const headers = {
456
- "content-type": "application/json",
457
- };
458
- b.bp("/v1/event-actions/{EventActionId}");
459
- b.p("EventActionId", () => input.EventActionId, "{EventActionId}", false);
460
- let body;
461
- body = JSON.stringify(take(input, {
462
- Action: (_) => _json(_),
463
- }));
464
- b.m("PATCH").h(headers).b(body);
465
- return b.build();
466
- };
467
- export const se_UpdateRevisionCommand = async (input, context) => {
468
- const b = rb(input, context);
469
- const headers = {
470
- "content-type": "application/json",
471
- };
472
- b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}");
473
- b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
474
- b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
475
- let body;
476
- body = JSON.stringify(take(input, {
477
- Comment: [],
478
- Finalized: [],
479
- }));
480
- b.m("PATCH").h(headers).b(body);
481
- return b.build();
482
- };
483
- export const de_AcceptDataGrantCommand = async (output, context) => {
484
- if (output.statusCode !== 200 && output.statusCode >= 300) {
485
- return de_CommandError(output, context);
486
- }
487
- const contents = map({
488
- $metadata: deserializeMetadata(output),
489
- });
490
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
491
- const doc = take(data, {
492
- AcceptanceState: __expectString,
493
- AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
494
- Arn: __expectString,
495
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
496
- DataSetId: __expectString,
497
- Description: __expectString,
498
- EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
499
- GrantDistributionScope: __expectString,
500
- Id: __expectString,
501
- Name: __expectString,
502
- ReceiverPrincipal: __expectString,
503
- SenderPrincipal: __expectString,
504
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
505
- });
506
- Object.assign(contents, doc);
507
- return contents;
508
- };
509
- export const de_CancelJobCommand = async (output, context) => {
510
- if (output.statusCode !== 204 && output.statusCode >= 300) {
511
- return de_CommandError(output, context);
512
- }
513
- const contents = map({
514
- $metadata: deserializeMetadata(output),
515
- });
516
- await collectBody(output.body, context);
517
- return contents;
518
- };
519
- export const de_CreateDataGrantCommand = async (output, context) => {
520
- if (output.statusCode !== 201 && output.statusCode >= 300) {
521
- return de_CommandError(output, context);
522
- }
523
- const contents = map({
524
- $metadata: deserializeMetadata(output),
525
- });
526
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
527
- const doc = take(data, {
528
- AcceptanceState: __expectString,
529
- AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
530
- Arn: __expectString,
531
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
532
- DataSetId: __expectString,
533
- Description: __expectString,
534
- EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
535
- GrantDistributionScope: __expectString,
536
- Id: __expectString,
537
- Name: __expectString,
538
- ReceiverPrincipal: __expectString,
539
- SenderPrincipal: __expectString,
540
- SourceDataSetId: __expectString,
541
- Tags: _json,
542
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
543
- });
544
- Object.assign(contents, doc);
545
- return contents;
546
- };
547
- export const de_CreateDataSetCommand = async (output, context) => {
548
- if (output.statusCode !== 201 && output.statusCode >= 300) {
549
- return de_CommandError(output, context);
550
- }
551
- const contents = map({
552
- $metadata: deserializeMetadata(output),
553
- });
554
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
555
- const doc = take(data, {
556
- Arn: __expectString,
557
- AssetType: __expectString,
558
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
559
- Description: __expectString,
560
- Id: __expectString,
561
- Name: __expectString,
562
- Origin: __expectString,
563
- OriginDetails: _json,
564
- SourceId: __expectString,
565
- Tags: _json,
566
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
567
- });
568
- Object.assign(contents, doc);
569
- return contents;
570
- };
571
- export const de_CreateEventActionCommand = async (output, context) => {
572
- if (output.statusCode !== 201 && output.statusCode >= 300) {
573
- return de_CommandError(output, context);
574
- }
575
- const contents = map({
576
- $metadata: deserializeMetadata(output),
577
- });
578
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
579
- const doc = take(data, {
580
- Action: _json,
581
- Arn: __expectString,
582
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
583
- Event: _json,
584
- Id: __expectString,
585
- Tags: _json,
586
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
587
- });
588
- Object.assign(contents, doc);
589
- return contents;
590
- };
591
- export const de_CreateJobCommand = async (output, context) => {
592
- if (output.statusCode !== 201 && output.statusCode >= 300) {
593
- return de_CommandError(output, context);
594
- }
595
- const contents = map({
596
- $metadata: deserializeMetadata(output),
597
- });
598
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
599
- const doc = take(data, {
600
- Arn: __expectString,
601
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
602
- Details: (_) => de_ResponseDetails(_, context),
603
- Errors: (_) => de_ListOfJobError(_, context),
604
- Id: __expectString,
605
- State: __expectString,
606
- Type: __expectString,
607
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
608
- });
609
- Object.assign(contents, doc);
610
- return contents;
611
- };
612
- export const de_CreateRevisionCommand = async (output, context) => {
613
- if (output.statusCode !== 201 && output.statusCode >= 300) {
614
- return de_CommandError(output, context);
615
- }
616
- const contents = map({
617
- $metadata: deserializeMetadata(output),
618
- });
619
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
620
- const doc = take(data, {
621
- Arn: __expectString,
622
- Comment: __expectString,
623
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
624
- DataSetId: __expectString,
625
- Finalized: __expectBoolean,
626
- Id: __expectString,
627
- RevocationComment: __expectString,
628
- Revoked: __expectBoolean,
629
- RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
630
- SourceId: __expectString,
631
- Tags: _json,
632
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
633
- });
634
- Object.assign(contents, doc);
635
- return contents;
636
- };
637
- export const de_DeleteAssetCommand = async (output, context) => {
638
- if (output.statusCode !== 204 && output.statusCode >= 300) {
639
- return de_CommandError(output, context);
640
- }
641
- const contents = map({
642
- $metadata: deserializeMetadata(output),
643
- });
644
- await collectBody(output.body, context);
645
- return contents;
646
- };
647
- export const de_DeleteDataGrantCommand = async (output, context) => {
648
- if (output.statusCode !== 204 && output.statusCode >= 300) {
649
- return de_CommandError(output, context);
650
- }
651
- const contents = map({
652
- $metadata: deserializeMetadata(output),
653
- });
654
- await collectBody(output.body, context);
655
- return contents;
656
- };
657
- export const de_DeleteDataSetCommand = async (output, context) => {
658
- if (output.statusCode !== 204 && output.statusCode >= 300) {
659
- return de_CommandError(output, context);
660
- }
661
- const contents = map({
662
- $metadata: deserializeMetadata(output),
663
- });
664
- await collectBody(output.body, context);
665
- return contents;
666
- };
667
- export const de_DeleteEventActionCommand = async (output, context) => {
668
- if (output.statusCode !== 204 && output.statusCode >= 300) {
669
- return de_CommandError(output, context);
670
- }
671
- const contents = map({
672
- $metadata: deserializeMetadata(output),
673
- });
674
- await collectBody(output.body, context);
675
- return contents;
676
- };
677
- export const de_DeleteRevisionCommand = async (output, context) => {
678
- if (output.statusCode !== 204 && output.statusCode >= 300) {
679
- return de_CommandError(output, context);
680
- }
681
- const contents = map({
682
- $metadata: deserializeMetadata(output),
683
- });
684
- await collectBody(output.body, context);
685
- return contents;
686
- };
687
- export const de_GetAssetCommand = async (output, context) => {
688
- if (output.statusCode !== 200 && output.statusCode >= 300) {
689
- return de_CommandError(output, context);
690
- }
691
- const contents = map({
692
- $metadata: deserializeMetadata(output),
693
- });
694
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
695
- const doc = take(data, {
696
- Arn: __expectString,
697
- AssetDetails: (_) => de_AssetDetails(_, context),
698
- AssetType: __expectString,
699
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
700
- DataSetId: __expectString,
701
- Id: __expectString,
702
- Name: __expectString,
703
- RevisionId: __expectString,
704
- SourceId: __expectString,
705
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
706
- });
707
- Object.assign(contents, doc);
708
- return contents;
709
- };
710
- export const de_GetDataGrantCommand = async (output, context) => {
711
- if (output.statusCode !== 200 && output.statusCode >= 300) {
712
- return de_CommandError(output, context);
713
- }
714
- const contents = map({
715
- $metadata: deserializeMetadata(output),
716
- });
717
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
718
- const doc = take(data, {
719
- AcceptanceState: __expectString,
720
- AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
721
- Arn: __expectString,
722
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
723
- DataSetId: __expectString,
724
- Description: __expectString,
725
- EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
726
- GrantDistributionScope: __expectString,
727
- Id: __expectString,
728
- Name: __expectString,
729
- ReceiverPrincipal: __expectString,
730
- SenderPrincipal: __expectString,
731
- SourceDataSetId: __expectString,
732
- Tags: _json,
733
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
734
- });
735
- Object.assign(contents, doc);
736
- return contents;
737
- };
738
- export const de_GetDataSetCommand = async (output, context) => {
739
- if (output.statusCode !== 200 && output.statusCode >= 300) {
740
- return de_CommandError(output, context);
741
- }
742
- const contents = map({
743
- $metadata: deserializeMetadata(output),
744
- });
745
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
746
- const doc = take(data, {
747
- Arn: __expectString,
748
- AssetType: __expectString,
749
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
750
- Description: __expectString,
751
- Id: __expectString,
752
- Name: __expectString,
753
- Origin: __expectString,
754
- OriginDetails: _json,
755
- SourceId: __expectString,
756
- Tags: _json,
757
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
758
- });
759
- Object.assign(contents, doc);
760
- return contents;
761
- };
762
- export const de_GetEventActionCommand = async (output, context) => {
763
- if (output.statusCode !== 200 && output.statusCode >= 300) {
764
- return de_CommandError(output, context);
765
- }
766
- const contents = map({
767
- $metadata: deserializeMetadata(output),
768
- });
769
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
770
- const doc = take(data, {
771
- Action: _json,
772
- Arn: __expectString,
773
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
774
- Event: _json,
775
- Id: __expectString,
776
- Tags: _json,
777
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
778
- });
779
- Object.assign(contents, doc);
780
- return contents;
781
- };
782
- export const de_GetJobCommand = async (output, context) => {
783
- if (output.statusCode !== 200 && output.statusCode >= 300) {
784
- return de_CommandError(output, context);
785
- }
786
- const contents = map({
787
- $metadata: deserializeMetadata(output),
788
- });
789
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
790
- const doc = take(data, {
791
- Arn: __expectString,
792
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
793
- Details: (_) => de_ResponseDetails(_, context),
794
- Errors: (_) => de_ListOfJobError(_, context),
795
- Id: __expectString,
796
- State: __expectString,
797
- Type: __expectString,
798
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
799
- });
800
- Object.assign(contents, doc);
801
- return contents;
802
- };
803
- export const de_GetReceivedDataGrantCommand = async (output, context) => {
804
- if (output.statusCode !== 200 && output.statusCode >= 300) {
805
- return de_CommandError(output, context);
806
- }
807
- const contents = map({
808
- $metadata: deserializeMetadata(output),
809
- });
810
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
811
- const doc = take(data, {
812
- AcceptanceState: __expectString,
813
- AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
814
- Arn: __expectString,
815
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
816
- DataSetId: __expectString,
817
- Description: __expectString,
818
- EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
819
- GrantDistributionScope: __expectString,
820
- Id: __expectString,
821
- Name: __expectString,
822
- ReceiverPrincipal: __expectString,
823
- SenderPrincipal: __expectString,
824
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
825
- });
826
- Object.assign(contents, doc);
827
- return contents;
828
- };
829
- export const de_GetRevisionCommand = async (output, context) => {
830
- if (output.statusCode !== 200 && output.statusCode >= 300) {
831
- return de_CommandError(output, context);
832
- }
833
- const contents = map({
834
- $metadata: deserializeMetadata(output),
835
- });
836
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
837
- const doc = take(data, {
838
- Arn: __expectString,
839
- Comment: __expectString,
840
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
841
- DataSetId: __expectString,
842
- Finalized: __expectBoolean,
843
- Id: __expectString,
844
- RevocationComment: __expectString,
845
- Revoked: __expectBoolean,
846
- RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
847
- SourceId: __expectString,
848
- Tags: _json,
849
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
850
- });
851
- Object.assign(contents, doc);
852
- return contents;
853
- };
854
- export const de_ListDataGrantsCommand = async (output, context) => {
855
- if (output.statusCode !== 200 && output.statusCode >= 300) {
856
- return de_CommandError(output, context);
857
- }
858
- const contents = map({
859
- $metadata: deserializeMetadata(output),
860
- });
861
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
862
- const doc = take(data, {
863
- DataGrantSummaries: (_) => de_ListOfDataGrantSummaryEntry(_, context),
864
- NextToken: __expectString,
865
- });
866
- Object.assign(contents, doc);
867
- return contents;
868
- };
869
- export const de_ListDataSetRevisionsCommand = async (output, context) => {
870
- if (output.statusCode !== 200 && output.statusCode >= 300) {
871
- return de_CommandError(output, context);
872
- }
873
- const contents = map({
874
- $metadata: deserializeMetadata(output),
875
- });
876
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
877
- const doc = take(data, {
878
- NextToken: __expectString,
879
- Revisions: (_) => de_ListOfRevisionEntry(_, context),
880
- });
881
- Object.assign(contents, doc);
882
- return contents;
883
- };
884
- export const de_ListDataSetsCommand = async (output, context) => {
885
- if (output.statusCode !== 200 && output.statusCode >= 300) {
886
- return de_CommandError(output, context);
887
- }
888
- const contents = map({
889
- $metadata: deserializeMetadata(output),
890
- });
891
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
892
- const doc = take(data, {
893
- DataSets: (_) => de_ListOfDataSetEntry(_, context),
894
- NextToken: __expectString,
895
- });
896
- Object.assign(contents, doc);
897
- return contents;
898
- };
899
- export const de_ListEventActionsCommand = async (output, context) => {
900
- if (output.statusCode !== 200 && output.statusCode >= 300) {
901
- return de_CommandError(output, context);
902
- }
903
- const contents = map({
904
- $metadata: deserializeMetadata(output),
905
- });
906
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
907
- const doc = take(data, {
908
- EventActions: (_) => de_ListOfEventActionEntry(_, context),
909
- NextToken: __expectString,
910
- });
911
- Object.assign(contents, doc);
912
- return contents;
913
- };
914
- export const de_ListJobsCommand = async (output, context) => {
915
- if (output.statusCode !== 200 && output.statusCode >= 300) {
916
- return de_CommandError(output, context);
917
- }
918
- const contents = map({
919
- $metadata: deserializeMetadata(output),
920
- });
921
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
922
- const doc = take(data, {
923
- Jobs: (_) => de_ListOfJobEntry(_, context),
924
- NextToken: __expectString,
925
- });
926
- Object.assign(contents, doc);
927
- return contents;
928
- };
929
- export const de_ListReceivedDataGrantsCommand = async (output, context) => {
930
- if (output.statusCode !== 200 && output.statusCode >= 300) {
931
- return de_CommandError(output, context);
932
- }
933
- const contents = map({
934
- $metadata: deserializeMetadata(output),
935
- });
936
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
937
- const doc = take(data, {
938
- DataGrantSummaries: (_) => de_ListOfReceivedDataGrantSummariesEntry(_, context),
939
- NextToken: __expectString,
940
- });
941
- Object.assign(contents, doc);
942
- return contents;
943
- };
944
- export const de_ListRevisionAssetsCommand = async (output, context) => {
945
- if (output.statusCode !== 200 && output.statusCode >= 300) {
946
- return de_CommandError(output, context);
947
- }
948
- const contents = map({
949
- $metadata: deserializeMetadata(output),
950
- });
951
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
952
- const doc = take(data, {
953
- Assets: (_) => de_ListOfAssetEntry(_, context),
954
- NextToken: __expectString,
955
- });
956
- Object.assign(contents, doc);
957
- return contents;
958
- };
959
- export const de_ListTagsForResourceCommand = async (output, context) => {
960
- if (output.statusCode !== 200 && output.statusCode >= 300) {
961
- return de_CommandError(output, context);
962
- }
963
- const contents = map({
964
- $metadata: deserializeMetadata(output),
965
- });
966
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
967
- const doc = take(data, {
968
- Tags: [, _json, `tags`],
969
- });
970
- Object.assign(contents, doc);
971
- return contents;
972
- };
973
- export const de_RevokeRevisionCommand = async (output, context) => {
974
- if (output.statusCode !== 200 && output.statusCode >= 300) {
975
- return de_CommandError(output, context);
976
- }
977
- const contents = map({
978
- $metadata: deserializeMetadata(output),
979
- });
980
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
981
- const doc = take(data, {
982
- Arn: __expectString,
983
- Comment: __expectString,
984
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
985
- DataSetId: __expectString,
986
- Finalized: __expectBoolean,
987
- Id: __expectString,
988
- RevocationComment: __expectString,
989
- Revoked: __expectBoolean,
990
- RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
991
- SourceId: __expectString,
992
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
993
- });
994
- Object.assign(contents, doc);
995
- return contents;
996
- };
997
- export const de_SendApiAssetCommand = async (output, context) => {
998
- if (output.statusCode !== 200 && output.statusCode >= 300) {
999
- return de_CommandError(output, context);
1000
- }
1001
- const contents = map({
1002
- $metadata: deserializeMetadata(output),
1003
- ResponseHeaders: [
1004
- ,
1005
- Object.keys(output.headers)
1006
- .filter((header) => header.startsWith(""))
1007
- .reduce((acc, header) => {
1008
- acc[header.substring(0)] = output.headers[header];
1009
- return acc;
1010
- }, {}),
1011
- ],
1012
- });
1013
- const data = await collectBodyString(output.body, context);
1014
- contents.Body = __expectString(data);
1015
- return contents;
1016
- };
1017
- export const de_SendDataSetNotificationCommand = async (output, context) => {
1018
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1019
- return de_CommandError(output, context);
1020
- }
1021
- const contents = map({
1022
- $metadata: deserializeMetadata(output),
1023
- });
1024
- await collectBody(output.body, context);
1025
- return contents;
1026
- };
1027
- export const de_StartJobCommand = async (output, context) => {
1028
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1029
- return de_CommandError(output, context);
1030
- }
1031
- const contents = map({
1032
- $metadata: deserializeMetadata(output),
1033
- });
1034
- await collectBody(output.body, context);
1035
- return contents;
1036
- };
1037
- export const de_TagResourceCommand = async (output, context) => {
1038
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1039
- return de_CommandError(output, context);
1040
- }
1041
- const contents = map({
1042
- $metadata: deserializeMetadata(output),
1043
- });
1044
- await collectBody(output.body, context);
1045
- return contents;
1046
- };
1047
- export const de_UntagResourceCommand = async (output, context) => {
1048
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1049
- return de_CommandError(output, context);
1050
- }
1051
- const contents = map({
1052
- $metadata: deserializeMetadata(output),
1053
- });
1054
- await collectBody(output.body, context);
1055
- return contents;
1056
- };
1057
- export const de_UpdateAssetCommand = async (output, context) => {
1058
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1059
- return de_CommandError(output, context);
1060
- }
1061
- const contents = map({
1062
- $metadata: deserializeMetadata(output),
1063
- });
1064
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1065
- const doc = take(data, {
1066
- Arn: __expectString,
1067
- AssetDetails: (_) => de_AssetDetails(_, context),
1068
- AssetType: __expectString,
1069
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1070
- DataSetId: __expectString,
1071
- Id: __expectString,
1072
- Name: __expectString,
1073
- RevisionId: __expectString,
1074
- SourceId: __expectString,
1075
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1076
- });
1077
- Object.assign(contents, doc);
1078
- return contents;
1079
- };
1080
- export const de_UpdateDataSetCommand = async (output, context) => {
1081
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1082
- return de_CommandError(output, context);
1083
- }
1084
- const contents = map({
1085
- $metadata: deserializeMetadata(output),
1086
- });
1087
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1088
- const doc = take(data, {
1089
- Arn: __expectString,
1090
- AssetType: __expectString,
1091
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1092
- Description: __expectString,
1093
- Id: __expectString,
1094
- Name: __expectString,
1095
- Origin: __expectString,
1096
- OriginDetails: _json,
1097
- SourceId: __expectString,
1098
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1099
- });
1100
- Object.assign(contents, doc);
1101
- return contents;
1102
- };
1103
- export const de_UpdateEventActionCommand = async (output, context) => {
1104
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1105
- return de_CommandError(output, context);
1106
- }
1107
- const contents = map({
1108
- $metadata: deserializeMetadata(output),
1109
- });
1110
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1111
- const doc = take(data, {
1112
- Action: _json,
1113
- Arn: __expectString,
1114
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1115
- Event: _json,
1116
- Id: __expectString,
1117
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1118
- });
1119
- Object.assign(contents, doc);
1120
- return contents;
1121
- };
1122
- export const de_UpdateRevisionCommand = async (output, context) => {
1123
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1124
- return de_CommandError(output, context);
1125
- }
1126
- const contents = map({
1127
- $metadata: deserializeMetadata(output),
1128
- });
1129
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1130
- const doc = take(data, {
1131
- Arn: __expectString,
1132
- Comment: __expectString,
1133
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1134
- DataSetId: __expectString,
1135
- Finalized: __expectBoolean,
1136
- Id: __expectString,
1137
- RevocationComment: __expectString,
1138
- Revoked: __expectBoolean,
1139
- RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1140
- SourceId: __expectString,
1141
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1142
- });
1143
- Object.assign(contents, doc);
1144
- return contents;
1145
- };
1146
- const de_CommandError = async (output, context) => {
1147
- const parsedOutput = {
1148
- ...output,
1149
- body: await parseErrorBody(output.body, context),
1150
- };
1151
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1152
- switch (errorCode) {
1153
- case "AccessDeniedException":
1154
- case "com.amazonaws.dataexchange#AccessDeniedException":
1155
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1156
- case "ConflictException":
1157
- case "com.amazonaws.dataexchange#ConflictException":
1158
- throw await de_ConflictExceptionRes(parsedOutput, context);
1159
- case "InternalServerException":
1160
- case "com.amazonaws.dataexchange#InternalServerException":
1161
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1162
- case "ResourceNotFoundException":
1163
- case "com.amazonaws.dataexchange#ResourceNotFoundException":
1164
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1165
- case "ThrottlingException":
1166
- case "com.amazonaws.dataexchange#ThrottlingException":
1167
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1168
- case "ValidationException":
1169
- case "com.amazonaws.dataexchange#ValidationException":
1170
- throw await de_ValidationExceptionRes(parsedOutput, context);
1171
- case "ServiceLimitExceededException":
1172
- case "com.amazonaws.dataexchange#ServiceLimitExceededException":
1173
- throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
1174
- default:
1175
- const parsedBody = parsedOutput.body;
1176
- return throwDefaultError({
1177
- output,
1178
- parsedBody,
1179
- errorCode,
1180
- });
1181
- }
1182
- };
1183
- const throwDefaultError = withBaseException(__BaseException);
1184
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1185
- const contents = map({});
1186
- const data = parsedOutput.body;
1187
- const doc = take(data, {
1188
- Message: __expectString,
1189
- });
1190
- Object.assign(contents, doc);
1191
- const exception = new AccessDeniedException({
1192
- $metadata: deserializeMetadata(parsedOutput),
1193
- ...contents,
1194
- });
1195
- return __decorateServiceException(exception, parsedOutput.body);
1196
- };
1197
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1198
- const contents = map({});
1199
- const data = parsedOutput.body;
1200
- const doc = take(data, {
1201
- Message: __expectString,
1202
- ResourceId: __expectString,
1203
- ResourceType: __expectString,
1204
- });
1205
- Object.assign(contents, doc);
1206
- const exception = new ConflictException({
1207
- $metadata: deserializeMetadata(parsedOutput),
1208
- ...contents,
1209
- });
1210
- return __decorateServiceException(exception, parsedOutput.body);
1211
- };
1212
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1213
- const contents = map({});
1214
- const data = parsedOutput.body;
1215
- const doc = take(data, {
1216
- Message: __expectString,
1217
- });
1218
- Object.assign(contents, doc);
1219
- const exception = new InternalServerException({
1220
- $metadata: deserializeMetadata(parsedOutput),
1221
- ...contents,
1222
- });
1223
- return __decorateServiceException(exception, parsedOutput.body);
1224
- };
1225
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1226
- const contents = map({});
1227
- const data = parsedOutput.body;
1228
- const doc = take(data, {
1229
- Message: __expectString,
1230
- ResourceId: __expectString,
1231
- ResourceType: __expectString,
1232
- });
1233
- Object.assign(contents, doc);
1234
- const exception = new ResourceNotFoundException({
1235
- $metadata: deserializeMetadata(parsedOutput),
1236
- ...contents,
1237
- });
1238
- return __decorateServiceException(exception, parsedOutput.body);
1239
- };
1240
- const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
1241
- const contents = map({});
1242
- const data = parsedOutput.body;
1243
- const doc = take(data, {
1244
- LimitName: __expectString,
1245
- LimitValue: __limitedParseDouble,
1246
- Message: __expectString,
1247
- });
1248
- Object.assign(contents, doc);
1249
- const exception = new ServiceLimitExceededException({
1250
- $metadata: deserializeMetadata(parsedOutput),
1251
- ...contents,
1252
- });
1253
- return __decorateServiceException(exception, parsedOutput.body);
1254
- };
1255
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1256
- const contents = map({});
1257
- const data = parsedOutput.body;
1258
- const doc = take(data, {
1259
- Message: __expectString,
1260
- });
1261
- Object.assign(contents, doc);
1262
- const exception = new ThrottlingException({
1263
- $metadata: deserializeMetadata(parsedOutput),
1264
- ...contents,
1265
- });
1266
- return __decorateServiceException(exception, parsedOutput.body);
1267
- };
1268
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1269
- const contents = map({});
1270
- const data = parsedOutput.body;
1271
- const doc = take(data, {
1272
- ExceptionCause: __expectString,
1273
- Message: __expectString,
1274
- });
1275
- Object.assign(contents, doc);
1276
- const exception = new ValidationException({
1277
- $metadata: deserializeMetadata(parsedOutput),
1278
- ...contents,
1279
- });
1280
- return __decorateServiceException(exception, parsedOutput.body);
1281
- };
1282
- const se_DataUpdateRequestDetails = (input, context) => {
1283
- return take(input, {
1284
- DataUpdatedAt: __serializeDateTime,
1285
- });
1286
- };
1287
- const se_DeprecationRequestDetails = (input, context) => {
1288
- return take(input, {
1289
- DeprecationAt: __serializeDateTime,
1290
- });
1291
- };
1292
- const se_NotificationDetails = (input, context) => {
1293
- return take(input, {
1294
- DataUpdate: (_) => se_DataUpdateRequestDetails(_, context),
1295
- Deprecation: (_) => se_DeprecationRequestDetails(_, context),
1296
- SchemaChange: (_) => se_SchemaChangeRequestDetails(_, context),
1297
- });
1298
- };
1299
- const se_SchemaChangeRequestDetails = (input, context) => {
1300
- return take(input, {
1301
- Changes: _json,
1302
- SchemaChangeAt: __serializeDateTime,
1303
- });
1304
- };
1305
- const de_ApiGatewayApiAsset = (output, context) => {
1306
- return take(output, {
1307
- ApiDescription: __expectString,
1308
- ApiEndpoint: __expectString,
1309
- ApiId: __expectString,
1310
- ApiKey: __expectString,
1311
- ApiName: __expectString,
1312
- ApiSpecificationDownloadUrl: __expectString,
1313
- ApiSpecificationDownloadUrlExpiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1314
- ProtocolType: __expectString,
1315
- Stage: __expectString,
1316
- });
1317
- };
1318
- const de_AssetDetails = (output, context) => {
1319
- return take(output, {
1320
- ApiGatewayApiAsset: (_) => de_ApiGatewayApiAsset(_, context),
1321
- LakeFormationDataPermissionAsset: _json,
1322
- RedshiftDataShareAsset: _json,
1323
- S3DataAccessAsset: _json,
1324
- S3SnapshotAsset: (_) => de_S3SnapshotAsset(_, context),
1325
- });
1326
- };
1327
- const de_AssetEntry = (output, context) => {
1328
- return take(output, {
1329
- Arn: __expectString,
1330
- AssetDetails: (_) => de_AssetDetails(_, context),
1331
- AssetType: __expectString,
1332
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1333
- DataSetId: __expectString,
1334
- Id: __expectString,
1335
- Name: __expectString,
1336
- RevisionId: __expectString,
1337
- SourceId: __expectString,
1338
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1339
- });
1340
- };
1341
- const de_DataGrantSummaryEntry = (output, context) => {
1342
- return take(output, {
1343
- AcceptanceState: __expectString,
1344
- AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1345
- Arn: __expectString,
1346
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1347
- DataSetId: __expectString,
1348
- EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1349
- Id: __expectString,
1350
- Name: __expectString,
1351
- ReceiverPrincipal: __expectString,
1352
- SenderPrincipal: __expectString,
1353
- SourceDataSetId: __expectString,
1354
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1355
- });
1356
- };
1357
- const de_DataSetEntry = (output, context) => {
1358
- return take(output, {
1359
- Arn: __expectString,
1360
- AssetType: __expectString,
1361
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1362
- Description: __expectString,
1363
- Id: __expectString,
1364
- Name: __expectString,
1365
- Origin: __expectString,
1366
- OriginDetails: _json,
1367
- SourceId: __expectString,
1368
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1369
- });
1370
- };
1371
- const de_EventActionEntry = (output, context) => {
1372
- return take(output, {
1373
- Action: _json,
1374
- Arn: __expectString,
1375
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1376
- Event: _json,
1377
- Id: __expectString,
1378
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1379
- });
1380
- };
1381
- const de_ExportAssetToSignedUrlResponseDetails = (output, context) => {
1382
- return take(output, {
1383
- AssetId: __expectString,
1384
- DataSetId: __expectString,
1385
- RevisionId: __expectString,
1386
- SignedUrl: __expectString,
1387
- SignedUrlExpiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1388
- });
1389
- };
1390
- const de_ImportAssetFromApiGatewayApiResponseDetails = (output, context) => {
1391
- return take(output, {
1392
- ApiDescription: __expectString,
1393
- ApiId: __expectString,
1394
- ApiKey: __expectString,
1395
- ApiName: __expectString,
1396
- ApiSpecificationMd5Hash: __expectString,
1397
- ApiSpecificationUploadUrl: __expectString,
1398
- ApiSpecificationUploadUrlExpiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1399
- DataSetId: __expectString,
1400
- ProtocolType: __expectString,
1401
- RevisionId: __expectString,
1402
- Stage: __expectString,
1403
- });
1404
- };
1405
- const de_ImportAssetFromSignedUrlResponseDetails = (output, context) => {
1406
- return take(output, {
1407
- AssetName: __expectString,
1408
- DataSetId: __expectString,
1409
- Md5Hash: __expectString,
1410
- RevisionId: __expectString,
1411
- SignedUrl: __expectString,
1412
- SignedUrlExpiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1413
- });
1414
- };
1415
- const de_JobEntry = (output, context) => {
1416
- return take(output, {
1417
- Arn: __expectString,
1418
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1419
- Details: (_) => de_ResponseDetails(_, context),
1420
- Errors: (_) => de_ListOfJobError(_, context),
1421
- Id: __expectString,
1422
- State: __expectString,
1423
- Type: __expectString,
1424
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1425
- });
1426
- };
1427
- const de_JobError = (output, context) => {
1428
- return take(output, {
1429
- Code: __expectString,
1430
- Details: _json,
1431
- LimitName: __expectString,
1432
- LimitValue: __limitedParseDouble,
1433
- Message: __expectString,
1434
- ResourceId: __expectString,
1435
- ResourceType: __expectString,
1436
- });
1437
- };
1438
- const de_ListOfAssetEntry = (output, context) => {
1439
- const retVal = (output || [])
1440
- .filter((e) => e != null)
1441
- .map((entry) => {
1442
- return de_AssetEntry(entry, context);
1443
- });
1444
- return retVal;
1445
- };
1446
- const de_ListOfDataGrantSummaryEntry = (output, context) => {
1447
- const retVal = (output || [])
1448
- .filter((e) => e != null)
1449
- .map((entry) => {
1450
- return de_DataGrantSummaryEntry(entry, context);
1451
- });
1452
- return retVal;
1453
- };
1454
- const de_ListOfDataSetEntry = (output, context) => {
1455
- const retVal = (output || [])
1456
- .filter((e) => e != null)
1457
- .map((entry) => {
1458
- return de_DataSetEntry(entry, context);
1459
- });
1460
- return retVal;
1461
- };
1462
- const de_ListOfEventActionEntry = (output, context) => {
1463
- const retVal = (output || [])
1464
- .filter((e) => e != null)
1465
- .map((entry) => {
1466
- return de_EventActionEntry(entry, context);
1467
- });
1468
- return retVal;
1469
- };
1470
- const de_ListOfJobEntry = (output, context) => {
1471
- const retVal = (output || [])
1472
- .filter((e) => e != null)
1473
- .map((entry) => {
1474
- return de_JobEntry(entry, context);
1475
- });
1476
- return retVal;
1477
- };
1478
- const de_ListOfJobError = (output, context) => {
1479
- const retVal = (output || [])
1480
- .filter((e) => e != null)
1481
- .map((entry) => {
1482
- return de_JobError(entry, context);
1483
- });
1484
- return retVal;
1485
- };
1486
- const de_ListOfReceivedDataGrantSummariesEntry = (output, context) => {
1487
- const retVal = (output || [])
1488
- .filter((e) => e != null)
1489
- .map((entry) => {
1490
- return de_ReceivedDataGrantSummariesEntry(entry, context);
1491
- });
1492
- return retVal;
1493
- };
1494
- const de_ListOfRevisionEntry = (output, context) => {
1495
- const retVal = (output || [])
1496
- .filter((e) => e != null)
1497
- .map((entry) => {
1498
- return de_RevisionEntry(entry, context);
1499
- });
1500
- return retVal;
1501
- };
1502
- const de_ReceivedDataGrantSummariesEntry = (output, context) => {
1503
- return take(output, {
1504
- AcceptanceState: __expectString,
1505
- AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1506
- Arn: __expectString,
1507
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1508
- DataSetId: __expectString,
1509
- EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1510
- Id: __expectString,
1511
- Name: __expectString,
1512
- ReceiverPrincipal: __expectString,
1513
- SenderPrincipal: __expectString,
1514
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1515
- });
1516
- };
1517
- const de_ResponseDetails = (output, context) => {
1518
- return take(output, {
1519
- CreateS3DataAccessFromS3Bucket: _json,
1520
- ExportAssetToSignedUrl: (_) => de_ExportAssetToSignedUrlResponseDetails(_, context),
1521
- ExportAssetsToS3: _json,
1522
- ExportRevisionsToS3: _json,
1523
- ImportAssetFromApiGatewayApi: (_) => de_ImportAssetFromApiGatewayApiResponseDetails(_, context),
1524
- ImportAssetFromSignedUrl: (_) => de_ImportAssetFromSignedUrlResponseDetails(_, context),
1525
- ImportAssetsFromLakeFormationTagPolicy: _json,
1526
- ImportAssetsFromRedshiftDataShares: _json,
1527
- ImportAssetsFromS3: _json,
1528
- });
1529
- };
1530
- const de_RevisionEntry = (output, context) => {
1531
- return take(output, {
1532
- Arn: __expectString,
1533
- Comment: __expectString,
1534
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1535
- DataSetId: __expectString,
1536
- Finalized: __expectBoolean,
1537
- Id: __expectString,
1538
- RevocationComment: __expectString,
1539
- Revoked: __expectBoolean,
1540
- RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1541
- SourceId: __expectString,
1542
- UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1543
- });
1544
- };
1545
- const de_S3SnapshotAsset = (output, context) => {
1546
- return take(output, {
1547
- Size: __limitedParseDouble,
1548
- });
1549
- };
1550
- const deserializeMetadata = (output) => ({
1551
- httpStatusCode: output.statusCode,
1552
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1553
- extendedRequestId: output.headers["x-amz-id-2"],
1554
- cfId: output.headers["x-amz-cf-id"],
1555
- });
1556
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1557
- const _AI = "AssetId";
1558
- const _AS = "AcceptanceState";
1559
- const _DSI = "DataSetId";
1560
- const _ESI = "EventSourceId";
1561
- const _M = "Method";
1562
- const _MR = "MaxResults";
1563
- const _NT = "NextToken";
1564
- const _O = "Origin";
1565
- const _P = "Path";
1566
- const _RI = "RevisionId";
1567
- const _TK = "TagKeys";
1568
- const _aS = "acceptanceState";
1569
- const _dSI = "dataSetId";
1570
- const _eSI = "eventSourceId";
1571
- const _mR = "maxResults";
1572
- const _nT = "nextToken";
1573
- const _o = "origin";
1574
- const _rI = "revisionId";
1575
- const _tK = "tagKeys";
1576
- const _xadai = "x-amzn-dataexchange-asset-id";
1577
- const _xaddsi = "x-amzn-dataexchange-data-set-id";
1578
- const _xadhm = "x-amzn-dataexchange-http-method";
1579
- const _xadp = "x-amzn-dataexchange-path";
1580
- const _xadri = "x-amzn-dataexchange-revision-id";