@aws-sdk/client-mediastore-data 3.131.0 → 3.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +1 -1
- package/dist-cjs/commands/DeleteObjectCommand.js +2 -2
- package/dist-cjs/commands/DescribeObjectCommand.js +2 -2
- package/dist-cjs/commands/GetObjectCommand.js +2 -2
- package/dist-cjs/commands/ListItemsCommand.js +2 -2
- package/dist-cjs/commands/PutObjectCommand.js +2 -2
- package/dist-cjs/models/models_0.js +45 -67
- package/dist-cjs/protocols/Aws_restJson1.js +98 -191
- package/dist-es/commands/DeleteObjectCommand.js +3 -3
- package/dist-es/commands/DescribeObjectCommand.js +3 -3
- package/dist-es/commands/GetObjectCommand.js +3 -3
- package/dist-es/commands/ListItemsCommand.js +3 -3
- package/dist-es/commands/PutObjectCommand.js +3 -3
- package/dist-es/models/models_0.js +11 -44
- package/dist-es/protocols/Aws_restJson1.js +118 -183
- package/dist-types/models/models_0.d.ts +44 -66
- package/dist-types/ts3.4/models/models_0.d.ts +22 -44
- package/package.json +6 -6
|
@@ -13,14 +13,6 @@ var ContainerNotFoundException = (function (_super) {
|
|
|
13
13
|
return ContainerNotFoundException;
|
|
14
14
|
}(__BaseException));
|
|
15
15
|
export { ContainerNotFoundException };
|
|
16
|
-
export var DeleteObjectRequest;
|
|
17
|
-
(function (DeleteObjectRequest) {
|
|
18
|
-
DeleteObjectRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
19
|
-
})(DeleteObjectRequest || (DeleteObjectRequest = {}));
|
|
20
|
-
export var DeleteObjectResponse;
|
|
21
|
-
(function (DeleteObjectResponse) {
|
|
22
|
-
DeleteObjectResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
23
|
-
})(DeleteObjectResponse || (DeleteObjectResponse = {}));
|
|
24
16
|
var InternalServerError = (function (_super) {
|
|
25
17
|
__extends(InternalServerError, _super);
|
|
26
18
|
function InternalServerError(opts) {
|
|
@@ -47,22 +39,6 @@ var ObjectNotFoundException = (function (_super) {
|
|
|
47
39
|
return ObjectNotFoundException;
|
|
48
40
|
}(__BaseException));
|
|
49
41
|
export { ObjectNotFoundException };
|
|
50
|
-
export var DescribeObjectRequest;
|
|
51
|
-
(function (DescribeObjectRequest) {
|
|
52
|
-
DescribeObjectRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
53
|
-
})(DescribeObjectRequest || (DescribeObjectRequest = {}));
|
|
54
|
-
export var DescribeObjectResponse;
|
|
55
|
-
(function (DescribeObjectResponse) {
|
|
56
|
-
DescribeObjectResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
57
|
-
})(DescribeObjectResponse || (DescribeObjectResponse = {}));
|
|
58
|
-
export var GetObjectRequest;
|
|
59
|
-
(function (GetObjectRequest) {
|
|
60
|
-
GetObjectRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
61
|
-
})(GetObjectRequest || (GetObjectRequest = {}));
|
|
62
|
-
export var GetObjectResponse;
|
|
63
|
-
(function (GetObjectResponse) {
|
|
64
|
-
GetObjectResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
65
|
-
})(GetObjectResponse || (GetObjectResponse = {}));
|
|
66
42
|
var RequestedRangeNotSatisfiableException = (function (_super) {
|
|
67
43
|
__extends(RequestedRangeNotSatisfiableException, _super);
|
|
68
44
|
function RequestedRangeNotSatisfiableException(opts) {
|
|
@@ -81,18 +57,6 @@ export var ItemType;
|
|
|
81
57
|
ItemType["FOLDER"] = "FOLDER";
|
|
82
58
|
ItemType["OBJECT"] = "OBJECT";
|
|
83
59
|
})(ItemType || (ItemType = {}));
|
|
84
|
-
export var Item;
|
|
85
|
-
(function (Item) {
|
|
86
|
-
Item.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
87
|
-
})(Item || (Item = {}));
|
|
88
|
-
export var ListItemsRequest;
|
|
89
|
-
(function (ListItemsRequest) {
|
|
90
|
-
ListItemsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
91
|
-
})(ListItemsRequest || (ListItemsRequest = {}));
|
|
92
|
-
export var ListItemsResponse;
|
|
93
|
-
(function (ListItemsResponse) {
|
|
94
|
-
ListItemsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
95
|
-
})(ListItemsResponse || (ListItemsResponse = {}));
|
|
96
60
|
export var StorageClass;
|
|
97
61
|
(function (StorageClass) {
|
|
98
62
|
StorageClass["TEMPORAL"] = "TEMPORAL";
|
|
@@ -102,11 +66,14 @@ export var UploadAvailability;
|
|
|
102
66
|
UploadAvailability["STANDARD"] = "STANDARD";
|
|
103
67
|
UploadAvailability["STREAMING"] = "STREAMING";
|
|
104
68
|
})(UploadAvailability || (UploadAvailability = {}));
|
|
105
|
-
export var
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
export var
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
69
|
+
export var DeleteObjectRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
70
|
+
export var DeleteObjectResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
71
|
+
export var DescribeObjectRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
72
|
+
export var DescribeObjectResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
73
|
+
export var GetObjectRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
74
|
+
export var GetObjectResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
75
|
+
export var ItemFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
76
|
+
export var ListItemsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
77
|
+
export var ListItemsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
78
|
+
export var PutObjectRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
79
|
+
export var PutObjectResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString,
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc7231DateTime as __parseRfc7231DateTime, resolvedPath as __resolvedPath, strictParseLong as __strictParseLong, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { MediaStoreDataServiceException as __BaseException } from "../models/MediaStoreDataServiceException";
|
|
5
5
|
import { ContainerNotFoundException, InternalServerError, ObjectNotFoundException, RequestedRangeNotSatisfiableException, } from "../models/models_0";
|
|
6
6
|
export var serializeAws_restJson1DeleteObjectCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
8
|
return __generator(this, function (_c) {
|
|
9
9
|
switch (_c.label) {
|
|
10
10
|
case 0: return [4, context.endpoint()];
|
|
@@ -12,19 +12,7 @@ export var serializeAws_restJson1DeleteObjectCommand = function (input, context)
|
|
|
12
12
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
13
|
headers = {};
|
|
14
14
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/{Path+}";
|
|
15
|
-
|
|
16
|
-
labelValue = input.Path;
|
|
17
|
-
if (labelValue.length <= 0) {
|
|
18
|
-
throw new Error("Empty value provided for input HTTP label: Path.");
|
|
19
|
-
}
|
|
20
|
-
resolvedPath = resolvedPath.replace("{Path+}", labelValue
|
|
21
|
-
.split("/")
|
|
22
|
-
.map(function (segment) { return __extendedEncodeURIComponent(segment); })
|
|
23
|
-
.join("/"));
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
throw new Error("No value provided for input HTTP label: Path.");
|
|
27
|
-
}
|
|
15
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Path", function () { return input.Path; }, "{Path+}", true);
|
|
28
16
|
return [2, new __HttpRequest({
|
|
29
17
|
protocol: protocol,
|
|
30
18
|
hostname: hostname,
|
|
@@ -38,7 +26,7 @@ export var serializeAws_restJson1DeleteObjectCommand = function (input, context)
|
|
|
38
26
|
});
|
|
39
27
|
}); };
|
|
40
28
|
export var serializeAws_restJson1DescribeObjectCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
29
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
42
30
|
return __generator(this, function (_c) {
|
|
43
31
|
switch (_c.label) {
|
|
44
32
|
case 0: return [4, context.endpoint()];
|
|
@@ -46,19 +34,7 @@ export var serializeAws_restJson1DescribeObjectCommand = function (input, contex
|
|
|
46
34
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
47
35
|
headers = {};
|
|
48
36
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/{Path+}";
|
|
49
|
-
|
|
50
|
-
labelValue = input.Path;
|
|
51
|
-
if (labelValue.length <= 0) {
|
|
52
|
-
throw new Error("Empty value provided for input HTTP label: Path.");
|
|
53
|
-
}
|
|
54
|
-
resolvedPath = resolvedPath.replace("{Path+}", labelValue
|
|
55
|
-
.split("/")
|
|
56
|
-
.map(function (segment) { return __extendedEncodeURIComponent(segment); })
|
|
57
|
-
.join("/"));
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
throw new Error("No value provided for input HTTP label: Path.");
|
|
61
|
-
}
|
|
37
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Path", function () { return input.Path; }, "{Path+}", true);
|
|
62
38
|
return [2, new __HttpRequest({
|
|
63
39
|
protocol: protocol,
|
|
64
40
|
hostname: hostname,
|
|
@@ -72,27 +48,17 @@ export var serializeAws_restJson1DescribeObjectCommand = function (input, contex
|
|
|
72
48
|
});
|
|
73
49
|
}); };
|
|
74
50
|
export var serializeAws_restJson1GetObjectCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
75
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
51
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
76
52
|
return __generator(this, function (_c) {
|
|
77
53
|
switch (_c.label) {
|
|
78
54
|
case 0: return [4, context.endpoint()];
|
|
79
55
|
case 1:
|
|
80
56
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
81
|
-
headers =
|
|
57
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
58
|
+
range: input.Range,
|
|
59
|
+
});
|
|
82
60
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/{Path+}";
|
|
83
|
-
|
|
84
|
-
labelValue = input.Path;
|
|
85
|
-
if (labelValue.length <= 0) {
|
|
86
|
-
throw new Error("Empty value provided for input HTTP label: Path.");
|
|
87
|
-
}
|
|
88
|
-
resolvedPath = resolvedPath.replace("{Path+}", labelValue
|
|
89
|
-
.split("/")
|
|
90
|
-
.map(function (segment) { return __extendedEncodeURIComponent(segment); })
|
|
91
|
-
.join("/"));
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
throw new Error("No value provided for input HTTP label: Path.");
|
|
95
|
-
}
|
|
61
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Path", function () { return input.Path; }, "{Path+}", true);
|
|
96
62
|
return [2, new __HttpRequest({
|
|
97
63
|
protocol: protocol,
|
|
98
64
|
hostname: hostname,
|
|
@@ -114,7 +80,11 @@ export var serializeAws_restJson1ListItemsCommand = function (input, context) {
|
|
|
114
80
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
115
81
|
headers = {};
|
|
116
82
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/";
|
|
117
|
-
query =
|
|
83
|
+
query = map({
|
|
84
|
+
Path: [, input.Path],
|
|
85
|
+
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
86
|
+
NextToken: [, input.NextToken],
|
|
87
|
+
});
|
|
118
88
|
return [2, new __HttpRequest({
|
|
119
89
|
protocol: protocol,
|
|
120
90
|
hostname: hostname,
|
|
@@ -129,29 +99,21 @@ export var serializeAws_restJson1ListItemsCommand = function (input, context) {
|
|
|
129
99
|
});
|
|
130
100
|
}); };
|
|
131
101
|
export var serializeAws_restJson1PutObjectCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
132
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
102
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
133
103
|
return __generator(this, function (_c) {
|
|
134
104
|
switch (_c.label) {
|
|
135
105
|
case 0: return [4, context.endpoint()];
|
|
136
106
|
case 1:
|
|
137
107
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
138
|
-
headers =
|
|
108
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
109
|
+
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
|
|
110
|
+
"content-type": input.ContentType || "application/octet-stream",
|
|
111
|
+
"cache-control": input.CacheControl,
|
|
112
|
+
"x-amz-storage-class": input.StorageClass,
|
|
139
113
|
"x-amz-upload-availability": input.UploadAvailability,
|
|
140
|
-
})
|
|
114
|
+
});
|
|
141
115
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/{Path+}";
|
|
142
|
-
|
|
143
|
-
labelValue = input.Path;
|
|
144
|
-
if (labelValue.length <= 0) {
|
|
145
|
-
throw new Error("Empty value provided for input HTTP label: Path.");
|
|
146
|
-
}
|
|
147
|
-
resolvedPath = resolvedPath.replace("{Path+}", labelValue
|
|
148
|
-
.split("/")
|
|
149
|
-
.map(function (segment) { return __extendedEncodeURIComponent(segment); })
|
|
150
|
-
.join("/"));
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
throw new Error("No value provided for input HTTP label: Path.");
|
|
154
|
-
}
|
|
116
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Path", function () { return input.Path; }, "{Path+}", true);
|
|
155
117
|
if (input.Body !== undefined) {
|
|
156
118
|
body = input.Body;
|
|
157
119
|
}
|
|
@@ -175,18 +137,18 @@ export var deserializeAws_restJson1DeleteObjectCommand = function (output, conte
|
|
|
175
137
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
176
138
|
return [2, deserializeAws_restJson1DeleteObjectCommandError(output, context)];
|
|
177
139
|
}
|
|
178
|
-
contents = {
|
|
140
|
+
contents = map({
|
|
179
141
|
$metadata: deserializeMetadata(output),
|
|
180
|
-
};
|
|
142
|
+
});
|
|
181
143
|
return [4, collectBody(output.body, context)];
|
|
182
144
|
case 1:
|
|
183
145
|
_a.sent();
|
|
184
|
-
return [2,
|
|
146
|
+
return [2, contents];
|
|
185
147
|
}
|
|
186
148
|
});
|
|
187
149
|
}); };
|
|
188
150
|
var deserializeAws_restJson1DeleteObjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
189
|
-
var parsedOutput, _a,
|
|
151
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
190
152
|
var _c;
|
|
191
153
|
return __generator(this, function (_d) {
|
|
192
154
|
switch (_d.label) {
|
|
@@ -215,14 +177,14 @@ var deserializeAws_restJson1DeleteObjectCommandError = function (output, context
|
|
|
215
177
|
case 7: throw _d.sent();
|
|
216
178
|
case 8:
|
|
217
179
|
parsedBody = parsedOutput.body;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
$metadata: $metadata,
|
|
180
|
+
throwDefaultError({
|
|
181
|
+
output: output,
|
|
182
|
+
parsedBody: parsedBody,
|
|
183
|
+
exceptionCtor: __BaseException,
|
|
184
|
+
errorCode: errorCode,
|
|
224
185
|
});
|
|
225
|
-
|
|
186
|
+
_d.label = 9;
|
|
187
|
+
case 9: return [2];
|
|
226
188
|
}
|
|
227
189
|
});
|
|
228
190
|
}); };
|
|
@@ -234,38 +196,29 @@ export var deserializeAws_restJson1DescribeObjectCommand = function (output, con
|
|
|
234
196
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
235
197
|
return [2, deserializeAws_restJson1DescribeObjectCommandError(output, context)];
|
|
236
198
|
}
|
|
237
|
-
contents = {
|
|
199
|
+
contents = map({
|
|
238
200
|
$metadata: deserializeMetadata(output),
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
if (output.headers["content-length"] !== undefined) {
|
|
252
|
-
contents.ContentLength = __strictParseLong(output.headers["content-length"]);
|
|
253
|
-
}
|
|
254
|
-
if (output.headers["cache-control"] !== undefined) {
|
|
255
|
-
contents.CacheControl = output.headers["cache-control"];
|
|
256
|
-
}
|
|
257
|
-
if (output.headers["last-modified"] !== undefined) {
|
|
258
|
-
contents.LastModified = __expectNonNull(__parseRfc7231DateTime(output.headers["last-modified"]));
|
|
259
|
-
}
|
|
201
|
+
ETag: [, output.headers["etag"]],
|
|
202
|
+
ContentType: [, output.headers["content-type"]],
|
|
203
|
+
ContentLength: [
|
|
204
|
+
function () { return void 0 !== output.headers["content-length"]; },
|
|
205
|
+
function () { return __strictParseLong(output.headers["content-length"]); },
|
|
206
|
+
],
|
|
207
|
+
CacheControl: [, output.headers["cache-control"]],
|
|
208
|
+
LastModified: [
|
|
209
|
+
function () { return void 0 !== output.headers["last-modified"]; },
|
|
210
|
+
function () { return __expectNonNull(__parseRfc7231DateTime(output.headers["last-modified"])); },
|
|
211
|
+
],
|
|
212
|
+
});
|
|
260
213
|
return [4, collectBody(output.body, context)];
|
|
261
214
|
case 1:
|
|
262
215
|
_a.sent();
|
|
263
|
-
return [2,
|
|
216
|
+
return [2, contents];
|
|
264
217
|
}
|
|
265
218
|
});
|
|
266
219
|
}); };
|
|
267
220
|
var deserializeAws_restJson1DescribeObjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
|
-
var parsedOutput, _a,
|
|
221
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
269
222
|
var _c;
|
|
270
223
|
return __generator(this, function (_d) {
|
|
271
224
|
switch (_d.label) {
|
|
@@ -294,14 +247,14 @@ var deserializeAws_restJson1DescribeObjectCommandError = function (output, conte
|
|
|
294
247
|
case 7: throw _d.sent();
|
|
295
248
|
case 8:
|
|
296
249
|
parsedBody = parsedOutput.body;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
$metadata: $metadata,
|
|
250
|
+
throwDefaultError({
|
|
251
|
+
output: output,
|
|
252
|
+
parsedBody: parsedBody,
|
|
253
|
+
exceptionCtor: __BaseException,
|
|
254
|
+
errorCode: errorCode,
|
|
303
255
|
});
|
|
304
|
-
|
|
256
|
+
_d.label = 9;
|
|
257
|
+
case 9: return [2];
|
|
305
258
|
}
|
|
306
259
|
});
|
|
307
260
|
}); };
|
|
@@ -311,45 +264,31 @@ export var deserializeAws_restJson1GetObjectCommand = function (output, context)
|
|
|
311
264
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
312
265
|
return [2, deserializeAws_restJson1GetObjectCommandError(output, context)];
|
|
313
266
|
}
|
|
314
|
-
contents = {
|
|
267
|
+
contents = map({
|
|
315
268
|
$metadata: deserializeMetadata(output),
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
ContentLength:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
contents.ContentRange = output.headers["content-range"];
|
|
330
|
-
}
|
|
331
|
-
if (output.headers["content-length"] !== undefined) {
|
|
332
|
-
contents.ContentLength = __strictParseLong(output.headers["content-length"]);
|
|
333
|
-
}
|
|
334
|
-
if (output.headers["content-type"] !== undefined) {
|
|
335
|
-
contents.ContentType = output.headers["content-type"];
|
|
336
|
-
}
|
|
337
|
-
if (output.headers["etag"] !== undefined) {
|
|
338
|
-
contents.ETag = output.headers["etag"];
|
|
339
|
-
}
|
|
340
|
-
if (output.headers["last-modified"] !== undefined) {
|
|
341
|
-
contents.LastModified = __expectNonNull(__parseRfc7231DateTime(output.headers["last-modified"]));
|
|
342
|
-
}
|
|
269
|
+
CacheControl: [, output.headers["cache-control"]],
|
|
270
|
+
ContentRange: [, output.headers["content-range"]],
|
|
271
|
+
ContentLength: [
|
|
272
|
+
function () { return void 0 !== output.headers["content-length"]; },
|
|
273
|
+
function () { return __strictParseLong(output.headers["content-length"]); },
|
|
274
|
+
],
|
|
275
|
+
ContentType: [, output.headers["content-type"]],
|
|
276
|
+
ETag: [, output.headers["etag"]],
|
|
277
|
+
LastModified: [
|
|
278
|
+
function () { return void 0 !== output.headers["last-modified"]; },
|
|
279
|
+
function () { return __expectNonNull(__parseRfc7231DateTime(output.headers["last-modified"])); },
|
|
280
|
+
],
|
|
281
|
+
});
|
|
343
282
|
data = output.body;
|
|
344
283
|
contents.Body = data;
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
348
|
-
return [2,
|
|
284
|
+
map(contents, {
|
|
285
|
+
StatusCode: [, output.statusCode],
|
|
286
|
+
});
|
|
287
|
+
return [2, contents];
|
|
349
288
|
});
|
|
350
289
|
}); };
|
|
351
290
|
var deserializeAws_restJson1GetObjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
352
|
-
var parsedOutput, _a,
|
|
291
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
353
292
|
var _c;
|
|
354
293
|
return __generator(this, function (_d) {
|
|
355
294
|
switch (_d.label) {
|
|
@@ -382,14 +321,14 @@ var deserializeAws_restJson1GetObjectCommandError = function (output, context) {
|
|
|
382
321
|
case 9: throw _d.sent();
|
|
383
322
|
case 10:
|
|
384
323
|
parsedBody = parsedOutput.body;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
$metadata: $metadata,
|
|
324
|
+
throwDefaultError({
|
|
325
|
+
output: output,
|
|
326
|
+
parsedBody: parsedBody,
|
|
327
|
+
exceptionCtor: __BaseException,
|
|
328
|
+
errorCode: errorCode,
|
|
391
329
|
});
|
|
392
|
-
|
|
330
|
+
_d.label = 11;
|
|
331
|
+
case 11: return [2];
|
|
393
332
|
}
|
|
394
333
|
});
|
|
395
334
|
}); };
|
|
@@ -401,28 +340,26 @@ export var deserializeAws_restJson1ListItemsCommand = function (output, context)
|
|
|
401
340
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
402
341
|
return [2, deserializeAws_restJson1ListItemsCommandError(output, context)];
|
|
403
342
|
}
|
|
404
|
-
contents = {
|
|
343
|
+
contents = map({
|
|
405
344
|
$metadata: deserializeMetadata(output),
|
|
406
|
-
|
|
407
|
-
NextToken: undefined,
|
|
408
|
-
};
|
|
345
|
+
});
|
|
409
346
|
_a = __expectNonNull;
|
|
410
347
|
_b = __expectObject;
|
|
411
348
|
return [4, parseBody(output.body, context)];
|
|
412
349
|
case 1:
|
|
413
350
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
414
|
-
if (data.Items
|
|
351
|
+
if (data.Items != null) {
|
|
415
352
|
contents.Items = deserializeAws_restJson1ItemList(data.Items, context);
|
|
416
353
|
}
|
|
417
|
-
if (data.NextToken
|
|
354
|
+
if (data.NextToken != null) {
|
|
418
355
|
contents.NextToken = __expectString(data.NextToken);
|
|
419
356
|
}
|
|
420
|
-
return [2,
|
|
357
|
+
return [2, contents];
|
|
421
358
|
}
|
|
422
359
|
});
|
|
423
360
|
}); };
|
|
424
361
|
var deserializeAws_restJson1ListItemsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
425
|
-
var parsedOutput, _a,
|
|
362
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
426
363
|
var _c;
|
|
427
364
|
return __generator(this, function (_d) {
|
|
428
365
|
switch (_d.label) {
|
|
@@ -447,14 +384,14 @@ var deserializeAws_restJson1ListItemsCommandError = function (output, context) {
|
|
|
447
384
|
case 5: throw _d.sent();
|
|
448
385
|
case 6:
|
|
449
386
|
parsedBody = parsedOutput.body;
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
$metadata: $metadata,
|
|
387
|
+
throwDefaultError({
|
|
388
|
+
output: output,
|
|
389
|
+
parsedBody: parsedBody,
|
|
390
|
+
exceptionCtor: __BaseException,
|
|
391
|
+
errorCode: errorCode,
|
|
456
392
|
});
|
|
457
|
-
|
|
393
|
+
_d.label = 7;
|
|
394
|
+
case 7: return [2];
|
|
458
395
|
}
|
|
459
396
|
});
|
|
460
397
|
}); };
|
|
@@ -466,32 +403,29 @@ export var deserializeAws_restJson1PutObjectCommand = function (output, context)
|
|
|
466
403
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
467
404
|
return [2, deserializeAws_restJson1PutObjectCommandError(output, context)];
|
|
468
405
|
}
|
|
469
|
-
contents = {
|
|
406
|
+
contents = map({
|
|
470
407
|
$metadata: deserializeMetadata(output),
|
|
471
|
-
|
|
472
|
-
ETag: undefined,
|
|
473
|
-
StorageClass: undefined,
|
|
474
|
-
};
|
|
408
|
+
});
|
|
475
409
|
_a = __expectNonNull;
|
|
476
410
|
_b = __expectObject;
|
|
477
411
|
return [4, parseBody(output.body, context)];
|
|
478
412
|
case 1:
|
|
479
413
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
480
|
-
if (data.ContentSHA256
|
|
414
|
+
if (data.ContentSHA256 != null) {
|
|
481
415
|
contents.ContentSHA256 = __expectString(data.ContentSHA256);
|
|
482
416
|
}
|
|
483
|
-
if (data.ETag
|
|
417
|
+
if (data.ETag != null) {
|
|
484
418
|
contents.ETag = __expectString(data.ETag);
|
|
485
419
|
}
|
|
486
|
-
if (data.StorageClass
|
|
420
|
+
if (data.StorageClass != null) {
|
|
487
421
|
contents.StorageClass = __expectString(data.StorageClass);
|
|
488
422
|
}
|
|
489
|
-
return [2,
|
|
423
|
+
return [2, contents];
|
|
490
424
|
}
|
|
491
425
|
});
|
|
492
426
|
}); };
|
|
493
427
|
var deserializeAws_restJson1PutObjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
494
|
-
var parsedOutput, _a,
|
|
428
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
495
429
|
var _c;
|
|
496
430
|
return __generator(this, function (_d) {
|
|
497
431
|
switch (_d.label) {
|
|
@@ -516,23 +450,24 @@ var deserializeAws_restJson1PutObjectCommandError = function (output, context) {
|
|
|
516
450
|
case 5: throw _d.sent();
|
|
517
451
|
case 6:
|
|
518
452
|
parsedBody = parsedOutput.body;
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
$metadata: $metadata,
|
|
453
|
+
throwDefaultError({
|
|
454
|
+
output: output,
|
|
455
|
+
parsedBody: parsedBody,
|
|
456
|
+
exceptionCtor: __BaseException,
|
|
457
|
+
errorCode: errorCode,
|
|
525
458
|
});
|
|
526
|
-
|
|
459
|
+
_d.label = 7;
|
|
460
|
+
case 7: return [2];
|
|
527
461
|
}
|
|
528
462
|
});
|
|
529
463
|
}); };
|
|
464
|
+
var map = __map;
|
|
530
465
|
var deserializeAws_restJson1ContainerNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
531
466
|
var contents, data, exception;
|
|
532
467
|
return __generator(this, function (_a) {
|
|
533
|
-
contents = {};
|
|
468
|
+
contents = map({});
|
|
534
469
|
data = parsedOutput.body;
|
|
535
|
-
if (data.Message
|
|
470
|
+
if (data.Message != null) {
|
|
536
471
|
contents.Message = __expectString(data.Message);
|
|
537
472
|
}
|
|
538
473
|
exception = new ContainerNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -542,9 +477,9 @@ var deserializeAws_restJson1ContainerNotFoundExceptionResponse = function (parse
|
|
|
542
477
|
var deserializeAws_restJson1InternalServerErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
543
478
|
var contents, data, exception;
|
|
544
479
|
return __generator(this, function (_a) {
|
|
545
|
-
contents = {};
|
|
480
|
+
contents = map({});
|
|
546
481
|
data = parsedOutput.body;
|
|
547
|
-
if (data.Message
|
|
482
|
+
if (data.Message != null) {
|
|
548
483
|
contents.Message = __expectString(data.Message);
|
|
549
484
|
}
|
|
550
485
|
exception = new InternalServerError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -554,9 +489,9 @@ var deserializeAws_restJson1InternalServerErrorResponse = function (parsedOutput
|
|
|
554
489
|
var deserializeAws_restJson1ObjectNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
555
490
|
var contents, data, exception;
|
|
556
491
|
return __generator(this, function (_a) {
|
|
557
|
-
contents = {};
|
|
492
|
+
contents = map({});
|
|
558
493
|
data = parsedOutput.body;
|
|
559
|
-
if (data.Message
|
|
494
|
+
if (data.Message != null) {
|
|
560
495
|
contents.Message = __expectString(data.Message);
|
|
561
496
|
}
|
|
562
497
|
exception = new ObjectNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -566,9 +501,9 @@ var deserializeAws_restJson1ObjectNotFoundExceptionResponse = function (parsedOu
|
|
|
566
501
|
var deserializeAws_restJson1RequestedRangeNotSatisfiableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
567
502
|
var contents, data, exception;
|
|
568
503
|
return __generator(this, function (_a) {
|
|
569
|
-
contents = {};
|
|
504
|
+
contents = map({});
|
|
570
505
|
data = parsedOutput.body;
|
|
571
|
-
if (data.Message
|
|
506
|
+
if (data.Message != null) {
|
|
572
507
|
contents.Message = __expectString(data.Message);
|
|
573
508
|
}
|
|
574
509
|
exception = new RequestedRangeNotSatisfiableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|