@aws-sdk/client-mediapackage-vod 3.476.0 → 3.478.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.
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListAssets = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListAssetsCommand_1 = require("../commands/ListAssetsCommand");
5
6
  const MediaPackageVodClient_1 = require("../MediaPackageVodClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListAssetsCommand_1.ListAssetsCommand(input), ...args);
8
- };
9
- async function* paginateListAssets(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MediaPackageVodClient_1.MediaPackageVodClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MediaPackageVod | MediaPackageVodClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListAssets = paginateListAssets;
7
+ exports.paginateListAssets = (0, core_1.createPaginator)(MediaPackageVodClient_1.MediaPackageVodClient, ListAssetsCommand_1.ListAssetsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPackagingConfigurations = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPackagingConfigurationsCommand_1 = require("../commands/ListPackagingConfigurationsCommand");
5
6
  const MediaPackageVodClient_1 = require("../MediaPackageVodClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPackagingConfigurationsCommand_1.ListPackagingConfigurationsCommand(input), ...args);
8
- };
9
- async function* paginateListPackagingConfigurations(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MediaPackageVodClient_1.MediaPackageVodClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MediaPackageVod | MediaPackageVodClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListPackagingConfigurations = paginateListPackagingConfigurations;
7
+ exports.paginateListPackagingConfigurations = (0, core_1.createPaginator)(MediaPackageVodClient_1.MediaPackageVodClient, ListPackagingConfigurationsCommand_1.ListPackagingConfigurationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPackagingGroups = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPackagingGroupsCommand_1 = require("../commands/ListPackagingGroupsCommand");
5
6
  const MediaPackageVodClient_1 = require("../MediaPackageVodClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPackagingGroupsCommand_1.ListPackagingGroupsCommand(input), ...args);
8
- };
9
- async function* paginateListPackagingGroups(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MediaPackageVodClient_1.MediaPackageVodClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MediaPackageVod | MediaPackageVodClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListPackagingGroups = paginateListPackagingGroups;
7
+ exports.paginateListPackagingGroups = (0, core_1.createPaginator)(MediaPackageVodClient_1.MediaPackageVodClient, ListPackagingGroupsCommand_1.ListPackagingGroupsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,38 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdatePackagingGroupCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPackagingGroupsCommand = exports.de_ListPackagingConfigurationsCommand = exports.de_ListAssetsCommand = exports.de_DescribePackagingGroupCommand = exports.de_DescribePackagingConfigurationCommand = exports.de_DescribeAssetCommand = exports.de_DeletePackagingGroupCommand = exports.de_DeletePackagingConfigurationCommand = exports.de_DeleteAssetCommand = exports.de_CreatePackagingGroupCommand = exports.de_CreatePackagingConfigurationCommand = exports.de_CreateAssetCommand = exports.de_ConfigureLogsCommand = exports.se_UpdatePackagingGroupCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPackagingGroupsCommand = exports.se_ListPackagingConfigurationsCommand = exports.se_ListAssetsCommand = exports.se_DescribePackagingGroupCommand = exports.se_DescribePackagingConfigurationCommand = exports.se_DescribeAssetCommand = exports.se_DeletePackagingGroupCommand = exports.se_DeletePackagingConfigurationCommand = exports.se_DeleteAssetCommand = exports.se_CreatePackagingGroupCommand = exports.se_CreatePackagingConfigurationCommand = exports.se_CreateAssetCommand = exports.se_ConfigureLogsCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const MediaPackageVodServiceException_1 = require("../models/MediaPackageVodServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_ConfigureLogsCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}/configure_logs";
14
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
13
+ b.bp("/packaging_groups/{Id}/configure_logs");
14
+ b.p("Id", () => input.Id, "{Id}", false);
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`],
18
18
  }));
19
- return new protocol_http_1.HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "PUT",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("PUT").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  exports.se_ConfigureLogsCommand = se_ConfigureLogsCommand;
30
23
  const se_CreateAssetCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = (0, core_1.requestBuilder)(input, context);
32
25
  const headers = {
33
26
  "content-type": "application/json",
34
27
  };
35
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets";
28
+ b.bp("/assets");
36
29
  let body;
37
30
  body = JSON.stringify((0, smithy_client_1.take)(input, {
38
31
  id: [, , `Id`],
@@ -42,23 +35,16 @@ const se_CreateAssetCommand = async (input, context) => {
42
35
  sourceRoleArn: [, , `SourceRoleArn`],
43
36
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
44
37
  }));
45
- return new protocol_http_1.HttpRequest({
46
- protocol,
47
- hostname,
48
- port,
49
- method: "POST",
50
- headers,
51
- path: resolvedPath,
52
- body,
53
- });
38
+ b.m("POST").h(headers).b(body);
39
+ return b.build();
54
40
  };
55
41
  exports.se_CreateAssetCommand = se_CreateAssetCommand;
56
42
  const se_CreatePackagingConfigurationCommand = async (input, context) => {
57
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
43
+ const b = (0, core_1.requestBuilder)(input, context);
58
44
  const headers = {
59
45
  "content-type": "application/json",
60
46
  };
61
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations";
47
+ b.bp("/packaging_configurations");
62
48
  let body;
63
49
  body = JSON.stringify((0, smithy_client_1.take)(input, {
64
50
  cmafPackage: [, (_) => se_CmafPackage(_, context), `CmafPackage`],
@@ -69,23 +55,16 @@ const se_CreatePackagingConfigurationCommand = async (input, context) => {
69
55
  packagingGroupId: [, , `PackagingGroupId`],
70
56
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
71
57
  }));
72
- return new protocol_http_1.HttpRequest({
73
- protocol,
74
- hostname,
75
- port,
76
- method: "POST",
77
- headers,
78
- path: resolvedPath,
79
- body,
80
- });
58
+ b.m("POST").h(headers).b(body);
59
+ return b.build();
81
60
  };
82
61
  exports.se_CreatePackagingConfigurationCommand = se_CreatePackagingConfigurationCommand;
83
62
  const se_CreatePackagingGroupCommand = async (input, context) => {
84
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
63
+ const b = (0, core_1.requestBuilder)(input, context);
85
64
  const headers = {
86
65
  "content-type": "application/json",
87
66
  };
88
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups";
67
+ b.bp("/packaging_groups");
89
68
  let body;
90
69
  body = JSON.stringify((0, smithy_client_1.take)(input, {
91
70
  authorization: [, (_) => se_Authorization(_, context), `Authorization`],
@@ -93,267 +72,165 @@ const se_CreatePackagingGroupCommand = async (input, context) => {
93
72
  id: [, , `Id`],
94
73
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
95
74
  }));
96
- return new protocol_http_1.HttpRequest({
97
- protocol,
98
- hostname,
99
- port,
100
- method: "POST",
101
- headers,
102
- path: resolvedPath,
103
- body,
104
- });
75
+ b.m("POST").h(headers).b(body);
76
+ return b.build();
105
77
  };
106
78
  exports.se_CreatePackagingGroupCommand = se_CreatePackagingGroupCommand;
107
79
  const se_DeleteAssetCommand = async (input, context) => {
108
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = (0, core_1.requestBuilder)(input, context);
109
81
  const headers = {};
110
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets/{Id}";
111
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
82
+ b.bp("/assets/{Id}");
83
+ b.p("Id", () => input.Id, "{Id}", false);
112
84
  let body;
113
- return new protocol_http_1.HttpRequest({
114
- protocol,
115
- hostname,
116
- port,
117
- method: "DELETE",
118
- headers,
119
- path: resolvedPath,
120
- body,
121
- });
85
+ b.m("DELETE").h(headers).b(body);
86
+ return b.build();
122
87
  };
123
88
  exports.se_DeleteAssetCommand = se_DeleteAssetCommand;
124
89
  const se_DeletePackagingConfigurationCommand = async (input, context) => {
125
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
90
+ const b = (0, core_1.requestBuilder)(input, context);
126
91
  const headers = {};
127
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations/{Id}";
128
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
92
+ b.bp("/packaging_configurations/{Id}");
93
+ b.p("Id", () => input.Id, "{Id}", false);
129
94
  let body;
130
- return new protocol_http_1.HttpRequest({
131
- protocol,
132
- hostname,
133
- port,
134
- method: "DELETE",
135
- headers,
136
- path: resolvedPath,
137
- body,
138
- });
95
+ b.m("DELETE").h(headers).b(body);
96
+ return b.build();
139
97
  };
140
98
  exports.se_DeletePackagingConfigurationCommand = se_DeletePackagingConfigurationCommand;
141
99
  const se_DeletePackagingGroupCommand = async (input, context) => {
142
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = (0, core_1.requestBuilder)(input, context);
143
101
  const headers = {};
144
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}";
145
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
102
+ b.bp("/packaging_groups/{Id}");
103
+ b.p("Id", () => input.Id, "{Id}", false);
146
104
  let body;
147
- return new protocol_http_1.HttpRequest({
148
- protocol,
149
- hostname,
150
- port,
151
- method: "DELETE",
152
- headers,
153
- path: resolvedPath,
154
- body,
155
- });
105
+ b.m("DELETE").h(headers).b(body);
106
+ return b.build();
156
107
  };
157
108
  exports.se_DeletePackagingGroupCommand = se_DeletePackagingGroupCommand;
158
109
  const se_DescribeAssetCommand = async (input, context) => {
159
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
110
+ const b = (0, core_1.requestBuilder)(input, context);
160
111
  const headers = {};
161
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets/{Id}";
162
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
112
+ b.bp("/assets/{Id}");
113
+ b.p("Id", () => input.Id, "{Id}", false);
163
114
  let body;
164
- return new protocol_http_1.HttpRequest({
165
- protocol,
166
- hostname,
167
- port,
168
- method: "GET",
169
- headers,
170
- path: resolvedPath,
171
- body,
172
- });
115
+ b.m("GET").h(headers).b(body);
116
+ return b.build();
173
117
  };
174
118
  exports.se_DescribeAssetCommand = se_DescribeAssetCommand;
175
119
  const se_DescribePackagingConfigurationCommand = async (input, context) => {
176
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
+ const b = (0, core_1.requestBuilder)(input, context);
177
121
  const headers = {};
178
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations/{Id}";
179
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
122
+ b.bp("/packaging_configurations/{Id}");
123
+ b.p("Id", () => input.Id, "{Id}", false);
180
124
  let body;
181
- return new protocol_http_1.HttpRequest({
182
- protocol,
183
- hostname,
184
- port,
185
- method: "GET",
186
- headers,
187
- path: resolvedPath,
188
- body,
189
- });
125
+ b.m("GET").h(headers).b(body);
126
+ return b.build();
190
127
  };
191
128
  exports.se_DescribePackagingConfigurationCommand = se_DescribePackagingConfigurationCommand;
192
129
  const se_DescribePackagingGroupCommand = async (input, context) => {
193
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
130
+ const b = (0, core_1.requestBuilder)(input, context);
194
131
  const headers = {};
195
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}";
196
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
132
+ b.bp("/packaging_groups/{Id}");
133
+ b.p("Id", () => input.Id, "{Id}", false);
197
134
  let body;
198
- return new protocol_http_1.HttpRequest({
199
- protocol,
200
- hostname,
201
- port,
202
- method: "GET",
203
- headers,
204
- path: resolvedPath,
205
- body,
206
- });
135
+ b.m("GET").h(headers).b(body);
136
+ return b.build();
207
137
  };
208
138
  exports.se_DescribePackagingGroupCommand = se_DescribePackagingGroupCommand;
209
139
  const se_ListAssetsCommand = async (input, context) => {
210
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = (0, core_1.requestBuilder)(input, context);
211
141
  const headers = {};
212
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets";
142
+ b.bp("/assets");
213
143
  const query = (0, smithy_client_1.map)({
214
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
215
- nextToken: [, input.NextToken],
216
- packagingGroupId: [, input.PackagingGroupId],
144
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
145
+ [_nT]: [, input[_NT]],
146
+ [_pGI]: [, input[_PGI]],
217
147
  });
218
148
  let body;
219
- return new protocol_http_1.HttpRequest({
220
- protocol,
221
- hostname,
222
- port,
223
- method: "GET",
224
- headers,
225
- path: resolvedPath,
226
- query,
227
- body,
228
- });
149
+ b.m("GET").h(headers).q(query).b(body);
150
+ return b.build();
229
151
  };
230
152
  exports.se_ListAssetsCommand = se_ListAssetsCommand;
231
153
  const se_ListPackagingConfigurationsCommand = async (input, context) => {
232
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
154
+ const b = (0, core_1.requestBuilder)(input, context);
233
155
  const headers = {};
234
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations";
156
+ b.bp("/packaging_configurations");
235
157
  const query = (0, smithy_client_1.map)({
236
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
237
- nextToken: [, input.NextToken],
238
- packagingGroupId: [, input.PackagingGroupId],
158
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
159
+ [_nT]: [, input[_NT]],
160
+ [_pGI]: [, input[_PGI]],
239
161
  });
240
162
  let body;
241
- return new protocol_http_1.HttpRequest({
242
- protocol,
243
- hostname,
244
- port,
245
- method: "GET",
246
- headers,
247
- path: resolvedPath,
248
- query,
249
- body,
250
- });
163
+ b.m("GET").h(headers).q(query).b(body);
164
+ return b.build();
251
165
  };
252
166
  exports.se_ListPackagingConfigurationsCommand = se_ListPackagingConfigurationsCommand;
253
167
  const se_ListPackagingGroupsCommand = async (input, context) => {
254
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const b = (0, core_1.requestBuilder)(input, context);
255
169
  const headers = {};
256
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups";
170
+ b.bp("/packaging_groups");
257
171
  const query = (0, smithy_client_1.map)({
258
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
259
- nextToken: [, input.NextToken],
172
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
173
+ [_nT]: [, input[_NT]],
260
174
  });
261
175
  let body;
262
- return new protocol_http_1.HttpRequest({
263
- protocol,
264
- hostname,
265
- port,
266
- method: "GET",
267
- headers,
268
- path: resolvedPath,
269
- query,
270
- body,
271
- });
176
+ b.m("GET").h(headers).q(query).b(body);
177
+ return b.build();
272
178
  };
273
179
  exports.se_ListPackagingGroupsCommand = se_ListPackagingGroupsCommand;
274
180
  const se_ListTagsForResourceCommand = async (input, context) => {
275
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
+ const b = (0, core_1.requestBuilder)(input, context);
276
182
  const headers = {};
277
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
278
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
183
+ b.bp("/tags/{ResourceArn}");
184
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
279
185
  let body;
280
- return new protocol_http_1.HttpRequest({
281
- protocol,
282
- hostname,
283
- port,
284
- method: "GET",
285
- headers,
286
- path: resolvedPath,
287
- body,
288
- });
186
+ b.m("GET").h(headers).b(body);
187
+ return b.build();
289
188
  };
290
189
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
291
190
  const se_TagResourceCommand = async (input, context) => {
292
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
191
+ const b = (0, core_1.requestBuilder)(input, context);
293
192
  const headers = {
294
193
  "content-type": "application/json",
295
194
  };
296
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
297
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
195
+ b.bp("/tags/{ResourceArn}");
196
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
298
197
  let body;
299
198
  body = JSON.stringify((0, smithy_client_1.take)(input, {
300
199
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
301
200
  }));
302
- return new protocol_http_1.HttpRequest({
303
- protocol,
304
- hostname,
305
- port,
306
- method: "POST",
307
- headers,
308
- path: resolvedPath,
309
- body,
310
- });
201
+ b.m("POST").h(headers).b(body);
202
+ return b.build();
311
203
  };
312
204
  exports.se_TagResourceCommand = se_TagResourceCommand;
313
205
  const se_UntagResourceCommand = async (input, context) => {
314
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
206
+ const b = (0, core_1.requestBuilder)(input, context);
315
207
  const headers = {};
316
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
317
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
208
+ b.bp("/tags/{ResourceArn}");
209
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
318
210
  const query = (0, smithy_client_1.map)({
319
- tagKeys: [
211
+ [_tK]: [
320
212
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
321
- () => (input.TagKeys || []).map((_entry) => _entry),
213
+ () => (input[_TK] || []).map((_entry) => _entry),
322
214
  ],
323
215
  });
324
216
  let body;
325
- return new protocol_http_1.HttpRequest({
326
- protocol,
327
- hostname,
328
- port,
329
- method: "DELETE",
330
- headers,
331
- path: resolvedPath,
332
- query,
333
- body,
334
- });
217
+ b.m("DELETE").h(headers).q(query).b(body);
218
+ return b.build();
335
219
  };
336
220
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
337
221
  const se_UpdatePackagingGroupCommand = async (input, context) => {
338
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
222
+ const b = (0, core_1.requestBuilder)(input, context);
339
223
  const headers = {
340
224
  "content-type": "application/json",
341
225
  };
342
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}";
343
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
226
+ b.bp("/packaging_groups/{Id}");
227
+ b.p("Id", () => input.Id, "{Id}", false);
344
228
  let body;
345
229
  body = JSON.stringify((0, smithy_client_1.take)(input, {
346
230
  authorization: [, (_) => se_Authorization(_, context), `Authorization`],
347
231
  }));
348
- return new protocol_http_1.HttpRequest({
349
- protocol,
350
- hostname,
351
- port,
352
- method: "PUT",
353
- headers,
354
- path: resolvedPath,
355
- body,
356
- });
232
+ b.m("PUT").h(headers).b(body);
233
+ return b.build();
357
234
  };
358
235
  exports.se_UpdatePackagingGroupCommand = se_UpdatePackagingGroupCommand;
359
236
  const de_ConfigureLogsCommand = async (output, context) => {
@@ -1619,6 +1496,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1619
1496
  value !== "" &&
1620
1497
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1621
1498
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1499
+ const _MR = "MaxResults";
1500
+ const _NT = "NextToken";
1501
+ const _PGI = "PackagingGroupId";
1502
+ const _TK = "TagKeys";
1503
+ const _mR = "maxResults";
1504
+ const _nT = "nextToken";
1505
+ const _pGI = "packagingGroupId";
1506
+ const _tK = "tagKeys";
1622
1507
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1623
1508
  if (encoded.length) {
1624
1509
  return JSON.parse(encoded);
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAssetsCommand } from "../commands/ListAssetsCommand";
2
3
  import { MediaPackageVodClient } from "../MediaPackageVodClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAssetsCommand(input), ...args);
5
- };
6
- export async function* paginateListAssets(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MediaPackageVodClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaPackageVod | MediaPackageVodClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListAssets = createPaginator(MediaPackageVodClient, ListAssetsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListPackagingConfigurationsCommand, } from "../commands/ListPackagingConfigurationsCommand";
2
3
  import { MediaPackageVodClient } from "../MediaPackageVodClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListPackagingConfigurationsCommand(input), ...args);
5
- };
6
- export async function* paginateListPackagingConfigurations(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MediaPackageVodClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaPackageVod | MediaPackageVodClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListPackagingConfigurations = createPaginator(MediaPackageVodClient, ListPackagingConfigurationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListPackagingGroupsCommand, } from "../commands/ListPackagingGroupsCommand";
2
3
  import { MediaPackageVodClient } from "../MediaPackageVodClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListPackagingGroupsCommand(input), ...args);
5
- };
6
- export async function* paginateListPackagingGroups(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MediaPackageVodClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaPackageVod | MediaPackageVodClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListPackagingGroups = createPaginator(MediaPackageVodClient, ListPackagingGroupsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,34 +1,27 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { MediaPackageVodServiceException as __BaseException } from "../models/MediaPackageVodServiceException";
4
4
  import { ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableException, TooManyRequestsException, UnprocessableEntityException, } from "../models/models_0";
5
5
  export const se_ConfigureLogsCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}/configure_logs";
11
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
10
+ b.bp("/packaging_groups/{Id}/configure_logs");
11
+ b.p("Id", () => input.Id, "{Id}", false);
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`],
15
15
  }));
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "PUT",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("PUT").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  export const se_CreateAssetCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets";
24
+ b.bp("/assets");
32
25
  let body;
33
26
  body = JSON.stringify(take(input, {
34
27
  id: [, , `Id`],
@@ -38,22 +31,15 @@ export const se_CreateAssetCommand = async (input, context) => {
38
31
  sourceRoleArn: [, , `SourceRoleArn`],
39
32
  tags: [, (_) => _json(_), `Tags`],
40
33
  }));
41
- return new __HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "POST",
46
- headers,
47
- path: resolvedPath,
48
- body,
49
- });
34
+ b.m("POST").h(headers).b(body);
35
+ return b.build();
50
36
  };
51
37
  export const se_CreatePackagingConfigurationCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
38
+ const b = rb(input, context);
53
39
  const headers = {
54
40
  "content-type": "application/json",
55
41
  };
56
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations";
42
+ b.bp("/packaging_configurations");
57
43
  let body;
58
44
  body = JSON.stringify(take(input, {
59
45
  cmafPackage: [, (_) => se_CmafPackage(_, context), `CmafPackage`],
@@ -64,22 +50,15 @@ export const se_CreatePackagingConfigurationCommand = async (input, context) =>
64
50
  packagingGroupId: [, , `PackagingGroupId`],
65
51
  tags: [, (_) => _json(_), `Tags`],
66
52
  }));
67
- return new __HttpRequest({
68
- protocol,
69
- hostname,
70
- port,
71
- method: "POST",
72
- headers,
73
- path: resolvedPath,
74
- body,
75
- });
53
+ b.m("POST").h(headers).b(body);
54
+ return b.build();
76
55
  };
77
56
  export const se_CreatePackagingGroupCommand = async (input, context) => {
78
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
57
+ const b = rb(input, context);
79
58
  const headers = {
80
59
  "content-type": "application/json",
81
60
  };
82
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups";
61
+ b.bp("/packaging_groups");
83
62
  let body;
84
63
  body = JSON.stringify(take(input, {
85
64
  authorization: [, (_) => se_Authorization(_, context), `Authorization`],
@@ -87,254 +66,152 @@ export const se_CreatePackagingGroupCommand = async (input, context) => {
87
66
  id: [, , `Id`],
88
67
  tags: [, (_) => _json(_), `Tags`],
89
68
  }));
90
- return new __HttpRequest({
91
- protocol,
92
- hostname,
93
- port,
94
- method: "POST",
95
- headers,
96
- path: resolvedPath,
97
- body,
98
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
99
71
  };
100
72
  export const se_DeleteAssetCommand = async (input, context) => {
101
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = rb(input, context);
102
74
  const headers = {};
103
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets/{Id}";
104
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
75
+ b.bp("/assets/{Id}");
76
+ b.p("Id", () => input.Id, "{Id}", false);
105
77
  let body;
106
- return new __HttpRequest({
107
- protocol,
108
- hostname,
109
- port,
110
- method: "DELETE",
111
- headers,
112
- path: resolvedPath,
113
- body,
114
- });
78
+ b.m("DELETE").h(headers).b(body);
79
+ return b.build();
115
80
  };
116
81
  export const se_DeletePackagingConfigurationCommand = async (input, context) => {
117
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const b = rb(input, context);
118
83
  const headers = {};
119
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations/{Id}";
120
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
84
+ b.bp("/packaging_configurations/{Id}");
85
+ b.p("Id", () => input.Id, "{Id}", false);
121
86
  let body;
122
- return new __HttpRequest({
123
- protocol,
124
- hostname,
125
- port,
126
- method: "DELETE",
127
- headers,
128
- path: resolvedPath,
129
- body,
130
- });
87
+ b.m("DELETE").h(headers).b(body);
88
+ return b.build();
131
89
  };
132
90
  export const se_DeletePackagingGroupCommand = async (input, context) => {
133
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const b = rb(input, context);
134
92
  const headers = {};
135
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}";
136
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
93
+ b.bp("/packaging_groups/{Id}");
94
+ b.p("Id", () => input.Id, "{Id}", false);
137
95
  let body;
138
- return new __HttpRequest({
139
- protocol,
140
- hostname,
141
- port,
142
- method: "DELETE",
143
- headers,
144
- path: resolvedPath,
145
- body,
146
- });
96
+ b.m("DELETE").h(headers).b(body);
97
+ return b.build();
147
98
  };
148
99
  export const se_DescribeAssetCommand = async (input, context) => {
149
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = rb(input, context);
150
101
  const headers = {};
151
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets/{Id}";
152
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
102
+ b.bp("/assets/{Id}");
103
+ b.p("Id", () => input.Id, "{Id}", false);
153
104
  let body;
154
- return new __HttpRequest({
155
- protocol,
156
- hostname,
157
- port,
158
- method: "GET",
159
- headers,
160
- path: resolvedPath,
161
- body,
162
- });
105
+ b.m("GET").h(headers).b(body);
106
+ return b.build();
163
107
  };
164
108
  export const se_DescribePackagingConfigurationCommand = async (input, context) => {
165
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const b = rb(input, context);
166
110
  const headers = {};
167
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations/{Id}";
168
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
111
+ b.bp("/packaging_configurations/{Id}");
112
+ b.p("Id", () => input.Id, "{Id}", false);
169
113
  let body;
170
- return new __HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "GET",
175
- headers,
176
- path: resolvedPath,
177
- body,
178
- });
114
+ b.m("GET").h(headers).b(body);
115
+ return b.build();
179
116
  };
180
117
  export const se_DescribePackagingGroupCommand = async (input, context) => {
181
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const b = rb(input, context);
182
119
  const headers = {};
183
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}";
184
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
120
+ b.bp("/packaging_groups/{Id}");
121
+ b.p("Id", () => input.Id, "{Id}", false);
185
122
  let body;
186
- return new __HttpRequest({
187
- protocol,
188
- hostname,
189
- port,
190
- method: "GET",
191
- headers,
192
- path: resolvedPath,
193
- body,
194
- });
123
+ b.m("GET").h(headers).b(body);
124
+ return b.build();
195
125
  };
196
126
  export const se_ListAssetsCommand = async (input, context) => {
197
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
127
+ const b = rb(input, context);
198
128
  const headers = {};
199
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets";
129
+ b.bp("/assets");
200
130
  const query = map({
201
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
202
- nextToken: [, input.NextToken],
203
- packagingGroupId: [, input.PackagingGroupId],
131
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
132
+ [_nT]: [, input[_NT]],
133
+ [_pGI]: [, input[_PGI]],
204
134
  });
205
135
  let body;
206
- return new __HttpRequest({
207
- protocol,
208
- hostname,
209
- port,
210
- method: "GET",
211
- headers,
212
- path: resolvedPath,
213
- query,
214
- body,
215
- });
136
+ b.m("GET").h(headers).q(query).b(body);
137
+ return b.build();
216
138
  };
217
139
  export const se_ListPackagingConfigurationsCommand = async (input, context) => {
218
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = rb(input, context);
219
141
  const headers = {};
220
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations";
142
+ b.bp("/packaging_configurations");
221
143
  const query = map({
222
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
223
- nextToken: [, input.NextToken],
224
- packagingGroupId: [, input.PackagingGroupId],
144
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
145
+ [_nT]: [, input[_NT]],
146
+ [_pGI]: [, input[_PGI]],
225
147
  });
226
148
  let body;
227
- return new __HttpRequest({
228
- protocol,
229
- hostname,
230
- port,
231
- method: "GET",
232
- headers,
233
- path: resolvedPath,
234
- query,
235
- body,
236
- });
149
+ b.m("GET").h(headers).q(query).b(body);
150
+ return b.build();
237
151
  };
238
152
  export const se_ListPackagingGroupsCommand = async (input, context) => {
239
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
153
+ const b = rb(input, context);
240
154
  const headers = {};
241
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups";
155
+ b.bp("/packaging_groups");
242
156
  const query = map({
243
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
244
- nextToken: [, input.NextToken],
157
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
158
+ [_nT]: [, input[_NT]],
245
159
  });
246
160
  let body;
247
- return new __HttpRequest({
248
- protocol,
249
- hostname,
250
- port,
251
- method: "GET",
252
- headers,
253
- path: resolvedPath,
254
- query,
255
- body,
256
- });
161
+ b.m("GET").h(headers).q(query).b(body);
162
+ return b.build();
257
163
  };
258
164
  export const se_ListTagsForResourceCommand = async (input, context) => {
259
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
165
+ const b = rb(input, context);
260
166
  const headers = {};
261
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
262
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
167
+ b.bp("/tags/{ResourceArn}");
168
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
263
169
  let body;
264
- return new __HttpRequest({
265
- protocol,
266
- hostname,
267
- port,
268
- method: "GET",
269
- headers,
270
- path: resolvedPath,
271
- body,
272
- });
170
+ b.m("GET").h(headers).b(body);
171
+ return b.build();
273
172
  };
274
173
  export const se_TagResourceCommand = async (input, context) => {
275
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const b = rb(input, context);
276
175
  const headers = {
277
176
  "content-type": "application/json",
278
177
  };
279
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
280
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
178
+ b.bp("/tags/{ResourceArn}");
179
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
281
180
  let body;
282
181
  body = JSON.stringify(take(input, {
283
182
  tags: [, (_) => _json(_), `Tags`],
284
183
  }));
285
- return new __HttpRequest({
286
- protocol,
287
- hostname,
288
- port,
289
- method: "POST",
290
- headers,
291
- path: resolvedPath,
292
- body,
293
- });
184
+ b.m("POST").h(headers).b(body);
185
+ return b.build();
294
186
  };
295
187
  export const se_UntagResourceCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
188
+ const b = rb(input, context);
297
189
  const headers = {};
298
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
299
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
190
+ b.bp("/tags/{ResourceArn}");
191
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
300
192
  const query = map({
301
- tagKeys: [
193
+ [_tK]: [
302
194
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
303
- () => (input.TagKeys || []).map((_entry) => _entry),
195
+ () => (input[_TK] || []).map((_entry) => _entry),
304
196
  ],
305
197
  });
306
198
  let body;
307
- return new __HttpRequest({
308
- protocol,
309
- hostname,
310
- port,
311
- method: "DELETE",
312
- headers,
313
- path: resolvedPath,
314
- query,
315
- body,
316
- });
199
+ b.m("DELETE").h(headers).q(query).b(body);
200
+ return b.build();
317
201
  };
318
202
  export const se_UpdatePackagingGroupCommand = async (input, context) => {
319
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
203
+ const b = rb(input, context);
320
204
  const headers = {
321
205
  "content-type": "application/json",
322
206
  };
323
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}";
324
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
207
+ b.bp("/packaging_groups/{Id}");
208
+ b.p("Id", () => input.Id, "{Id}", false);
325
209
  let body;
326
210
  body = JSON.stringify(take(input, {
327
211
  authorization: [, (_) => se_Authorization(_, context), `Authorization`],
328
212
  }));
329
- return new __HttpRequest({
330
- protocol,
331
- hostname,
332
- port,
333
- method: "PUT",
334
- headers,
335
- path: resolvedPath,
336
- body,
337
- });
213
+ b.m("PUT").h(headers).b(body);
214
+ return b.build();
338
215
  };
339
216
  export const de_ConfigureLogsCommand = async (output, context) => {
340
217
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1582,6 +1459,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1582
1459
  value !== "" &&
1583
1460
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1584
1461
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1462
+ const _MR = "MaxResults";
1463
+ const _NT = "NextToken";
1464
+ const _PGI = "PackagingGroupId";
1465
+ const _TK = "TagKeys";
1466
+ const _mR = "maxResults";
1467
+ const _nT = "nextToken";
1468
+ const _pGI = "packagingGroupId";
1469
+ const _tK = "tagKeys";
1585
1470
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1586
1471
  if (encoded.length) {
1587
1472
  return JSON.parse(encoded);
@@ -4,4 +4,4 @@ import { MediaPackageVodPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListAssets(config: MediaPackageVodPaginationConfiguration, input: ListAssetsCommandInput, ...additionalArguments: any): Paginator<ListAssetsCommandOutput>;
7
+ export declare const paginateListAssets: (config: MediaPackageVodPaginationConfiguration, input: ListAssetsCommandInput, ...rest: any[]) => Paginator<ListAssetsCommandOutput>;
@@ -4,4 +4,4 @@ import { MediaPackageVodPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListPackagingConfigurations(config: MediaPackageVodPaginationConfiguration, input: ListPackagingConfigurationsCommandInput, ...additionalArguments: any): Paginator<ListPackagingConfigurationsCommandOutput>;
7
+ export declare const paginateListPackagingConfigurations: (config: MediaPackageVodPaginationConfiguration, input: ListPackagingConfigurationsCommandInput, ...rest: any[]) => Paginator<ListPackagingConfigurationsCommandOutput>;
@@ -4,4 +4,4 @@ import { MediaPackageVodPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListPackagingGroups(config: MediaPackageVodPaginationConfiguration, input: ListPackagingGroupsCommandInput, ...additionalArguments: any): Paginator<ListPackagingGroupsCommandOutput>;
7
+ export declare const paginateListPackagingGroups: (config: MediaPackageVodPaginationConfiguration, input: ListPackagingGroupsCommandInput, ...rest: any[]) => Paginator<ListPackagingGroupsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListAssetsCommandOutput,
5
5
  } from "../commands/ListAssetsCommand";
6
6
  import { MediaPackageVodPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListAssets(
7
+ export declare const paginateListAssets: (
8
8
  config: MediaPackageVodPaginationConfiguration,
9
9
  input: ListAssetsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListAssetsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListAssetsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListPackagingConfigurationsCommandOutput,
5
5
  } from "../commands/ListPackagingConfigurationsCommand";
6
6
  import { MediaPackageVodPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListPackagingConfigurations(
7
+ export declare const paginateListPackagingConfigurations: (
8
8
  config: MediaPackageVodPaginationConfiguration,
9
9
  input: ListPackagingConfigurationsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListPackagingConfigurationsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListPackagingConfigurationsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListPackagingGroupsCommandOutput,
5
5
  } from "../commands/ListPackagingGroupsCommand";
6
6
  import { MediaPackageVodPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListPackagingGroups(
7
+ export declare const paginateListPackagingGroups: (
8
8
  config: MediaPackageVodPaginationConfiguration,
9
9
  input: ListPackagingGroupsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListPackagingGroupsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListPackagingGroupsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-mediapackage-vod",
3
3
  "description": "AWS SDK for JavaScript Mediapackage Vod Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.478.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,20 +20,21 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.478.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.478.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
29
29
  "@aws-sdk/middleware-signing": "3.468.0",
30
- "@aws-sdk/middleware-user-agent": "3.470.0",
30
+ "@aws-sdk/middleware-user-agent": "3.478.0",
31
31
  "@aws-sdk/region-config-resolver": "3.470.0",
32
32
  "@aws-sdk/types": "3.468.0",
33
- "@aws-sdk/util-endpoints": "3.470.0",
33
+ "@aws-sdk/util-endpoints": "3.478.0",
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",