@aws-sdk/client-kinesis-video-media 3.927.0 → 3.929.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -6,6 +6,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
6
6
  var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
7
  var configResolver = require('@smithy/config-resolver');
8
8
  var core = require('@smithy/core');
9
+ var schema = require('@smithy/core/schema');
9
10
  var middlewareContentLength = require('@smithy/middleware-content-length');
10
11
  var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
12
  var middlewareRetry = require('@smithy/middleware-retry');
@@ -14,8 +15,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
15
  var runtimeConfig = require('./runtimeConfig');
15
16
  var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
17
  var protocolHttp = require('@smithy/protocol-http');
17
- var middlewareSerde = require('@smithy/middleware-serde');
18
- var core$1 = require('@aws-sdk/core');
19
18
 
20
19
  const resolveClientEndpointParameters = (options) => {
21
20
  return Object.assign(options, {
@@ -91,6 +90,7 @@ class KinesisVideoMediaClient extends smithyClient.Client {
91
90
  const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
91
  const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
92
  this.config = _config_8;
93
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
94
94
  this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
95
  this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
96
  this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
@@ -110,14 +110,14 @@ class KinesisVideoMediaClient extends smithyClient.Client {
110
110
  }
111
111
  }
112
112
 
113
- class KinesisVideoMediaServiceException extends smithyClient.ServiceException {
113
+ let KinesisVideoMediaServiceException$1 = class KinesisVideoMediaServiceException extends smithyClient.ServiceException {
114
114
  constructor(options) {
115
115
  super(options);
116
116
  Object.setPrototypeOf(this, KinesisVideoMediaServiceException.prototype);
117
117
  }
118
- }
118
+ };
119
119
 
120
- class ClientLimitExceededException extends KinesisVideoMediaServiceException {
120
+ let ClientLimitExceededException$1 = class ClientLimitExceededException extends KinesisVideoMediaServiceException$1 {
121
121
  name = "ClientLimitExceededException";
122
122
  $fault = "client";
123
123
  Message;
@@ -130,8 +130,8 @@ class ClientLimitExceededException extends KinesisVideoMediaServiceException {
130
130
  Object.setPrototypeOf(this, ClientLimitExceededException.prototype);
131
131
  this.Message = opts.Message;
132
132
  }
133
- }
134
- class ConnectionLimitExceededException extends KinesisVideoMediaServiceException {
133
+ };
134
+ let ConnectionLimitExceededException$1 = class ConnectionLimitExceededException extends KinesisVideoMediaServiceException$1 {
135
135
  name = "ConnectionLimitExceededException";
136
136
  $fault = "client";
137
137
  Message;
@@ -144,7 +144,7 @@ class ConnectionLimitExceededException extends KinesisVideoMediaServiceException
144
144
  Object.setPrototypeOf(this, ConnectionLimitExceededException.prototype);
145
145
  this.Message = opts.Message;
146
146
  }
147
- }
147
+ };
148
148
  const StartSelectorType = {
149
149
  CONTINUATION_TOKEN: "CONTINUATION_TOKEN",
150
150
  EARLIEST: "EARLIEST",
@@ -153,7 +153,7 @@ const StartSelectorType = {
153
153
  PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
154
154
  SERVER_TIMESTAMP: "SERVER_TIMESTAMP",
155
155
  };
156
- class InvalidArgumentException extends KinesisVideoMediaServiceException {
156
+ let InvalidArgumentException$1 = class InvalidArgumentException extends KinesisVideoMediaServiceException$1 {
157
157
  name = "InvalidArgumentException";
158
158
  $fault = "client";
159
159
  Message;
@@ -166,8 +166,8 @@ class InvalidArgumentException extends KinesisVideoMediaServiceException {
166
166
  Object.setPrototypeOf(this, InvalidArgumentException.prototype);
167
167
  this.Message = opts.Message;
168
168
  }
169
- }
170
- class InvalidEndpointException extends KinesisVideoMediaServiceException {
169
+ };
170
+ let InvalidEndpointException$1 = class InvalidEndpointException extends KinesisVideoMediaServiceException$1 {
171
171
  name = "InvalidEndpointException";
172
172
  $fault = "client";
173
173
  Message;
@@ -180,8 +180,8 @@ class InvalidEndpointException extends KinesisVideoMediaServiceException {
180
180
  Object.setPrototypeOf(this, InvalidEndpointException.prototype);
181
181
  this.Message = opts.Message;
182
182
  }
183
- }
184
- class NotAuthorizedException extends KinesisVideoMediaServiceException {
183
+ };
184
+ let NotAuthorizedException$1 = class NotAuthorizedException extends KinesisVideoMediaServiceException$1 {
185
185
  name = "NotAuthorizedException";
186
186
  $fault = "client";
187
187
  Message;
@@ -194,8 +194,8 @@ class NotAuthorizedException extends KinesisVideoMediaServiceException {
194
194
  Object.setPrototypeOf(this, NotAuthorizedException.prototype);
195
195
  this.Message = opts.Message;
196
196
  }
197
- }
198
- class ResourceNotFoundException extends KinesisVideoMediaServiceException {
197
+ };
198
+ let ResourceNotFoundException$1 = class ResourceNotFoundException extends KinesisVideoMediaServiceException$1 {
199
199
  name = "ResourceNotFoundException";
200
200
  $fault = "client";
201
201
  Message;
@@ -208,183 +208,164 @@ class ResourceNotFoundException extends KinesisVideoMediaServiceException {
208
208
  Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
209
209
  this.Message = opts.Message;
210
210
  }
211
- }
212
- const GetMediaOutputFilterSensitiveLog = (obj) => ({
213
- ...obj,
214
- });
215
-
216
- const se_GetMediaCommand = async (input, context) => {
217
- const b = core.requestBuilder(input, context);
218
- const headers = {
219
- "content-type": "application/json",
220
- };
221
- b.bp("/getMedia");
222
- let body;
223
- body = JSON.stringify(smithyClient.take(input, {
224
- StartSelector: (_) => se_StartSelector(_),
225
- StreamARN: [],
226
- StreamName: [],
227
- }));
228
- b.m("POST").h(headers).b(body);
229
- return b.build();
230
- };
231
- const de_GetMediaCommand = async (output, context) => {
232
- if (output.statusCode !== 200 && output.statusCode >= 300) {
233
- return de_CommandError(output, context);
234
- }
235
- const contents = smithyClient.map({
236
- $metadata: deserializeMetadata(output),
237
- [_CT]: [, output.headers[_ct]],
238
- });
239
- const data = output.body;
240
- context.sdkStreamMixin(data);
241
- contents.Payload = data;
242
- return contents;
243
- };
244
- const de_CommandError = async (output, context) => {
245
- const parsedOutput = {
246
- ...output,
247
- body: await core$1.parseJsonErrorBody(output.body, context),
248
- };
249
- const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
250
- switch (errorCode) {
251
- case "ClientLimitExceededException":
252
- case "com.amazonaws.kinesisvideomedia#ClientLimitExceededException":
253
- throw await de_ClientLimitExceededExceptionRes(parsedOutput);
254
- case "ConnectionLimitExceededException":
255
- case "com.amazonaws.kinesisvideomedia#ConnectionLimitExceededException":
256
- throw await de_ConnectionLimitExceededExceptionRes(parsedOutput);
257
- case "InvalidArgumentException":
258
- case "com.amazonaws.kinesisvideomedia#InvalidArgumentException":
259
- throw await de_InvalidArgumentExceptionRes(parsedOutput);
260
- case "InvalidEndpointException":
261
- case "com.amazonaws.kinesisvideomedia#InvalidEndpointException":
262
- throw await de_InvalidEndpointExceptionRes(parsedOutput);
263
- case "NotAuthorizedException":
264
- case "com.amazonaws.kinesisvideomedia#NotAuthorizedException":
265
- throw await de_NotAuthorizedExceptionRes(parsedOutput);
266
- case "ResourceNotFoundException":
267
- case "com.amazonaws.kinesisvideomedia#ResourceNotFoundException":
268
- throw await de_ResourceNotFoundExceptionRes(parsedOutput);
269
- default:
270
- const parsedBody = parsedOutput.body;
271
- return throwDefaultError({
272
- output,
273
- parsedBody,
274
- errorCode,
275
- });
276
- }
277
211
  };
278
- const throwDefaultError = smithyClient.withBaseException(KinesisVideoMediaServiceException);
279
- const de_ClientLimitExceededExceptionRes = async (parsedOutput, context) => {
280
- const contents = smithyClient.map({});
281
- const data = parsedOutput.body;
282
- const doc = smithyClient.take(data, {
283
- Message: smithyClient.expectString,
284
- });
285
- Object.assign(contents, doc);
286
- const exception = new ClientLimitExceededException({
287
- $metadata: deserializeMetadata(parsedOutput),
288
- ...contents,
289
- });
290
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
291
- };
292
- const de_ConnectionLimitExceededExceptionRes = async (parsedOutput, context) => {
293
- const contents = smithyClient.map({});
294
- const data = parsedOutput.body;
295
- const doc = smithyClient.take(data, {
296
- Message: smithyClient.expectString,
297
- });
298
- Object.assign(contents, doc);
299
- const exception = new ConnectionLimitExceededException({
300
- $metadata: deserializeMetadata(parsedOutput),
301
- ...contents,
302
- });
303
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
304
- };
305
- const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
306
- const contents = smithyClient.map({});
307
- const data = parsedOutput.body;
308
- const doc = smithyClient.take(data, {
309
- Message: smithyClient.expectString,
310
- });
311
- Object.assign(contents, doc);
312
- const exception = new InvalidArgumentException({
313
- $metadata: deserializeMetadata(parsedOutput),
314
- ...contents,
315
- });
316
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
317
- };
318
- const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
319
- const contents = smithyClient.map({});
320
- const data = parsedOutput.body;
321
- const doc = smithyClient.take(data, {
322
- Message: smithyClient.expectString,
323
- });
324
- Object.assign(contents, doc);
325
- const exception = new InvalidEndpointException({
326
- $metadata: deserializeMetadata(parsedOutput),
327
- ...contents,
328
- });
329
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
330
- };
331
- const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
332
- const contents = smithyClient.map({});
333
- const data = parsedOutput.body;
334
- const doc = smithyClient.take(data, {
335
- Message: smithyClient.expectString,
336
- });
337
- Object.assign(contents, doc);
338
- const exception = new NotAuthorizedException({
339
- $metadata: deserializeMetadata(parsedOutput),
340
- ...contents,
341
- });
342
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
343
- };
344
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
345
- const contents = smithyClient.map({});
346
- const data = parsedOutput.body;
347
- const doc = smithyClient.take(data, {
348
- Message: smithyClient.expectString,
349
- });
350
- Object.assign(contents, doc);
351
- const exception = new ResourceNotFoundException({
352
- $metadata: deserializeMetadata(parsedOutput),
353
- ...contents,
354
- });
355
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
356
- };
357
- const se_StartSelector = (input, context) => {
358
- return smithyClient.take(input, {
359
- AfterFragmentNumber: [],
360
- ContinuationToken: [],
361
- StartSelectorType: [],
362
- StartTimestamp: (_) => _.getTime() / 1_000,
363
- });
364
- };
365
- const deserializeMetadata = (output) => ({
366
- httpStatusCode: output.statusCode,
367
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
368
- extendedRequestId: output.headers["x-amz-id-2"],
369
- cfId: output.headers["x-amz-cf-id"],
370
- });
212
+
213
+ const _AFN = "AfterFragmentNumber";
214
+ const _CLEE = "ClientLimitExceededException";
215
+ const _CLEEo = "ConnectionLimitExceededException";
371
216
  const _CT = "ContentType";
372
- const _ct = "content-type";
217
+ const _CT_ = "Content-Type";
218
+ const _CTo = "ContinuationToken";
219
+ const _GM = "GetMedia";
220
+ const _GMI = "GetMediaInput";
221
+ const _GMO = "GetMediaOutput";
222
+ const _IAE = "InvalidArgumentException";
223
+ const _IEE = "InvalidEndpointException";
224
+ const _M = "Message";
225
+ const _NAE = "NotAuthorizedException";
226
+ const _P = "Payload";
227
+ const _RNFE = "ResourceNotFoundException";
228
+ const _SARN = "StreamARN";
229
+ const _SN = "StreamName";
230
+ const _SS = "StartSelector";
231
+ const _SST = "StartSelectorType";
232
+ const _ST = "StartTimestamp";
233
+ const _c = "client";
234
+ const _e = "error";
235
+ const _h = "http";
236
+ const _hE = "httpError";
237
+ const _hH = "httpHeader";
238
+ const _s = "streaming";
239
+ const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.kinesisvideomedia";
240
+ const n0 = "com.amazonaws.kinesisvideomedia";
241
+ var Payload = [
242
+ 0,
243
+ n0,
244
+ _P,
245
+ {
246
+ [_s]: 1,
247
+ },
248
+ 42,
249
+ ];
250
+ var ClientLimitExceededException = [
251
+ -3,
252
+ n0,
253
+ _CLEE,
254
+ {
255
+ [_e]: _c,
256
+ [_hE]: 400,
257
+ },
258
+ [_M],
259
+ [0],
260
+ ];
261
+ schema.TypeRegistry.for(n0).registerError(ClientLimitExceededException, ClientLimitExceededException$1);
262
+ var ConnectionLimitExceededException = [
263
+ -3,
264
+ n0,
265
+ _CLEEo,
266
+ {
267
+ [_e]: _c,
268
+ [_hE]: 400,
269
+ },
270
+ [_M],
271
+ [0],
272
+ ];
273
+ schema.TypeRegistry.for(n0).registerError(ConnectionLimitExceededException, ConnectionLimitExceededException$1);
274
+ var GetMediaInput = [3, n0, _GMI, 0, [_SN, _SARN, _SS], [0, 0, () => StartSelector]];
275
+ var GetMediaOutput = [
276
+ 3,
277
+ n0,
278
+ _GMO,
279
+ 0,
280
+ [_CT, _P],
281
+ [
282
+ [
283
+ 0,
284
+ {
285
+ [_hH]: _CT_,
286
+ },
287
+ ],
288
+ [() => Payload, 16],
289
+ ],
290
+ ];
291
+ var InvalidArgumentException = [
292
+ -3,
293
+ n0,
294
+ _IAE,
295
+ {
296
+ [_e]: _c,
297
+ [_hE]: 400,
298
+ },
299
+ [_M],
300
+ [0],
301
+ ];
302
+ schema.TypeRegistry.for(n0).registerError(InvalidArgumentException, InvalidArgumentException$1);
303
+ var InvalidEndpointException = [
304
+ -3,
305
+ n0,
306
+ _IEE,
307
+ {
308
+ [_e]: _c,
309
+ [_hE]: 400,
310
+ },
311
+ [_M],
312
+ [0],
313
+ ];
314
+ schema.TypeRegistry.for(n0).registerError(InvalidEndpointException, InvalidEndpointException$1);
315
+ var NotAuthorizedException = [
316
+ -3,
317
+ n0,
318
+ _NAE,
319
+ {
320
+ [_e]: _c,
321
+ [_hE]: 401,
322
+ },
323
+ [_M],
324
+ [0],
325
+ ];
326
+ schema.TypeRegistry.for(n0).registerError(NotAuthorizedException, NotAuthorizedException$1);
327
+ var ResourceNotFoundException = [
328
+ -3,
329
+ n0,
330
+ _RNFE,
331
+ {
332
+ [_e]: _c,
333
+ [_hE]: 404,
334
+ },
335
+ [_M],
336
+ [0],
337
+ ];
338
+ schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException, ResourceNotFoundException$1);
339
+ var StartSelector = [3, n0, _SS, 0, [_SST, _AFN, _ST, _CTo], [0, 0, 4, 0]];
340
+ var KinesisVideoMediaServiceException = [
341
+ -3,
342
+ _sm,
343
+ "KinesisVideoMediaServiceException",
344
+ 0,
345
+ [],
346
+ [],
347
+ ];
348
+ schema.TypeRegistry.for(_sm).registerError(KinesisVideoMediaServiceException, KinesisVideoMediaServiceException$1);
349
+ var GetMedia = [
350
+ 9,
351
+ n0,
352
+ _GM,
353
+ {
354
+ [_h]: ["POST", "/getMedia", 200],
355
+ },
356
+ () => GetMediaInput,
357
+ () => GetMediaOutput,
358
+ ];
373
359
 
374
360
  class GetMediaCommand extends smithyClient.Command
375
361
  .classBuilder()
376
362
  .ep(commonParams)
377
363
  .m(function (Command, cs, config, o) {
378
- return [
379
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
380
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
381
- ];
364
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
382
365
  })
383
366
  .s("AWSAcuityInletService", "GetMedia", {})
384
367
  .n("KinesisVideoMediaClient", "GetMediaCommand")
385
- .f(void 0, GetMediaOutputFilterSensitiveLog)
386
- .ser(se_GetMediaCommand)
387
- .de(de_GetMediaCommand)
368
+ .sc(GetMedia)
388
369
  .build() {
389
370
  }
390
371
 
@@ -403,15 +384,14 @@ Object.defineProperty(exports, "__Client", {
403
384
  enumerable: true,
404
385
  get: function () { return smithyClient.Client; }
405
386
  });
406
- exports.ClientLimitExceededException = ClientLimitExceededException;
407
- exports.ConnectionLimitExceededException = ConnectionLimitExceededException;
387
+ exports.ClientLimitExceededException = ClientLimitExceededException$1;
388
+ exports.ConnectionLimitExceededException = ConnectionLimitExceededException$1;
408
389
  exports.GetMediaCommand = GetMediaCommand;
409
- exports.GetMediaOutputFilterSensitiveLog = GetMediaOutputFilterSensitiveLog;
410
- exports.InvalidArgumentException = InvalidArgumentException;
411
- exports.InvalidEndpointException = InvalidEndpointException;
390
+ exports.InvalidArgumentException = InvalidArgumentException$1;
391
+ exports.InvalidEndpointException = InvalidEndpointException$1;
412
392
  exports.KinesisVideoMedia = KinesisVideoMedia;
413
393
  exports.KinesisVideoMediaClient = KinesisVideoMediaClient;
414
- exports.KinesisVideoMediaServiceException = KinesisVideoMediaServiceException;
415
- exports.NotAuthorizedException = NotAuthorizedException;
416
- exports.ResourceNotFoundException = ResourceNotFoundException;
394
+ exports.KinesisVideoMediaServiceException = KinesisVideoMediaServiceException$1;
395
+ exports.NotAuthorizedException = NotAuthorizedException$1;
396
+ exports.ResourceNotFoundException = ResourceNotFoundException$1;
417
397
  exports.StartSelectorType = StartSelectorType;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
+ const protocols_1 = require("@aws-sdk/core/protocols");
5
6
  const smithy_client_1 = require("@smithy/smithy-client");
6
7
  const url_parser_1 = require("@smithy/url-parser");
7
8
  const util_base64_1 = require("@smithy/util-base64");
@@ -26,6 +27,7 @@ const getRuntimeConfig = (config) => {
26
27
  },
27
28
  ],
28
29
  logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
30
+ protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.kinesisvideomedia" }),
29
31
  sdkStreamMixin: config?.sdkStreamMixin ?? util_stream_1.sdkStreamMixin,
30
32
  serviceId: config?.serviceId ?? "Kinesis Video Media",
31
33
  urlParser: config?.urlParser ?? url_parser_1.parseUrl,
@@ -4,6 +4,7 @@ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detec
4
4
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
5
5
  import { resolveRegionConfig } from "@smithy/config-resolver";
6
6
  import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
+ import { getSchemaSerdePlugin } from "@smithy/core/schema";
7
8
  import { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
9
  import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
10
  import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
@@ -28,6 +29,7 @@ export class KinesisVideoMediaClient extends __Client {
28
29
  const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
29
30
  const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
30
31
  this.config = _config_8;
32
+ this.middlewareStack.use(getSchemaSerdePlugin(this.config));
31
33
  this.middlewareStack.use(getUserAgentPlugin(this.config));
32
34
  this.middlewareStack.use(getRetryPlugin(this.config));
33
35
  this.middlewareStack.use(getContentLengthPlugin(this.config));
@@ -1,23 +1,16 @@
1
1
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
- import { getSerdePlugin } from "@smithy/middleware-serde";
3
2
  import { Command as $Command } from "@smithy/smithy-client";
4
3
  import { commonParams } from "../endpoint/EndpointParameters";
5
- import { GetMediaOutputFilterSensitiveLog } from "../models/models_0";
6
- import { de_GetMediaCommand, se_GetMediaCommand } from "../protocols/Aws_restJson1";
4
+ import { GetMedia } from "../schemas/schemas_0";
7
5
  export { $Command };
8
6
  export class GetMediaCommand extends $Command
9
7
  .classBuilder()
10
8
  .ep(commonParams)
11
9
  .m(function (Command, cs, config, o) {
12
- return [
13
- getSerdePlugin(config, this.serialize, this.deserialize),
14
- getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
15
- ];
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
16
11
  })
17
12
  .s("AWSAcuityInletService", "GetMedia", {})
18
13
  .n("KinesisVideoMediaClient", "GetMediaCommand")
19
- .f(void 0, GetMediaOutputFilterSensitiveLog)
20
- .ser(se_GetMediaCommand)
21
- .de(de_GetMediaCommand)
14
+ .sc(GetMedia)
22
15
  .build() {
23
16
  }
@@ -91,6 +91,3 @@ export class ResourceNotFoundException extends __BaseException {
91
91
  this.Message = opts.Message;
92
92
  }
93
93
  }
94
- export const GetMediaOutputFilterSensitiveLog = (obj) => ({
95
- ...obj,
96
- });
@@ -1,4 +1,5 @@
1
1
  import { AwsSdkSigV4Signer } from "@aws-sdk/core";
2
+ import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
2
3
  import { NoOpLogger } from "@smithy/smithy-client";
3
4
  import { parseUrl } from "@smithy/url-parser";
4
5
  import { fromBase64, toBase64 } from "@smithy/util-base64";
@@ -23,6 +24,7 @@ export const getRuntimeConfig = (config) => {
23
24
  },
24
25
  ],
25
26
  logger: config?.logger ?? new NoOpLogger(),
27
+ protocol: config?.protocol ?? new AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.kinesisvideomedia" }),
26
28
  sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,
27
29
  serviceId: config?.serviceId ?? "Kinesis Video Media",
28
30
  urlParser: config?.urlParser ?? parseUrl,
@@ -0,0 +1,150 @@
1
+ const _AFN = "AfterFragmentNumber";
2
+ const _CLEE = "ClientLimitExceededException";
3
+ const _CLEEo = "ConnectionLimitExceededException";
4
+ const _CT = "ContentType";
5
+ const _CT_ = "Content-Type";
6
+ const _CTo = "ContinuationToken";
7
+ const _GM = "GetMedia";
8
+ const _GMI = "GetMediaInput";
9
+ const _GMO = "GetMediaOutput";
10
+ const _IAE = "InvalidArgumentException";
11
+ const _IEE = "InvalidEndpointException";
12
+ const _M = "Message";
13
+ const _NAE = "NotAuthorizedException";
14
+ const _P = "Payload";
15
+ const _RNFE = "ResourceNotFoundException";
16
+ const _SARN = "StreamARN";
17
+ const _SN = "StreamName";
18
+ const _SS = "StartSelector";
19
+ const _SST = "StartSelectorType";
20
+ const _ST = "StartTimestamp";
21
+ const _c = "client";
22
+ const _e = "error";
23
+ const _h = "http";
24
+ const _hE = "httpError";
25
+ const _hH = "httpHeader";
26
+ const _s = "streaming";
27
+ const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.kinesisvideomedia";
28
+ const n0 = "com.amazonaws.kinesisvideomedia";
29
+ import { TypeRegistry } from "@smithy/core/schema";
30
+ import { ClientLimitExceededException as __ClientLimitExceededException, ConnectionLimitExceededException as __ConnectionLimitExceededException, InvalidArgumentException as __InvalidArgumentException, InvalidEndpointException as __InvalidEndpointException, NotAuthorizedException as __NotAuthorizedException, ResourceNotFoundException as __ResourceNotFoundException, } from "../models/index";
31
+ import { KinesisVideoMediaServiceException as __KinesisVideoMediaServiceException } from "../models/KinesisVideoMediaServiceException";
32
+ export var Payload = [
33
+ 0,
34
+ n0,
35
+ _P,
36
+ {
37
+ [_s]: 1,
38
+ },
39
+ 42,
40
+ ];
41
+ export var ClientLimitExceededException = [
42
+ -3,
43
+ n0,
44
+ _CLEE,
45
+ {
46
+ [_e]: _c,
47
+ [_hE]: 400,
48
+ },
49
+ [_M],
50
+ [0],
51
+ ];
52
+ TypeRegistry.for(n0).registerError(ClientLimitExceededException, __ClientLimitExceededException);
53
+ export var ConnectionLimitExceededException = [
54
+ -3,
55
+ n0,
56
+ _CLEEo,
57
+ {
58
+ [_e]: _c,
59
+ [_hE]: 400,
60
+ },
61
+ [_M],
62
+ [0],
63
+ ];
64
+ TypeRegistry.for(n0).registerError(ConnectionLimitExceededException, __ConnectionLimitExceededException);
65
+ export var GetMediaInput = [3, n0, _GMI, 0, [_SN, _SARN, _SS], [0, 0, () => StartSelector]];
66
+ export var GetMediaOutput = [
67
+ 3,
68
+ n0,
69
+ _GMO,
70
+ 0,
71
+ [_CT, _P],
72
+ [
73
+ [
74
+ 0,
75
+ {
76
+ [_hH]: _CT_,
77
+ },
78
+ ],
79
+ [() => Payload, 16],
80
+ ],
81
+ ];
82
+ export var InvalidArgumentException = [
83
+ -3,
84
+ n0,
85
+ _IAE,
86
+ {
87
+ [_e]: _c,
88
+ [_hE]: 400,
89
+ },
90
+ [_M],
91
+ [0],
92
+ ];
93
+ TypeRegistry.for(n0).registerError(InvalidArgumentException, __InvalidArgumentException);
94
+ export var InvalidEndpointException = [
95
+ -3,
96
+ n0,
97
+ _IEE,
98
+ {
99
+ [_e]: _c,
100
+ [_hE]: 400,
101
+ },
102
+ [_M],
103
+ [0],
104
+ ];
105
+ TypeRegistry.for(n0).registerError(InvalidEndpointException, __InvalidEndpointException);
106
+ export var NotAuthorizedException = [
107
+ -3,
108
+ n0,
109
+ _NAE,
110
+ {
111
+ [_e]: _c,
112
+ [_hE]: 401,
113
+ },
114
+ [_M],
115
+ [0],
116
+ ];
117
+ TypeRegistry.for(n0).registerError(NotAuthorizedException, __NotAuthorizedException);
118
+ export var ResourceNotFoundException = [
119
+ -3,
120
+ n0,
121
+ _RNFE,
122
+ {
123
+ [_e]: _c,
124
+ [_hE]: 404,
125
+ },
126
+ [_M],
127
+ [0],
128
+ ];
129
+ TypeRegistry.for(n0).registerError(ResourceNotFoundException, __ResourceNotFoundException);
130
+ export var StartSelector = [3, n0, _SS, 0, [_SST, _AFN, _ST, _CTo], [0, 0, 4, 0]];
131
+ export var __Unit = "unit";
132
+ export var KinesisVideoMediaServiceException = [
133
+ -3,
134
+ _sm,
135
+ "KinesisVideoMediaServiceException",
136
+ 0,
137
+ [],
138
+ [],
139
+ ];
140
+ TypeRegistry.for(_sm).registerError(KinesisVideoMediaServiceException, __KinesisVideoMediaServiceException);
141
+ export var GetMedia = [
142
+ 9,
143
+ n0,
144
+ _GM,
145
+ {
146
+ [_h]: ["POST", "/getMedia", 200],
147
+ },
148
+ () => GetMediaInput,
149
+ () => GetMediaOutput,
150
+ ];
@@ -5,7 +5,7 @@ import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-
5
5
  import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
6
6
  import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
7
7
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
8
- import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, SdkStreamMixinInjector as __SdkStreamMixinInjector, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
8
+ import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, ClientProtocol, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, HttpRequest, HttpResponse, Logger as __Logger, Provider as __Provider, Provider, SdkStreamMixinInjector as __SdkStreamMixinInjector, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
9
9
  import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
10
10
  import { GetMediaCommandInput, GetMediaCommandOutput } from "./commands/GetMediaCommand";
11
11
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
@@ -142,6 +142,15 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
142
142
  * Optional extensions
143
143
  */
144
144
  extensions?: RuntimeExtension[];
145
+ /**
146
+ * The protocol controlling the message type (e.g. HTTP) and format (e.g. JSON)
147
+ * may be overridden. A default will always be set by the client.
148
+ * Available options depend on the service's supported protocols and will not be validated by
149
+ * the client.
150
+ * @alpha
151
+ *
152
+ */
153
+ protocol?: ClientProtocol<HttpRequest, HttpResponse>;
145
154
  /**
146
155
  * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
147
156
  */
@@ -281,7 +281,3 @@ export declare class ResourceNotFoundException extends __BaseException {
281
281
  */
282
282
  constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
283
283
  }
284
- /**
285
- * @internal
286
- */
287
- export declare const GetMediaOutputFilterSensitiveLog: (obj: GetMediaOutput) => any;
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: KinesisVideoMediaClientConfig) =
29
29
  profile?: string;
30
30
  logger: import("@smithy/types").Logger;
31
31
  extensions: import("./runtimeExtensions").RuntimeExtension[];
32
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
32
33
  sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
33
34
  customUserAgent?: string | import("@smithy/types").UserAgent;
34
35
  userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
@@ -31,6 +31,7 @@ export declare const getRuntimeConfig: (config: KinesisVideoMediaClientConfig) =
31
31
  profile?: string;
32
32
  logger: import("@smithy/types").Logger;
33
33
  extensions: import("./runtimeExtensions").RuntimeExtension[];
34
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
34
35
  sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
35
36
  customUserAgent?: string | import("@smithy/types").UserAgent;
36
37
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
@@ -27,6 +27,7 @@ export declare const getRuntimeConfig: (config: KinesisVideoMediaClientConfig) =
27
27
  retryMode: string | import("@smithy/types").Provider<string>;
28
28
  logger: import("@smithy/types").Logger;
29
29
  extensions: import("./runtimeExtensions").RuntimeExtension[];
30
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
30
31
  defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
31
32
  sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
32
33
  customUserAgent?: string | import("@smithy/types").UserAgent;
@@ -14,6 +14,7 @@ export declare const getRuntimeConfig: (config: KinesisVideoMediaClientConfig) =
14
14
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").KinesisVideoMediaHttpAuthSchemeProvider;
15
15
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
16
16
  logger: import("@smithy/types").Logger;
17
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
17
18
  sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
18
19
  serviceId: string;
19
20
  urlParser: import("@smithy/types").UrlParser;
@@ -0,0 +1,14 @@
1
+ import { StaticErrorSchema, StaticOperationSchema, StaticSimpleSchema, StaticStructureSchema } from "@smithy/types";
2
+ export declare var Payload: StaticSimpleSchema;
3
+ export declare var ClientLimitExceededException: StaticErrorSchema;
4
+ export declare var ConnectionLimitExceededException: StaticErrorSchema;
5
+ export declare var GetMediaInput: StaticStructureSchema;
6
+ export declare var GetMediaOutput: StaticStructureSchema;
7
+ export declare var InvalidArgumentException: StaticErrorSchema;
8
+ export declare var InvalidEndpointException: StaticErrorSchema;
9
+ export declare var NotAuthorizedException: StaticErrorSchema;
10
+ export declare var ResourceNotFoundException: StaticErrorSchema;
11
+ export declare var StartSelector: StaticStructureSchema;
12
+ export declare var __Unit: "unit";
13
+ export declare var KinesisVideoMediaServiceException: StaticErrorSchema;
14
+ export declare var GetMedia: StaticOperationSchema;
@@ -30,10 +30,13 @@ import {
30
30
  BodyLengthCalculator as __BodyLengthCalculator,
31
31
  CheckOptionalClientConfig as __CheckOptionalClientConfig,
32
32
  ChecksumConstructor as __ChecksumConstructor,
33
+ ClientProtocol,
33
34
  Decoder as __Decoder,
34
35
  Encoder as __Encoder,
35
36
  HashConstructor as __HashConstructor,
36
37
  HttpHandlerOptions as __HttpHandlerOptions,
38
+ HttpRequest,
39
+ HttpResponse,
37
40
  Logger as __Logger,
38
41
  Provider as __Provider,
39
42
  Provider,
@@ -83,6 +86,7 @@ export interface ClientDefaults
83
86
  retryMode?: string | __Provider<string>;
84
87
  logger?: __Logger;
85
88
  extensions?: RuntimeExtension[];
89
+ protocol?: ClientProtocol<HttpRequest, HttpResponse>;
86
90
  defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
87
91
  sdkStreamMixin?: __SdkStreamMixinInjector;
88
92
  }
@@ -77,6 +77,3 @@ export declare class ResourceNotFoundException extends __BaseException {
77
77
  opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>
78
78
  );
79
79
  }
80
- export declare const GetMediaOutputFilterSensitiveLog: (
81
- obj: GetMediaOutput
82
- ) => any;
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
40
40
  profile?: string;
41
41
  logger: import("@smithy/types").Logger;
42
42
  extensions: import("./runtimeExtensions").RuntimeExtension[];
43
+ protocol: import("@smithy/types").ClientProtocol<
44
+ import("@smithy/types").HttpRequest,
45
+ import("@smithy/types").HttpResponse
46
+ >;
43
47
  sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
44
48
  customUserAgent?: string | import("@smithy/types").UserAgent;
45
49
  userAgentAppId?:
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
40
40
  profile?: string;
41
41
  logger: import("@smithy/types").Logger;
42
42
  extensions: import("./runtimeExtensions").RuntimeExtension[];
43
+ protocol: import("@smithy/types").ClientProtocol<
44
+ import("@smithy/types").HttpRequest,
45
+ import("@smithy/types").HttpResponse
46
+ >;
43
47
  sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
44
48
  customUserAgent?: string | import("@smithy/types").UserAgent;
45
49
  retryStrategy?:
@@ -39,6 +39,10 @@ export declare const getRuntimeConfig: (
39
39
  retryMode: string | import("@smithy/types").Provider<string>;
40
40
  logger: import("@smithy/types").Logger;
41
41
  extensions: import("./runtimeExtensions").RuntimeExtension[];
42
+ protocol: import("@smithy/types").ClientProtocol<
43
+ import("@smithy/types").HttpRequest,
44
+ import("@smithy/types").HttpResponse
45
+ >;
42
46
  defaultsMode:
43
47
  | import("@smithy/smithy-client").DefaultsMode
44
48
  | import("@smithy/types").Provider<
@@ -16,6 +16,10 @@ export declare const getRuntimeConfig: (
16
16
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").KinesisVideoMediaHttpAuthSchemeProvider;
17
17
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
18
18
  logger: import("@smithy/types").Logger;
19
+ protocol: import("@smithy/types").ClientProtocol<
20
+ import("@smithy/types").HttpRequest,
21
+ import("@smithy/types").HttpResponse
22
+ >;
19
23
  sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
20
24
  serviceId: string;
21
25
  urlParser: import("@smithy/types").UrlParser;
@@ -0,0 +1,19 @@
1
+ import {
2
+ StaticErrorSchema,
3
+ StaticOperationSchema,
4
+ StaticSimpleSchema,
5
+ StaticStructureSchema,
6
+ } from "@smithy/types";
7
+ export declare var Payload: StaticSimpleSchema;
8
+ export declare var ClientLimitExceededException: StaticErrorSchema;
9
+ export declare var ConnectionLimitExceededException: StaticErrorSchema;
10
+ export declare var GetMediaInput: StaticStructureSchema;
11
+ export declare var GetMediaOutput: StaticStructureSchema;
12
+ export declare var InvalidArgumentException: StaticErrorSchema;
13
+ export declare var InvalidEndpointException: StaticErrorSchema;
14
+ export declare var NotAuthorizedException: StaticErrorSchema;
15
+ export declare var ResourceNotFoundException: StaticErrorSchema;
16
+ export declare var StartSelector: StaticStructureSchema;
17
+ export declare var __Unit: "unit";
18
+ export declare var KinesisVideoMediaServiceException: StaticErrorSchema;
19
+ export declare var GetMedia: StaticOperationSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-kinesis-video-media",
3
3
  "description": "AWS SDK for JavaScript Kinesis Video Media Client for Node.js, Browser and React Native",
4
- "version": "3.927.0",
4
+ "version": "3.929.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-kinesis-video-media",
@@ -20,17 +20,17 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.927.0",
24
- "@aws-sdk/credential-provider-node": "3.927.0",
23
+ "@aws-sdk/core": "3.928.0",
24
+ "@aws-sdk/credential-provider-node": "3.929.0",
25
25
  "@aws-sdk/middleware-host-header": "3.922.0",
26
26
  "@aws-sdk/middleware-logger": "3.922.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.922.0",
28
- "@aws-sdk/middleware-user-agent": "3.927.0",
28
+ "@aws-sdk/middleware-user-agent": "3.928.0",
29
29
  "@aws-sdk/region-config-resolver": "3.925.0",
30
30
  "@aws-sdk/types": "3.922.0",
31
31
  "@aws-sdk/util-endpoints": "3.922.0",
32
32
  "@aws-sdk/util-user-agent-browser": "3.922.0",
33
- "@aws-sdk/util-user-agent-node": "3.927.0",
33
+ "@aws-sdk/util-user-agent-node": "3.928.0",
34
34
  "@smithy/config-resolver": "^4.4.2",
35
35
  "@smithy/core": "^3.17.2",
36
36
  "@smithy/fetch-http-handler": "^5.3.5",
@@ -1,163 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { collectBody, decorateServiceException as __decorateServiceException, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
4
- import { KinesisVideoMediaServiceException as __BaseException } from "../models/KinesisVideoMediaServiceException";
5
- import { ClientLimitExceededException, ConnectionLimitExceededException, InvalidArgumentException, InvalidEndpointException, NotAuthorizedException, ResourceNotFoundException, } from "../models/models_0";
6
- export const se_GetMediaCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {
9
- "content-type": "application/json",
10
- };
11
- b.bp("/getMedia");
12
- let body;
13
- body = JSON.stringify(take(input, {
14
- StartSelector: (_) => se_StartSelector(_, context),
15
- StreamARN: [],
16
- StreamName: [],
17
- }));
18
- b.m("POST").h(headers).b(body);
19
- return b.build();
20
- };
21
- export const de_GetMediaCommand = async (output, context) => {
22
- if (output.statusCode !== 200 && output.statusCode >= 300) {
23
- return de_CommandError(output, context);
24
- }
25
- const contents = map({
26
- $metadata: deserializeMetadata(output),
27
- [_CT]: [, output.headers[_ct]],
28
- });
29
- const data = output.body;
30
- context.sdkStreamMixin(data);
31
- contents.Payload = data;
32
- return contents;
33
- };
34
- const de_CommandError = async (output, context) => {
35
- const parsedOutput = {
36
- ...output,
37
- body: await parseErrorBody(output.body, context),
38
- };
39
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
40
- switch (errorCode) {
41
- case "ClientLimitExceededException":
42
- case "com.amazonaws.kinesisvideomedia#ClientLimitExceededException":
43
- throw await de_ClientLimitExceededExceptionRes(parsedOutput, context);
44
- case "ConnectionLimitExceededException":
45
- case "com.amazonaws.kinesisvideomedia#ConnectionLimitExceededException":
46
- throw await de_ConnectionLimitExceededExceptionRes(parsedOutput, context);
47
- case "InvalidArgumentException":
48
- case "com.amazonaws.kinesisvideomedia#InvalidArgumentException":
49
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
50
- case "InvalidEndpointException":
51
- case "com.amazonaws.kinesisvideomedia#InvalidEndpointException":
52
- throw await de_InvalidEndpointExceptionRes(parsedOutput, context);
53
- case "NotAuthorizedException":
54
- case "com.amazonaws.kinesisvideomedia#NotAuthorizedException":
55
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
56
- case "ResourceNotFoundException":
57
- case "com.amazonaws.kinesisvideomedia#ResourceNotFoundException":
58
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
59
- default:
60
- const parsedBody = parsedOutput.body;
61
- return throwDefaultError({
62
- output,
63
- parsedBody,
64
- errorCode,
65
- });
66
- }
67
- };
68
- const throwDefaultError = withBaseException(__BaseException);
69
- const de_ClientLimitExceededExceptionRes = async (parsedOutput, context) => {
70
- const contents = map({});
71
- const data = parsedOutput.body;
72
- const doc = take(data, {
73
- Message: __expectString,
74
- });
75
- Object.assign(contents, doc);
76
- const exception = new ClientLimitExceededException({
77
- $metadata: deserializeMetadata(parsedOutput),
78
- ...contents,
79
- });
80
- return __decorateServiceException(exception, parsedOutput.body);
81
- };
82
- const de_ConnectionLimitExceededExceptionRes = async (parsedOutput, context) => {
83
- const contents = map({});
84
- const data = parsedOutput.body;
85
- const doc = take(data, {
86
- Message: __expectString,
87
- });
88
- Object.assign(contents, doc);
89
- const exception = new ConnectionLimitExceededException({
90
- $metadata: deserializeMetadata(parsedOutput),
91
- ...contents,
92
- });
93
- return __decorateServiceException(exception, parsedOutput.body);
94
- };
95
- const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
96
- const contents = map({});
97
- const data = parsedOutput.body;
98
- const doc = take(data, {
99
- Message: __expectString,
100
- });
101
- Object.assign(contents, doc);
102
- const exception = new InvalidArgumentException({
103
- $metadata: deserializeMetadata(parsedOutput),
104
- ...contents,
105
- });
106
- return __decorateServiceException(exception, parsedOutput.body);
107
- };
108
- const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
109
- const contents = map({});
110
- const data = parsedOutput.body;
111
- const doc = take(data, {
112
- Message: __expectString,
113
- });
114
- Object.assign(contents, doc);
115
- const exception = new InvalidEndpointException({
116
- $metadata: deserializeMetadata(parsedOutput),
117
- ...contents,
118
- });
119
- return __decorateServiceException(exception, parsedOutput.body);
120
- };
121
- const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
122
- const contents = map({});
123
- const data = parsedOutput.body;
124
- const doc = take(data, {
125
- Message: __expectString,
126
- });
127
- Object.assign(contents, doc);
128
- const exception = new NotAuthorizedException({
129
- $metadata: deserializeMetadata(parsedOutput),
130
- ...contents,
131
- });
132
- return __decorateServiceException(exception, parsedOutput.body);
133
- };
134
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
135
- const contents = map({});
136
- const data = parsedOutput.body;
137
- const doc = take(data, {
138
- Message: __expectString,
139
- });
140
- Object.assign(contents, doc);
141
- const exception = new ResourceNotFoundException({
142
- $metadata: deserializeMetadata(parsedOutput),
143
- ...contents,
144
- });
145
- return __decorateServiceException(exception, parsedOutput.body);
146
- };
147
- const se_StartSelector = (input, context) => {
148
- return take(input, {
149
- AfterFragmentNumber: [],
150
- ContinuationToken: [],
151
- StartSelectorType: [],
152
- StartTimestamp: (_) => _.getTime() / 1_000,
153
- });
154
- };
155
- const deserializeMetadata = (output) => ({
156
- httpStatusCode: output.statusCode,
157
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
158
- extendedRequestId: output.headers["x-amz-id-2"],
159
- cfId: output.headers["x-amz-cf-id"],
160
- });
161
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
162
- const _CT = "ContentType";
163
- const _ct = "content-type";
@@ -1,11 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
2
- import { SdkStreamSerdeContext as __SdkStreamSerdeContext, SerdeContext as __SerdeContext } from "@smithy/types";
3
- import { GetMediaCommandInput, GetMediaCommandOutput } from "../commands/GetMediaCommand";
4
- /**
5
- * serializeAws_restJson1GetMediaCommand
6
- */
7
- export declare const se_GetMediaCommand: (input: GetMediaCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
8
- /**
9
- * deserializeAws_restJson1GetMediaCommand
10
- */
11
- export declare const de_GetMediaCommand: (output: __HttpResponse, context: __SerdeContext & __SdkStreamSerdeContext) => Promise<GetMediaCommandOutput>;
@@ -1,20 +0,0 @@
1
- import {
2
- HttpRequest as __HttpRequest,
3
- HttpResponse as __HttpResponse,
4
- } from "@smithy/protocol-http";
5
- import {
6
- SdkStreamSerdeContext as __SdkStreamSerdeContext,
7
- SerdeContext as __SerdeContext,
8
- } from "@smithy/types";
9
- import {
10
- GetMediaCommandInput,
11
- GetMediaCommandOutput,
12
- } from "../commands/GetMediaCommand";
13
- export declare const se_GetMediaCommand: (
14
- input: GetMediaCommandInput,
15
- context: __SerdeContext
16
- ) => Promise<__HttpRequest>;
17
- export declare const de_GetMediaCommand: (
18
- output: __HttpResponse,
19
- context: __SerdeContext & __SdkStreamSerdeContext
20
- ) => Promise<GetMediaCommandOutput>;