@aws-sdk/client-chime-sdk-media-pipelines 3.476.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.
@@ -1,14 +1,14 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ChimeSDKMediaPipelinesServiceException as __BaseException } from "../models/ChimeSDKMediaPipelinesServiceException";
5
5
  import { BadRequestException, ConflictException, ForbiddenException, NotFoundException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, } from "../models/models_0";
6
6
  export const se_CreateMediaCapturePipelineCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-capture-pipelines";
11
+ b.bp("/sdk-media-capture-pipelines");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  ChimeSdkMeetingConfiguration: (_) => _json(_),
@@ -19,22 +19,15 @@ export const se_CreateMediaCapturePipelineCommand = async (input, context) => {
19
19
  SourceType: [],
20
20
  Tags: (_) => _json(_),
21
21
  }));
22
- return new __HttpRequest({
23
- protocol,
24
- hostname,
25
- port,
26
- method: "POST",
27
- headers,
28
- path: resolvedPath,
29
- body,
30
- });
22
+ b.m("POST").h(headers).b(body);
23
+ return b.build();
31
24
  };
32
25
  export const se_CreateMediaConcatenationPipelineCommand = async (input, context) => {
33
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
26
+ const b = rb(input, context);
34
27
  const headers = {
35
28
  "content-type": "application/json",
36
29
  };
37
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-concatenation-pipelines";
30
+ b.bp("/sdk-media-concatenation-pipelines");
38
31
  let body;
39
32
  body = JSON.stringify(take(input, {
40
33
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -42,22 +35,15 @@ export const se_CreateMediaConcatenationPipelineCommand = async (input, context)
42
35
  Sources: (_) => _json(_),
43
36
  Tags: (_) => _json(_),
44
37
  }));
45
- return new __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
  export const se_CreateMediaInsightsPipelineCommand = async (input, context) => {
56
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
42
+ const b = rb(input, context);
57
43
  const headers = {
58
44
  "content-type": "application/json",
59
45
  };
60
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/media-insights-pipelines";
46
+ b.bp("/media-insights-pipelines");
61
47
  let body;
62
48
  body = JSON.stringify(take(input, {
63
49
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -68,22 +54,15 @@ export const se_CreateMediaInsightsPipelineCommand = async (input, context) => {
68
54
  S3RecordingSinkRuntimeConfiguration: (_) => _json(_),
69
55
  Tags: (_) => _json(_),
70
56
  }));
71
- return new __HttpRequest({
72
- protocol,
73
- hostname,
74
- port,
75
- method: "POST",
76
- headers,
77
- path: resolvedPath,
78
- body,
79
- });
57
+ b.m("POST").h(headers).b(body);
58
+ return b.build();
80
59
  };
81
60
  export const se_CreateMediaInsightsPipelineConfigurationCommand = async (input, context) => {
82
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
61
+ const b = rb(input, context);
83
62
  const headers = {
84
63
  "content-type": "application/json",
85
64
  };
86
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/media-insights-pipeline-configurations";
65
+ b.bp("/media-insights-pipeline-configurations");
87
66
  let body;
88
67
  body = JSON.stringify(take(input, {
89
68
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -93,22 +72,15 @@ export const se_CreateMediaInsightsPipelineConfigurationCommand = async (input,
93
72
  ResourceAccessRoleArn: [],
94
73
  Tags: (_) => _json(_),
95
74
  }));
96
- return new __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
  export const se_CreateMediaLiveConnectorPipelineCommand = async (input, context) => {
107
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
79
+ const b = rb(input, context);
108
80
  const headers = {
109
81
  "content-type": "application/json",
110
82
  };
111
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-live-connector-pipelines";
83
+ b.bp("/sdk-media-live-connector-pipelines");
112
84
  let body;
113
85
  body = JSON.stringify(take(input, {
114
86
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -116,23 +88,15 @@ export const se_CreateMediaLiveConnectorPipelineCommand = async (input, context)
116
88
  Sources: (_) => _json(_),
117
89
  Tags: (_) => _json(_),
118
90
  }));
119
- return new __HttpRequest({
120
- protocol,
121
- hostname,
122
- port,
123
- method: "POST",
124
- headers,
125
- path: resolvedPath,
126
- body,
127
- });
91
+ b.m("POST").h(headers).b(body);
92
+ return b.build();
128
93
  };
129
94
  export const se_CreateMediaPipelineKinesisVideoStreamPoolCommand = async (input, context) => {
130
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
95
+ const b = rb(input, context);
131
96
  const headers = {
132
97
  "content-type": "application/json",
133
98
  };
134
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
135
- "/media-pipeline-kinesis-video-stream-pools";
99
+ b.bp("/media-pipeline-kinesis-video-stream-pools");
136
100
  let body;
137
101
  body = JSON.stringify(take(input, {
138
102
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -140,22 +104,15 @@ export const se_CreateMediaPipelineKinesisVideoStreamPoolCommand = async (input,
140
104
  StreamConfiguration: (_) => _json(_),
141
105
  Tags: (_) => _json(_),
142
106
  }));
143
- return new __HttpRequest({
144
- protocol,
145
- hostname,
146
- port,
147
- method: "POST",
148
- headers,
149
- path: resolvedPath,
150
- body,
151
- });
107
+ b.m("POST").h(headers).b(body);
108
+ return b.build();
152
109
  };
153
110
  export const se_CreateMediaStreamPipelineCommand = async (input, context) => {
154
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
111
+ const b = rb(input, context);
155
112
  const headers = {
156
113
  "content-type": "application/json",
157
114
  };
158
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-stream-pipelines";
115
+ b.bp("/sdk-media-stream-pipelines");
159
116
  let body;
160
117
  body = JSON.stringify(take(input, {
161
118
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -163,296 +120,169 @@ export const se_CreateMediaStreamPipelineCommand = async (input, context) => {
163
120
  Sources: (_) => _json(_),
164
121
  Tags: (_) => _json(_),
165
122
  }));
166
- return new __HttpRequest({
167
- protocol,
168
- hostname,
169
- port,
170
- method: "POST",
171
- headers,
172
- path: resolvedPath,
173
- body,
174
- });
123
+ b.m("POST").h(headers).b(body);
124
+ return b.build();
175
125
  };
176
126
  export const se_DeleteMediaCapturePipelineCommand = async (input, context) => {
177
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
127
+ const b = rb(input, context);
178
128
  const headers = {};
179
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
180
- "/sdk-media-capture-pipelines/{MediaPipelineId}";
181
- resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
129
+ b.bp("/sdk-media-capture-pipelines/{MediaPipelineId}");
130
+ b.p("MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
182
131
  let body;
183
- return new __HttpRequest({
184
- protocol,
185
- hostname,
186
- port,
187
- method: "DELETE",
188
- headers,
189
- path: resolvedPath,
190
- body,
191
- });
132
+ b.m("DELETE").h(headers).b(body);
133
+ return b.build();
192
134
  };
193
135
  export const se_DeleteMediaInsightsPipelineConfigurationCommand = async (input, context) => {
194
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
+ const b = rb(input, context);
195
137
  const headers = {};
196
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
197
- "/media-insights-pipeline-configurations/{Identifier}";
198
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
138
+ b.bp("/media-insights-pipeline-configurations/{Identifier}");
139
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
199
140
  let body;
200
- return new __HttpRequest({
201
- protocol,
202
- hostname,
203
- port,
204
- method: "DELETE",
205
- headers,
206
- path: resolvedPath,
207
- body,
208
- });
141
+ b.m("DELETE").h(headers).b(body);
142
+ return b.build();
209
143
  };
210
144
  export const se_DeleteMediaPipelineCommand = async (input, context) => {
211
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
145
+ const b = rb(input, context);
212
146
  const headers = {};
213
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-pipelines/{MediaPipelineId}";
214
- resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
147
+ b.bp("/sdk-media-pipelines/{MediaPipelineId}");
148
+ b.p("MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
215
149
  let body;
216
- return new __HttpRequest({
217
- protocol,
218
- hostname,
219
- port,
220
- method: "DELETE",
221
- headers,
222
- path: resolvedPath,
223
- body,
224
- });
150
+ b.m("DELETE").h(headers).b(body);
151
+ return b.build();
225
152
  };
226
153
  export const se_DeleteMediaPipelineKinesisVideoStreamPoolCommand = async (input, context) => {
227
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
154
+ const b = rb(input, context);
228
155
  const headers = {};
229
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
230
- "/media-pipeline-kinesis-video-stream-pools/{Identifier}";
231
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
156
+ b.bp("/media-pipeline-kinesis-video-stream-pools/{Identifier}");
157
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
232
158
  let body;
233
- return new __HttpRequest({
234
- protocol,
235
- hostname,
236
- port,
237
- method: "DELETE",
238
- headers,
239
- path: resolvedPath,
240
- body,
241
- });
159
+ b.m("DELETE").h(headers).b(body);
160
+ return b.build();
242
161
  };
243
162
  export const se_GetMediaCapturePipelineCommand = async (input, context) => {
244
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const b = rb(input, context);
245
164
  const headers = {};
246
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
247
- "/sdk-media-capture-pipelines/{MediaPipelineId}";
248
- resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
165
+ b.bp("/sdk-media-capture-pipelines/{MediaPipelineId}");
166
+ b.p("MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
249
167
  let body;
250
- return new __HttpRequest({
251
- protocol,
252
- hostname,
253
- port,
254
- method: "GET",
255
- headers,
256
- path: resolvedPath,
257
- body,
258
- });
168
+ b.m("GET").h(headers).b(body);
169
+ return b.build();
259
170
  };
260
171
  export const se_GetMediaInsightsPipelineConfigurationCommand = async (input, context) => {
261
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = rb(input, context);
262
173
  const headers = {};
263
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
264
- "/media-insights-pipeline-configurations/{Identifier}";
265
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
174
+ b.bp("/media-insights-pipeline-configurations/{Identifier}");
175
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
266
176
  let body;
267
- return new __HttpRequest({
268
- protocol,
269
- hostname,
270
- port,
271
- method: "GET",
272
- headers,
273
- path: resolvedPath,
274
- body,
275
- });
177
+ b.m("GET").h(headers).b(body);
178
+ return b.build();
276
179
  };
277
180
  export const se_GetMediaPipelineCommand = async (input, context) => {
278
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
+ const b = rb(input, context);
279
182
  const headers = {};
280
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-pipelines/{MediaPipelineId}";
281
- resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
183
+ b.bp("/sdk-media-pipelines/{MediaPipelineId}");
184
+ b.p("MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
282
185
  let body;
283
- return new __HttpRequest({
284
- protocol,
285
- hostname,
286
- port,
287
- method: "GET",
288
- headers,
289
- path: resolvedPath,
290
- body,
291
- });
186
+ b.m("GET").h(headers).b(body);
187
+ return b.build();
292
188
  };
293
189
  export const se_GetMediaPipelineKinesisVideoStreamPoolCommand = async (input, context) => {
294
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
190
+ const b = rb(input, context);
295
191
  const headers = {};
296
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
297
- "/media-pipeline-kinesis-video-stream-pools/{Identifier}";
298
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
192
+ b.bp("/media-pipeline-kinesis-video-stream-pools/{Identifier}");
193
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
299
194
  let body;
300
- return new __HttpRequest({
301
- protocol,
302
- hostname,
303
- port,
304
- method: "GET",
305
- headers,
306
- path: resolvedPath,
307
- body,
308
- });
195
+ b.m("GET").h(headers).b(body);
196
+ return b.build();
309
197
  };
310
198
  export const se_GetSpeakerSearchTaskCommand = async (input, context) => {
311
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
199
+ const b = rb(input, context);
312
200
  const headers = {};
313
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
314
- "/media-insights-pipelines/{Identifier}/speaker-search-tasks/{SpeakerSearchTaskId}";
315
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
316
- resolvedPath = __resolvedPath(resolvedPath, input, "SpeakerSearchTaskId", () => input.SpeakerSearchTaskId, "{SpeakerSearchTaskId}", false);
201
+ b.bp("/media-insights-pipelines/{Identifier}/speaker-search-tasks/{SpeakerSearchTaskId}");
202
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
203
+ b.p("SpeakerSearchTaskId", () => input.SpeakerSearchTaskId, "{SpeakerSearchTaskId}", false);
317
204
  let body;
318
- return new __HttpRequest({
319
- protocol,
320
- hostname,
321
- port,
322
- method: "GET",
323
- headers,
324
- path: resolvedPath,
325
- body,
326
- });
205
+ b.m("GET").h(headers).b(body);
206
+ return b.build();
327
207
  };
328
208
  export const se_GetVoiceToneAnalysisTaskCommand = async (input, context) => {
329
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
209
+ const b = rb(input, context);
330
210
  const headers = {};
331
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
332
- "/media-insights-pipelines/{Identifier}/voice-tone-analysis-tasks/{VoiceToneAnalysisTaskId}";
333
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
334
- resolvedPath = __resolvedPath(resolvedPath, input, "VoiceToneAnalysisTaskId", () => input.VoiceToneAnalysisTaskId, "{VoiceToneAnalysisTaskId}", false);
211
+ b.bp("/media-insights-pipelines/{Identifier}/voice-tone-analysis-tasks/{VoiceToneAnalysisTaskId}");
212
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
213
+ b.p("VoiceToneAnalysisTaskId", () => input.VoiceToneAnalysisTaskId, "{VoiceToneAnalysisTaskId}", false);
335
214
  let body;
336
- return new __HttpRequest({
337
- protocol,
338
- hostname,
339
- port,
340
- method: "GET",
341
- headers,
342
- path: resolvedPath,
343
- body,
344
- });
215
+ b.m("GET").h(headers).b(body);
216
+ return b.build();
345
217
  };
346
218
  export const se_ListMediaCapturePipelinesCommand = async (input, context) => {
347
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
219
+ const b = rb(input, context);
348
220
  const headers = {};
349
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-capture-pipelines";
221
+ b.bp("/sdk-media-capture-pipelines");
350
222
  const query = map({
351
- "next-token": [, input.NextToken],
352
- "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
223
+ [_nt]: [, input[_NT]],
224
+ [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
353
225
  });
354
226
  let body;
355
- return new __HttpRequest({
356
- protocol,
357
- hostname,
358
- port,
359
- method: "GET",
360
- headers,
361
- path: resolvedPath,
362
- query,
363
- body,
364
- });
227
+ b.m("GET").h(headers).q(query).b(body);
228
+ return b.build();
365
229
  };
366
230
  export const se_ListMediaInsightsPipelineConfigurationsCommand = async (input, context) => {
367
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
231
+ const b = rb(input, context);
368
232
  const headers = {};
369
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/media-insights-pipeline-configurations";
233
+ b.bp("/media-insights-pipeline-configurations");
370
234
  const query = map({
371
- "next-token": [, input.NextToken],
372
- "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
235
+ [_nt]: [, input[_NT]],
236
+ [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
373
237
  });
374
238
  let body;
375
- return new __HttpRequest({
376
- protocol,
377
- hostname,
378
- port,
379
- method: "GET",
380
- headers,
381
- path: resolvedPath,
382
- query,
383
- body,
384
- });
239
+ b.m("GET").h(headers).q(query).b(body);
240
+ return b.build();
385
241
  };
386
242
  export const se_ListMediaPipelineKinesisVideoStreamPoolsCommand = async (input, context) => {
387
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
243
+ const b = rb(input, context);
388
244
  const headers = {};
389
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
390
- "/media-pipeline-kinesis-video-stream-pools";
245
+ b.bp("/media-pipeline-kinesis-video-stream-pools");
391
246
  const query = map({
392
- "next-token": [, input.NextToken],
393
- "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
247
+ [_nt]: [, input[_NT]],
248
+ [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
394
249
  });
395
250
  let body;
396
- return new __HttpRequest({
397
- protocol,
398
- hostname,
399
- port,
400
- method: "GET",
401
- headers,
402
- path: resolvedPath,
403
- query,
404
- body,
405
- });
251
+ b.m("GET").h(headers).q(query).b(body);
252
+ return b.build();
406
253
  };
407
254
  export const se_ListMediaPipelinesCommand = async (input, context) => {
408
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const b = rb(input, context);
409
256
  const headers = {};
410
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-pipelines";
257
+ b.bp("/sdk-media-pipelines");
411
258
  const query = map({
412
- "next-token": [, input.NextToken],
413
- "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
259
+ [_nt]: [, input[_NT]],
260
+ [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
414
261
  });
415
262
  let body;
416
- return new __HttpRequest({
417
- protocol,
418
- hostname,
419
- port,
420
- method: "GET",
421
- headers,
422
- path: resolvedPath,
423
- query,
424
- body,
425
- });
263
+ b.m("GET").h(headers).q(query).b(body);
264
+ return b.build();
426
265
  };
427
266
  export const se_ListTagsForResourceCommand = async (input, context) => {
428
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
267
+ const b = rb(input, context);
429
268
  const headers = {};
430
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
269
+ b.bp("/tags");
431
270
  const query = map({
432
- arn: [, __expectNonNull(input.ResourceARN, `ResourceARN`)],
271
+ [_a]: [, __expectNonNull(input[_RARN], `ResourceARN`)],
433
272
  });
434
273
  let body;
435
- return new __HttpRequest({
436
- protocol,
437
- hostname,
438
- port,
439
- method: "GET",
440
- headers,
441
- path: resolvedPath,
442
- query,
443
- body,
444
- });
274
+ b.m("GET").h(headers).q(query).b(body);
275
+ return b.build();
445
276
  };
446
277
  export const se_StartSpeakerSearchTaskCommand = async (input, context) => {
447
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
278
+ const b = rb(input, context);
448
279
  const headers = {
449
280
  "content-type": "application/json",
450
281
  };
451
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
452
- "/media-insights-pipelines/{Identifier}/speaker-search-tasks";
453
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
282
+ b.bp("/media-insights-pipelines/{Identifier}/speaker-search-tasks");
283
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
454
284
  const query = map({
455
- operation: [, "start"],
285
+ [_o]: [, "start"],
456
286
  });
457
287
  let body;
458
288
  body = JSON.stringify(take(input, {
@@ -460,27 +290,18 @@ export const se_StartSpeakerSearchTaskCommand = async (input, context) => {
460
290
  KinesisVideoStreamSourceTaskConfiguration: (_) => _json(_),
461
291
  VoiceProfileDomainArn: [],
462
292
  }));
463
- return new __HttpRequest({
464
- protocol,
465
- hostname,
466
- port,
467
- method: "POST",
468
- headers,
469
- path: resolvedPath,
470
- query,
471
- body,
472
- });
293
+ b.m("POST").h(headers).q(query).b(body);
294
+ return b.build();
473
295
  };
474
296
  export const se_StartVoiceToneAnalysisTaskCommand = async (input, context) => {
475
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
297
+ const b = rb(input, context);
476
298
  const headers = {
477
299
  "content-type": "application/json",
478
300
  };
479
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
480
- "/media-insights-pipelines/{Identifier}/voice-tone-analysis-tasks";
481
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
301
+ b.bp("/media-insights-pipelines/{Identifier}/voice-tone-analysis-tasks");
302
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
482
303
  const query = map({
483
- operation: [, "start"],
304
+ [_o]: [, "start"],
484
305
  });
485
306
  let body;
486
307
  body = JSON.stringify(take(input, {
@@ -488,178 +309,112 @@ export const se_StartVoiceToneAnalysisTaskCommand = async (input, context) => {
488
309
  KinesisVideoStreamSourceTaskConfiguration: (_) => _json(_),
489
310
  LanguageCode: [],
490
311
  }));
491
- return new __HttpRequest({
492
- protocol,
493
- hostname,
494
- port,
495
- method: "POST",
496
- headers,
497
- path: resolvedPath,
498
- query,
499
- body,
500
- });
312
+ b.m("POST").h(headers).q(query).b(body);
313
+ return b.build();
501
314
  };
502
315
  export const se_StopSpeakerSearchTaskCommand = async (input, context) => {
503
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
316
+ const b = rb(input, context);
504
317
  const headers = {};
505
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
506
- "/media-insights-pipelines/{Identifier}/speaker-search-tasks/{SpeakerSearchTaskId}";
507
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
508
- resolvedPath = __resolvedPath(resolvedPath, input, "SpeakerSearchTaskId", () => input.SpeakerSearchTaskId, "{SpeakerSearchTaskId}", false);
318
+ b.bp("/media-insights-pipelines/{Identifier}/speaker-search-tasks/{SpeakerSearchTaskId}");
319
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
320
+ b.p("SpeakerSearchTaskId", () => input.SpeakerSearchTaskId, "{SpeakerSearchTaskId}", false);
509
321
  const query = map({
510
- operation: [, "stop"],
322
+ [_o]: [, "stop"],
511
323
  });
512
324
  let body;
513
- return new __HttpRequest({
514
- protocol,
515
- hostname,
516
- port,
517
- method: "POST",
518
- headers,
519
- path: resolvedPath,
520
- query,
521
- body,
522
- });
325
+ b.m("POST").h(headers).q(query).b(body);
326
+ return b.build();
523
327
  };
524
328
  export const se_StopVoiceToneAnalysisTaskCommand = async (input, context) => {
525
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
329
+ const b = rb(input, context);
526
330
  const headers = {};
527
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
528
- "/media-insights-pipelines/{Identifier}/voice-tone-analysis-tasks/{VoiceToneAnalysisTaskId}";
529
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
530
- resolvedPath = __resolvedPath(resolvedPath, input, "VoiceToneAnalysisTaskId", () => input.VoiceToneAnalysisTaskId, "{VoiceToneAnalysisTaskId}", false);
331
+ b.bp("/media-insights-pipelines/{Identifier}/voice-tone-analysis-tasks/{VoiceToneAnalysisTaskId}");
332
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
333
+ b.p("VoiceToneAnalysisTaskId", () => input.VoiceToneAnalysisTaskId, "{VoiceToneAnalysisTaskId}", false);
531
334
  const query = map({
532
- operation: [, "stop"],
335
+ [_o]: [, "stop"],
533
336
  });
534
337
  let body;
535
- return new __HttpRequest({
536
- protocol,
537
- hostname,
538
- port,
539
- method: "POST",
540
- headers,
541
- path: resolvedPath,
542
- query,
543
- body,
544
- });
338
+ b.m("POST").h(headers).q(query).b(body);
339
+ return b.build();
545
340
  };
546
341
  export const se_TagResourceCommand = async (input, context) => {
547
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
342
+ const b = rb(input, context);
548
343
  const headers = {
549
344
  "content-type": "application/json",
550
345
  };
551
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
346
+ b.bp("/tags");
552
347
  const query = map({
553
- operation: [, "tag-resource"],
348
+ [_o]: [, "tag-resource"],
554
349
  });
555
350
  let body;
556
351
  body = JSON.stringify(take(input, {
557
352
  ResourceARN: [],
558
353
  Tags: (_) => _json(_),
559
354
  }));
560
- return new __HttpRequest({
561
- protocol,
562
- hostname,
563
- port,
564
- method: "POST",
565
- headers,
566
- path: resolvedPath,
567
- query,
568
- body,
569
- });
355
+ b.m("POST").h(headers).q(query).b(body);
356
+ return b.build();
570
357
  };
571
358
  export const se_UntagResourceCommand = async (input, context) => {
572
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
359
+ const b = rb(input, context);
573
360
  const headers = {
574
361
  "content-type": "application/json",
575
362
  };
576
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
363
+ b.bp("/tags");
577
364
  const query = map({
578
- operation: [, "untag-resource"],
365
+ [_o]: [, "untag-resource"],
579
366
  });
580
367
  let body;
581
368
  body = JSON.stringify(take(input, {
582
369
  ResourceARN: [],
583
370
  TagKeys: (_) => _json(_),
584
371
  }));
585
- return new __HttpRequest({
586
- protocol,
587
- hostname,
588
- port,
589
- method: "POST",
590
- headers,
591
- path: resolvedPath,
592
- query,
593
- body,
594
- });
372
+ b.m("POST").h(headers).q(query).b(body);
373
+ return b.build();
595
374
  };
596
375
  export const se_UpdateMediaInsightsPipelineConfigurationCommand = async (input, context) => {
597
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
376
+ const b = rb(input, context);
598
377
  const headers = {
599
378
  "content-type": "application/json",
600
379
  };
601
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
602
- "/media-insights-pipeline-configurations/{Identifier}";
603
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
380
+ b.bp("/media-insights-pipeline-configurations/{Identifier}");
381
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
604
382
  let body;
605
383
  body = JSON.stringify(take(input, {
606
384
  Elements: (_) => _json(_),
607
385
  RealTimeAlertConfiguration: (_) => _json(_),
608
386
  ResourceAccessRoleArn: [],
609
387
  }));
610
- return new __HttpRequest({
611
- protocol,
612
- hostname,
613
- port,
614
- method: "PUT",
615
- headers,
616
- path: resolvedPath,
617
- body,
618
- });
388
+ b.m("PUT").h(headers).b(body);
389
+ return b.build();
619
390
  };
620
391
  export const se_UpdateMediaInsightsPipelineStatusCommand = async (input, context) => {
621
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
392
+ const b = rb(input, context);
622
393
  const headers = {
623
394
  "content-type": "application/json",
624
395
  };
625
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
626
- "/media-insights-pipeline-status/{Identifier}";
627
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
396
+ b.bp("/media-insights-pipeline-status/{Identifier}");
397
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
628
398
  let body;
629
399
  body = JSON.stringify(take(input, {
630
400
  UpdateStatus: [],
631
401
  }));
632
- return new __HttpRequest({
633
- protocol,
634
- hostname,
635
- port,
636
- method: "PUT",
637
- headers,
638
- path: resolvedPath,
639
- body,
640
- });
402
+ b.m("PUT").h(headers).b(body);
403
+ return b.build();
641
404
  };
642
405
  export const se_UpdateMediaPipelineKinesisVideoStreamPoolCommand = async (input, context) => {
643
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
406
+ const b = rb(input, context);
644
407
  const headers = {
645
408
  "content-type": "application/json",
646
409
  };
647
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
648
- "/media-pipeline-kinesis-video-stream-pools/{Identifier}";
649
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
410
+ b.bp("/media-pipeline-kinesis-video-stream-pools/{Identifier}");
411
+ b.p("Identifier", () => input.Identifier, "{Identifier}", false);
650
412
  let body;
651
413
  body = JSON.stringify(take(input, {
652
414
  StreamConfiguration: (_) => _json(_),
653
415
  }));
654
- return new __HttpRequest({
655
- protocol,
656
- hostname,
657
- port,
658
- method: "PUT",
659
- headers,
660
- path: resolvedPath,
661
- body,
662
- });
416
+ b.m("PUT").h(headers).b(body);
417
+ return b.build();
663
418
  };
664
419
  export const de_CreateMediaCapturePipelineCommand = async (output, context) => {
665
420
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -2546,6 +2301,13 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2546
2301
  value !== "" &&
2547
2302
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2548
2303
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2304
+ const _MR = "MaxResults";
2305
+ const _NT = "NextToken";
2306
+ const _RARN = "ResourceARN";
2307
+ const _a = "arn";
2308
+ const _mr = "max-results";
2309
+ const _nt = "next-token";
2310
+ const _o = "operation";
2549
2311
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2550
2312
  if (encoded.length) {
2551
2313
  return JSON.parse(encoded);