@aws-sdk/client-mediastore-data 3.52.0 → 3.54.1
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/CHANGELOG.md +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/MediaStoreDataServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +58 -1
- package/dist-cjs/protocols/Aws_restJson1.js +62 -163
- package/dist-es/index.js +1 -0
- package/dist-es/models/MediaStoreDataServiceException.js +12 -0
- package/dist-es/models/models_0.js +54 -1
- package/dist-es/protocols/Aws_restJson1.js +109 -188
- package/dist-types/MediaStoreDataClient.d.ts +2 -2
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/MediaStoreDataServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +30 -13
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/MediaStoreDataClient.d.ts +2 -2
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/MediaStoreDataServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +22 -13
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/package.json +27 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.54.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.0...v3.54.1) (2022-03-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-mediastore-data
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.54.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.53.1...v3.54.0) (2022-03-11)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/client-mediastore-data
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.53.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.52.0...v3.53.0) (2022-02-24)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **clients:** generate service exceptions as classes ([#3267](https://github.com/aws/aws-sdk-js-v3/issues/3267)) ([ca64fee](https://github.com/aws/aws-sdk-js-v3/commit/ca64feed3351c394c07dc26b782a5760a396a074))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [3.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @aws-sdk/client-mediastore-data
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaStoreDataServiceException = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./MediaStoreData"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./MediaStoreDataClient"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./commands"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./models"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./pagination"), exports);
|
|
10
|
+
var MediaStoreDataServiceException_1 = require("./models/MediaStoreDataServiceException");
|
|
11
|
+
Object.defineProperty(exports, "MediaStoreDataServiceException", { enumerable: true, get: function () { return MediaStoreDataServiceException_1.MediaStoreDataServiceException; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaStoreDataServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
class MediaStoreDataServiceException extends smithy_client_1.ServiceException {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
Object.setPrototypeOf(this, MediaStoreDataServiceException.prototype);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.MediaStoreDataServiceException = MediaStoreDataServiceException;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PutObjectResponse = exports.PutObjectRequest = exports.UploadAvailability = exports.StorageClass = exports.ListItemsResponse = exports.ListItemsRequest = exports.Item = exports.ItemType = exports.GetObjectResponse = exports.GetObjectRequest = exports.DescribeObjectResponse = exports.DescribeObjectRequest = exports.DeleteObjectResponse = exports.DeleteObjectRequest = void 0;
|
|
3
|
+
exports.PutObjectResponse = exports.PutObjectRequest = exports.UploadAvailability = exports.StorageClass = exports.ListItemsResponse = exports.ListItemsRequest = exports.Item = exports.ItemType = exports.RequestedRangeNotSatisfiableException = exports.GetObjectResponse = exports.GetObjectRequest = exports.DescribeObjectResponse = exports.DescribeObjectRequest = exports.ObjectNotFoundException = exports.InternalServerError = exports.DeleteObjectResponse = exports.DeleteObjectRequest = exports.ContainerNotFoundException = void 0;
|
|
4
|
+
const MediaStoreDataServiceException_1 = require("./MediaStoreDataServiceException");
|
|
5
|
+
class ContainerNotFoundException extends MediaStoreDataServiceException_1.MediaStoreDataServiceException {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super({
|
|
8
|
+
name: "ContainerNotFoundException",
|
|
9
|
+
$fault: "client",
|
|
10
|
+
...opts,
|
|
11
|
+
});
|
|
12
|
+
this.name = "ContainerNotFoundException";
|
|
13
|
+
this.$fault = "client";
|
|
14
|
+
Object.setPrototypeOf(this, ContainerNotFoundException.prototype);
|
|
15
|
+
this.Message = opts.Message;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ContainerNotFoundException = ContainerNotFoundException;
|
|
4
19
|
var DeleteObjectRequest;
|
|
5
20
|
(function (DeleteObjectRequest) {
|
|
6
21
|
DeleteObjectRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -13,6 +28,34 @@ var DeleteObjectResponse;
|
|
|
13
28
|
...obj,
|
|
14
29
|
});
|
|
15
30
|
})(DeleteObjectResponse = exports.DeleteObjectResponse || (exports.DeleteObjectResponse = {}));
|
|
31
|
+
class InternalServerError extends MediaStoreDataServiceException_1.MediaStoreDataServiceException {
|
|
32
|
+
constructor(opts) {
|
|
33
|
+
super({
|
|
34
|
+
name: "InternalServerError",
|
|
35
|
+
$fault: "server",
|
|
36
|
+
...opts,
|
|
37
|
+
});
|
|
38
|
+
this.name = "InternalServerError";
|
|
39
|
+
this.$fault = "server";
|
|
40
|
+
Object.setPrototypeOf(this, InternalServerError.prototype);
|
|
41
|
+
this.Message = opts.Message;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.InternalServerError = InternalServerError;
|
|
45
|
+
class ObjectNotFoundException extends MediaStoreDataServiceException_1.MediaStoreDataServiceException {
|
|
46
|
+
constructor(opts) {
|
|
47
|
+
super({
|
|
48
|
+
name: "ObjectNotFoundException",
|
|
49
|
+
$fault: "client",
|
|
50
|
+
...opts,
|
|
51
|
+
});
|
|
52
|
+
this.name = "ObjectNotFoundException";
|
|
53
|
+
this.$fault = "client";
|
|
54
|
+
Object.setPrototypeOf(this, ObjectNotFoundException.prototype);
|
|
55
|
+
this.Message = opts.Message;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.ObjectNotFoundException = ObjectNotFoundException;
|
|
16
59
|
var DescribeObjectRequest;
|
|
17
60
|
(function (DescribeObjectRequest) {
|
|
18
61
|
DescribeObjectRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -37,6 +80,20 @@ var GetObjectResponse;
|
|
|
37
80
|
...obj,
|
|
38
81
|
});
|
|
39
82
|
})(GetObjectResponse = exports.GetObjectResponse || (exports.GetObjectResponse = {}));
|
|
83
|
+
class RequestedRangeNotSatisfiableException extends MediaStoreDataServiceException_1.MediaStoreDataServiceException {
|
|
84
|
+
constructor(opts) {
|
|
85
|
+
super({
|
|
86
|
+
name: "RequestedRangeNotSatisfiableException",
|
|
87
|
+
$fault: "client",
|
|
88
|
+
...opts,
|
|
89
|
+
});
|
|
90
|
+
this.name = "RequestedRangeNotSatisfiableException";
|
|
91
|
+
this.$fault = "client";
|
|
92
|
+
Object.setPrototypeOf(this, RequestedRangeNotSatisfiableException.prototype);
|
|
93
|
+
this.Message = opts.Message;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.RequestedRangeNotSatisfiableException = RequestedRangeNotSatisfiableException;
|
|
40
97
|
var ItemType;
|
|
41
98
|
(function (ItemType) {
|
|
42
99
|
ItemType["FOLDER"] = "FOLDER";
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_restJson1PutObjectCommand = exports.deserializeAws_restJson1ListItemsCommand = exports.deserializeAws_restJson1GetObjectCommand = exports.deserializeAws_restJson1DescribeObjectCommand = exports.deserializeAws_restJson1DeleteObjectCommand = exports.serializeAws_restJson1PutObjectCommand = exports.serializeAws_restJson1ListItemsCommand = exports.serializeAws_restJson1GetObjectCommand = exports.serializeAws_restJson1DescribeObjectCommand = exports.serializeAws_restJson1DeleteObjectCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const MediaStoreDataServiceException_1 = require("../models/MediaStoreDataServiceException");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
6
8
|
const serializeAws_restJson1DeleteObjectCommand = async (input, context) => {
|
|
7
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
10
|
const headers = {};
|
|
@@ -177,43 +179,22 @@ const deserializeAws_restJson1DeleteObjectCommandError = async (output, context)
|
|
|
177
179
|
switch (errorCode) {
|
|
178
180
|
case "ContainerNotFoundException":
|
|
179
181
|
case "com.amazonaws.mediastoredata#ContainerNotFoundException":
|
|
180
|
-
|
|
181
|
-
...(await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)),
|
|
182
|
-
name: errorCode,
|
|
183
|
-
$metadata: deserializeMetadata(output),
|
|
184
|
-
};
|
|
185
|
-
break;
|
|
182
|
+
throw await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context);
|
|
186
183
|
case "InternalServerError":
|
|
187
184
|
case "com.amazonaws.mediastoredata#InternalServerError":
|
|
188
|
-
|
|
189
|
-
...(await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)),
|
|
190
|
-
name: errorCode,
|
|
191
|
-
$metadata: deserializeMetadata(output),
|
|
192
|
-
};
|
|
193
|
-
break;
|
|
185
|
+
throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
|
|
194
186
|
case "ObjectNotFoundException":
|
|
195
187
|
case "com.amazonaws.mediastoredata#ObjectNotFoundException":
|
|
196
|
-
|
|
197
|
-
...(await deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context)),
|
|
198
|
-
name: errorCode,
|
|
199
|
-
$metadata: deserializeMetadata(output),
|
|
200
|
-
};
|
|
201
|
-
break;
|
|
188
|
+
throw await deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context);
|
|
202
189
|
default:
|
|
203
190
|
const parsedBody = parsedOutput.body;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
...parsedBody,
|
|
207
|
-
name: `${errorCode}`,
|
|
208
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
191
|
+
response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
|
|
192
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
209
193
|
$fault: "client",
|
|
210
194
|
$metadata: deserializeMetadata(output),
|
|
211
|
-
};
|
|
195
|
+
});
|
|
196
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
212
197
|
}
|
|
213
|
-
const message = response.message || response.Message || errorCode;
|
|
214
|
-
response.message = message;
|
|
215
|
-
delete response.Message;
|
|
216
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
217
198
|
};
|
|
218
199
|
const deserializeAws_restJson1DescribeObjectCommand = async (output, context) => {
|
|
219
200
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -257,43 +238,22 @@ const deserializeAws_restJson1DescribeObjectCommandError = async (output, contex
|
|
|
257
238
|
switch (errorCode) {
|
|
258
239
|
case "ContainerNotFoundException":
|
|
259
240
|
case "com.amazonaws.mediastoredata#ContainerNotFoundException":
|
|
260
|
-
|
|
261
|
-
...(await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)),
|
|
262
|
-
name: errorCode,
|
|
263
|
-
$metadata: deserializeMetadata(output),
|
|
264
|
-
};
|
|
265
|
-
break;
|
|
241
|
+
throw await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context);
|
|
266
242
|
case "InternalServerError":
|
|
267
243
|
case "com.amazonaws.mediastoredata#InternalServerError":
|
|
268
|
-
|
|
269
|
-
...(await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)),
|
|
270
|
-
name: errorCode,
|
|
271
|
-
$metadata: deserializeMetadata(output),
|
|
272
|
-
};
|
|
273
|
-
break;
|
|
244
|
+
throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
|
|
274
245
|
case "ObjectNotFoundException":
|
|
275
246
|
case "com.amazonaws.mediastoredata#ObjectNotFoundException":
|
|
276
|
-
|
|
277
|
-
...(await deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context)),
|
|
278
|
-
name: errorCode,
|
|
279
|
-
$metadata: deserializeMetadata(output),
|
|
280
|
-
};
|
|
281
|
-
break;
|
|
247
|
+
throw await deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context);
|
|
282
248
|
default:
|
|
283
249
|
const parsedBody = parsedOutput.body;
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
...parsedBody,
|
|
287
|
-
name: `${errorCode}`,
|
|
288
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
250
|
+
response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
|
|
251
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
289
252
|
$fault: "client",
|
|
290
253
|
$metadata: deserializeMetadata(output),
|
|
291
|
-
};
|
|
254
|
+
});
|
|
255
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
292
256
|
}
|
|
293
|
-
const message = response.message || response.Message || errorCode;
|
|
294
|
-
response.message = message;
|
|
295
|
-
delete response.Message;
|
|
296
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
297
257
|
};
|
|
298
258
|
const deserializeAws_restJson1GetObjectCommand = async (output, context) => {
|
|
299
259
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -347,51 +307,25 @@ const deserializeAws_restJson1GetObjectCommandError = async (output, context) =>
|
|
|
347
307
|
switch (errorCode) {
|
|
348
308
|
case "ContainerNotFoundException":
|
|
349
309
|
case "com.amazonaws.mediastoredata#ContainerNotFoundException":
|
|
350
|
-
|
|
351
|
-
...(await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)),
|
|
352
|
-
name: errorCode,
|
|
353
|
-
$metadata: deserializeMetadata(output),
|
|
354
|
-
};
|
|
355
|
-
break;
|
|
310
|
+
throw await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context);
|
|
356
311
|
case "InternalServerError":
|
|
357
312
|
case "com.amazonaws.mediastoredata#InternalServerError":
|
|
358
|
-
|
|
359
|
-
...(await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)),
|
|
360
|
-
name: errorCode,
|
|
361
|
-
$metadata: deserializeMetadata(output),
|
|
362
|
-
};
|
|
363
|
-
break;
|
|
313
|
+
throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
|
|
364
314
|
case "ObjectNotFoundException":
|
|
365
315
|
case "com.amazonaws.mediastoredata#ObjectNotFoundException":
|
|
366
|
-
|
|
367
|
-
...(await deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context)),
|
|
368
|
-
name: errorCode,
|
|
369
|
-
$metadata: deserializeMetadata(output),
|
|
370
|
-
};
|
|
371
|
-
break;
|
|
316
|
+
throw await deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context);
|
|
372
317
|
case "RequestedRangeNotSatisfiableException":
|
|
373
318
|
case "com.amazonaws.mediastoredata#RequestedRangeNotSatisfiableException":
|
|
374
|
-
|
|
375
|
-
...(await deserializeAws_restJson1RequestedRangeNotSatisfiableExceptionResponse(parsedOutput, context)),
|
|
376
|
-
name: errorCode,
|
|
377
|
-
$metadata: deserializeMetadata(output),
|
|
378
|
-
};
|
|
379
|
-
break;
|
|
319
|
+
throw await deserializeAws_restJson1RequestedRangeNotSatisfiableExceptionResponse(parsedOutput, context);
|
|
380
320
|
default:
|
|
381
321
|
const parsedBody = parsedOutput.body;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
...parsedBody,
|
|
385
|
-
name: `${errorCode}`,
|
|
386
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
322
|
+
response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
|
|
323
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
387
324
|
$fault: "client",
|
|
388
325
|
$metadata: deserializeMetadata(output),
|
|
389
|
-
};
|
|
326
|
+
});
|
|
327
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
390
328
|
}
|
|
391
|
-
const message = response.message || response.Message || errorCode;
|
|
392
|
-
response.message = message;
|
|
393
|
-
delete response.Message;
|
|
394
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
395
329
|
};
|
|
396
330
|
const deserializeAws_restJson1ListItemsCommand = async (output, context) => {
|
|
397
331
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -423,35 +357,19 @@ const deserializeAws_restJson1ListItemsCommandError = async (output, context) =>
|
|
|
423
357
|
switch (errorCode) {
|
|
424
358
|
case "ContainerNotFoundException":
|
|
425
359
|
case "com.amazonaws.mediastoredata#ContainerNotFoundException":
|
|
426
|
-
|
|
427
|
-
...(await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)),
|
|
428
|
-
name: errorCode,
|
|
429
|
-
$metadata: deserializeMetadata(output),
|
|
430
|
-
};
|
|
431
|
-
break;
|
|
360
|
+
throw await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context);
|
|
432
361
|
case "InternalServerError":
|
|
433
362
|
case "com.amazonaws.mediastoredata#InternalServerError":
|
|
434
|
-
|
|
435
|
-
...(await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)),
|
|
436
|
-
name: errorCode,
|
|
437
|
-
$metadata: deserializeMetadata(output),
|
|
438
|
-
};
|
|
439
|
-
break;
|
|
363
|
+
throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
|
|
440
364
|
default:
|
|
441
365
|
const parsedBody = parsedOutput.body;
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
...parsedBody,
|
|
445
|
-
name: `${errorCode}`,
|
|
446
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
366
|
+
response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
|
|
367
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
447
368
|
$fault: "client",
|
|
448
369
|
$metadata: deserializeMetadata(output),
|
|
449
|
-
};
|
|
370
|
+
});
|
|
371
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
450
372
|
}
|
|
451
|
-
const message = response.message || response.Message || errorCode;
|
|
452
|
-
response.message = message;
|
|
453
|
-
delete response.Message;
|
|
454
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
455
373
|
};
|
|
456
374
|
const deserializeAws_restJson1PutObjectCommand = async (output, context) => {
|
|
457
375
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -487,87 +405,67 @@ const deserializeAws_restJson1PutObjectCommandError = async (output, context) =>
|
|
|
487
405
|
switch (errorCode) {
|
|
488
406
|
case "ContainerNotFoundException":
|
|
489
407
|
case "com.amazonaws.mediastoredata#ContainerNotFoundException":
|
|
490
|
-
|
|
491
|
-
...(await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)),
|
|
492
|
-
name: errorCode,
|
|
493
|
-
$metadata: deserializeMetadata(output),
|
|
494
|
-
};
|
|
495
|
-
break;
|
|
408
|
+
throw await deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context);
|
|
496
409
|
case "InternalServerError":
|
|
497
410
|
case "com.amazonaws.mediastoredata#InternalServerError":
|
|
498
|
-
|
|
499
|
-
...(await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)),
|
|
500
|
-
name: errorCode,
|
|
501
|
-
$metadata: deserializeMetadata(output),
|
|
502
|
-
};
|
|
503
|
-
break;
|
|
411
|
+
throw await deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context);
|
|
504
412
|
default:
|
|
505
413
|
const parsedBody = parsedOutput.body;
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
...parsedBody,
|
|
509
|
-
name: `${errorCode}`,
|
|
510
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
414
|
+
response = new MediaStoreDataServiceException_1.MediaStoreDataServiceException({
|
|
415
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
511
416
|
$fault: "client",
|
|
512
417
|
$metadata: deserializeMetadata(output),
|
|
513
|
-
};
|
|
418
|
+
});
|
|
419
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
514
420
|
}
|
|
515
|
-
const message = response.message || response.Message || errorCode;
|
|
516
|
-
response.message = message;
|
|
517
|
-
delete response.Message;
|
|
518
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
519
421
|
};
|
|
520
422
|
const deserializeAws_restJson1ContainerNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
521
|
-
const contents = {
|
|
522
|
-
name: "ContainerNotFoundException",
|
|
523
|
-
$fault: "client",
|
|
524
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
525
|
-
Message: undefined,
|
|
526
|
-
};
|
|
423
|
+
const contents = {};
|
|
527
424
|
const data = parsedOutput.body;
|
|
528
425
|
if (data.Message !== undefined && data.Message !== null) {
|
|
529
426
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
530
427
|
}
|
|
531
|
-
|
|
428
|
+
const exception = new models_0_1.ContainerNotFoundException({
|
|
429
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
430
|
+
...contents,
|
|
431
|
+
});
|
|
432
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
532
433
|
};
|
|
533
434
|
const deserializeAws_restJson1InternalServerErrorResponse = async (parsedOutput, context) => {
|
|
534
|
-
const contents = {
|
|
535
|
-
name: "InternalServerError",
|
|
536
|
-
$fault: "server",
|
|
537
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
538
|
-
Message: undefined,
|
|
539
|
-
};
|
|
435
|
+
const contents = {};
|
|
540
436
|
const data = parsedOutput.body;
|
|
541
437
|
if (data.Message !== undefined && data.Message !== null) {
|
|
542
438
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
543
439
|
}
|
|
544
|
-
|
|
440
|
+
const exception = new models_0_1.InternalServerError({
|
|
441
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
442
|
+
...contents,
|
|
443
|
+
});
|
|
444
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
545
445
|
};
|
|
546
446
|
const deserializeAws_restJson1ObjectNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
547
|
-
const contents = {
|
|
548
|
-
name: "ObjectNotFoundException",
|
|
549
|
-
$fault: "client",
|
|
550
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
551
|
-
Message: undefined,
|
|
552
|
-
};
|
|
447
|
+
const contents = {};
|
|
553
448
|
const data = parsedOutput.body;
|
|
554
449
|
if (data.Message !== undefined && data.Message !== null) {
|
|
555
450
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
556
451
|
}
|
|
557
|
-
|
|
452
|
+
const exception = new models_0_1.ObjectNotFoundException({
|
|
453
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
454
|
+
...contents,
|
|
455
|
+
});
|
|
456
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
558
457
|
};
|
|
559
458
|
const deserializeAws_restJson1RequestedRangeNotSatisfiableExceptionResponse = async (parsedOutput, context) => {
|
|
560
|
-
const contents = {
|
|
561
|
-
name: "RequestedRangeNotSatisfiableException",
|
|
562
|
-
$fault: "client",
|
|
563
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
564
|
-
Message: undefined,
|
|
565
|
-
};
|
|
459
|
+
const contents = {};
|
|
566
460
|
const data = parsedOutput.body;
|
|
567
461
|
if (data.Message !== undefined && data.Message !== null) {
|
|
568
462
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
569
463
|
}
|
|
570
|
-
|
|
464
|
+
const exception = new models_0_1.RequestedRangeNotSatisfiableException({
|
|
465
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
466
|
+
...contents,
|
|
467
|
+
});
|
|
468
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
571
469
|
};
|
|
572
470
|
const deserializeAws_restJson1Item = (output, context) => {
|
|
573
471
|
return {
|
|
@@ -582,7 +480,7 @@ const deserializeAws_restJson1Item = (output, context) => {
|
|
|
582
480
|
};
|
|
583
481
|
};
|
|
584
482
|
const deserializeAws_restJson1ItemList = (output, context) => {
|
|
585
|
-
|
|
483
|
+
const retVal = (output || [])
|
|
586
484
|
.filter((e) => e != null)
|
|
587
485
|
.map((entry) => {
|
|
588
486
|
if (entry === null) {
|
|
@@ -590,6 +488,7 @@ const deserializeAws_restJson1ItemList = (output, context) => {
|
|
|
590
488
|
}
|
|
591
489
|
return deserializeAws_restJson1Item(entry, context);
|
|
592
490
|
});
|
|
491
|
+
return retVal;
|
|
593
492
|
};
|
|
594
493
|
const deserializeMetadata = (output) => {
|
|
595
494
|
var _a;
|
package/dist-es/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
+
var MediaStoreDataServiceException = (function (_super) {
|
|
4
|
+
__extends(MediaStoreDataServiceException, _super);
|
|
5
|
+
function MediaStoreDataServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, MediaStoreDataServiceException.prototype);
|
|
8
|
+
return _this;
|
|
9
|
+
}
|
|
10
|
+
return MediaStoreDataServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { MediaStoreDataServiceException };
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
2
|
+
import { MediaStoreDataServiceException as __BaseException } from "./MediaStoreDataServiceException";
|
|
3
|
+
var ContainerNotFoundException = (function (_super) {
|
|
4
|
+
__extends(ContainerNotFoundException, _super);
|
|
5
|
+
function ContainerNotFoundException(opts) {
|
|
6
|
+
var _this = _super.call(this, __assign({ name: "ContainerNotFoundException", $fault: "client" }, opts)) || this;
|
|
7
|
+
_this.name = "ContainerNotFoundException";
|
|
8
|
+
_this.$fault = "client";
|
|
9
|
+
Object.setPrototypeOf(_this, ContainerNotFoundException.prototype);
|
|
10
|
+
_this.Message = opts.Message;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
return ContainerNotFoundException;
|
|
14
|
+
}(__BaseException));
|
|
15
|
+
export { ContainerNotFoundException };
|
|
2
16
|
export var DeleteObjectRequest;
|
|
3
17
|
(function (DeleteObjectRequest) {
|
|
4
18
|
DeleteObjectRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -7,6 +21,32 @@ export var DeleteObjectResponse;
|
|
|
7
21
|
(function (DeleteObjectResponse) {
|
|
8
22
|
DeleteObjectResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
9
23
|
})(DeleteObjectResponse || (DeleteObjectResponse = {}));
|
|
24
|
+
var InternalServerError = (function (_super) {
|
|
25
|
+
__extends(InternalServerError, _super);
|
|
26
|
+
function InternalServerError(opts) {
|
|
27
|
+
var _this = _super.call(this, __assign({ name: "InternalServerError", $fault: "server" }, opts)) || this;
|
|
28
|
+
_this.name = "InternalServerError";
|
|
29
|
+
_this.$fault = "server";
|
|
30
|
+
Object.setPrototypeOf(_this, InternalServerError.prototype);
|
|
31
|
+
_this.Message = opts.Message;
|
|
32
|
+
return _this;
|
|
33
|
+
}
|
|
34
|
+
return InternalServerError;
|
|
35
|
+
}(__BaseException));
|
|
36
|
+
export { InternalServerError };
|
|
37
|
+
var ObjectNotFoundException = (function (_super) {
|
|
38
|
+
__extends(ObjectNotFoundException, _super);
|
|
39
|
+
function ObjectNotFoundException(opts) {
|
|
40
|
+
var _this = _super.call(this, __assign({ name: "ObjectNotFoundException", $fault: "client" }, opts)) || this;
|
|
41
|
+
_this.name = "ObjectNotFoundException";
|
|
42
|
+
_this.$fault = "client";
|
|
43
|
+
Object.setPrototypeOf(_this, ObjectNotFoundException.prototype);
|
|
44
|
+
_this.Message = opts.Message;
|
|
45
|
+
return _this;
|
|
46
|
+
}
|
|
47
|
+
return ObjectNotFoundException;
|
|
48
|
+
}(__BaseException));
|
|
49
|
+
export { ObjectNotFoundException };
|
|
10
50
|
export var DescribeObjectRequest;
|
|
11
51
|
(function (DescribeObjectRequest) {
|
|
12
52
|
DescribeObjectRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -23,6 +63,19 @@ export var GetObjectResponse;
|
|
|
23
63
|
(function (GetObjectResponse) {
|
|
24
64
|
GetObjectResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
25
65
|
})(GetObjectResponse || (GetObjectResponse = {}));
|
|
66
|
+
var RequestedRangeNotSatisfiableException = (function (_super) {
|
|
67
|
+
__extends(RequestedRangeNotSatisfiableException, _super);
|
|
68
|
+
function RequestedRangeNotSatisfiableException(opts) {
|
|
69
|
+
var _this = _super.call(this, __assign({ name: "RequestedRangeNotSatisfiableException", $fault: "client" }, opts)) || this;
|
|
70
|
+
_this.name = "RequestedRangeNotSatisfiableException";
|
|
71
|
+
_this.$fault = "client";
|
|
72
|
+
Object.setPrototypeOf(_this, RequestedRangeNotSatisfiableException.prototype);
|
|
73
|
+
_this.Message = opts.Message;
|
|
74
|
+
return _this;
|
|
75
|
+
}
|
|
76
|
+
return RequestedRangeNotSatisfiableException;
|
|
77
|
+
}(__BaseException));
|
|
78
|
+
export { RequestedRangeNotSatisfiableException };
|
|
26
79
|
export var ItemType;
|
|
27
80
|
(function (ItemType) {
|
|
28
81
|
ItemType["FOLDER"] = "FOLDER";
|