@aws-sdk/client-dataexchange 3.474.0 → 3.477.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.
@@ -2,34 +2,28 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_ListTagsForResourceCommand = exports.de_ListRevisionAssetsCommand = exports.de_ListJobsCommand = exports.de_ListEventActionsCommand = exports.de_ListDataSetsCommand = exports.de_ListDataSetRevisionsCommand = exports.de_GetRevisionCommand = exports.de_GetJobCommand = exports.de_GetEventActionCommand = exports.de_GetDataSetCommand = exports.de_GetAssetCommand = exports.de_DeleteRevisionCommand = exports.de_DeleteEventActionCommand = exports.de_DeleteDataSetCommand = exports.de_DeleteAssetCommand = exports.de_CreateRevisionCommand = exports.de_CreateJobCommand = exports.de_CreateEventActionCommand = exports.de_CreateDataSetCommand = exports.de_CancelJobCommand = exports.se_UpdateRevisionCommand = exports.se_UpdateEventActionCommand = exports.se_UpdateDataSetCommand = exports.se_UpdateAssetCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartJobCommand = exports.se_SendDataSetNotificationCommand = exports.se_SendApiAssetCommand = exports.se_RevokeRevisionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRevisionAssetsCommand = exports.se_ListJobsCommand = exports.se_ListEventActionsCommand = exports.se_ListDataSetsCommand = exports.se_ListDataSetRevisionsCommand = exports.se_GetRevisionCommand = exports.se_GetJobCommand = exports.se_GetEventActionCommand = exports.se_GetDataSetCommand = exports.se_GetAssetCommand = exports.se_DeleteRevisionCommand = exports.se_DeleteEventActionCommand = exports.se_DeleteDataSetCommand = exports.se_DeleteAssetCommand = exports.se_CreateRevisionCommand = exports.se_CreateJobCommand = exports.se_CreateEventActionCommand = exports.se_CreateDataSetCommand = exports.se_CancelJobCommand = void 0;
4
4
  exports.de_UpdateRevisionCommand = exports.de_UpdateEventActionCommand = exports.de_UpdateDataSetCommand = exports.de_UpdateAssetCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartJobCommand = exports.de_SendDataSetNotificationCommand = exports.de_SendApiAssetCommand = exports.de_RevokeRevisionCommand = void 0;
5
+ const core_1 = require("@smithy/core");
5
6
  const protocol_http_1 = require("@smithy/protocol-http");
6
7
  const smithy_client_1 = require("@smithy/smithy-client");
7
8
  const uuid_1 = require("uuid");
8
9
  const DataExchangeServiceException_1 = require("../models/DataExchangeServiceException");
9
10
  const models_0_1 = require("../models/models_0");
10
11
  const se_CancelJobCommand = async (input, context) => {
11
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
12
+ const b = (0, core_1.requestBuilder)(input, context);
12
13
  const headers = {};
13
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs/{JobId}";
14
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "JobId", () => input.JobId, "{JobId}", false);
14
+ b.bp("/v1/jobs/{JobId}");
15
+ b.p("JobId", () => input.JobId, "{JobId}", false);
15
16
  let body;
16
- return new protocol_http_1.HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "DELETE",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
17
+ b.m("DELETE").h(headers).b(body);
18
+ return b.build();
25
19
  };
26
20
  exports.se_CancelJobCommand = se_CancelJobCommand;
27
21
  const se_CreateDataSetCommand = async (input, context) => {
28
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
22
+ const b = (0, core_1.requestBuilder)(input, context);
29
23
  const headers = {
30
24
  "content-type": "application/json",
31
25
  };
32
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets";
26
+ b.bp("/v1/data-sets");
33
27
  let body;
34
28
  body = JSON.stringify((0, smithy_client_1.take)(input, {
35
29
  AssetType: [],
@@ -37,417 +31,266 @@ const se_CreateDataSetCommand = async (input, context) => {
37
31
  Name: [],
38
32
  Tags: (_) => (0, smithy_client_1._json)(_),
39
33
  }));
40
- return new protocol_http_1.HttpRequest({
41
- protocol,
42
- hostname,
43
- port,
44
- method: "POST",
45
- headers,
46
- path: resolvedPath,
47
- body,
48
- });
34
+ b.m("POST").h(headers).b(body);
35
+ return b.build();
49
36
  };
50
37
  exports.se_CreateDataSetCommand = se_CreateDataSetCommand;
51
38
  const se_CreateEventActionCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const b = (0, core_1.requestBuilder)(input, context);
53
40
  const headers = {
54
41
  "content-type": "application/json",
55
42
  };
56
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions";
43
+ b.bp("/v1/event-actions");
57
44
  let body;
58
45
  body = JSON.stringify((0, smithy_client_1.take)(input, {
59
46
  Action: (_) => (0, smithy_client_1._json)(_),
60
47
  Event: (_) => (0, smithy_client_1._json)(_),
61
48
  }));
62
- return new protocol_http_1.HttpRequest({
63
- protocol,
64
- hostname,
65
- port,
66
- method: "POST",
67
- headers,
68
- path: resolvedPath,
69
- body,
70
- });
49
+ b.m("POST").h(headers).b(body);
50
+ return b.build();
71
51
  };
72
52
  exports.se_CreateEventActionCommand = se_CreateEventActionCommand;
73
53
  const se_CreateJobCommand = async (input, context) => {
74
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
54
+ const b = (0, core_1.requestBuilder)(input, context);
75
55
  const headers = {
76
56
  "content-type": "application/json",
77
57
  };
78
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs";
58
+ b.bp("/v1/jobs");
79
59
  let body;
80
60
  body = JSON.stringify((0, smithy_client_1.take)(input, {
81
61
  Details: (_) => (0, smithy_client_1._json)(_),
82
62
  Type: [],
83
63
  }));
84
- return new protocol_http_1.HttpRequest({
85
- protocol,
86
- hostname,
87
- port,
88
- method: "POST",
89
- headers,
90
- path: resolvedPath,
91
- body,
92
- });
64
+ b.m("POST").h(headers).b(body);
65
+ return b.build();
93
66
  };
94
67
  exports.se_CreateJobCommand = se_CreateJobCommand;
95
68
  const se_CreateRevisionCommand = async (input, context) => {
96
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const b = (0, core_1.requestBuilder)(input, context);
97
70
  const headers = {
98
71
  "content-type": "application/json",
99
72
  };
100
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}/revisions";
101
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
73
+ b.bp("/v1/data-sets/{DataSetId}/revisions");
74
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
102
75
  let body;
103
76
  body = JSON.stringify((0, smithy_client_1.take)(input, {
104
77
  Comment: [],
105
78
  Tags: (_) => (0, smithy_client_1._json)(_),
106
79
  }));
107
- return new protocol_http_1.HttpRequest({
108
- protocol,
109
- hostname,
110
- port,
111
- method: "POST",
112
- headers,
113
- path: resolvedPath,
114
- body,
115
- });
80
+ b.m("POST").h(headers).b(body);
81
+ return b.build();
116
82
  };
117
83
  exports.se_CreateRevisionCommand = se_CreateRevisionCommand;
118
84
  const se_DeleteAssetCommand = async (input, context) => {
119
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = (0, core_1.requestBuilder)(input, context);
120
86
  const headers = {};
121
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
122
- "/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}";
123
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AssetId", () => input.AssetId, "{AssetId}", false);
124
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
125
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
87
+ b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}");
88
+ b.p("AssetId", () => input.AssetId, "{AssetId}", false);
89
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
90
+ b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
126
91
  let body;
127
- return new protocol_http_1.HttpRequest({
128
- protocol,
129
- hostname,
130
- port,
131
- method: "DELETE",
132
- headers,
133
- path: resolvedPath,
134
- body,
135
- });
92
+ b.m("DELETE").h(headers).b(body);
93
+ return b.build();
136
94
  };
137
95
  exports.se_DeleteAssetCommand = se_DeleteAssetCommand;
138
96
  const se_DeleteDataSetCommand = async (input, context) => {
139
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
97
+ const b = (0, core_1.requestBuilder)(input, context);
140
98
  const headers = {};
141
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}";
142
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
99
+ b.bp("/v1/data-sets/{DataSetId}");
100
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
143
101
  let body;
144
- return new protocol_http_1.HttpRequest({
145
- protocol,
146
- hostname,
147
- port,
148
- method: "DELETE",
149
- headers,
150
- path: resolvedPath,
151
- body,
152
- });
102
+ b.m("DELETE").h(headers).b(body);
103
+ return b.build();
153
104
  };
154
105
  exports.se_DeleteDataSetCommand = se_DeleteDataSetCommand;
155
106
  const se_DeleteEventActionCommand = async (input, context) => {
156
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = (0, core_1.requestBuilder)(input, context);
157
108
  const headers = {};
158
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}";
159
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EventActionId", () => input.EventActionId, "{EventActionId}", false);
109
+ b.bp("/v1/event-actions/{EventActionId}");
110
+ b.p("EventActionId", () => input.EventActionId, "{EventActionId}", false);
160
111
  let body;
161
- return new protocol_http_1.HttpRequest({
162
- protocol,
163
- hostname,
164
- port,
165
- method: "DELETE",
166
- headers,
167
- path: resolvedPath,
168
- body,
169
- });
112
+ b.m("DELETE").h(headers).b(body);
113
+ return b.build();
170
114
  };
171
115
  exports.se_DeleteEventActionCommand = se_DeleteEventActionCommand;
172
116
  const se_DeleteRevisionCommand = async (input, context) => {
173
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
117
+ const b = (0, core_1.requestBuilder)(input, context);
174
118
  const headers = {};
175
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
176
- "/v1/data-sets/{DataSetId}/revisions/{RevisionId}";
177
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
178
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
119
+ b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}");
120
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
121
+ b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
179
122
  let body;
180
- return new protocol_http_1.HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "DELETE",
185
- headers,
186
- path: resolvedPath,
187
- body,
188
- });
123
+ b.m("DELETE").h(headers).b(body);
124
+ return b.build();
189
125
  };
190
126
  exports.se_DeleteRevisionCommand = se_DeleteRevisionCommand;
191
127
  const se_GetAssetCommand = async (input, context) => {
192
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
128
+ const b = (0, core_1.requestBuilder)(input, context);
193
129
  const headers = {};
194
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
195
- "/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}";
196
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AssetId", () => input.AssetId, "{AssetId}", false);
197
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
198
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
130
+ b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}");
131
+ b.p("AssetId", () => input.AssetId, "{AssetId}", false);
132
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
133
+ b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
199
134
  let body;
200
- return new protocol_http_1.HttpRequest({
201
- protocol,
202
- hostname,
203
- port,
204
- method: "GET",
205
- headers,
206
- path: resolvedPath,
207
- body,
208
- });
135
+ b.m("GET").h(headers).b(body);
136
+ return b.build();
209
137
  };
210
138
  exports.se_GetAssetCommand = se_GetAssetCommand;
211
139
  const se_GetDataSetCommand = async (input, context) => {
212
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = (0, core_1.requestBuilder)(input, context);
213
141
  const headers = {};
214
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}";
215
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
142
+ b.bp("/v1/data-sets/{DataSetId}");
143
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
216
144
  let body;
217
- return new protocol_http_1.HttpRequest({
218
- protocol,
219
- hostname,
220
- port,
221
- method: "GET",
222
- headers,
223
- path: resolvedPath,
224
- body,
225
- });
145
+ b.m("GET").h(headers).b(body);
146
+ return b.build();
226
147
  };
227
148
  exports.se_GetDataSetCommand = se_GetDataSetCommand;
228
149
  const se_GetEventActionCommand = async (input, context) => {
229
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
150
+ const b = (0, core_1.requestBuilder)(input, context);
230
151
  const headers = {};
231
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}";
232
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EventActionId", () => input.EventActionId, "{EventActionId}", false);
152
+ b.bp("/v1/event-actions/{EventActionId}");
153
+ b.p("EventActionId", () => input.EventActionId, "{EventActionId}", false);
233
154
  let body;
234
- return new protocol_http_1.HttpRequest({
235
- protocol,
236
- hostname,
237
- port,
238
- method: "GET",
239
- headers,
240
- path: resolvedPath,
241
- body,
242
- });
155
+ b.m("GET").h(headers).b(body);
156
+ return b.build();
243
157
  };
244
158
  exports.se_GetEventActionCommand = se_GetEventActionCommand;
245
159
  const se_GetJobCommand = async (input, context) => {
246
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
160
+ const b = (0, core_1.requestBuilder)(input, context);
247
161
  const headers = {};
248
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs/{JobId}";
249
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "JobId", () => input.JobId, "{JobId}", false);
162
+ b.bp("/v1/jobs/{JobId}");
163
+ b.p("JobId", () => input.JobId, "{JobId}", false);
250
164
  let body;
251
- return new protocol_http_1.HttpRequest({
252
- protocol,
253
- hostname,
254
- port,
255
- method: "GET",
256
- headers,
257
- path: resolvedPath,
258
- body,
259
- });
165
+ b.m("GET").h(headers).b(body);
166
+ return b.build();
260
167
  };
261
168
  exports.se_GetJobCommand = se_GetJobCommand;
262
169
  const se_GetRevisionCommand = async (input, context) => {
263
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
170
+ const b = (0, core_1.requestBuilder)(input, context);
264
171
  const headers = {};
265
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
266
- "/v1/data-sets/{DataSetId}/revisions/{RevisionId}";
267
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
268
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
172
+ b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}");
173
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
174
+ b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
269
175
  let body;
270
- return new protocol_http_1.HttpRequest({
271
- protocol,
272
- hostname,
273
- port,
274
- method: "GET",
275
- headers,
276
- path: resolvedPath,
277
- body,
278
- });
176
+ b.m("GET").h(headers).b(body);
177
+ return b.build();
279
178
  };
280
179
  exports.se_GetRevisionCommand = se_GetRevisionCommand;
281
180
  const se_ListDataSetRevisionsCommand = async (input, context) => {
282
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
+ const b = (0, core_1.requestBuilder)(input, context);
283
182
  const headers = {};
284
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}/revisions";
285
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
183
+ b.bp("/v1/data-sets/{DataSetId}/revisions");
184
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
286
185
  const query = (0, smithy_client_1.map)({
287
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
288
- nextToken: [, input.NextToken],
186
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
187
+ [_nT]: [, input[_NT]],
289
188
  });
290
189
  let body;
291
- return new protocol_http_1.HttpRequest({
292
- protocol,
293
- hostname,
294
- port,
295
- method: "GET",
296
- headers,
297
- path: resolvedPath,
298
- query,
299
- body,
300
- });
190
+ b.m("GET").h(headers).q(query).b(body);
191
+ return b.build();
301
192
  };
302
193
  exports.se_ListDataSetRevisionsCommand = se_ListDataSetRevisionsCommand;
303
194
  const se_ListDataSetsCommand = async (input, context) => {
304
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
195
+ const b = (0, core_1.requestBuilder)(input, context);
305
196
  const headers = {};
306
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets";
197
+ b.bp("/v1/data-sets");
307
198
  const query = (0, smithy_client_1.map)({
308
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
309
- nextToken: [, input.NextToken],
310
- origin: [, input.Origin],
199
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
200
+ [_nT]: [, input[_NT]],
201
+ [_o]: [, input[_O]],
311
202
  });
312
203
  let body;
313
- return new protocol_http_1.HttpRequest({
314
- protocol,
315
- hostname,
316
- port,
317
- method: "GET",
318
- headers,
319
- path: resolvedPath,
320
- query,
321
- body,
322
- });
204
+ b.m("GET").h(headers).q(query).b(body);
205
+ return b.build();
323
206
  };
324
207
  exports.se_ListDataSetsCommand = se_ListDataSetsCommand;
325
208
  const se_ListEventActionsCommand = async (input, context) => {
326
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
209
+ const b = (0, core_1.requestBuilder)(input, context);
327
210
  const headers = {};
328
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions";
211
+ b.bp("/v1/event-actions");
329
212
  const query = (0, smithy_client_1.map)({
330
- eventSourceId: [, input.EventSourceId],
331
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
332
- nextToken: [, input.NextToken],
213
+ [_eSI]: [, input[_ESI]],
214
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
215
+ [_nT]: [, input[_NT]],
333
216
  });
334
217
  let body;
335
- return new protocol_http_1.HttpRequest({
336
- protocol,
337
- hostname,
338
- port,
339
- method: "GET",
340
- headers,
341
- path: resolvedPath,
342
- query,
343
- body,
344
- });
218
+ b.m("GET").h(headers).q(query).b(body);
219
+ return b.build();
345
220
  };
346
221
  exports.se_ListEventActionsCommand = se_ListEventActionsCommand;
347
222
  const se_ListJobsCommand = async (input, context) => {
348
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
223
+ const b = (0, core_1.requestBuilder)(input, context);
349
224
  const headers = {};
350
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs";
225
+ b.bp("/v1/jobs");
351
226
  const query = (0, smithy_client_1.map)({
352
- dataSetId: [, input.DataSetId],
353
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
354
- nextToken: [, input.NextToken],
355
- revisionId: [, input.RevisionId],
227
+ [_dSI]: [, input[_DSI]],
228
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
229
+ [_nT]: [, input[_NT]],
230
+ [_rI]: [, input[_RI]],
356
231
  });
357
232
  let body;
358
- return new protocol_http_1.HttpRequest({
359
- protocol,
360
- hostname,
361
- port,
362
- method: "GET",
363
- headers,
364
- path: resolvedPath,
365
- query,
366
- body,
367
- });
233
+ b.m("GET").h(headers).q(query).b(body);
234
+ return b.build();
368
235
  };
369
236
  exports.se_ListJobsCommand = se_ListJobsCommand;
370
237
  const se_ListRevisionAssetsCommand = async (input, context) => {
371
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
238
+ const b = (0, core_1.requestBuilder)(input, context);
372
239
  const headers = {};
373
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
374
- "/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets";
375
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
376
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
240
+ b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets");
241
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
242
+ b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
377
243
  const query = (0, smithy_client_1.map)({
378
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
379
- nextToken: [, input.NextToken],
244
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
245
+ [_nT]: [, input[_NT]],
380
246
  });
381
247
  let body;
382
- return new protocol_http_1.HttpRequest({
383
- protocol,
384
- hostname,
385
- port,
386
- method: "GET",
387
- headers,
388
- path: resolvedPath,
389
- query,
390
- body,
391
- });
248
+ b.m("GET").h(headers).q(query).b(body);
249
+ return b.build();
392
250
  };
393
251
  exports.se_ListRevisionAssetsCommand = se_ListRevisionAssetsCommand;
394
252
  const se_ListTagsForResourceCommand = async (input, context) => {
395
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
253
+ const b = (0, core_1.requestBuilder)(input, context);
396
254
  const headers = {};
397
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
398
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
255
+ b.bp("/tags/{ResourceArn}");
256
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
399
257
  let body;
400
- return new protocol_http_1.HttpRequest({
401
- protocol,
402
- hostname,
403
- port,
404
- method: "GET",
405
- headers,
406
- path: resolvedPath,
407
- body,
408
- });
258
+ b.m("GET").h(headers).b(body);
259
+ return b.build();
409
260
  };
410
261
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
411
262
  const se_RevokeRevisionCommand = async (input, context) => {
412
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
263
+ const b = (0, core_1.requestBuilder)(input, context);
413
264
  const headers = {
414
265
  "content-type": "application/json",
415
266
  };
416
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
417
- "/v1/data-sets/{DataSetId}/revisions/{RevisionId}/revoke";
418
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
419
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
267
+ b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/revoke");
268
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
269
+ b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
420
270
  let body;
421
271
  body = JSON.stringify((0, smithy_client_1.take)(input, {
422
272
  RevocationComment: [],
423
273
  }));
424
- return new protocol_http_1.HttpRequest({
425
- protocol,
426
- hostname,
427
- port,
428
- method: "POST",
429
- headers,
430
- path: resolvedPath,
431
- body,
432
- });
274
+ b.m("POST").h(headers).b(body);
275
+ return b.build();
433
276
  };
434
277
  exports.se_RevokeRevisionCommand = se_RevokeRevisionCommand;
435
278
  const se_SendApiAssetCommand = async (input, context) => {
436
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
279
+ const b = (0, core_1.requestBuilder)(input, context);
437
280
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
438
281
  "content-type": "text/plain",
439
- "x-amzn-dataexchange-asset-id": input.AssetId,
440
- "x-amzn-dataexchange-data-set-id": input.DataSetId,
441
- "x-amzn-dataexchange-http-method": input.Method,
442
- "x-amzn-dataexchange-path": input.Path,
443
- "x-amzn-dataexchange-revision-id": input.RevisionId,
282
+ [_xadai]: input[_AI],
283
+ [_xaddsi]: input[_DSI],
284
+ [_xadhm]: input[_M],
285
+ [_xadp]: input[_P],
286
+ [_xadri]: input[_RI],
444
287
  ...(input.RequestHeaders !== undefined &&
445
288
  Object.keys(input.RequestHeaders).reduce((acc, suffix) => {
446
289
  acc[`x-amzn-dataexchange-header-${suffix.toLowerCase()}`] = input.RequestHeaders[suffix];
447
290
  return acc;
448
291
  }, {})),
449
292
  });
450
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1";
293
+ b.bp("/v1");
451
294
  const query = (0, smithy_client_1.map)({
452
295
  ...(0, smithy_client_1.convertMap)(input.QueryStringParameters),
453
296
  });
@@ -462,25 +305,18 @@ const se_SendApiAssetCommand = async (input, context) => {
462
305
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
463
306
  }
464
307
  }
465
- return new protocol_http_1.HttpRequest({
466
- protocol,
467
- hostname: resolvedHostname,
468
- port,
469
- method: "POST",
470
- headers,
471
- path: resolvedPath,
472
- query,
473
- body,
474
- });
308
+ b.hn(resolvedHostname);
309
+ b.m("POST").h(headers).q(query).b(body);
310
+ return b.build();
475
311
  };
476
312
  exports.se_SendApiAssetCommand = se_SendApiAssetCommand;
477
313
  const se_SendDataSetNotificationCommand = async (input, context) => {
478
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
314
+ const b = (0, core_1.requestBuilder)(input, context);
479
315
  const headers = {
480
316
  "content-type": "application/json",
481
317
  };
482
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}/notification";
483
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
318
+ b.bp("/v1/data-sets/{DataSetId}/notification");
319
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
484
320
  let body;
485
321
  body = JSON.stringify((0, smithy_client_1.take)(input, {
486
322
  ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -489,173 +325,114 @@ const se_SendDataSetNotificationCommand = async (input, context) => {
489
325
  Scope: (_) => (0, smithy_client_1._json)(_),
490
326
  Type: [],
491
327
  }));
492
- return new protocol_http_1.HttpRequest({
493
- protocol,
494
- hostname,
495
- port,
496
- method: "POST",
497
- headers,
498
- path: resolvedPath,
499
- body,
500
- });
328
+ b.m("POST").h(headers).b(body);
329
+ return b.build();
501
330
  };
502
331
  exports.se_SendDataSetNotificationCommand = se_SendDataSetNotificationCommand;
503
332
  const se_StartJobCommand = async (input, context) => {
504
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
333
+ const b = (0, core_1.requestBuilder)(input, context);
505
334
  const headers = {};
506
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs/{JobId}";
507
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "JobId", () => input.JobId, "{JobId}", false);
335
+ b.bp("/v1/jobs/{JobId}");
336
+ b.p("JobId", () => input.JobId, "{JobId}", false);
508
337
  let body;
509
- return new protocol_http_1.HttpRequest({
510
- protocol,
511
- hostname,
512
- port,
513
- method: "PATCH",
514
- headers,
515
- path: resolvedPath,
516
- body,
517
- });
338
+ b.m("PATCH").h(headers).b(body);
339
+ return b.build();
518
340
  };
519
341
  exports.se_StartJobCommand = se_StartJobCommand;
520
342
  const se_TagResourceCommand = async (input, context) => {
521
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
343
+ const b = (0, core_1.requestBuilder)(input, context);
522
344
  const headers = {
523
345
  "content-type": "application/json",
524
346
  };
525
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
526
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
347
+ b.bp("/tags/{ResourceArn}");
348
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
527
349
  let body;
528
350
  body = JSON.stringify((0, smithy_client_1.take)(input, {
529
351
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
530
352
  }));
531
- return new protocol_http_1.HttpRequest({
532
- protocol,
533
- hostname,
534
- port,
535
- method: "POST",
536
- headers,
537
- path: resolvedPath,
538
- body,
539
- });
353
+ b.m("POST").h(headers).b(body);
354
+ return b.build();
540
355
  };
541
356
  exports.se_TagResourceCommand = se_TagResourceCommand;
542
357
  const se_UntagResourceCommand = async (input, context) => {
543
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
358
+ const b = (0, core_1.requestBuilder)(input, context);
544
359
  const headers = {};
545
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
546
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
360
+ b.bp("/tags/{ResourceArn}");
361
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
547
362
  const query = (0, smithy_client_1.map)({
548
- tagKeys: [
363
+ [_tK]: [
549
364
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
550
- () => (input.TagKeys || []).map((_entry) => _entry),
365
+ () => (input[_TK] || []).map((_entry) => _entry),
551
366
  ],
552
367
  });
553
368
  let body;
554
- return new protocol_http_1.HttpRequest({
555
- protocol,
556
- hostname,
557
- port,
558
- method: "DELETE",
559
- headers,
560
- path: resolvedPath,
561
- query,
562
- body,
563
- });
369
+ b.m("DELETE").h(headers).q(query).b(body);
370
+ return b.build();
564
371
  };
565
372
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
566
373
  const se_UpdateAssetCommand = async (input, context) => {
567
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
374
+ const b = (0, core_1.requestBuilder)(input, context);
568
375
  const headers = {
569
376
  "content-type": "application/json",
570
377
  };
571
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
572
- "/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}";
573
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AssetId", () => input.AssetId, "{AssetId}", false);
574
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
575
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
378
+ b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}");
379
+ b.p("AssetId", () => input.AssetId, "{AssetId}", false);
380
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
381
+ b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
576
382
  let body;
577
383
  body = JSON.stringify((0, smithy_client_1.take)(input, {
578
384
  Name: [],
579
385
  }));
580
- return new protocol_http_1.HttpRequest({
581
- protocol,
582
- hostname,
583
- port,
584
- method: "PATCH",
585
- headers,
586
- path: resolvedPath,
587
- body,
588
- });
386
+ b.m("PATCH").h(headers).b(body);
387
+ return b.build();
589
388
  };
590
389
  exports.se_UpdateAssetCommand = se_UpdateAssetCommand;
591
390
  const se_UpdateDataSetCommand = async (input, context) => {
592
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
391
+ const b = (0, core_1.requestBuilder)(input, context);
593
392
  const headers = {
594
393
  "content-type": "application/json",
595
394
  };
596
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}";
597
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
395
+ b.bp("/v1/data-sets/{DataSetId}");
396
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
598
397
  let body;
599
398
  body = JSON.stringify((0, smithy_client_1.take)(input, {
600
399
  Description: [],
601
400
  Name: [],
602
401
  }));
603
- return new protocol_http_1.HttpRequest({
604
- protocol,
605
- hostname,
606
- port,
607
- method: "PATCH",
608
- headers,
609
- path: resolvedPath,
610
- body,
611
- });
402
+ b.m("PATCH").h(headers).b(body);
403
+ return b.build();
612
404
  };
613
405
  exports.se_UpdateDataSetCommand = se_UpdateDataSetCommand;
614
406
  const se_UpdateEventActionCommand = async (input, context) => {
615
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
407
+ const b = (0, core_1.requestBuilder)(input, context);
616
408
  const headers = {
617
409
  "content-type": "application/json",
618
410
  };
619
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}";
620
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EventActionId", () => input.EventActionId, "{EventActionId}", false);
411
+ b.bp("/v1/event-actions/{EventActionId}");
412
+ b.p("EventActionId", () => input.EventActionId, "{EventActionId}", false);
621
413
  let body;
622
414
  body = JSON.stringify((0, smithy_client_1.take)(input, {
623
415
  Action: (_) => (0, smithy_client_1._json)(_),
624
416
  }));
625
- return new protocol_http_1.HttpRequest({
626
- protocol,
627
- hostname,
628
- port,
629
- method: "PATCH",
630
- headers,
631
- path: resolvedPath,
632
- body,
633
- });
417
+ b.m("PATCH").h(headers).b(body);
418
+ return b.build();
634
419
  };
635
420
  exports.se_UpdateEventActionCommand = se_UpdateEventActionCommand;
636
421
  const se_UpdateRevisionCommand = async (input, context) => {
637
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
422
+ const b = (0, core_1.requestBuilder)(input, context);
638
423
  const headers = {
639
424
  "content-type": "application/json",
640
425
  };
641
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
642
- "/v1/data-sets/{DataSetId}/revisions/{RevisionId}";
643
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
644
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
426
+ b.bp("/v1/data-sets/{DataSetId}/revisions/{RevisionId}");
427
+ b.p("DataSetId", () => input.DataSetId, "{DataSetId}", false);
428
+ b.p("RevisionId", () => input.RevisionId, "{RevisionId}", false);
645
429
  let body;
646
430
  body = JSON.stringify((0, smithy_client_1.take)(input, {
647
431
  Comment: [],
648
432
  Finalized: [],
649
433
  }));
650
- return new protocol_http_1.HttpRequest({
651
- protocol,
652
- hostname,
653
- port,
654
- method: "PATCH",
655
- headers,
656
- path: resolvedPath,
657
- body,
658
- });
434
+ b.m("PATCH").h(headers).b(body);
435
+ return b.build();
659
436
  };
660
437
  exports.se_UpdateRevisionCommand = se_UpdateRevisionCommand;
661
438
  const de_CancelJobCommand = async (output, context) => {
@@ -2403,6 +2180,28 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2403
2180
  value !== "" &&
2404
2181
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2405
2182
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2183
+ const _AI = "AssetId";
2184
+ const _DSI = "DataSetId";
2185
+ const _ESI = "EventSourceId";
2186
+ const _M = "Method";
2187
+ const _MR = "MaxResults";
2188
+ const _NT = "NextToken";
2189
+ const _O = "Origin";
2190
+ const _P = "Path";
2191
+ const _RI = "RevisionId";
2192
+ const _TK = "TagKeys";
2193
+ const _dSI = "dataSetId";
2194
+ const _eSI = "eventSourceId";
2195
+ const _mR = "maxResults";
2196
+ const _nT = "nextToken";
2197
+ const _o = "origin";
2198
+ const _rI = "revisionId";
2199
+ const _tK = "tagKeys";
2200
+ const _xadai = "x-amzn-dataexchange-asset-id";
2201
+ const _xaddsi = "x-amzn-dataexchange-data-set-id";
2202
+ const _xadhm = "x-amzn-dataexchange-http-method";
2203
+ const _xadp = "x-amzn-dataexchange-path";
2204
+ const _xadri = "x-amzn-dataexchange-revision-id";
2406
2205
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2407
2206
  if (encoded.length) {
2408
2207
  return JSON.parse(encoded);