@aws-sdk/client-kinesis-video-archived-media 3.901.0 → 3.907.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist-cjs/index.js +883 -1050
  2. package/package.json +6 -6
package/dist-cjs/index.js CHANGED
@@ -1,1090 +1,923 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+
20
+ const resolveClientEndpointParameters = (options) => {
21
+ return Object.assign(options, {
22
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
23
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
24
+ defaultSigningName: "kinesisvideo",
25
+ });
18
26
  };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ const commonParams = {
28
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
29
+ Endpoint: { type: "builtInParams", name: "endpoint" },
30
+ Region: { type: "builtInParams", name: "region" },
31
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
32
+ };
33
+
34
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
37
+ let _credentials = runtimeConfig.credentials;
38
+ return {
39
+ setHttpAuthScheme(httpAuthScheme) {
40
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
41
+ if (index === -1) {
42
+ _httpAuthSchemes.push(httpAuthScheme);
43
+ }
44
+ else {
45
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
46
+ }
47
+ },
48
+ httpAuthSchemes() {
49
+ return _httpAuthSchemes;
50
+ },
51
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
52
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
53
+ },
54
+ httpAuthSchemeProvider() {
55
+ return _httpAuthSchemeProvider;
56
+ },
57
+ setCredentials(credentials) {
58
+ _credentials = credentials;
59
+ },
60
+ credentials() {
61
+ return _credentials;
62
+ },
63
+ };
64
+ };
65
+ const resolveHttpAuthRuntimeConfig = (config) => {
66
+ return {
67
+ httpAuthSchemes: config.httpAuthSchemes(),
68
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
69
+ credentials: config.credentials(),
70
+ };
71
+ };
72
+
73
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
74
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
75
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
76
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
77
+ };
78
+
79
+ class KinesisVideoArchivedMediaClient extends smithyClient.Client {
80
+ config;
81
+ constructor(...[configuration]) {
82
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
83
+ super(_config_0);
84
+ this.initConfig = _config_0;
85
+ const _config_1 = resolveClientEndpointParameters(_config_0);
86
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
87
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
88
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
89
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
90
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
91
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
+ this.config = _config_8;
94
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
97
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
98
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
99
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
100
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
101
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultKinesisVideoArchivedMediaHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
107
+ }
108
+ destroy() {
109
+ super.destroy();
110
+ }
111
+ }
20
112
 
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- ClientLimitExceededException: () => ClientLimitExceededException,
25
- ClipFragmentSelectorType: () => ClipFragmentSelectorType,
26
- ContainerFormat: () => ContainerFormat,
27
- DASHDisplayFragmentNumber: () => DASHDisplayFragmentNumber,
28
- DASHDisplayFragmentTimestamp: () => DASHDisplayFragmentTimestamp,
29
- DASHFragmentSelectorType: () => DASHFragmentSelectorType,
30
- DASHPlaybackMode: () => DASHPlaybackMode,
31
- Format: () => Format,
32
- FormatConfigKey: () => FormatConfigKey,
33
- FragmentSelectorType: () => FragmentSelectorType,
34
- GetClipCommand: () => GetClipCommand,
35
- GetClipOutputFilterSensitiveLog: () => GetClipOutputFilterSensitiveLog,
36
- GetDASHStreamingSessionURLCommand: () => GetDASHStreamingSessionURLCommand,
37
- GetHLSStreamingSessionURLCommand: () => GetHLSStreamingSessionURLCommand,
38
- GetImagesCommand: () => GetImagesCommand,
39
- GetMediaForFragmentListCommand: () => GetMediaForFragmentListCommand,
40
- GetMediaForFragmentListOutputFilterSensitiveLog: () => GetMediaForFragmentListOutputFilterSensitiveLog,
41
- HLSDiscontinuityMode: () => HLSDiscontinuityMode,
42
- HLSDisplayFragmentTimestamp: () => HLSDisplayFragmentTimestamp,
43
- HLSFragmentSelectorType: () => HLSFragmentSelectorType,
44
- HLSPlaybackMode: () => HLSPlaybackMode,
45
- ImageError: () => ImageError,
46
- ImageSelectorType: () => ImageSelectorType,
47
- InvalidArgumentException: () => InvalidArgumentException,
48
- InvalidCodecPrivateDataException: () => InvalidCodecPrivateDataException,
49
- InvalidMediaFrameException: () => InvalidMediaFrameException,
50
- KinesisVideoArchivedMedia: () => KinesisVideoArchivedMedia,
51
- KinesisVideoArchivedMediaClient: () => KinesisVideoArchivedMediaClient,
52
- KinesisVideoArchivedMediaServiceException: () => KinesisVideoArchivedMediaServiceException,
53
- ListFragmentsCommand: () => ListFragmentsCommand,
54
- MissingCodecPrivateDataException: () => MissingCodecPrivateDataException,
55
- NoDataRetentionException: () => NoDataRetentionException,
56
- NotAuthorizedException: () => NotAuthorizedException,
57
- ResourceNotFoundException: () => ResourceNotFoundException,
58
- UnsupportedStreamMediaTypeException: () => UnsupportedStreamMediaTypeException,
59
- __Client: () => import_smithy_client.Client,
60
- paginateGetImages: () => paginateGetImages,
61
- paginateListFragments: () => paginateListFragments
113
+ class KinesisVideoArchivedMediaServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, KinesisVideoArchivedMediaServiceException.prototype);
117
+ }
118
+ }
119
+
120
+ class ClientLimitExceededException extends KinesisVideoArchivedMediaServiceException {
121
+ name = "ClientLimitExceededException";
122
+ $fault = "client";
123
+ Message;
124
+ constructor(opts) {
125
+ super({
126
+ name: "ClientLimitExceededException",
127
+ $fault: "client",
128
+ ...opts,
129
+ });
130
+ Object.setPrototypeOf(this, ClientLimitExceededException.prototype);
131
+ this.Message = opts.Message;
132
+ }
133
+ }
134
+ const ClipFragmentSelectorType = {
135
+ PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
136
+ SERVER_TIMESTAMP: "SERVER_TIMESTAMP",
137
+ };
138
+ class InvalidArgumentException extends KinesisVideoArchivedMediaServiceException {
139
+ name = "InvalidArgumentException";
140
+ $fault = "client";
141
+ Message;
142
+ constructor(opts) {
143
+ super({
144
+ name: "InvalidArgumentException",
145
+ $fault: "client",
146
+ ...opts,
147
+ });
148
+ Object.setPrototypeOf(this, InvalidArgumentException.prototype);
149
+ this.Message = opts.Message;
150
+ }
151
+ }
152
+ class InvalidCodecPrivateDataException extends KinesisVideoArchivedMediaServiceException {
153
+ name = "InvalidCodecPrivateDataException";
154
+ $fault = "client";
155
+ Message;
156
+ constructor(opts) {
157
+ super({
158
+ name: "InvalidCodecPrivateDataException",
159
+ $fault: "client",
160
+ ...opts,
161
+ });
162
+ Object.setPrototypeOf(this, InvalidCodecPrivateDataException.prototype);
163
+ this.Message = opts.Message;
164
+ }
165
+ }
166
+ class InvalidMediaFrameException extends KinesisVideoArchivedMediaServiceException {
167
+ name = "InvalidMediaFrameException";
168
+ $fault = "client";
169
+ Message;
170
+ constructor(opts) {
171
+ super({
172
+ name: "InvalidMediaFrameException",
173
+ $fault: "client",
174
+ ...opts,
175
+ });
176
+ Object.setPrototypeOf(this, InvalidMediaFrameException.prototype);
177
+ this.Message = opts.Message;
178
+ }
179
+ }
180
+ class MissingCodecPrivateDataException extends KinesisVideoArchivedMediaServiceException {
181
+ name = "MissingCodecPrivateDataException";
182
+ $fault = "client";
183
+ Message;
184
+ constructor(opts) {
185
+ super({
186
+ name: "MissingCodecPrivateDataException",
187
+ $fault: "client",
188
+ ...opts,
189
+ });
190
+ Object.setPrototypeOf(this, MissingCodecPrivateDataException.prototype);
191
+ this.Message = opts.Message;
192
+ }
193
+ }
194
+ class NoDataRetentionException extends KinesisVideoArchivedMediaServiceException {
195
+ name = "NoDataRetentionException";
196
+ $fault = "client";
197
+ Message;
198
+ constructor(opts) {
199
+ super({
200
+ name: "NoDataRetentionException",
201
+ $fault: "client",
202
+ ...opts,
203
+ });
204
+ Object.setPrototypeOf(this, NoDataRetentionException.prototype);
205
+ this.Message = opts.Message;
206
+ }
207
+ }
208
+ class NotAuthorizedException extends KinesisVideoArchivedMediaServiceException {
209
+ name = "NotAuthorizedException";
210
+ $fault = "client";
211
+ Message;
212
+ constructor(opts) {
213
+ super({
214
+ name: "NotAuthorizedException",
215
+ $fault: "client",
216
+ ...opts,
217
+ });
218
+ Object.setPrototypeOf(this, NotAuthorizedException.prototype);
219
+ this.Message = opts.Message;
220
+ }
221
+ }
222
+ class ResourceNotFoundException extends KinesisVideoArchivedMediaServiceException {
223
+ name = "ResourceNotFoundException";
224
+ $fault = "client";
225
+ Message;
226
+ constructor(opts) {
227
+ super({
228
+ name: "ResourceNotFoundException",
229
+ $fault: "client",
230
+ ...opts,
231
+ });
232
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
233
+ this.Message = opts.Message;
234
+ }
235
+ }
236
+ class UnsupportedStreamMediaTypeException extends KinesisVideoArchivedMediaServiceException {
237
+ name = "UnsupportedStreamMediaTypeException";
238
+ $fault = "client";
239
+ Message;
240
+ constructor(opts) {
241
+ super({
242
+ name: "UnsupportedStreamMediaTypeException",
243
+ $fault: "client",
244
+ ...opts,
245
+ });
246
+ Object.setPrototypeOf(this, UnsupportedStreamMediaTypeException.prototype);
247
+ this.Message = opts.Message;
248
+ }
249
+ }
250
+ const DASHFragmentSelectorType = {
251
+ PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
252
+ SERVER_TIMESTAMP: "SERVER_TIMESTAMP",
253
+ };
254
+ const DASHDisplayFragmentNumber = {
255
+ ALWAYS: "ALWAYS",
256
+ NEVER: "NEVER",
257
+ };
258
+ const DASHDisplayFragmentTimestamp = {
259
+ ALWAYS: "ALWAYS",
260
+ NEVER: "NEVER",
261
+ };
262
+ const DASHPlaybackMode = {
263
+ LIVE: "LIVE",
264
+ LIVE_REPLAY: "LIVE_REPLAY",
265
+ ON_DEMAND: "ON_DEMAND",
266
+ };
267
+ const ContainerFormat = {
268
+ FRAGMENTED_MP4: "FRAGMENTED_MP4",
269
+ MPEG_TS: "MPEG_TS",
270
+ };
271
+ const HLSDiscontinuityMode = {
272
+ ALWAYS: "ALWAYS",
273
+ NEVER: "NEVER",
274
+ ON_DISCONTINUITY: "ON_DISCONTINUITY",
275
+ };
276
+ const HLSDisplayFragmentTimestamp = {
277
+ ALWAYS: "ALWAYS",
278
+ NEVER: "NEVER",
279
+ };
280
+ const HLSFragmentSelectorType = {
281
+ PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
282
+ SERVER_TIMESTAMP: "SERVER_TIMESTAMP",
283
+ };
284
+ const HLSPlaybackMode = {
285
+ LIVE: "LIVE",
286
+ LIVE_REPLAY: "LIVE_REPLAY",
287
+ ON_DEMAND: "ON_DEMAND",
288
+ };
289
+ const Format = {
290
+ JPEG: "JPEG",
291
+ PNG: "PNG",
292
+ };
293
+ const FormatConfigKey = {
294
+ JPEGQuality: "JPEGQuality",
295
+ };
296
+ const ImageSelectorType = {
297
+ PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
298
+ SERVER_TIMESTAMP: "SERVER_TIMESTAMP",
299
+ };
300
+ const ImageError = {
301
+ MEDIA_ERROR: "MEDIA_ERROR",
302
+ NO_MEDIA: "NO_MEDIA",
303
+ };
304
+ const FragmentSelectorType = {
305
+ PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
306
+ SERVER_TIMESTAMP: "SERVER_TIMESTAMP",
307
+ };
308
+ const GetClipOutputFilterSensitiveLog = (obj) => ({
309
+ ...obj,
310
+ });
311
+ const GetMediaForFragmentListOutputFilterSensitiveLog = (obj) => ({
312
+ ...obj,
62
313
  });
63
- module.exports = __toCommonJS(index_exports);
64
-
65
- // src/KinesisVideoArchivedMediaClient.ts
66
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
67
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
68
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
69
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
70
- var import_config_resolver = require("@smithy/config-resolver");
71
- var import_core = require("@smithy/core");
72
- var import_middleware_content_length = require("@smithy/middleware-content-length");
73
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
74
- var import_middleware_retry = require("@smithy/middleware-retry");
75
-
76
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
77
-
78
- // src/endpoint/EndpointParameters.ts
79
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
80
- return Object.assign(options, {
81
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
82
- useFipsEndpoint: options.useFipsEndpoint ?? false,
83
- defaultSigningName: "kinesisvideo"
84
- });
85
- }, "resolveClientEndpointParameters");
86
- var commonParams = {
87
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
88
- Endpoint: { type: "builtInParams", name: "endpoint" },
89
- Region: { type: "builtInParams", name: "region" },
90
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
91
- };
92
-
93
- // src/KinesisVideoArchivedMediaClient.ts
94
- var import_runtimeConfig = require("././runtimeConfig");
95
-
96
- // src/runtimeExtensions.ts
97
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
98
- var import_protocol_http = require("@smithy/protocol-http");
99
- var import_smithy_client = require("@smithy/smithy-client");
100
314
 
101
- // src/auth/httpAuthExtensionConfiguration.ts
102
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
103
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
104
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
105
- let _credentials = runtimeConfig.credentials;
106
- return {
107
- setHttpAuthScheme(httpAuthScheme) {
108
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
109
- if (index === -1) {
110
- _httpAuthSchemes.push(httpAuthScheme);
111
- } else {
112
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
113
- }
114
- },
115
- httpAuthSchemes() {
116
- return _httpAuthSchemes;
117
- },
118
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
119
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
120
- },
121
- httpAuthSchemeProvider() {
122
- return _httpAuthSchemeProvider;
123
- },
124
- setCredentials(credentials) {
125
- _credentials = credentials;
126
- },
127
- credentials() {
128
- return _credentials;
315
+ const se_GetClipCommand = async (input, context) => {
316
+ const b = core.requestBuilder(input, context);
317
+ const headers = {
318
+ "content-type": "application/json",
319
+ };
320
+ b.bp("/getClip");
321
+ let body;
322
+ body = JSON.stringify(smithyClient.take(input, {
323
+ ClipFragmentSelector: (_) => se_ClipFragmentSelector(_),
324
+ StreamARN: [],
325
+ StreamName: [],
326
+ }));
327
+ b.m("POST").h(headers).b(body);
328
+ return b.build();
329
+ };
330
+ const se_GetDASHStreamingSessionURLCommand = async (input, context) => {
331
+ const b = core.requestBuilder(input, context);
332
+ const headers = {
333
+ "content-type": "application/json",
334
+ };
335
+ b.bp("/getDASHStreamingSessionURL");
336
+ let body;
337
+ body = JSON.stringify(smithyClient.take(input, {
338
+ DASHFragmentSelector: (_) => se_DASHFragmentSelector(_),
339
+ DisplayFragmentNumber: [],
340
+ DisplayFragmentTimestamp: [],
341
+ Expires: [],
342
+ MaxManifestFragmentResults: [],
343
+ PlaybackMode: [],
344
+ StreamARN: [],
345
+ StreamName: [],
346
+ }));
347
+ b.m("POST").h(headers).b(body);
348
+ return b.build();
349
+ };
350
+ const se_GetHLSStreamingSessionURLCommand = async (input, context) => {
351
+ const b = core.requestBuilder(input, context);
352
+ const headers = {
353
+ "content-type": "application/json",
354
+ };
355
+ b.bp("/getHLSStreamingSessionURL");
356
+ let body;
357
+ body = JSON.stringify(smithyClient.take(input, {
358
+ ContainerFormat: [],
359
+ DiscontinuityMode: [],
360
+ DisplayFragmentTimestamp: [],
361
+ Expires: [],
362
+ HLSFragmentSelector: (_) => se_HLSFragmentSelector(_),
363
+ MaxMediaPlaylistFragmentResults: [],
364
+ PlaybackMode: [],
365
+ StreamARN: [],
366
+ StreamName: [],
367
+ }));
368
+ b.m("POST").h(headers).b(body);
369
+ return b.build();
370
+ };
371
+ const se_GetImagesCommand = async (input, context) => {
372
+ const b = core.requestBuilder(input, context);
373
+ const headers = {
374
+ "content-type": "application/json",
375
+ };
376
+ b.bp("/getImages");
377
+ let body;
378
+ body = JSON.stringify(smithyClient.take(input, {
379
+ EndTimestamp: (_) => _.getTime() / 1_000,
380
+ Format: [],
381
+ FormatConfig: (_) => smithyClient._json(_),
382
+ HeightPixels: [],
383
+ ImageSelectorType: [],
384
+ MaxResults: [],
385
+ NextToken: [],
386
+ SamplingInterval: [],
387
+ StartTimestamp: (_) => _.getTime() / 1_000,
388
+ StreamARN: [],
389
+ StreamName: [],
390
+ WidthPixels: [],
391
+ }));
392
+ b.m("POST").h(headers).b(body);
393
+ return b.build();
394
+ };
395
+ const se_GetMediaForFragmentListCommand = async (input, context) => {
396
+ const b = core.requestBuilder(input, context);
397
+ const headers = {
398
+ "content-type": "application/json",
399
+ };
400
+ b.bp("/getMediaForFragmentList");
401
+ let body;
402
+ body = JSON.stringify(smithyClient.take(input, {
403
+ Fragments: (_) => smithyClient._json(_),
404
+ StreamARN: [],
405
+ StreamName: [],
406
+ }));
407
+ b.m("POST").h(headers).b(body);
408
+ return b.build();
409
+ };
410
+ const se_ListFragmentsCommand = async (input, context) => {
411
+ const b = core.requestBuilder(input, context);
412
+ const headers = {
413
+ "content-type": "application/json",
414
+ };
415
+ b.bp("/listFragments");
416
+ let body;
417
+ body = JSON.stringify(smithyClient.take(input, {
418
+ FragmentSelector: (_) => se_FragmentSelector(_),
419
+ MaxResults: [],
420
+ NextToken: [],
421
+ StreamARN: [],
422
+ StreamName: [],
423
+ }));
424
+ b.m("POST").h(headers).b(body);
425
+ return b.build();
426
+ };
427
+ const de_GetClipCommand = async (output, context) => {
428
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
429
+ return de_CommandError(output, context);
129
430
  }
130
- };
131
- }, "getHttpAuthExtensionConfiguration");
132
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
133
- return {
134
- httpAuthSchemes: config.httpAuthSchemes(),
135
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
136
- credentials: config.credentials()
137
- };
138
- }, "resolveHttpAuthRuntimeConfig");
139
-
140
- // src/runtimeExtensions.ts
141
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
142
- const extensionConfiguration = Object.assign(
143
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
144
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
145
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
146
- getHttpAuthExtensionConfiguration(runtimeConfig)
147
- );
148
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
149
- return Object.assign(
150
- runtimeConfig,
151
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
152
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
153
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
154
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
155
- );
156
- }, "resolveRuntimeExtensions");
157
-
158
- // src/KinesisVideoArchivedMediaClient.ts
159
- var KinesisVideoArchivedMediaClient = class extends import_smithy_client.Client {
160
- static {
161
- __name(this, "KinesisVideoArchivedMediaClient");
162
- }
163
- /**
164
- * The resolved configuration of KinesisVideoArchivedMediaClient class. This is resolved and normalized from the {@link KinesisVideoArchivedMediaClientConfig | constructor configuration interface}.
165
- */
166
- config;
167
- constructor(...[configuration]) {
168
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
169
- super(_config_0);
170
- this.initConfig = _config_0;
171
- const _config_1 = resolveClientEndpointParameters(_config_0);
172
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
173
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
174
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
175
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
176
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
177
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
178
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
179
- this.config = _config_8;
180
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
181
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
182
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
183
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
184
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
185
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
186
- this.middlewareStack.use(
187
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
188
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultKinesisVideoArchivedMediaHttpAuthSchemeParametersProvider,
189
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
190
- "aws.auth#sigv4": config.credentials
191
- }), "identityProviderConfigProvider")
192
- })
193
- );
194
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
195
- }
196
- /**
197
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
198
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
199
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
200
- */
201
- destroy() {
202
- super.destroy();
203
- }
204
- };
205
-
206
- // src/KinesisVideoArchivedMedia.ts
207
-
208
-
209
- // src/commands/GetClipCommand.ts
210
-
211
- var import_middleware_serde = require("@smithy/middleware-serde");
212
-
213
-
214
- // src/models/KinesisVideoArchivedMediaServiceException.ts
215
-
216
- var KinesisVideoArchivedMediaServiceException = class _KinesisVideoArchivedMediaServiceException extends import_smithy_client.ServiceException {
217
- static {
218
- __name(this, "KinesisVideoArchivedMediaServiceException");
219
- }
220
- /**
221
- * @internal
222
- */
223
- constructor(options) {
224
- super(options);
225
- Object.setPrototypeOf(this, _KinesisVideoArchivedMediaServiceException.prototype);
226
- }
227
- };
228
-
229
- // src/models/models_0.ts
230
- var ClientLimitExceededException = class _ClientLimitExceededException extends KinesisVideoArchivedMediaServiceException {
231
- static {
232
- __name(this, "ClientLimitExceededException");
233
- }
234
- name = "ClientLimitExceededException";
235
- $fault = "client";
236
- Message;
237
- /**
238
- * @internal
239
- */
240
- constructor(opts) {
241
- super({
242
- name: "ClientLimitExceededException",
243
- $fault: "client",
244
- ...opts
431
+ const contents = smithyClient.map({
432
+ $metadata: deserializeMetadata(output),
433
+ [_CT]: [, output.headers[_ct]],
245
434
  });
246
- Object.setPrototypeOf(this, _ClientLimitExceededException.prototype);
247
- this.Message = opts.Message;
248
- }
249
- };
250
- var ClipFragmentSelectorType = {
251
- PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
252
- SERVER_TIMESTAMP: "SERVER_TIMESTAMP"
253
- };
254
- var InvalidArgumentException = class _InvalidArgumentException extends KinesisVideoArchivedMediaServiceException {
255
- static {
256
- __name(this, "InvalidArgumentException");
257
- }
258
- name = "InvalidArgumentException";
259
- $fault = "client";
260
- Message;
261
- /**
262
- * @internal
263
- */
264
- constructor(opts) {
265
- super({
266
- name: "InvalidArgumentException",
267
- $fault: "client",
268
- ...opts
435
+ const data = output.body;
436
+ context.sdkStreamMixin(data);
437
+ contents.Payload = data;
438
+ return contents;
439
+ };
440
+ const de_GetDASHStreamingSessionURLCommand = async (output, context) => {
441
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
442
+ return de_CommandError(output, context);
443
+ }
444
+ const contents = smithyClient.map({
445
+ $metadata: deserializeMetadata(output),
269
446
  });
270
- Object.setPrototypeOf(this, _InvalidArgumentException.prototype);
271
- this.Message = opts.Message;
272
- }
273
- };
274
- var InvalidCodecPrivateDataException = class _InvalidCodecPrivateDataException extends KinesisVideoArchivedMediaServiceException {
275
- static {
276
- __name(this, "InvalidCodecPrivateDataException");
277
- }
278
- name = "InvalidCodecPrivateDataException";
279
- $fault = "client";
280
- Message;
281
- /**
282
- * @internal
283
- */
284
- constructor(opts) {
285
- super({
286
- name: "InvalidCodecPrivateDataException",
287
- $fault: "client",
288
- ...opts
447
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
448
+ const doc = smithyClient.take(data, {
449
+ DASHStreamingSessionURL: smithyClient.expectString,
289
450
  });
290
- Object.setPrototypeOf(this, _InvalidCodecPrivateDataException.prototype);
291
- this.Message = opts.Message;
292
- }
451
+ Object.assign(contents, doc);
452
+ return contents;
293
453
  };
294
- var InvalidMediaFrameException = class _InvalidMediaFrameException extends KinesisVideoArchivedMediaServiceException {
295
- static {
296
- __name(this, "InvalidMediaFrameException");
297
- }
298
- name = "InvalidMediaFrameException";
299
- $fault = "client";
300
- Message;
301
- /**
302
- * @internal
303
- */
304
- constructor(opts) {
305
- super({
306
- name: "InvalidMediaFrameException",
307
- $fault: "client",
308
- ...opts
454
+ const de_GetHLSStreamingSessionURLCommand = async (output, context) => {
455
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
456
+ return de_CommandError(output, context);
457
+ }
458
+ const contents = smithyClient.map({
459
+ $metadata: deserializeMetadata(output),
309
460
  });
310
- Object.setPrototypeOf(this, _InvalidMediaFrameException.prototype);
311
- this.Message = opts.Message;
312
- }
313
- };
314
- var MissingCodecPrivateDataException = class _MissingCodecPrivateDataException extends KinesisVideoArchivedMediaServiceException {
315
- static {
316
- __name(this, "MissingCodecPrivateDataException");
317
- }
318
- name = "MissingCodecPrivateDataException";
319
- $fault = "client";
320
- Message;
321
- /**
322
- * @internal
323
- */
324
- constructor(opts) {
325
- super({
326
- name: "MissingCodecPrivateDataException",
327
- $fault: "client",
328
- ...opts
461
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
462
+ const doc = smithyClient.take(data, {
463
+ HLSStreamingSessionURL: smithyClient.expectString,
329
464
  });
330
- Object.setPrototypeOf(this, _MissingCodecPrivateDataException.prototype);
331
- this.Message = opts.Message;
332
- }
465
+ Object.assign(contents, doc);
466
+ return contents;
333
467
  };
334
- var NoDataRetentionException = class _NoDataRetentionException extends KinesisVideoArchivedMediaServiceException {
335
- static {
336
- __name(this, "NoDataRetentionException");
337
- }
338
- name = "NoDataRetentionException";
339
- $fault = "client";
340
- Message;
341
- /**
342
- * @internal
343
- */
344
- constructor(opts) {
345
- super({
346
- name: "NoDataRetentionException",
347
- $fault: "client",
348
- ...opts
468
+ const de_GetImagesCommand = async (output, context) => {
469
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
470
+ return de_CommandError(output, context);
471
+ }
472
+ const contents = smithyClient.map({
473
+ $metadata: deserializeMetadata(output),
349
474
  });
350
- Object.setPrototypeOf(this, _NoDataRetentionException.prototype);
351
- this.Message = opts.Message;
352
- }
353
- };
354
- var NotAuthorizedException = class _NotAuthorizedException extends KinesisVideoArchivedMediaServiceException {
355
- static {
356
- __name(this, "NotAuthorizedException");
357
- }
358
- name = "NotAuthorizedException";
359
- $fault = "client";
360
- Message;
361
- /**
362
- * @internal
363
- */
364
- constructor(opts) {
365
- super({
366
- name: "NotAuthorizedException",
367
- $fault: "client",
368
- ...opts
475
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
476
+ const doc = smithyClient.take(data, {
477
+ Images: (_) => de_Images(_),
478
+ NextToken: smithyClient.expectString,
369
479
  });
370
- Object.setPrototypeOf(this, _NotAuthorizedException.prototype);
371
- this.Message = opts.Message;
372
- }
480
+ Object.assign(contents, doc);
481
+ return contents;
373
482
  };
374
- var ResourceNotFoundException = class _ResourceNotFoundException extends KinesisVideoArchivedMediaServiceException {
375
- static {
376
- __name(this, "ResourceNotFoundException");
377
- }
378
- name = "ResourceNotFoundException";
379
- $fault = "client";
380
- Message;
381
- /**
382
- * @internal
383
- */
384
- constructor(opts) {
385
- super({
386
- name: "ResourceNotFoundException",
387
- $fault: "client",
388
- ...opts
483
+ const de_GetMediaForFragmentListCommand = async (output, context) => {
484
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
485
+ return de_CommandError(output, context);
486
+ }
487
+ const contents = smithyClient.map({
488
+ $metadata: deserializeMetadata(output),
489
+ [_CT]: [, output.headers[_ct]],
389
490
  });
390
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
391
- this.Message = opts.Message;
392
- }
393
- };
394
- var UnsupportedStreamMediaTypeException = class _UnsupportedStreamMediaTypeException extends KinesisVideoArchivedMediaServiceException {
395
- static {
396
- __name(this, "UnsupportedStreamMediaTypeException");
397
- }
398
- name = "UnsupportedStreamMediaTypeException";
399
- $fault = "client";
400
- Message;
401
- /**
402
- * @internal
403
- */
404
- constructor(opts) {
405
- super({
406
- name: "UnsupportedStreamMediaTypeException",
407
- $fault: "client",
408
- ...opts
491
+ const data = output.body;
492
+ context.sdkStreamMixin(data);
493
+ contents.Payload = data;
494
+ return contents;
495
+ };
496
+ const de_ListFragmentsCommand = async (output, context) => {
497
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
498
+ return de_CommandError(output, context);
499
+ }
500
+ const contents = smithyClient.map({
501
+ $metadata: deserializeMetadata(output),
409
502
  });
410
- Object.setPrototypeOf(this, _UnsupportedStreamMediaTypeException.prototype);
411
- this.Message = opts.Message;
412
- }
413
- };
414
- var DASHFragmentSelectorType = {
415
- PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
416
- SERVER_TIMESTAMP: "SERVER_TIMESTAMP"
503
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
504
+ const doc = smithyClient.take(data, {
505
+ Fragments: (_) => de_FragmentList(_),
506
+ NextToken: smithyClient.expectString,
507
+ });
508
+ Object.assign(contents, doc);
509
+ return contents;
510
+ };
511
+ const de_CommandError = async (output, context) => {
512
+ const parsedOutput = {
513
+ ...output,
514
+ body: await core$1.parseJsonErrorBody(output.body, context),
515
+ };
516
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
517
+ switch (errorCode) {
518
+ case "ClientLimitExceededException":
519
+ case "com.amazonaws.kinesisvideoarchivedmedia#ClientLimitExceededException":
520
+ throw await de_ClientLimitExceededExceptionRes(parsedOutput);
521
+ case "InvalidArgumentException":
522
+ case "com.amazonaws.kinesisvideoarchivedmedia#InvalidArgumentException":
523
+ throw await de_InvalidArgumentExceptionRes(parsedOutput);
524
+ case "InvalidCodecPrivateDataException":
525
+ case "com.amazonaws.kinesisvideoarchivedmedia#InvalidCodecPrivateDataException":
526
+ throw await de_InvalidCodecPrivateDataExceptionRes(parsedOutput);
527
+ case "InvalidMediaFrameException":
528
+ case "com.amazonaws.kinesisvideoarchivedmedia#InvalidMediaFrameException":
529
+ throw await de_InvalidMediaFrameExceptionRes(parsedOutput);
530
+ case "MissingCodecPrivateDataException":
531
+ case "com.amazonaws.kinesisvideoarchivedmedia#MissingCodecPrivateDataException":
532
+ throw await de_MissingCodecPrivateDataExceptionRes(parsedOutput);
533
+ case "NoDataRetentionException":
534
+ case "com.amazonaws.kinesisvideoarchivedmedia#NoDataRetentionException":
535
+ throw await de_NoDataRetentionExceptionRes(parsedOutput);
536
+ case "NotAuthorizedException":
537
+ case "com.amazonaws.kinesisvideoarchivedmedia#NotAuthorizedException":
538
+ throw await de_NotAuthorizedExceptionRes(parsedOutput);
539
+ case "ResourceNotFoundException":
540
+ case "com.amazonaws.kinesisvideoarchivedmedia#ResourceNotFoundException":
541
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
542
+ case "UnsupportedStreamMediaTypeException":
543
+ case "com.amazonaws.kinesisvideoarchivedmedia#UnsupportedStreamMediaTypeException":
544
+ throw await de_UnsupportedStreamMediaTypeExceptionRes(parsedOutput);
545
+ default:
546
+ const parsedBody = parsedOutput.body;
547
+ return throwDefaultError({
548
+ output,
549
+ parsedBody,
550
+ errorCode,
551
+ });
552
+ }
417
553
  };
418
- var DASHDisplayFragmentNumber = {
419
- ALWAYS: "ALWAYS",
420
- NEVER: "NEVER"
554
+ const throwDefaultError = smithyClient.withBaseException(KinesisVideoArchivedMediaServiceException);
555
+ const de_ClientLimitExceededExceptionRes = async (parsedOutput, context) => {
556
+ const contents = smithyClient.map({});
557
+ const data = parsedOutput.body;
558
+ const doc = smithyClient.take(data, {
559
+ Message: smithyClient.expectString,
560
+ });
561
+ Object.assign(contents, doc);
562
+ const exception = new ClientLimitExceededException({
563
+ $metadata: deserializeMetadata(parsedOutput),
564
+ ...contents,
565
+ });
566
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
421
567
  };
422
- var DASHDisplayFragmentTimestamp = {
423
- ALWAYS: "ALWAYS",
424
- NEVER: "NEVER"
568
+ const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
569
+ const contents = smithyClient.map({});
570
+ const data = parsedOutput.body;
571
+ const doc = smithyClient.take(data, {
572
+ Message: smithyClient.expectString,
573
+ });
574
+ Object.assign(contents, doc);
575
+ const exception = new InvalidArgumentException({
576
+ $metadata: deserializeMetadata(parsedOutput),
577
+ ...contents,
578
+ });
579
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
425
580
  };
426
- var DASHPlaybackMode = {
427
- LIVE: "LIVE",
428
- LIVE_REPLAY: "LIVE_REPLAY",
429
- ON_DEMAND: "ON_DEMAND"
581
+ const de_InvalidCodecPrivateDataExceptionRes = async (parsedOutput, context) => {
582
+ const contents = smithyClient.map({});
583
+ const data = parsedOutput.body;
584
+ const doc = smithyClient.take(data, {
585
+ Message: smithyClient.expectString,
586
+ });
587
+ Object.assign(contents, doc);
588
+ const exception = new InvalidCodecPrivateDataException({
589
+ $metadata: deserializeMetadata(parsedOutput),
590
+ ...contents,
591
+ });
592
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
430
593
  };
431
- var ContainerFormat = {
432
- FRAGMENTED_MP4: "FRAGMENTED_MP4",
433
- MPEG_TS: "MPEG_TS"
594
+ const de_InvalidMediaFrameExceptionRes = async (parsedOutput, context) => {
595
+ const contents = smithyClient.map({});
596
+ const data = parsedOutput.body;
597
+ const doc = smithyClient.take(data, {
598
+ Message: smithyClient.expectString,
599
+ });
600
+ Object.assign(contents, doc);
601
+ const exception = new InvalidMediaFrameException({
602
+ $metadata: deserializeMetadata(parsedOutput),
603
+ ...contents,
604
+ });
605
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
434
606
  };
435
- var HLSDiscontinuityMode = {
436
- ALWAYS: "ALWAYS",
437
- NEVER: "NEVER",
438
- ON_DISCONTINUITY: "ON_DISCONTINUITY"
607
+ const de_MissingCodecPrivateDataExceptionRes = async (parsedOutput, context) => {
608
+ const contents = smithyClient.map({});
609
+ const data = parsedOutput.body;
610
+ const doc = smithyClient.take(data, {
611
+ Message: smithyClient.expectString,
612
+ });
613
+ Object.assign(contents, doc);
614
+ const exception = new MissingCodecPrivateDataException({
615
+ $metadata: deserializeMetadata(parsedOutput),
616
+ ...contents,
617
+ });
618
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
439
619
  };
440
- var HLSDisplayFragmentTimestamp = {
441
- ALWAYS: "ALWAYS",
442
- NEVER: "NEVER"
620
+ const de_NoDataRetentionExceptionRes = async (parsedOutput, context) => {
621
+ const contents = smithyClient.map({});
622
+ const data = parsedOutput.body;
623
+ const doc = smithyClient.take(data, {
624
+ Message: smithyClient.expectString,
625
+ });
626
+ Object.assign(contents, doc);
627
+ const exception = new NoDataRetentionException({
628
+ $metadata: deserializeMetadata(parsedOutput),
629
+ ...contents,
630
+ });
631
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
443
632
  };
444
- var HLSFragmentSelectorType = {
445
- PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
446
- SERVER_TIMESTAMP: "SERVER_TIMESTAMP"
633
+ const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
634
+ const contents = smithyClient.map({});
635
+ const data = parsedOutput.body;
636
+ const doc = smithyClient.take(data, {
637
+ Message: smithyClient.expectString,
638
+ });
639
+ Object.assign(contents, doc);
640
+ const exception = new NotAuthorizedException({
641
+ $metadata: deserializeMetadata(parsedOutput),
642
+ ...contents,
643
+ });
644
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
447
645
  };
448
- var HLSPlaybackMode = {
449
- LIVE: "LIVE",
450
- LIVE_REPLAY: "LIVE_REPLAY",
451
- ON_DEMAND: "ON_DEMAND"
646
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
647
+ const contents = smithyClient.map({});
648
+ const data = parsedOutput.body;
649
+ const doc = smithyClient.take(data, {
650
+ Message: smithyClient.expectString,
651
+ });
652
+ Object.assign(contents, doc);
653
+ const exception = new ResourceNotFoundException({
654
+ $metadata: deserializeMetadata(parsedOutput),
655
+ ...contents,
656
+ });
657
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
452
658
  };
453
- var Format = {
454
- JPEG: "JPEG",
455
- PNG: "PNG"
659
+ const de_UnsupportedStreamMediaTypeExceptionRes = async (parsedOutput, context) => {
660
+ const contents = smithyClient.map({});
661
+ const data = parsedOutput.body;
662
+ const doc = smithyClient.take(data, {
663
+ Message: smithyClient.expectString,
664
+ });
665
+ Object.assign(contents, doc);
666
+ const exception = new UnsupportedStreamMediaTypeException({
667
+ $metadata: deserializeMetadata(parsedOutput),
668
+ ...contents,
669
+ });
670
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
456
671
  };
457
- var FormatConfigKey = {
458
- JPEGQuality: "JPEGQuality"
672
+ const se_ClipFragmentSelector = (input, context) => {
673
+ return smithyClient.take(input, {
674
+ FragmentSelectorType: [],
675
+ TimestampRange: (_) => se_ClipTimestampRange(_),
676
+ });
459
677
  };
460
- var ImageSelectorType = {
461
- PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
462
- SERVER_TIMESTAMP: "SERVER_TIMESTAMP"
678
+ const se_ClipTimestampRange = (input, context) => {
679
+ return smithyClient.take(input, {
680
+ EndTimestamp: (_) => _.getTime() / 1_000,
681
+ StartTimestamp: (_) => _.getTime() / 1_000,
682
+ });
463
683
  };
464
- var ImageError = {
465
- MEDIA_ERROR: "MEDIA_ERROR",
466
- NO_MEDIA: "NO_MEDIA"
684
+ const se_DASHFragmentSelector = (input, context) => {
685
+ return smithyClient.take(input, {
686
+ FragmentSelectorType: [],
687
+ TimestampRange: (_) => se_DASHTimestampRange(_),
688
+ });
467
689
  };
468
- var FragmentSelectorType = {
469
- PRODUCER_TIMESTAMP: "PRODUCER_TIMESTAMP",
470
- SERVER_TIMESTAMP: "SERVER_TIMESTAMP"
690
+ const se_DASHTimestampRange = (input, context) => {
691
+ return smithyClient.take(input, {
692
+ EndTimestamp: (_) => _.getTime() / 1_000,
693
+ StartTimestamp: (_) => _.getTime() / 1_000,
694
+ });
471
695
  };
472
- var GetClipOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
473
- ...obj
474
- }), "GetClipOutputFilterSensitiveLog");
475
- var GetMediaForFragmentListOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
476
- ...obj
477
- }), "GetMediaForFragmentListOutputFilterSensitiveLog");
478
-
479
- // src/protocols/Aws_restJson1.ts
480
- var import_core2 = require("@aws-sdk/core");
481
-
482
-
483
- var se_GetClipCommand = /* @__PURE__ */ __name(async (input, context) => {
484
- const b = (0, import_core.requestBuilder)(input, context);
485
- const headers = {
486
- "content-type": "application/json"
487
- };
488
- b.bp("/getClip");
489
- let body;
490
- body = JSON.stringify(
491
- (0, import_smithy_client.take)(input, {
492
- ClipFragmentSelector: /* @__PURE__ */ __name((_) => se_ClipFragmentSelector(_, context), "ClipFragmentSelector"),
493
- StreamARN: [],
494
- StreamName: []
495
- })
496
- );
497
- b.m("POST").h(headers).b(body);
498
- return b.build();
499
- }, "se_GetClipCommand");
500
- var se_GetDASHStreamingSessionURLCommand = /* @__PURE__ */ __name(async (input, context) => {
501
- const b = (0, import_core.requestBuilder)(input, context);
502
- const headers = {
503
- "content-type": "application/json"
504
- };
505
- b.bp("/getDASHStreamingSessionURL");
506
- let body;
507
- body = JSON.stringify(
508
- (0, import_smithy_client.take)(input, {
509
- DASHFragmentSelector: /* @__PURE__ */ __name((_) => se_DASHFragmentSelector(_, context), "DASHFragmentSelector"),
510
- DisplayFragmentNumber: [],
511
- DisplayFragmentTimestamp: [],
512
- Expires: [],
513
- MaxManifestFragmentResults: [],
514
- PlaybackMode: [],
515
- StreamARN: [],
516
- StreamName: []
517
- })
518
- );
519
- b.m("POST").h(headers).b(body);
520
- return b.build();
521
- }, "se_GetDASHStreamingSessionURLCommand");
522
- var se_GetHLSStreamingSessionURLCommand = /* @__PURE__ */ __name(async (input, context) => {
523
- const b = (0, import_core.requestBuilder)(input, context);
524
- const headers = {
525
- "content-type": "application/json"
526
- };
527
- b.bp("/getHLSStreamingSessionURL");
528
- let body;
529
- body = JSON.stringify(
530
- (0, import_smithy_client.take)(input, {
531
- ContainerFormat: [],
532
- DiscontinuityMode: [],
533
- DisplayFragmentTimestamp: [],
534
- Expires: [],
535
- HLSFragmentSelector: /* @__PURE__ */ __name((_) => se_HLSFragmentSelector(_, context), "HLSFragmentSelector"),
536
- MaxMediaPlaylistFragmentResults: [],
537
- PlaybackMode: [],
538
- StreamARN: [],
539
- StreamName: []
540
- })
541
- );
542
- b.m("POST").h(headers).b(body);
543
- return b.build();
544
- }, "se_GetHLSStreamingSessionURLCommand");
545
- var se_GetImagesCommand = /* @__PURE__ */ __name(async (input, context) => {
546
- const b = (0, import_core.requestBuilder)(input, context);
547
- const headers = {
548
- "content-type": "application/json"
549
- };
550
- b.bp("/getImages");
551
- let body;
552
- body = JSON.stringify(
553
- (0, import_smithy_client.take)(input, {
554
- EndTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "EndTimestamp"),
555
- Format: [],
556
- FormatConfig: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "FormatConfig"),
557
- HeightPixels: [],
558
- ImageSelectorType: [],
559
- MaxResults: [],
560
- NextToken: [],
561
- SamplingInterval: [],
562
- StartTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "StartTimestamp"),
563
- StreamARN: [],
564
- StreamName: [],
565
- WidthPixels: []
566
- })
567
- );
568
- b.m("POST").h(headers).b(body);
569
- return b.build();
570
- }, "se_GetImagesCommand");
571
- var se_GetMediaForFragmentListCommand = /* @__PURE__ */ __name(async (input, context) => {
572
- const b = (0, import_core.requestBuilder)(input, context);
573
- const headers = {
574
- "content-type": "application/json"
575
- };
576
- b.bp("/getMediaForFragmentList");
577
- let body;
578
- body = JSON.stringify(
579
- (0, import_smithy_client.take)(input, {
580
- Fragments: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Fragments"),
581
- StreamARN: [],
582
- StreamName: []
583
- })
584
- );
585
- b.m("POST").h(headers).b(body);
586
- return b.build();
587
- }, "se_GetMediaForFragmentListCommand");
588
- var se_ListFragmentsCommand = /* @__PURE__ */ __name(async (input, context) => {
589
- const b = (0, import_core.requestBuilder)(input, context);
590
- const headers = {
591
- "content-type": "application/json"
592
- };
593
- b.bp("/listFragments");
594
- let body;
595
- body = JSON.stringify(
596
- (0, import_smithy_client.take)(input, {
597
- FragmentSelector: /* @__PURE__ */ __name((_) => se_FragmentSelector(_, context), "FragmentSelector"),
598
- MaxResults: [],
599
- NextToken: [],
600
- StreamARN: [],
601
- StreamName: []
602
- })
603
- );
604
- b.m("POST").h(headers).b(body);
605
- return b.build();
606
- }, "se_ListFragmentsCommand");
607
- var de_GetClipCommand = /* @__PURE__ */ __name(async (output, context) => {
608
- if (output.statusCode !== 200 && output.statusCode >= 300) {
609
- return de_CommandError(output, context);
610
- }
611
- const contents = (0, import_smithy_client.map)({
612
- $metadata: deserializeMetadata(output),
613
- [_CT]: [, output.headers[_ct]]
614
- });
615
- const data = output.body;
616
- context.sdkStreamMixin(data);
617
- contents.Payload = data;
618
- return contents;
619
- }, "de_GetClipCommand");
620
- var de_GetDASHStreamingSessionURLCommand = /* @__PURE__ */ __name(async (output, context) => {
621
- if (output.statusCode !== 200 && output.statusCode >= 300) {
622
- return de_CommandError(output, context);
623
- }
624
- const contents = (0, import_smithy_client.map)({
625
- $metadata: deserializeMetadata(output)
626
- });
627
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
628
- const doc = (0, import_smithy_client.take)(data, {
629
- DASHStreamingSessionURL: import_smithy_client.expectString
630
- });
631
- Object.assign(contents, doc);
632
- return contents;
633
- }, "de_GetDASHStreamingSessionURLCommand");
634
- var de_GetHLSStreamingSessionURLCommand = /* @__PURE__ */ __name(async (output, context) => {
635
- if (output.statusCode !== 200 && output.statusCode >= 300) {
636
- return de_CommandError(output, context);
637
- }
638
- const contents = (0, import_smithy_client.map)({
639
- $metadata: deserializeMetadata(output)
640
- });
641
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
642
- const doc = (0, import_smithy_client.take)(data, {
643
- HLSStreamingSessionURL: import_smithy_client.expectString
644
- });
645
- Object.assign(contents, doc);
646
- return contents;
647
- }, "de_GetHLSStreamingSessionURLCommand");
648
- var de_GetImagesCommand = /* @__PURE__ */ __name(async (output, context) => {
649
- if (output.statusCode !== 200 && output.statusCode >= 300) {
650
- return de_CommandError(output, context);
651
- }
652
- const contents = (0, import_smithy_client.map)({
653
- $metadata: deserializeMetadata(output)
654
- });
655
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
656
- const doc = (0, import_smithy_client.take)(data, {
657
- Images: /* @__PURE__ */ __name((_) => de_Images(_, context), "Images"),
658
- NextToken: import_smithy_client.expectString
659
- });
660
- Object.assign(contents, doc);
661
- return contents;
662
- }, "de_GetImagesCommand");
663
- var de_GetMediaForFragmentListCommand = /* @__PURE__ */ __name(async (output, context) => {
664
- if (output.statusCode !== 200 && output.statusCode >= 300) {
665
- return de_CommandError(output, context);
666
- }
667
- const contents = (0, import_smithy_client.map)({
668
- $metadata: deserializeMetadata(output),
669
- [_CT]: [, output.headers[_ct]]
670
- });
671
- const data = output.body;
672
- context.sdkStreamMixin(data);
673
- contents.Payload = data;
674
- return contents;
675
- }, "de_GetMediaForFragmentListCommand");
676
- var de_ListFragmentsCommand = /* @__PURE__ */ __name(async (output, context) => {
677
- if (output.statusCode !== 200 && output.statusCode >= 300) {
678
- return de_CommandError(output, context);
679
- }
680
- const contents = (0, import_smithy_client.map)({
681
- $metadata: deserializeMetadata(output)
682
- });
683
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
684
- const doc = (0, import_smithy_client.take)(data, {
685
- Fragments: /* @__PURE__ */ __name((_) => de_FragmentList(_, context), "Fragments"),
686
- NextToken: import_smithy_client.expectString
687
- });
688
- Object.assign(contents, doc);
689
- return contents;
690
- }, "de_ListFragmentsCommand");
691
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
692
- const parsedOutput = {
693
- ...output,
694
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
695
- };
696
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
697
- switch (errorCode) {
698
- case "ClientLimitExceededException":
699
- case "com.amazonaws.kinesisvideoarchivedmedia#ClientLimitExceededException":
700
- throw await de_ClientLimitExceededExceptionRes(parsedOutput, context);
701
- case "InvalidArgumentException":
702
- case "com.amazonaws.kinesisvideoarchivedmedia#InvalidArgumentException":
703
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
704
- case "InvalidCodecPrivateDataException":
705
- case "com.amazonaws.kinesisvideoarchivedmedia#InvalidCodecPrivateDataException":
706
- throw await de_InvalidCodecPrivateDataExceptionRes(parsedOutput, context);
707
- case "InvalidMediaFrameException":
708
- case "com.amazonaws.kinesisvideoarchivedmedia#InvalidMediaFrameException":
709
- throw await de_InvalidMediaFrameExceptionRes(parsedOutput, context);
710
- case "MissingCodecPrivateDataException":
711
- case "com.amazonaws.kinesisvideoarchivedmedia#MissingCodecPrivateDataException":
712
- throw await de_MissingCodecPrivateDataExceptionRes(parsedOutput, context);
713
- case "NoDataRetentionException":
714
- case "com.amazonaws.kinesisvideoarchivedmedia#NoDataRetentionException":
715
- throw await de_NoDataRetentionExceptionRes(parsedOutput, context);
716
- case "NotAuthorizedException":
717
- case "com.amazonaws.kinesisvideoarchivedmedia#NotAuthorizedException":
718
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
719
- case "ResourceNotFoundException":
720
- case "com.amazonaws.kinesisvideoarchivedmedia#ResourceNotFoundException":
721
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
722
- case "UnsupportedStreamMediaTypeException":
723
- case "com.amazonaws.kinesisvideoarchivedmedia#UnsupportedStreamMediaTypeException":
724
- throw await de_UnsupportedStreamMediaTypeExceptionRes(parsedOutput, context);
725
- default:
726
- const parsedBody = parsedOutput.body;
727
- return throwDefaultError({
728
- output,
729
- parsedBody,
730
- errorCode
731
- });
732
- }
733
- }, "de_CommandError");
734
- var throwDefaultError = (0, import_smithy_client.withBaseException)(KinesisVideoArchivedMediaServiceException);
735
- var de_ClientLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
736
- const contents = (0, import_smithy_client.map)({});
737
- const data = parsedOutput.body;
738
- const doc = (0, import_smithy_client.take)(data, {
739
- Message: import_smithy_client.expectString
740
- });
741
- Object.assign(contents, doc);
742
- const exception = new ClientLimitExceededException({
743
- $metadata: deserializeMetadata(parsedOutput),
744
- ...contents
745
- });
746
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
747
- }, "de_ClientLimitExceededExceptionRes");
748
- var de_InvalidArgumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
749
- const contents = (0, import_smithy_client.map)({});
750
- const data = parsedOutput.body;
751
- const doc = (0, import_smithy_client.take)(data, {
752
- Message: import_smithy_client.expectString
753
- });
754
- Object.assign(contents, doc);
755
- const exception = new InvalidArgumentException({
756
- $metadata: deserializeMetadata(parsedOutput),
757
- ...contents
758
- });
759
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
760
- }, "de_InvalidArgumentExceptionRes");
761
- var de_InvalidCodecPrivateDataExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
762
- const contents = (0, import_smithy_client.map)({});
763
- const data = parsedOutput.body;
764
- const doc = (0, import_smithy_client.take)(data, {
765
- Message: import_smithy_client.expectString
766
- });
767
- Object.assign(contents, doc);
768
- const exception = new InvalidCodecPrivateDataException({
769
- $metadata: deserializeMetadata(parsedOutput),
770
- ...contents
771
- });
772
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
773
- }, "de_InvalidCodecPrivateDataExceptionRes");
774
- var de_InvalidMediaFrameExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
775
- const contents = (0, import_smithy_client.map)({});
776
- const data = parsedOutput.body;
777
- const doc = (0, import_smithy_client.take)(data, {
778
- Message: import_smithy_client.expectString
779
- });
780
- Object.assign(contents, doc);
781
- const exception = new InvalidMediaFrameException({
782
- $metadata: deserializeMetadata(parsedOutput),
783
- ...contents
784
- });
785
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
786
- }, "de_InvalidMediaFrameExceptionRes");
787
- var de_MissingCodecPrivateDataExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
788
- const contents = (0, import_smithy_client.map)({});
789
- const data = parsedOutput.body;
790
- const doc = (0, import_smithy_client.take)(data, {
791
- Message: import_smithy_client.expectString
792
- });
793
- Object.assign(contents, doc);
794
- const exception = new MissingCodecPrivateDataException({
795
- $metadata: deserializeMetadata(parsedOutput),
796
- ...contents
797
- });
798
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
799
- }, "de_MissingCodecPrivateDataExceptionRes");
800
- var de_NoDataRetentionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
801
- const contents = (0, import_smithy_client.map)({});
802
- const data = parsedOutput.body;
803
- const doc = (0, import_smithy_client.take)(data, {
804
- Message: import_smithy_client.expectString
805
- });
806
- Object.assign(contents, doc);
807
- const exception = new NoDataRetentionException({
808
- $metadata: deserializeMetadata(parsedOutput),
809
- ...contents
810
- });
811
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
812
- }, "de_NoDataRetentionExceptionRes");
813
- var de_NotAuthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
814
- const contents = (0, import_smithy_client.map)({});
815
- const data = parsedOutput.body;
816
- const doc = (0, import_smithy_client.take)(data, {
817
- Message: import_smithy_client.expectString
818
- });
819
- Object.assign(contents, doc);
820
- const exception = new NotAuthorizedException({
821
- $metadata: deserializeMetadata(parsedOutput),
822
- ...contents
823
- });
824
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
825
- }, "de_NotAuthorizedExceptionRes");
826
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
827
- const contents = (0, import_smithy_client.map)({});
828
- const data = parsedOutput.body;
829
- const doc = (0, import_smithy_client.take)(data, {
830
- Message: import_smithy_client.expectString
831
- });
832
- Object.assign(contents, doc);
833
- const exception = new ResourceNotFoundException({
834
- $metadata: deserializeMetadata(parsedOutput),
835
- ...contents
836
- });
837
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
838
- }, "de_ResourceNotFoundExceptionRes");
839
- var de_UnsupportedStreamMediaTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
840
- const contents = (0, import_smithy_client.map)({});
841
- const data = parsedOutput.body;
842
- const doc = (0, import_smithy_client.take)(data, {
843
- Message: import_smithy_client.expectString
844
- });
845
- Object.assign(contents, doc);
846
- const exception = new UnsupportedStreamMediaTypeException({
847
- $metadata: deserializeMetadata(parsedOutput),
848
- ...contents
849
- });
850
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
851
- }, "de_UnsupportedStreamMediaTypeExceptionRes");
852
- var se_ClipFragmentSelector = /* @__PURE__ */ __name((input, context) => {
853
- return (0, import_smithy_client.take)(input, {
854
- FragmentSelectorType: [],
855
- TimestampRange: /* @__PURE__ */ __name((_) => se_ClipTimestampRange(_, context), "TimestampRange")
856
- });
857
- }, "se_ClipFragmentSelector");
858
- var se_ClipTimestampRange = /* @__PURE__ */ __name((input, context) => {
859
- return (0, import_smithy_client.take)(input, {
860
- EndTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "EndTimestamp"),
861
- StartTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "StartTimestamp")
862
- });
863
- }, "se_ClipTimestampRange");
864
- var se_DASHFragmentSelector = /* @__PURE__ */ __name((input, context) => {
865
- return (0, import_smithy_client.take)(input, {
866
- FragmentSelectorType: [],
867
- TimestampRange: /* @__PURE__ */ __name((_) => se_DASHTimestampRange(_, context), "TimestampRange")
868
- });
869
- }, "se_DASHFragmentSelector");
870
- var se_DASHTimestampRange = /* @__PURE__ */ __name((input, context) => {
871
- return (0, import_smithy_client.take)(input, {
872
- EndTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "EndTimestamp"),
873
- StartTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "StartTimestamp")
874
- });
875
- }, "se_DASHTimestampRange");
876
- var se_FragmentSelector = /* @__PURE__ */ __name((input, context) => {
877
- return (0, import_smithy_client.take)(input, {
878
- FragmentSelectorType: [],
879
- TimestampRange: /* @__PURE__ */ __name((_) => se_TimestampRange(_, context), "TimestampRange")
880
- });
881
- }, "se_FragmentSelector");
882
- var se_HLSFragmentSelector = /* @__PURE__ */ __name((input, context) => {
883
- return (0, import_smithy_client.take)(input, {
884
- FragmentSelectorType: [],
885
- TimestampRange: /* @__PURE__ */ __name((_) => se_HLSTimestampRange(_, context), "TimestampRange")
886
- });
887
- }, "se_HLSFragmentSelector");
888
- var se_HLSTimestampRange = /* @__PURE__ */ __name((input, context) => {
889
- return (0, import_smithy_client.take)(input, {
890
- EndTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "EndTimestamp"),
891
- StartTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "StartTimestamp")
892
- });
893
- }, "se_HLSTimestampRange");
894
- var se_TimestampRange = /* @__PURE__ */ __name((input, context) => {
895
- return (0, import_smithy_client.take)(input, {
896
- EndTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "EndTimestamp"),
897
- StartTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "StartTimestamp")
898
- });
899
- }, "se_TimestampRange");
900
- var de_Fragment = /* @__PURE__ */ __name((output, context) => {
901
- return (0, import_smithy_client.take)(output, {
902
- FragmentLengthInMilliseconds: import_smithy_client.expectLong,
903
- FragmentNumber: import_smithy_client.expectString,
904
- FragmentSizeInBytes: import_smithy_client.expectLong,
905
- ProducerTimestamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "ProducerTimestamp"),
906
- ServerTimestamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "ServerTimestamp")
907
- });
908
- }, "de_Fragment");
909
- var de_FragmentList = /* @__PURE__ */ __name((output, context) => {
910
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
911
- return de_Fragment(entry, context);
912
- });
913
- return retVal;
914
- }, "de_FragmentList");
915
- var de_Image = /* @__PURE__ */ __name((output, context) => {
916
- return (0, import_smithy_client.take)(output, {
917
- Error: import_smithy_client.expectString,
918
- ImageContent: import_smithy_client.expectString,
919
- TimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "TimeStamp")
920
- });
921
- }, "de_Image");
922
- var de_Images = /* @__PURE__ */ __name((output, context) => {
923
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
924
- return de_Image(entry, context);
925
- });
926
- return retVal;
927
- }, "de_Images");
928
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
929
- httpStatusCode: output.statusCode,
930
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
931
- extendedRequestId: output.headers["x-amz-id-2"],
932
- cfId: output.headers["x-amz-cf-id"]
933
- }), "deserializeMetadata");
934
- var _CT = "ContentType";
935
- var _ct = "content-type";
936
-
937
- // src/commands/GetClipCommand.ts
938
- var GetClipCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
939
- return [
940
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
941
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
942
- ];
943
- }).s("AWSAcuityReader", "GetClip", {}).n("KinesisVideoArchivedMediaClient", "GetClipCommand").f(void 0, GetClipOutputFilterSensitiveLog).ser(se_GetClipCommand).de(de_GetClipCommand).build() {
944
- static {
945
- __name(this, "GetClipCommand");
946
- }
696
+ const se_FragmentSelector = (input, context) => {
697
+ return smithyClient.take(input, {
698
+ FragmentSelectorType: [],
699
+ TimestampRange: (_) => se_TimestampRange(_),
700
+ });
947
701
  };
948
-
949
- // src/commands/GetDASHStreamingSessionURLCommand.ts
950
-
951
-
952
-
953
- var GetDASHStreamingSessionURLCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
954
- return [
955
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
956
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
957
- ];
958
- }).s("AWSAcuityReader", "GetDASHStreamingSessionURL", {}).n("KinesisVideoArchivedMediaClient", "GetDASHStreamingSessionURLCommand").f(void 0, void 0).ser(se_GetDASHStreamingSessionURLCommand).de(de_GetDASHStreamingSessionURLCommand).build() {
959
- static {
960
- __name(this, "GetDASHStreamingSessionURLCommand");
961
- }
702
+ const se_HLSFragmentSelector = (input, context) => {
703
+ return smithyClient.take(input, {
704
+ FragmentSelectorType: [],
705
+ TimestampRange: (_) => se_HLSTimestampRange(_),
706
+ });
962
707
  };
963
-
964
- // src/commands/GetHLSStreamingSessionURLCommand.ts
965
-
966
-
967
-
968
- var GetHLSStreamingSessionURLCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
969
- return [
970
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
971
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
972
- ];
973
- }).s("AWSAcuityReader", "GetHLSStreamingSessionURL", {}).n("KinesisVideoArchivedMediaClient", "GetHLSStreamingSessionURLCommand").f(void 0, void 0).ser(se_GetHLSStreamingSessionURLCommand).de(de_GetHLSStreamingSessionURLCommand).build() {
974
- static {
975
- __name(this, "GetHLSStreamingSessionURLCommand");
976
- }
708
+ const se_HLSTimestampRange = (input, context) => {
709
+ return smithyClient.take(input, {
710
+ EndTimestamp: (_) => _.getTime() / 1_000,
711
+ StartTimestamp: (_) => _.getTime() / 1_000,
712
+ });
977
713
  };
978
-
979
- // src/commands/GetImagesCommand.ts
980
-
981
-
982
-
983
- var GetImagesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
984
- return [
985
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
986
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
987
- ];
988
- }).s("AWSAcuityReader", "GetImages", {}).n("KinesisVideoArchivedMediaClient", "GetImagesCommand").f(void 0, void 0).ser(se_GetImagesCommand).de(de_GetImagesCommand).build() {
989
- static {
990
- __name(this, "GetImagesCommand");
991
- }
714
+ const se_TimestampRange = (input, context) => {
715
+ return smithyClient.take(input, {
716
+ EndTimestamp: (_) => _.getTime() / 1_000,
717
+ StartTimestamp: (_) => _.getTime() / 1_000,
718
+ });
992
719
  };
993
-
994
- // src/commands/GetMediaForFragmentListCommand.ts
995
-
996
-
997
-
998
- var GetMediaForFragmentListCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
999
- return [
1000
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1001
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1002
- ];
1003
- }).s("AWSAcuityReader", "GetMediaForFragmentList", {}).n("KinesisVideoArchivedMediaClient", "GetMediaForFragmentListCommand").f(void 0, GetMediaForFragmentListOutputFilterSensitiveLog).ser(se_GetMediaForFragmentListCommand).de(de_GetMediaForFragmentListCommand).build() {
1004
- static {
1005
- __name(this, "GetMediaForFragmentListCommand");
1006
- }
720
+ const de_Fragment = (output, context) => {
721
+ return smithyClient.take(output, {
722
+ FragmentLengthInMilliseconds: smithyClient.expectLong,
723
+ FragmentNumber: smithyClient.expectString,
724
+ FragmentSizeInBytes: smithyClient.expectLong,
725
+ ProducerTimestamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
726
+ ServerTimestamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
727
+ });
1007
728
  };
1008
-
1009
- // src/commands/ListFragmentsCommand.ts
1010
-
1011
-
1012
-
1013
- var ListFragmentsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1014
- return [
1015
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1016
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1017
- ];
1018
- }).s("AWSAcuityReader", "ListFragments", {}).n("KinesisVideoArchivedMediaClient", "ListFragmentsCommand").f(void 0, void 0).ser(se_ListFragmentsCommand).de(de_ListFragmentsCommand).build() {
1019
- static {
1020
- __name(this, "ListFragmentsCommand");
1021
- }
729
+ const de_FragmentList = (output, context) => {
730
+ const retVal = (output || [])
731
+ .filter((e) => e != null)
732
+ .map((entry) => {
733
+ return de_Fragment(entry);
734
+ });
735
+ return retVal;
1022
736
  };
1023
-
1024
- // src/KinesisVideoArchivedMedia.ts
1025
- var commands = {
1026
- GetClipCommand,
1027
- GetDASHStreamingSessionURLCommand,
1028
- GetHLSStreamingSessionURLCommand,
1029
- GetImagesCommand,
1030
- GetMediaForFragmentListCommand,
1031
- ListFragmentsCommand
737
+ const de_Image = (output, context) => {
738
+ return smithyClient.take(output, {
739
+ Error: smithyClient.expectString,
740
+ ImageContent: smithyClient.expectString,
741
+ TimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
742
+ });
1032
743
  };
1033
- var KinesisVideoArchivedMedia = class extends KinesisVideoArchivedMediaClient {
1034
- static {
1035
- __name(this, "KinesisVideoArchivedMedia");
1036
- }
744
+ const de_Images = (output, context) => {
745
+ const retVal = (output || [])
746
+ .filter((e) => e != null)
747
+ .map((entry) => {
748
+ return de_Image(entry);
749
+ });
750
+ return retVal;
1037
751
  };
1038
- (0, import_smithy_client.createAggregatedClient)(commands, KinesisVideoArchivedMedia);
1039
-
1040
- // src/pagination/GetImagesPaginator.ts
1041
-
1042
- var paginateGetImages = (0, import_core.createPaginator)(KinesisVideoArchivedMediaClient, GetImagesCommand, "NextToken", "NextToken", "MaxResults");
1043
-
1044
- // src/pagination/ListFragmentsPaginator.ts
1045
-
1046
- var paginateListFragments = (0, import_core.createPaginator)(KinesisVideoArchivedMediaClient, ListFragmentsCommand, "NextToken", "NextToken", "MaxResults");
1047
- // Annotate the CommonJS export names for ESM import in node:
1048
-
1049
- 0 && (module.exports = {
1050
- KinesisVideoArchivedMediaServiceException,
1051
- __Client,
1052
- KinesisVideoArchivedMediaClient,
1053
- KinesisVideoArchivedMedia,
1054
- $Command,
1055
- GetClipCommand,
1056
- GetDASHStreamingSessionURLCommand,
1057
- GetHLSStreamingSessionURLCommand,
1058
- GetImagesCommand,
1059
- GetMediaForFragmentListCommand,
1060
- ListFragmentsCommand,
1061
- paginateGetImages,
1062
- paginateListFragments,
1063
- ClientLimitExceededException,
1064
- ClipFragmentSelectorType,
1065
- InvalidArgumentException,
1066
- InvalidCodecPrivateDataException,
1067
- InvalidMediaFrameException,
1068
- MissingCodecPrivateDataException,
1069
- NoDataRetentionException,
1070
- NotAuthorizedException,
1071
- ResourceNotFoundException,
1072
- UnsupportedStreamMediaTypeException,
1073
- DASHFragmentSelectorType,
1074
- DASHDisplayFragmentNumber,
1075
- DASHDisplayFragmentTimestamp,
1076
- DASHPlaybackMode,
1077
- ContainerFormat,
1078
- HLSDiscontinuityMode,
1079
- HLSDisplayFragmentTimestamp,
1080
- HLSFragmentSelectorType,
1081
- HLSPlaybackMode,
1082
- Format,
1083
- FormatConfigKey,
1084
- ImageSelectorType,
1085
- ImageError,
1086
- FragmentSelectorType,
1087
- GetClipOutputFilterSensitiveLog,
1088
- GetMediaForFragmentListOutputFilterSensitiveLog
752
+ const deserializeMetadata = (output) => ({
753
+ httpStatusCode: output.statusCode,
754
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
755
+ extendedRequestId: output.headers["x-amz-id-2"],
756
+ cfId: output.headers["x-amz-cf-id"],
1089
757
  });
1090
-
758
+ const _CT = "ContentType";
759
+ const _ct = "content-type";
760
+
761
+ class GetClipCommand extends smithyClient.Command
762
+ .classBuilder()
763
+ .ep(commonParams)
764
+ .m(function (Command, cs, config, o) {
765
+ return [
766
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
767
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
768
+ ];
769
+ })
770
+ .s("AWSAcuityReader", "GetClip", {})
771
+ .n("KinesisVideoArchivedMediaClient", "GetClipCommand")
772
+ .f(void 0, GetClipOutputFilterSensitiveLog)
773
+ .ser(se_GetClipCommand)
774
+ .de(de_GetClipCommand)
775
+ .build() {
776
+ }
777
+
778
+ class GetDASHStreamingSessionURLCommand extends smithyClient.Command
779
+ .classBuilder()
780
+ .ep(commonParams)
781
+ .m(function (Command, cs, config, o) {
782
+ return [
783
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
784
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
785
+ ];
786
+ })
787
+ .s("AWSAcuityReader", "GetDASHStreamingSessionURL", {})
788
+ .n("KinesisVideoArchivedMediaClient", "GetDASHStreamingSessionURLCommand")
789
+ .f(void 0, void 0)
790
+ .ser(se_GetDASHStreamingSessionURLCommand)
791
+ .de(de_GetDASHStreamingSessionURLCommand)
792
+ .build() {
793
+ }
794
+
795
+ class GetHLSStreamingSessionURLCommand extends smithyClient.Command
796
+ .classBuilder()
797
+ .ep(commonParams)
798
+ .m(function (Command, cs, config, o) {
799
+ return [
800
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
801
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
802
+ ];
803
+ })
804
+ .s("AWSAcuityReader", "GetHLSStreamingSessionURL", {})
805
+ .n("KinesisVideoArchivedMediaClient", "GetHLSStreamingSessionURLCommand")
806
+ .f(void 0, void 0)
807
+ .ser(se_GetHLSStreamingSessionURLCommand)
808
+ .de(de_GetHLSStreamingSessionURLCommand)
809
+ .build() {
810
+ }
811
+
812
+ class GetImagesCommand extends smithyClient.Command
813
+ .classBuilder()
814
+ .ep(commonParams)
815
+ .m(function (Command, cs, config, o) {
816
+ return [
817
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
818
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
819
+ ];
820
+ })
821
+ .s("AWSAcuityReader", "GetImages", {})
822
+ .n("KinesisVideoArchivedMediaClient", "GetImagesCommand")
823
+ .f(void 0, void 0)
824
+ .ser(se_GetImagesCommand)
825
+ .de(de_GetImagesCommand)
826
+ .build() {
827
+ }
828
+
829
+ class GetMediaForFragmentListCommand extends smithyClient.Command
830
+ .classBuilder()
831
+ .ep(commonParams)
832
+ .m(function (Command, cs, config, o) {
833
+ return [
834
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
835
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
836
+ ];
837
+ })
838
+ .s("AWSAcuityReader", "GetMediaForFragmentList", {})
839
+ .n("KinesisVideoArchivedMediaClient", "GetMediaForFragmentListCommand")
840
+ .f(void 0, GetMediaForFragmentListOutputFilterSensitiveLog)
841
+ .ser(se_GetMediaForFragmentListCommand)
842
+ .de(de_GetMediaForFragmentListCommand)
843
+ .build() {
844
+ }
845
+
846
+ class ListFragmentsCommand extends smithyClient.Command
847
+ .classBuilder()
848
+ .ep(commonParams)
849
+ .m(function (Command, cs, config, o) {
850
+ return [
851
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
852
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
853
+ ];
854
+ })
855
+ .s("AWSAcuityReader", "ListFragments", {})
856
+ .n("KinesisVideoArchivedMediaClient", "ListFragmentsCommand")
857
+ .f(void 0, void 0)
858
+ .ser(se_ListFragmentsCommand)
859
+ .de(de_ListFragmentsCommand)
860
+ .build() {
861
+ }
862
+
863
+ const commands = {
864
+ GetClipCommand,
865
+ GetDASHStreamingSessionURLCommand,
866
+ GetHLSStreamingSessionURLCommand,
867
+ GetImagesCommand,
868
+ GetMediaForFragmentListCommand,
869
+ ListFragmentsCommand,
870
+ };
871
+ class KinesisVideoArchivedMedia extends KinesisVideoArchivedMediaClient {
872
+ }
873
+ smithyClient.createAggregatedClient(commands, KinesisVideoArchivedMedia);
874
+
875
+ const paginateGetImages = core.createPaginator(KinesisVideoArchivedMediaClient, GetImagesCommand, "NextToken", "NextToken", "MaxResults");
876
+
877
+ const paginateListFragments = core.createPaginator(KinesisVideoArchivedMediaClient, ListFragmentsCommand, "NextToken", "NextToken", "MaxResults");
878
+
879
+ Object.defineProperty(exports, "$Command", {
880
+ enumerable: true,
881
+ get: function () { return smithyClient.Command; }
882
+ });
883
+ Object.defineProperty(exports, "__Client", {
884
+ enumerable: true,
885
+ get: function () { return smithyClient.Client; }
886
+ });
887
+ exports.ClientLimitExceededException = ClientLimitExceededException;
888
+ exports.ClipFragmentSelectorType = ClipFragmentSelectorType;
889
+ exports.ContainerFormat = ContainerFormat;
890
+ exports.DASHDisplayFragmentNumber = DASHDisplayFragmentNumber;
891
+ exports.DASHDisplayFragmentTimestamp = DASHDisplayFragmentTimestamp;
892
+ exports.DASHFragmentSelectorType = DASHFragmentSelectorType;
893
+ exports.DASHPlaybackMode = DASHPlaybackMode;
894
+ exports.Format = Format;
895
+ exports.FormatConfigKey = FormatConfigKey;
896
+ exports.FragmentSelectorType = FragmentSelectorType;
897
+ exports.GetClipCommand = GetClipCommand;
898
+ exports.GetClipOutputFilterSensitiveLog = GetClipOutputFilterSensitiveLog;
899
+ exports.GetDASHStreamingSessionURLCommand = GetDASHStreamingSessionURLCommand;
900
+ exports.GetHLSStreamingSessionURLCommand = GetHLSStreamingSessionURLCommand;
901
+ exports.GetImagesCommand = GetImagesCommand;
902
+ exports.GetMediaForFragmentListCommand = GetMediaForFragmentListCommand;
903
+ exports.GetMediaForFragmentListOutputFilterSensitiveLog = GetMediaForFragmentListOutputFilterSensitiveLog;
904
+ exports.HLSDiscontinuityMode = HLSDiscontinuityMode;
905
+ exports.HLSDisplayFragmentTimestamp = HLSDisplayFragmentTimestamp;
906
+ exports.HLSFragmentSelectorType = HLSFragmentSelectorType;
907
+ exports.HLSPlaybackMode = HLSPlaybackMode;
908
+ exports.ImageError = ImageError;
909
+ exports.ImageSelectorType = ImageSelectorType;
910
+ exports.InvalidArgumentException = InvalidArgumentException;
911
+ exports.InvalidCodecPrivateDataException = InvalidCodecPrivateDataException;
912
+ exports.InvalidMediaFrameException = InvalidMediaFrameException;
913
+ exports.KinesisVideoArchivedMedia = KinesisVideoArchivedMedia;
914
+ exports.KinesisVideoArchivedMediaClient = KinesisVideoArchivedMediaClient;
915
+ exports.KinesisVideoArchivedMediaServiceException = KinesisVideoArchivedMediaServiceException;
916
+ exports.ListFragmentsCommand = ListFragmentsCommand;
917
+ exports.MissingCodecPrivateDataException = MissingCodecPrivateDataException;
918
+ exports.NoDataRetentionException = NoDataRetentionException;
919
+ exports.NotAuthorizedException = NotAuthorizedException;
920
+ exports.ResourceNotFoundException = ResourceNotFoundException;
921
+ exports.UnsupportedStreamMediaTypeException = UnsupportedStreamMediaTypeException;
922
+ exports.paginateGetImages = paginateGetImages;
923
+ exports.paginateListFragments = paginateListFragments;