@aws-sdk/client-outposts 3.30.0 → 3.34.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 +38 -0
- package/Outposts.ts +27 -0
- package/OutpostsClient.ts +3 -0
- package/README.md +7 -7
- package/commands/CreateOrderCommand.ts +94 -0
- package/dist/cjs/Outposts.js +15 -0
- package/dist/cjs/Outposts.js.map +1 -1
- package/dist/cjs/OutpostsClient.js +13 -13
- package/dist/cjs/OutpostsClient.js.map +1 -1
- package/dist/cjs/commands/CreateOrderCommand.js +61 -0
- package/dist/cjs/commands/CreateOrderCommand.js.map +1 -0
- package/dist/cjs/commands/CreateOutpostCommand.js +3 -3
- package/dist/cjs/commands/CreateOutpostCommand.js.map +1 -1
- package/dist/cjs/commands/DeleteOutpostCommand.js +3 -3
- package/dist/cjs/commands/DeleteOutpostCommand.js.map +1 -1
- package/dist/cjs/commands/DeleteSiteCommand.js +3 -3
- package/dist/cjs/commands/DeleteSiteCommand.js.map +1 -1
- package/dist/cjs/commands/GetOutpostCommand.js +3 -3
- package/dist/cjs/commands/GetOutpostCommand.js.map +1 -1
- package/dist/cjs/commands/GetOutpostInstanceTypesCommand.js +3 -3
- package/dist/cjs/commands/GetOutpostInstanceTypesCommand.js.map +1 -1
- package/dist/cjs/commands/ListOutpostsCommand.js +3 -3
- package/dist/cjs/commands/ListOutpostsCommand.js.map +1 -1
- package/dist/cjs/commands/ListSitesCommand.js +3 -3
- package/dist/cjs/commands/ListSitesCommand.js.map +1 -1
- package/dist/cjs/commands/ListTagsForResourceCommand.js +3 -3
- package/dist/cjs/commands/ListTagsForResourceCommand.js.map +1 -1
- package/dist/cjs/commands/TagResourceCommand.js +3 -3
- package/dist/cjs/commands/TagResourceCommand.js.map +1 -1
- package/dist/cjs/commands/UntagResourceCommand.js +3 -3
- package/dist/cjs/commands/UntagResourceCommand.js.map +1 -1
- package/dist/cjs/endpoints.js +1 -1
- package/dist/cjs/endpoints.js.map +1 -1
- package/dist/cjs/index.js +17 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/models/index.js +1 -1
- package/dist/cjs/models/index.js.map +1 -1
- package/dist/cjs/models/models_0.js +77 -13
- package/dist/cjs/models/models_0.js.map +1 -1
- package/dist/cjs/package.json +39 -39
- package/dist/cjs/protocols/Aws_restJson1.js +211 -44
- package/dist/cjs/protocols/Aws_restJson1.js.map +1 -1
- package/dist/cjs/runtimeConfig.browser.js +4 -4
- package/dist/cjs/runtimeConfig.browser.js.map +1 -1
- package/dist/cjs/runtimeConfig.js +8 -8
- package/dist/cjs/runtimeConfig.js.map +1 -1
- package/dist/cjs/runtimeConfig.native.js +1 -1
- package/dist/cjs/runtimeConfig.native.js.map +1 -1
- package/dist/es/Outposts.js +16 -8
- package/dist/es/Outposts.js.map +1 -1
- package/dist/es/OutpostsClient.js +1 -13
- package/dist/es/OutpostsClient.js.map +1 -1
- package/dist/es/commands/CreateOrderCommand.js +40 -0
- package/dist/es/commands/CreateOrderCommand.js.map +1 -0
- package/dist/es/commands/CreateOutpostCommand.js +2 -28
- package/dist/es/commands/CreateOutpostCommand.js.map +1 -1
- package/dist/es/commands/DeleteOutpostCommand.js +2 -27
- package/dist/es/commands/DeleteOutpostCommand.js.map +1 -1
- package/dist/es/commands/DeleteSiteCommand.js +2 -27
- package/dist/es/commands/DeleteSiteCommand.js.map +1 -1
- package/dist/es/commands/GetOutpostCommand.js +2 -27
- package/dist/es/commands/GetOutpostCommand.js.map +1 -1
- package/dist/es/commands/GetOutpostInstanceTypesCommand.js +2 -27
- package/dist/es/commands/GetOutpostInstanceTypesCommand.js.map +1 -1
- package/dist/es/commands/ListOutpostsCommand.js +2 -32
- package/dist/es/commands/ListOutpostsCommand.js.map +1 -1
- package/dist/es/commands/ListSitesCommand.js +2 -27
- package/dist/es/commands/ListSitesCommand.js.map +1 -1
- package/dist/es/commands/ListTagsForResourceCommand.js +2 -27
- package/dist/es/commands/ListTagsForResourceCommand.js.map +1 -1
- package/dist/es/commands/TagResourceCommand.js +2 -27
- package/dist/es/commands/TagResourceCommand.js.map +1 -1
- package/dist/es/commands/UntagResourceCommand.js +2 -27
- package/dist/es/commands/UntagResourceCommand.js.map +1 -1
- package/dist/es/endpoints.js +1 -1
- package/dist/es/endpoints.js.map +1 -1
- package/dist/es/index.js +1 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/models_0.js +51 -99
- package/dist/es/models/models_0.js.map +1 -1
- package/dist/es/package.json +39 -39
- package/dist/es/pagination/ListOutpostsPaginator.js +16 -28
- package/dist/es/pagination/ListOutpostsPaginator.js.map +1 -1
- package/dist/es/pagination/ListSitesPaginator.js +16 -28
- package/dist/es/pagination/ListSitesPaginator.js.map +1 -1
- package/dist/es/protocols/Aws_restJson1.js +421 -248
- package/dist/es/protocols/Aws_restJson1.js.map +1 -1
- package/dist/es/runtimeConfig.browser.js +0 -3
- package/dist/es/runtimeConfig.browser.js.map +1 -1
- package/dist/es/runtimeConfig.js +0 -3
- package/dist/es/runtimeConfig.js.map +1 -1
- package/dist/es/runtimeConfig.native.js +0 -3
- package/dist/es/runtimeConfig.native.js.map +1 -1
- package/dist/es/runtimeConfig.shared.js +0 -3
- package/dist/es/runtimeConfig.shared.js.map +1 -1
- package/dist/types/Outposts.d.ts +7 -0
- package/dist/types/OutpostsClient.d.ts +3 -2
- package/dist/types/commands/CreateOrderCommand.d.ts +35 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/models_0.d.ts +207 -54
- package/dist/types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist/types/runtimeConfig.browser.d.ts +1 -0
- package/dist/types/runtimeConfig.d.ts +1 -0
- package/dist/types/runtimeConfig.native.d.ts +1 -0
- package/dist/types/ts3.4/Outposts.d.ts +7 -0
- package/dist/types/ts3.4/OutpostsClient.d.ts +3 -2
- package/dist/types/ts3.4/commands/CreateOrderCommand.d.ts +35 -0
- package/dist/types/ts3.4/index.d.ts +1 -0
- package/dist/types/ts3.4/models/models_0.d.ts +207 -54
- package/dist/types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
- package/dist/types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/index.ts +1 -0
- package/models/models_0.ts +239 -50
- package/package.json +39 -39
- package/protocols/Aws_restJson1.ts +195 -0
- package/tsconfig.es.json +0 -2
- package/tsconfig.json +3 -5
- package/tsconfig.types.json +8 -0
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
4
|
+
export var serializeAws_restJson1CreateOrderCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
6
|
+
return __generator(this, function (_c) {
|
|
7
|
+
switch (_c.label) {
|
|
8
|
+
case 0: return [4, context.endpoint()];
|
|
9
|
+
case 1:
|
|
10
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
11
|
+
headers = {
|
|
12
|
+
"content-type": "application/json",
|
|
13
|
+
};
|
|
14
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/orders";
|
|
15
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.LineItems !== undefined &&
|
|
16
|
+
input.LineItems !== null && {
|
|
17
|
+
LineItems: serializeAws_restJson1LineItemRequestListDefinition(input.LineItems, context),
|
|
18
|
+
})), (input.OutpostIdentifier !== undefined &&
|
|
19
|
+
input.OutpostIdentifier !== null && { OutpostIdentifier: input.OutpostIdentifier })), (input.PaymentOption !== undefined && input.PaymentOption !== null && { PaymentOption: input.PaymentOption })), (input.PaymentTerm !== undefined && input.PaymentTerm !== null && { PaymentTerm: input.PaymentTerm })));
|
|
20
|
+
return [2, new __HttpRequest({
|
|
21
|
+
protocol: protocol,
|
|
22
|
+
hostname: hostname,
|
|
23
|
+
port: port,
|
|
24
|
+
method: "POST",
|
|
25
|
+
headers: headers,
|
|
26
|
+
path: resolvedPath,
|
|
27
|
+
body: body,
|
|
28
|
+
})];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}); };
|
|
4
32
|
export var serializeAws_restJson1CreateOutpostCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
33
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
6
34
|
return __generator(this, function (_c) {
|
|
7
35
|
switch (_c.label) {
|
|
8
|
-
case 0: return [4
|
|
36
|
+
case 0: return [4, context.endpoint()];
|
|
9
37
|
case 1:
|
|
10
38
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
11
39
|
headers = {
|
|
@@ -15,7 +43,7 @@ export var serializeAws_restJson1CreateOutpostCommand = function (input, context
|
|
|
15
43
|
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AvailabilityZone !== undefined &&
|
|
16
44
|
input.AvailabilityZone !== null && { AvailabilityZone: input.AvailabilityZone })), (input.AvailabilityZoneId !== undefined &&
|
|
17
45
|
input.AvailabilityZoneId !== null && { AvailabilityZoneId: input.AvailabilityZoneId })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
18
|
-
return [2
|
|
46
|
+
return [2, new __HttpRequest({
|
|
19
47
|
protocol: protocol,
|
|
20
48
|
hostname: hostname,
|
|
21
49
|
port: port,
|
|
@@ -31,7 +59,7 @@ export var serializeAws_restJson1DeleteOutpostCommand = function (input, context
|
|
|
31
59
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
32
60
|
return __generator(this, function (_c) {
|
|
33
61
|
switch (_c.label) {
|
|
34
|
-
case 0: return [4
|
|
62
|
+
case 0: return [4, context.endpoint()];
|
|
35
63
|
case 1:
|
|
36
64
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
37
65
|
headers = {};
|
|
@@ -46,7 +74,7 @@ export var serializeAws_restJson1DeleteOutpostCommand = function (input, context
|
|
|
46
74
|
else {
|
|
47
75
|
throw new Error("No value provided for input HTTP label: OutpostId.");
|
|
48
76
|
}
|
|
49
|
-
return [2
|
|
77
|
+
return [2, new __HttpRequest({
|
|
50
78
|
protocol: protocol,
|
|
51
79
|
hostname: hostname,
|
|
52
80
|
port: port,
|
|
@@ -62,7 +90,7 @@ export var serializeAws_restJson1DeleteSiteCommand = function (input, context) {
|
|
|
62
90
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
63
91
|
return __generator(this, function (_c) {
|
|
64
92
|
switch (_c.label) {
|
|
65
|
-
case 0: return [4
|
|
93
|
+
case 0: return [4, context.endpoint()];
|
|
66
94
|
case 1:
|
|
67
95
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
68
96
|
headers = {};
|
|
@@ -77,7 +105,7 @@ export var serializeAws_restJson1DeleteSiteCommand = function (input, context) {
|
|
|
77
105
|
else {
|
|
78
106
|
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
79
107
|
}
|
|
80
|
-
return [2
|
|
108
|
+
return [2, new __HttpRequest({
|
|
81
109
|
protocol: protocol,
|
|
82
110
|
hostname: hostname,
|
|
83
111
|
port: port,
|
|
@@ -93,7 +121,7 @@ export var serializeAws_restJson1GetOutpostCommand = function (input, context) {
|
|
|
93
121
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
94
122
|
return __generator(this, function (_c) {
|
|
95
123
|
switch (_c.label) {
|
|
96
|
-
case 0: return [4
|
|
124
|
+
case 0: return [4, context.endpoint()];
|
|
97
125
|
case 1:
|
|
98
126
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
99
127
|
headers = {};
|
|
@@ -108,7 +136,7 @@ export var serializeAws_restJson1GetOutpostCommand = function (input, context) {
|
|
|
108
136
|
else {
|
|
109
137
|
throw new Error("No value provided for input HTTP label: OutpostId.");
|
|
110
138
|
}
|
|
111
|
-
return [2
|
|
139
|
+
return [2, new __HttpRequest({
|
|
112
140
|
protocol: protocol,
|
|
113
141
|
hostname: hostname,
|
|
114
142
|
port: port,
|
|
@@ -124,7 +152,7 @@ export var serializeAws_restJson1GetOutpostInstanceTypesCommand = function (inpu
|
|
|
124
152
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
125
153
|
return __generator(this, function (_c) {
|
|
126
154
|
switch (_c.label) {
|
|
127
|
-
case 0: return [4
|
|
155
|
+
case 0: return [4, context.endpoint()];
|
|
128
156
|
case 1:
|
|
129
157
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
130
158
|
headers = {};
|
|
@@ -140,7 +168,7 @@ export var serializeAws_restJson1GetOutpostInstanceTypesCommand = function (inpu
|
|
|
140
168
|
throw new Error("No value provided for input HTTP label: OutpostId.");
|
|
141
169
|
}
|
|
142
170
|
query = __assign(__assign({}, (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
|
|
143
|
-
return [2
|
|
171
|
+
return [2, new __HttpRequest({
|
|
144
172
|
protocol: protocol,
|
|
145
173
|
hostname: hostname,
|
|
146
174
|
port: port,
|
|
@@ -157,7 +185,7 @@ export var serializeAws_restJson1ListOutpostsCommand = function (input, context)
|
|
|
157
185
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
158
186
|
return __generator(this, function (_c) {
|
|
159
187
|
switch (_c.label) {
|
|
160
|
-
case 0: return [4
|
|
188
|
+
case 0: return [4, context.endpoint()];
|
|
161
189
|
case 1:
|
|
162
190
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
163
191
|
headers = {};
|
|
@@ -169,7 +197,7 @@ export var serializeAws_restJson1ListOutpostsCommand = function (input, context)
|
|
|
169
197
|
})), (input.AvailabilityZoneIdFilter !== undefined && {
|
|
170
198
|
AvailabilityZoneIdFilter: (input.AvailabilityZoneIdFilter || []).map(function (_entry) { return _entry; }),
|
|
171
199
|
}));
|
|
172
|
-
return [2
|
|
200
|
+
return [2, new __HttpRequest({
|
|
173
201
|
protocol: protocol,
|
|
174
202
|
hostname: hostname,
|
|
175
203
|
port: port,
|
|
@@ -186,13 +214,13 @@ export var serializeAws_restJson1ListSitesCommand = function (input, context) {
|
|
|
186
214
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
187
215
|
return __generator(this, function (_c) {
|
|
188
216
|
switch (_c.label) {
|
|
189
|
-
case 0: return [4
|
|
217
|
+
case 0: return [4, context.endpoint()];
|
|
190
218
|
case 1:
|
|
191
219
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
192
220
|
headers = {};
|
|
193
221
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites";
|
|
194
222
|
query = __assign(__assign({}, (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
|
|
195
|
-
return [2
|
|
223
|
+
return [2, new __HttpRequest({
|
|
196
224
|
protocol: protocol,
|
|
197
225
|
hostname: hostname,
|
|
198
226
|
port: port,
|
|
@@ -209,7 +237,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
|
|
|
209
237
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
210
238
|
return __generator(this, function (_c) {
|
|
211
239
|
switch (_c.label) {
|
|
212
|
-
case 0: return [4
|
|
240
|
+
case 0: return [4, context.endpoint()];
|
|
213
241
|
case 1:
|
|
214
242
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
215
243
|
headers = {};
|
|
@@ -224,7 +252,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
|
|
|
224
252
|
else {
|
|
225
253
|
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
226
254
|
}
|
|
227
|
-
return [2
|
|
255
|
+
return [2, new __HttpRequest({
|
|
228
256
|
protocol: protocol,
|
|
229
257
|
hostname: hostname,
|
|
230
258
|
port: port,
|
|
@@ -240,7 +268,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
|
|
|
240
268
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
241
269
|
return __generator(this, function (_c) {
|
|
242
270
|
switch (_c.label) {
|
|
243
|
-
case 0: return [4
|
|
271
|
+
case 0: return [4, context.endpoint()];
|
|
244
272
|
case 1:
|
|
245
273
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
246
274
|
headers = {
|
|
@@ -258,7 +286,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
|
|
|
258
286
|
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
259
287
|
}
|
|
260
288
|
body = JSON.stringify(__assign({}, (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
261
|
-
return [2
|
|
289
|
+
return [2, new __HttpRequest({
|
|
262
290
|
protocol: protocol,
|
|
263
291
|
hostname: hostname,
|
|
264
292
|
port: port,
|
|
@@ -274,7 +302,7 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
|
|
|
274
302
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
275
303
|
return __generator(this, function (_c) {
|
|
276
304
|
switch (_c.label) {
|
|
277
|
-
case 0: return [4
|
|
305
|
+
case 0: return [4, context.endpoint()];
|
|
278
306
|
case 1:
|
|
279
307
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
280
308
|
headers = {};
|
|
@@ -290,7 +318,7 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
|
|
|
290
318
|
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
291
319
|
}
|
|
292
320
|
query = __assign({}, (input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map(function (_entry) { return _entry; }) }));
|
|
293
|
-
return [2
|
|
321
|
+
return [2, new __HttpRequest({
|
|
294
322
|
protocol: protocol,
|
|
295
323
|
hostname: hostname,
|
|
296
324
|
port: port,
|
|
@@ -303,13 +331,115 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
|
|
|
303
331
|
}
|
|
304
332
|
});
|
|
305
333
|
}); };
|
|
334
|
+
export var deserializeAws_restJson1CreateOrderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
335
|
+
var contents, data, _a, _b;
|
|
336
|
+
return __generator(this, function (_c) {
|
|
337
|
+
switch (_c.label) {
|
|
338
|
+
case 0:
|
|
339
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
340
|
+
return [2, deserializeAws_restJson1CreateOrderCommandError(output, context)];
|
|
341
|
+
}
|
|
342
|
+
contents = {
|
|
343
|
+
$metadata: deserializeMetadata(output),
|
|
344
|
+
Order: undefined,
|
|
345
|
+
};
|
|
346
|
+
_a = __expectNonNull;
|
|
347
|
+
_b = __expectObject;
|
|
348
|
+
return [4, parseBody(output.body, context)];
|
|
349
|
+
case 1:
|
|
350
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
351
|
+
if (data.Order !== undefined && data.Order !== null) {
|
|
352
|
+
contents.Order = deserializeAws_restJson1Order(data.Order, context);
|
|
353
|
+
}
|
|
354
|
+
return [2, Promise.resolve(contents)];
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
}); };
|
|
358
|
+
var deserializeAws_restJson1CreateOrderCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
359
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
360
|
+
var _j;
|
|
361
|
+
return __generator(this, function (_k) {
|
|
362
|
+
switch (_k.label) {
|
|
363
|
+
case 0:
|
|
364
|
+
_a = [__assign({}, output)];
|
|
365
|
+
_j = {};
|
|
366
|
+
return [4, parseBody(output.body, context)];
|
|
367
|
+
case 1:
|
|
368
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
369
|
+
errorCode = "UnknownError";
|
|
370
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
371
|
+
_b = errorCode;
|
|
372
|
+
switch (_b) {
|
|
373
|
+
case "AccessDeniedException": return [3, 2];
|
|
374
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
375
|
+
case "ConflictException": return [3, 4];
|
|
376
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
377
|
+
case "InternalServerException": return [3, 6];
|
|
378
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
379
|
+
case "NotFoundException": return [3, 8];
|
|
380
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
381
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
382
|
+
case "com.amazonaws.outposts#ServiceQuotaExceededException": return [3, 10];
|
|
383
|
+
case "ValidationException": return [3, 12];
|
|
384
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 12];
|
|
385
|
+
}
|
|
386
|
+
return [3, 14];
|
|
387
|
+
case 2:
|
|
388
|
+
_c = [{}];
|
|
389
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
390
|
+
case 3:
|
|
391
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
392
|
+
return [3, 15];
|
|
393
|
+
case 4:
|
|
394
|
+
_d = [{}];
|
|
395
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
396
|
+
case 5:
|
|
397
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
398
|
+
return [3, 15];
|
|
399
|
+
case 6:
|
|
400
|
+
_e = [{}];
|
|
401
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
402
|
+
case 7:
|
|
403
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
404
|
+
return [3, 15];
|
|
405
|
+
case 8:
|
|
406
|
+
_f = [{}];
|
|
407
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
408
|
+
case 9:
|
|
409
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
410
|
+
return [3, 15];
|
|
411
|
+
case 10:
|
|
412
|
+
_g = [{}];
|
|
413
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
414
|
+
case 11:
|
|
415
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
416
|
+
return [3, 15];
|
|
417
|
+
case 12:
|
|
418
|
+
_h = [{}];
|
|
419
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
420
|
+
case 13:
|
|
421
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
422
|
+
return [3, 15];
|
|
423
|
+
case 14:
|
|
424
|
+
parsedBody = parsedOutput.body;
|
|
425
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
426
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
427
|
+
_k.label = 15;
|
|
428
|
+
case 15:
|
|
429
|
+
message = response.message || response.Message || errorCode;
|
|
430
|
+
response.message = message;
|
|
431
|
+
delete response.Message;
|
|
432
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
}); };
|
|
306
436
|
export var deserializeAws_restJson1CreateOutpostCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
307
437
|
var contents, data, _a, _b;
|
|
308
438
|
return __generator(this, function (_c) {
|
|
309
439
|
switch (_c.label) {
|
|
310
440
|
case 0:
|
|
311
441
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
312
|
-
return [2
|
|
442
|
+
return [2, deserializeAws_restJson1CreateOutpostCommandError(output, context)];
|
|
313
443
|
}
|
|
314
444
|
contents = {
|
|
315
445
|
$metadata: deserializeMetadata(output),
|
|
@@ -317,13 +447,13 @@ export var deserializeAws_restJson1CreateOutpostCommand = function (output, cont
|
|
|
317
447
|
};
|
|
318
448
|
_a = __expectNonNull;
|
|
319
449
|
_b = __expectObject;
|
|
320
|
-
return [4
|
|
450
|
+
return [4, parseBody(output.body, context)];
|
|
321
451
|
case 1:
|
|
322
452
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
323
453
|
if (data.Outpost !== undefined && data.Outpost !== null) {
|
|
324
454
|
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
325
455
|
}
|
|
326
|
-
return [2
|
|
456
|
+
return [2, Promise.resolve(contents)];
|
|
327
457
|
}
|
|
328
458
|
});
|
|
329
459
|
}); };
|
|
@@ -335,63 +465,63 @@ var deserializeAws_restJson1CreateOutpostCommandError = function (output, contex
|
|
|
335
465
|
case 0:
|
|
336
466
|
_a = [__assign({}, output)];
|
|
337
467
|
_j = {};
|
|
338
|
-
return [4
|
|
468
|
+
return [4, parseBody(output.body, context)];
|
|
339
469
|
case 1:
|
|
340
470
|
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
341
471
|
errorCode = "UnknownError";
|
|
342
472
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
343
473
|
_b = errorCode;
|
|
344
474
|
switch (_b) {
|
|
345
|
-
case "AccessDeniedException": return [3
|
|
346
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3
|
|
347
|
-
case "ConflictException": return [3
|
|
348
|
-
case "com.amazonaws.outposts#ConflictException": return [3
|
|
349
|
-
case "InternalServerException": return [3
|
|
350
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
351
|
-
case "NotFoundException": return [3
|
|
352
|
-
case "com.amazonaws.outposts#NotFoundException": return [3
|
|
353
|
-
case "ServiceQuotaExceededException": return [3
|
|
354
|
-
case "com.amazonaws.outposts#ServiceQuotaExceededException": return [3
|
|
355
|
-
case "ValidationException": return [3
|
|
356
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
475
|
+
case "AccessDeniedException": return [3, 2];
|
|
476
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
477
|
+
case "ConflictException": return [3, 4];
|
|
478
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
479
|
+
case "InternalServerException": return [3, 6];
|
|
480
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
481
|
+
case "NotFoundException": return [3, 8];
|
|
482
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
483
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
484
|
+
case "com.amazonaws.outposts#ServiceQuotaExceededException": return [3, 10];
|
|
485
|
+
case "ValidationException": return [3, 12];
|
|
486
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 12];
|
|
357
487
|
}
|
|
358
|
-
return [3
|
|
488
|
+
return [3, 14];
|
|
359
489
|
case 2:
|
|
360
490
|
_c = [{}];
|
|
361
|
-
return [4
|
|
491
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
362
492
|
case 3:
|
|
363
493
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
364
|
-
return [3
|
|
494
|
+
return [3, 15];
|
|
365
495
|
case 4:
|
|
366
496
|
_d = [{}];
|
|
367
|
-
return [4
|
|
497
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
368
498
|
case 5:
|
|
369
499
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
370
|
-
return [3
|
|
500
|
+
return [3, 15];
|
|
371
501
|
case 6:
|
|
372
502
|
_e = [{}];
|
|
373
|
-
return [4
|
|
503
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
374
504
|
case 7:
|
|
375
505
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
376
|
-
return [3
|
|
506
|
+
return [3, 15];
|
|
377
507
|
case 8:
|
|
378
508
|
_f = [{}];
|
|
379
|
-
return [4
|
|
509
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
380
510
|
case 9:
|
|
381
511
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
382
|
-
return [3
|
|
512
|
+
return [3, 15];
|
|
383
513
|
case 10:
|
|
384
514
|
_g = [{}];
|
|
385
|
-
return [4
|
|
515
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
386
516
|
case 11:
|
|
387
517
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
388
|
-
return [3
|
|
518
|
+
return [3, 15];
|
|
389
519
|
case 12:
|
|
390
520
|
_h = [{}];
|
|
391
|
-
return [4
|
|
521
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
392
522
|
case 13:
|
|
393
523
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
394
|
-
return [3
|
|
524
|
+
return [3, 15];
|
|
395
525
|
case 14:
|
|
396
526
|
parsedBody = parsedOutput.body;
|
|
397
527
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -401,7 +531,7 @@ var deserializeAws_restJson1CreateOutpostCommandError = function (output, contex
|
|
|
401
531
|
message = response.message || response.Message || errorCode;
|
|
402
532
|
response.message = message;
|
|
403
533
|
delete response.Message;
|
|
404
|
-
return [2
|
|
534
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
405
535
|
}
|
|
406
536
|
});
|
|
407
537
|
}); };
|
|
@@ -411,15 +541,15 @@ export var deserializeAws_restJson1DeleteOutpostCommand = function (output, cont
|
|
|
411
541
|
switch (_a.label) {
|
|
412
542
|
case 0:
|
|
413
543
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
414
|
-
return [2
|
|
544
|
+
return [2, deserializeAws_restJson1DeleteOutpostCommandError(output, context)];
|
|
415
545
|
}
|
|
416
546
|
contents = {
|
|
417
547
|
$metadata: deserializeMetadata(output),
|
|
418
548
|
};
|
|
419
|
-
return [4
|
|
549
|
+
return [4, collectBody(output.body, context)];
|
|
420
550
|
case 1:
|
|
421
551
|
_a.sent();
|
|
422
|
-
return [2
|
|
552
|
+
return [2, Promise.resolve(contents)];
|
|
423
553
|
}
|
|
424
554
|
});
|
|
425
555
|
}); };
|
|
@@ -431,55 +561,55 @@ var deserializeAws_restJson1DeleteOutpostCommandError = function (output, contex
|
|
|
431
561
|
case 0:
|
|
432
562
|
_a = [__assign({}, output)];
|
|
433
563
|
_h = {};
|
|
434
|
-
return [4
|
|
564
|
+
return [4, parseBody(output.body, context)];
|
|
435
565
|
case 1:
|
|
436
566
|
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
437
567
|
errorCode = "UnknownError";
|
|
438
568
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
439
569
|
_b = errorCode;
|
|
440
570
|
switch (_b) {
|
|
441
|
-
case "AccessDeniedException": return [3
|
|
442
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3
|
|
443
|
-
case "ConflictException": return [3
|
|
444
|
-
case "com.amazonaws.outposts#ConflictException": return [3
|
|
445
|
-
case "InternalServerException": return [3
|
|
446
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
447
|
-
case "NotFoundException": return [3
|
|
448
|
-
case "com.amazonaws.outposts#NotFoundException": return [3
|
|
449
|
-
case "ValidationException": return [3
|
|
450
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
571
|
+
case "AccessDeniedException": return [3, 2];
|
|
572
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
573
|
+
case "ConflictException": return [3, 4];
|
|
574
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
575
|
+
case "InternalServerException": return [3, 6];
|
|
576
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
577
|
+
case "NotFoundException": return [3, 8];
|
|
578
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
579
|
+
case "ValidationException": return [3, 10];
|
|
580
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
451
581
|
}
|
|
452
|
-
return [3
|
|
582
|
+
return [3, 12];
|
|
453
583
|
case 2:
|
|
454
584
|
_c = [{}];
|
|
455
|
-
return [4
|
|
585
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
456
586
|
case 3:
|
|
457
587
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
458
|
-
return [3
|
|
588
|
+
return [3, 13];
|
|
459
589
|
case 4:
|
|
460
590
|
_d = [{}];
|
|
461
|
-
return [4
|
|
591
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
462
592
|
case 5:
|
|
463
593
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
464
|
-
return [3
|
|
594
|
+
return [3, 13];
|
|
465
595
|
case 6:
|
|
466
596
|
_e = [{}];
|
|
467
|
-
return [4
|
|
597
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
468
598
|
case 7:
|
|
469
599
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
470
|
-
return [3
|
|
600
|
+
return [3, 13];
|
|
471
601
|
case 8:
|
|
472
602
|
_f = [{}];
|
|
473
|
-
return [4
|
|
603
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
474
604
|
case 9:
|
|
475
605
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
476
|
-
return [3
|
|
606
|
+
return [3, 13];
|
|
477
607
|
case 10:
|
|
478
608
|
_g = [{}];
|
|
479
|
-
return [4
|
|
609
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
480
610
|
case 11:
|
|
481
611
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
482
|
-
return [3
|
|
612
|
+
return [3, 13];
|
|
483
613
|
case 12:
|
|
484
614
|
parsedBody = parsedOutput.body;
|
|
485
615
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -489,7 +619,7 @@ var deserializeAws_restJson1DeleteOutpostCommandError = function (output, contex
|
|
|
489
619
|
message = response.message || response.Message || errorCode;
|
|
490
620
|
response.message = message;
|
|
491
621
|
delete response.Message;
|
|
492
|
-
return [2
|
|
622
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
493
623
|
}
|
|
494
624
|
});
|
|
495
625
|
}); };
|
|
@@ -499,15 +629,15 @@ export var deserializeAws_restJson1DeleteSiteCommand = function (output, context
|
|
|
499
629
|
switch (_a.label) {
|
|
500
630
|
case 0:
|
|
501
631
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
502
|
-
return [2
|
|
632
|
+
return [2, deserializeAws_restJson1DeleteSiteCommandError(output, context)];
|
|
503
633
|
}
|
|
504
634
|
contents = {
|
|
505
635
|
$metadata: deserializeMetadata(output),
|
|
506
636
|
};
|
|
507
|
-
return [4
|
|
637
|
+
return [4, collectBody(output.body, context)];
|
|
508
638
|
case 1:
|
|
509
639
|
_a.sent();
|
|
510
|
-
return [2
|
|
640
|
+
return [2, Promise.resolve(contents)];
|
|
511
641
|
}
|
|
512
642
|
});
|
|
513
643
|
}); };
|
|
@@ -519,55 +649,55 @@ var deserializeAws_restJson1DeleteSiteCommandError = function (output, context)
|
|
|
519
649
|
case 0:
|
|
520
650
|
_a = [__assign({}, output)];
|
|
521
651
|
_h = {};
|
|
522
|
-
return [4
|
|
652
|
+
return [4, parseBody(output.body, context)];
|
|
523
653
|
case 1:
|
|
524
654
|
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
525
655
|
errorCode = "UnknownError";
|
|
526
656
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
527
657
|
_b = errorCode;
|
|
528
658
|
switch (_b) {
|
|
529
|
-
case "AccessDeniedException": return [3
|
|
530
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3
|
|
531
|
-
case "ConflictException": return [3
|
|
532
|
-
case "com.amazonaws.outposts#ConflictException": return [3
|
|
533
|
-
case "InternalServerException": return [3
|
|
534
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
535
|
-
case "NotFoundException": return [3
|
|
536
|
-
case "com.amazonaws.outposts#NotFoundException": return [3
|
|
537
|
-
case "ValidationException": return [3
|
|
538
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
659
|
+
case "AccessDeniedException": return [3, 2];
|
|
660
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
661
|
+
case "ConflictException": return [3, 4];
|
|
662
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
663
|
+
case "InternalServerException": return [3, 6];
|
|
664
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
665
|
+
case "NotFoundException": return [3, 8];
|
|
666
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
667
|
+
case "ValidationException": return [3, 10];
|
|
668
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
539
669
|
}
|
|
540
|
-
return [3
|
|
670
|
+
return [3, 12];
|
|
541
671
|
case 2:
|
|
542
672
|
_c = [{}];
|
|
543
|
-
return [4
|
|
673
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
544
674
|
case 3:
|
|
545
675
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
546
|
-
return [3
|
|
676
|
+
return [3, 13];
|
|
547
677
|
case 4:
|
|
548
678
|
_d = [{}];
|
|
549
|
-
return [4
|
|
679
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
550
680
|
case 5:
|
|
551
681
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
552
|
-
return [3
|
|
682
|
+
return [3, 13];
|
|
553
683
|
case 6:
|
|
554
684
|
_e = [{}];
|
|
555
|
-
return [4
|
|
685
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
556
686
|
case 7:
|
|
557
687
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
558
|
-
return [3
|
|
688
|
+
return [3, 13];
|
|
559
689
|
case 8:
|
|
560
690
|
_f = [{}];
|
|
561
|
-
return [4
|
|
691
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
562
692
|
case 9:
|
|
563
693
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
564
|
-
return [3
|
|
694
|
+
return [3, 13];
|
|
565
695
|
case 10:
|
|
566
696
|
_g = [{}];
|
|
567
|
-
return [4
|
|
697
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
568
698
|
case 11:
|
|
569
699
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
570
|
-
return [3
|
|
700
|
+
return [3, 13];
|
|
571
701
|
case 12:
|
|
572
702
|
parsedBody = parsedOutput.body;
|
|
573
703
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -577,7 +707,7 @@ var deserializeAws_restJson1DeleteSiteCommandError = function (output, context)
|
|
|
577
707
|
message = response.message || response.Message || errorCode;
|
|
578
708
|
response.message = message;
|
|
579
709
|
delete response.Message;
|
|
580
|
-
return [2
|
|
710
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
581
711
|
}
|
|
582
712
|
});
|
|
583
713
|
}); };
|
|
@@ -587,7 +717,7 @@ export var deserializeAws_restJson1GetOutpostCommand = function (output, context
|
|
|
587
717
|
switch (_c.label) {
|
|
588
718
|
case 0:
|
|
589
719
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
590
|
-
return [2
|
|
720
|
+
return [2, deserializeAws_restJson1GetOutpostCommandError(output, context)];
|
|
591
721
|
}
|
|
592
722
|
contents = {
|
|
593
723
|
$metadata: deserializeMetadata(output),
|
|
@@ -595,13 +725,13 @@ export var deserializeAws_restJson1GetOutpostCommand = function (output, context
|
|
|
595
725
|
};
|
|
596
726
|
_a = __expectNonNull;
|
|
597
727
|
_b = __expectObject;
|
|
598
|
-
return [4
|
|
728
|
+
return [4, parseBody(output.body, context)];
|
|
599
729
|
case 1:
|
|
600
730
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
601
731
|
if (data.Outpost !== undefined && data.Outpost !== null) {
|
|
602
732
|
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
603
733
|
}
|
|
604
|
-
return [2
|
|
734
|
+
return [2, Promise.resolve(contents)];
|
|
605
735
|
}
|
|
606
736
|
});
|
|
607
737
|
}); };
|
|
@@ -613,47 +743,47 @@ var deserializeAws_restJson1GetOutpostCommandError = function (output, context)
|
|
|
613
743
|
case 0:
|
|
614
744
|
_a = [__assign({}, output)];
|
|
615
745
|
_g = {};
|
|
616
|
-
return [4
|
|
746
|
+
return [4, parseBody(output.body, context)];
|
|
617
747
|
case 1:
|
|
618
748
|
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
619
749
|
errorCode = "UnknownError";
|
|
620
750
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
621
751
|
_b = errorCode;
|
|
622
752
|
switch (_b) {
|
|
623
|
-
case "AccessDeniedException": return [3
|
|
624
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3
|
|
625
|
-
case "InternalServerException": return [3
|
|
626
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
627
|
-
case "NotFoundException": return [3
|
|
628
|
-
case "com.amazonaws.outposts#NotFoundException": return [3
|
|
629
|
-
case "ValidationException": return [3
|
|
630
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
753
|
+
case "AccessDeniedException": return [3, 2];
|
|
754
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
755
|
+
case "InternalServerException": return [3, 4];
|
|
756
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
757
|
+
case "NotFoundException": return [3, 6];
|
|
758
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 6];
|
|
759
|
+
case "ValidationException": return [3, 8];
|
|
760
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
631
761
|
}
|
|
632
|
-
return [3
|
|
762
|
+
return [3, 10];
|
|
633
763
|
case 2:
|
|
634
764
|
_c = [{}];
|
|
635
|
-
return [4
|
|
765
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
636
766
|
case 3:
|
|
637
767
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
638
|
-
return [3
|
|
768
|
+
return [3, 11];
|
|
639
769
|
case 4:
|
|
640
770
|
_d = [{}];
|
|
641
|
-
return [4
|
|
771
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
642
772
|
case 5:
|
|
643
773
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
644
|
-
return [3
|
|
774
|
+
return [3, 11];
|
|
645
775
|
case 6:
|
|
646
776
|
_e = [{}];
|
|
647
|
-
return [4
|
|
777
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
648
778
|
case 7:
|
|
649
779
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
650
|
-
return [3
|
|
780
|
+
return [3, 11];
|
|
651
781
|
case 8:
|
|
652
782
|
_f = [{}];
|
|
653
|
-
return [4
|
|
783
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
654
784
|
case 9:
|
|
655
785
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
656
|
-
return [3
|
|
786
|
+
return [3, 11];
|
|
657
787
|
case 10:
|
|
658
788
|
parsedBody = parsedOutput.body;
|
|
659
789
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -663,7 +793,7 @@ var deserializeAws_restJson1GetOutpostCommandError = function (output, context)
|
|
|
663
793
|
message = response.message || response.Message || errorCode;
|
|
664
794
|
response.message = message;
|
|
665
795
|
delete response.Message;
|
|
666
|
-
return [2
|
|
796
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
667
797
|
}
|
|
668
798
|
});
|
|
669
799
|
}); };
|
|
@@ -673,7 +803,7 @@ export var deserializeAws_restJson1GetOutpostInstanceTypesCommand = function (ou
|
|
|
673
803
|
switch (_c.label) {
|
|
674
804
|
case 0:
|
|
675
805
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
676
|
-
return [2
|
|
806
|
+
return [2, deserializeAws_restJson1GetOutpostInstanceTypesCommandError(output, context)];
|
|
677
807
|
}
|
|
678
808
|
contents = {
|
|
679
809
|
$metadata: deserializeMetadata(output),
|
|
@@ -684,7 +814,7 @@ export var deserializeAws_restJson1GetOutpostInstanceTypesCommand = function (ou
|
|
|
684
814
|
};
|
|
685
815
|
_a = __expectNonNull;
|
|
686
816
|
_b = __expectObject;
|
|
687
|
-
return [4
|
|
817
|
+
return [4, parseBody(output.body, context)];
|
|
688
818
|
case 1:
|
|
689
819
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
690
820
|
if (data.InstanceTypes !== undefined && data.InstanceTypes !== null) {
|
|
@@ -699,7 +829,7 @@ export var deserializeAws_restJson1GetOutpostInstanceTypesCommand = function (ou
|
|
|
699
829
|
if (data.OutpostId !== undefined && data.OutpostId !== null) {
|
|
700
830
|
contents.OutpostId = __expectString(data.OutpostId);
|
|
701
831
|
}
|
|
702
|
-
return [2
|
|
832
|
+
return [2, Promise.resolve(contents)];
|
|
703
833
|
}
|
|
704
834
|
});
|
|
705
835
|
}); };
|
|
@@ -711,47 +841,47 @@ var deserializeAws_restJson1GetOutpostInstanceTypesCommandError = function (outp
|
|
|
711
841
|
case 0:
|
|
712
842
|
_a = [__assign({}, output)];
|
|
713
843
|
_g = {};
|
|
714
|
-
return [4
|
|
844
|
+
return [4, parseBody(output.body, context)];
|
|
715
845
|
case 1:
|
|
716
846
|
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
717
847
|
errorCode = "UnknownError";
|
|
718
848
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
719
849
|
_b = errorCode;
|
|
720
850
|
switch (_b) {
|
|
721
|
-
case "AccessDeniedException": return [3
|
|
722
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3
|
|
723
|
-
case "InternalServerException": return [3
|
|
724
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
725
|
-
case "NotFoundException": return [3
|
|
726
|
-
case "com.amazonaws.outposts#NotFoundException": return [3
|
|
727
|
-
case "ValidationException": return [3
|
|
728
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
851
|
+
case "AccessDeniedException": return [3, 2];
|
|
852
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
853
|
+
case "InternalServerException": return [3, 4];
|
|
854
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
855
|
+
case "NotFoundException": return [3, 6];
|
|
856
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 6];
|
|
857
|
+
case "ValidationException": return [3, 8];
|
|
858
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
729
859
|
}
|
|
730
|
-
return [3
|
|
860
|
+
return [3, 10];
|
|
731
861
|
case 2:
|
|
732
862
|
_c = [{}];
|
|
733
|
-
return [4
|
|
863
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
734
864
|
case 3:
|
|
735
865
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
736
|
-
return [3
|
|
866
|
+
return [3, 11];
|
|
737
867
|
case 4:
|
|
738
868
|
_d = [{}];
|
|
739
|
-
return [4
|
|
869
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
740
870
|
case 5:
|
|
741
871
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
742
|
-
return [3
|
|
872
|
+
return [3, 11];
|
|
743
873
|
case 6:
|
|
744
874
|
_e = [{}];
|
|
745
|
-
return [4
|
|
875
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
746
876
|
case 7:
|
|
747
877
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
748
|
-
return [3
|
|
878
|
+
return [3, 11];
|
|
749
879
|
case 8:
|
|
750
880
|
_f = [{}];
|
|
751
|
-
return [4
|
|
881
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
752
882
|
case 9:
|
|
753
883
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
754
|
-
return [3
|
|
884
|
+
return [3, 11];
|
|
755
885
|
case 10:
|
|
756
886
|
parsedBody = parsedOutput.body;
|
|
757
887
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -761,7 +891,7 @@ var deserializeAws_restJson1GetOutpostInstanceTypesCommandError = function (outp
|
|
|
761
891
|
message = response.message || response.Message || errorCode;
|
|
762
892
|
response.message = message;
|
|
763
893
|
delete response.Message;
|
|
764
|
-
return [2
|
|
894
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
765
895
|
}
|
|
766
896
|
});
|
|
767
897
|
}); };
|
|
@@ -771,7 +901,7 @@ export var deserializeAws_restJson1ListOutpostsCommand = function (output, conte
|
|
|
771
901
|
switch (_c.label) {
|
|
772
902
|
case 0:
|
|
773
903
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
774
|
-
return [2
|
|
904
|
+
return [2, deserializeAws_restJson1ListOutpostsCommandError(output, context)];
|
|
775
905
|
}
|
|
776
906
|
contents = {
|
|
777
907
|
$metadata: deserializeMetadata(output),
|
|
@@ -780,7 +910,7 @@ export var deserializeAws_restJson1ListOutpostsCommand = function (output, conte
|
|
|
780
910
|
};
|
|
781
911
|
_a = __expectNonNull;
|
|
782
912
|
_b = __expectObject;
|
|
783
|
-
return [4
|
|
913
|
+
return [4, parseBody(output.body, context)];
|
|
784
914
|
case 1:
|
|
785
915
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
786
916
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
@@ -789,7 +919,7 @@ export var deserializeAws_restJson1ListOutpostsCommand = function (output, conte
|
|
|
789
919
|
if (data.Outposts !== undefined && data.Outposts !== null) {
|
|
790
920
|
contents.Outposts = deserializeAws_restJson1outpostListDefinition(data.Outposts, context);
|
|
791
921
|
}
|
|
792
|
-
return [2
|
|
922
|
+
return [2, Promise.resolve(contents)];
|
|
793
923
|
}
|
|
794
924
|
});
|
|
795
925
|
}); };
|
|
@@ -801,39 +931,39 @@ var deserializeAws_restJson1ListOutpostsCommandError = function (output, context
|
|
|
801
931
|
case 0:
|
|
802
932
|
_a = [__assign({}, output)];
|
|
803
933
|
_f = {};
|
|
804
|
-
return [4
|
|
934
|
+
return [4, parseBody(output.body, context)];
|
|
805
935
|
case 1:
|
|
806
936
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
807
937
|
errorCode = "UnknownError";
|
|
808
938
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
809
939
|
_b = errorCode;
|
|
810
940
|
switch (_b) {
|
|
811
|
-
case "AccessDeniedException": return [3
|
|
812
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3
|
|
813
|
-
case "InternalServerException": return [3
|
|
814
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
815
|
-
case "ValidationException": return [3
|
|
816
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
941
|
+
case "AccessDeniedException": return [3, 2];
|
|
942
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
943
|
+
case "InternalServerException": return [3, 4];
|
|
944
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
945
|
+
case "ValidationException": return [3, 6];
|
|
946
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
817
947
|
}
|
|
818
|
-
return [3
|
|
948
|
+
return [3, 8];
|
|
819
949
|
case 2:
|
|
820
950
|
_c = [{}];
|
|
821
|
-
return [4
|
|
951
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
822
952
|
case 3:
|
|
823
953
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
824
|
-
return [3
|
|
954
|
+
return [3, 9];
|
|
825
955
|
case 4:
|
|
826
956
|
_d = [{}];
|
|
827
|
-
return [4
|
|
957
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
828
958
|
case 5:
|
|
829
959
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
830
|
-
return [3
|
|
960
|
+
return [3, 9];
|
|
831
961
|
case 6:
|
|
832
962
|
_e = [{}];
|
|
833
|
-
return [4
|
|
963
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
834
964
|
case 7:
|
|
835
965
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
836
|
-
return [3
|
|
966
|
+
return [3, 9];
|
|
837
967
|
case 8:
|
|
838
968
|
parsedBody = parsedOutput.body;
|
|
839
969
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -843,7 +973,7 @@ var deserializeAws_restJson1ListOutpostsCommandError = function (output, context
|
|
|
843
973
|
message = response.message || response.Message || errorCode;
|
|
844
974
|
response.message = message;
|
|
845
975
|
delete response.Message;
|
|
846
|
-
return [2
|
|
976
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
847
977
|
}
|
|
848
978
|
});
|
|
849
979
|
}); };
|
|
@@ -853,7 +983,7 @@ export var deserializeAws_restJson1ListSitesCommand = function (output, context)
|
|
|
853
983
|
switch (_c.label) {
|
|
854
984
|
case 0:
|
|
855
985
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
856
|
-
return [2
|
|
986
|
+
return [2, deserializeAws_restJson1ListSitesCommandError(output, context)];
|
|
857
987
|
}
|
|
858
988
|
contents = {
|
|
859
989
|
$metadata: deserializeMetadata(output),
|
|
@@ -862,7 +992,7 @@ export var deserializeAws_restJson1ListSitesCommand = function (output, context)
|
|
|
862
992
|
};
|
|
863
993
|
_a = __expectNonNull;
|
|
864
994
|
_b = __expectObject;
|
|
865
|
-
return [4
|
|
995
|
+
return [4, parseBody(output.body, context)];
|
|
866
996
|
case 1:
|
|
867
997
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
868
998
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
@@ -871,7 +1001,7 @@ export var deserializeAws_restJson1ListSitesCommand = function (output, context)
|
|
|
871
1001
|
if (data.Sites !== undefined && data.Sites !== null) {
|
|
872
1002
|
contents.Sites = deserializeAws_restJson1siteListDefinition(data.Sites, context);
|
|
873
1003
|
}
|
|
874
|
-
return [2
|
|
1004
|
+
return [2, Promise.resolve(contents)];
|
|
875
1005
|
}
|
|
876
1006
|
});
|
|
877
1007
|
}); };
|
|
@@ -883,39 +1013,39 @@ var deserializeAws_restJson1ListSitesCommandError = function (output, context) {
|
|
|
883
1013
|
case 0:
|
|
884
1014
|
_a = [__assign({}, output)];
|
|
885
1015
|
_f = {};
|
|
886
|
-
return [4
|
|
1016
|
+
return [4, parseBody(output.body, context)];
|
|
887
1017
|
case 1:
|
|
888
1018
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
889
1019
|
errorCode = "UnknownError";
|
|
890
1020
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
891
1021
|
_b = errorCode;
|
|
892
1022
|
switch (_b) {
|
|
893
|
-
case "AccessDeniedException": return [3
|
|
894
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3
|
|
895
|
-
case "InternalServerException": return [3
|
|
896
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
897
|
-
case "ValidationException": return [3
|
|
898
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
1023
|
+
case "AccessDeniedException": return [3, 2];
|
|
1024
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
1025
|
+
case "InternalServerException": return [3, 4];
|
|
1026
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
1027
|
+
case "ValidationException": return [3, 6];
|
|
1028
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
899
1029
|
}
|
|
900
|
-
return [3
|
|
1030
|
+
return [3, 8];
|
|
901
1031
|
case 2:
|
|
902
1032
|
_c = [{}];
|
|
903
|
-
return [4
|
|
1033
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
904
1034
|
case 3:
|
|
905
1035
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
906
|
-
return [3
|
|
1036
|
+
return [3, 9];
|
|
907
1037
|
case 4:
|
|
908
1038
|
_d = [{}];
|
|
909
|
-
return [4
|
|
1039
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
910
1040
|
case 5:
|
|
911
1041
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
912
|
-
return [3
|
|
1042
|
+
return [3, 9];
|
|
913
1043
|
case 6:
|
|
914
1044
|
_e = [{}];
|
|
915
|
-
return [4
|
|
1045
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
916
1046
|
case 7:
|
|
917
1047
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
918
|
-
return [3
|
|
1048
|
+
return [3, 9];
|
|
919
1049
|
case 8:
|
|
920
1050
|
parsedBody = parsedOutput.body;
|
|
921
1051
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -925,7 +1055,7 @@ var deserializeAws_restJson1ListSitesCommandError = function (output, context) {
|
|
|
925
1055
|
message = response.message || response.Message || errorCode;
|
|
926
1056
|
response.message = message;
|
|
927
1057
|
delete response.Message;
|
|
928
|
-
return [2
|
|
1058
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
929
1059
|
}
|
|
930
1060
|
});
|
|
931
1061
|
}); };
|
|
@@ -935,7 +1065,7 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
|
|
|
935
1065
|
switch (_c.label) {
|
|
936
1066
|
case 0:
|
|
937
1067
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
938
|
-
return [2
|
|
1068
|
+
return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
|
|
939
1069
|
}
|
|
940
1070
|
contents = {
|
|
941
1071
|
$metadata: deserializeMetadata(output),
|
|
@@ -943,13 +1073,13 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
|
|
|
943
1073
|
};
|
|
944
1074
|
_a = __expectNonNull;
|
|
945
1075
|
_b = __expectObject;
|
|
946
|
-
return [4
|
|
1076
|
+
return [4, parseBody(output.body, context)];
|
|
947
1077
|
case 1:
|
|
948
1078
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
949
1079
|
if (data.Tags !== undefined && data.Tags !== null) {
|
|
950
1080
|
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
951
1081
|
}
|
|
952
|
-
return [2
|
|
1082
|
+
return [2, Promise.resolve(contents)];
|
|
953
1083
|
}
|
|
954
1084
|
});
|
|
955
1085
|
}); };
|
|
@@ -961,39 +1091,39 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
961
1091
|
case 0:
|
|
962
1092
|
_a = [__assign({}, output)];
|
|
963
1093
|
_f = {};
|
|
964
|
-
return [4
|
|
1094
|
+
return [4, parseBody(output.body, context)];
|
|
965
1095
|
case 1:
|
|
966
1096
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
967
1097
|
errorCode = "UnknownError";
|
|
968
1098
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
969
1099
|
_b = errorCode;
|
|
970
1100
|
switch (_b) {
|
|
971
|
-
case "InternalServerException": return [3
|
|
972
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
973
|
-
case "NotFoundException": return [3
|
|
974
|
-
case "com.amazonaws.outposts#NotFoundException": return [3
|
|
975
|
-
case "ValidationException": return [3
|
|
976
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
1101
|
+
case "InternalServerException": return [3, 2];
|
|
1102
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 2];
|
|
1103
|
+
case "NotFoundException": return [3, 4];
|
|
1104
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 4];
|
|
1105
|
+
case "ValidationException": return [3, 6];
|
|
1106
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
977
1107
|
}
|
|
978
|
-
return [3
|
|
1108
|
+
return [3, 8];
|
|
979
1109
|
case 2:
|
|
980
1110
|
_c = [{}];
|
|
981
|
-
return [4
|
|
1111
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
982
1112
|
case 3:
|
|
983
1113
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
984
|
-
return [3
|
|
1114
|
+
return [3, 9];
|
|
985
1115
|
case 4:
|
|
986
1116
|
_d = [{}];
|
|
987
|
-
return [4
|
|
1117
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
988
1118
|
case 5:
|
|
989
1119
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
990
|
-
return [3
|
|
1120
|
+
return [3, 9];
|
|
991
1121
|
case 6:
|
|
992
1122
|
_e = [{}];
|
|
993
|
-
return [4
|
|
1123
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
994
1124
|
case 7:
|
|
995
1125
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
996
|
-
return [3
|
|
1126
|
+
return [3, 9];
|
|
997
1127
|
case 8:
|
|
998
1128
|
parsedBody = parsedOutput.body;
|
|
999
1129
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -1003,7 +1133,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
1003
1133
|
message = response.message || response.Message || errorCode;
|
|
1004
1134
|
response.message = message;
|
|
1005
1135
|
delete response.Message;
|
|
1006
|
-
return [2
|
|
1136
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1007
1137
|
}
|
|
1008
1138
|
});
|
|
1009
1139
|
}); };
|
|
@@ -1013,15 +1143,15 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
|
|
|
1013
1143
|
switch (_a.label) {
|
|
1014
1144
|
case 0:
|
|
1015
1145
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1016
|
-
return [2
|
|
1146
|
+
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
1017
1147
|
}
|
|
1018
1148
|
contents = {
|
|
1019
1149
|
$metadata: deserializeMetadata(output),
|
|
1020
1150
|
};
|
|
1021
|
-
return [4
|
|
1151
|
+
return [4, collectBody(output.body, context)];
|
|
1022
1152
|
case 1:
|
|
1023
1153
|
_a.sent();
|
|
1024
|
-
return [2
|
|
1154
|
+
return [2, Promise.resolve(contents)];
|
|
1025
1155
|
}
|
|
1026
1156
|
});
|
|
1027
1157
|
}); };
|
|
@@ -1033,39 +1163,39 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
1033
1163
|
case 0:
|
|
1034
1164
|
_a = [__assign({}, output)];
|
|
1035
1165
|
_f = {};
|
|
1036
|
-
return [4
|
|
1166
|
+
return [4, parseBody(output.body, context)];
|
|
1037
1167
|
case 1:
|
|
1038
1168
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1039
1169
|
errorCode = "UnknownError";
|
|
1040
1170
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1041
1171
|
_b = errorCode;
|
|
1042
1172
|
switch (_b) {
|
|
1043
|
-
case "InternalServerException": return [3
|
|
1044
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
1045
|
-
case "NotFoundException": return [3
|
|
1046
|
-
case "com.amazonaws.outposts#NotFoundException": return [3
|
|
1047
|
-
case "ValidationException": return [3
|
|
1048
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
1173
|
+
case "InternalServerException": return [3, 2];
|
|
1174
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 2];
|
|
1175
|
+
case "NotFoundException": return [3, 4];
|
|
1176
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 4];
|
|
1177
|
+
case "ValidationException": return [3, 6];
|
|
1178
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
1049
1179
|
}
|
|
1050
|
-
return [3
|
|
1180
|
+
return [3, 8];
|
|
1051
1181
|
case 2:
|
|
1052
1182
|
_c = [{}];
|
|
1053
|
-
return [4
|
|
1183
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1054
1184
|
case 3:
|
|
1055
1185
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1056
|
-
return [3
|
|
1186
|
+
return [3, 9];
|
|
1057
1187
|
case 4:
|
|
1058
1188
|
_d = [{}];
|
|
1059
|
-
return [4
|
|
1189
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1060
1190
|
case 5:
|
|
1061
1191
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1062
|
-
return [3
|
|
1192
|
+
return [3, 9];
|
|
1063
1193
|
case 6:
|
|
1064
1194
|
_e = [{}];
|
|
1065
|
-
return [4
|
|
1195
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1066
1196
|
case 7:
|
|
1067
1197
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1068
|
-
return [3
|
|
1198
|
+
return [3, 9];
|
|
1069
1199
|
case 8:
|
|
1070
1200
|
parsedBody = parsedOutput.body;
|
|
1071
1201
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -1075,7 +1205,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
1075
1205
|
message = response.message || response.Message || errorCode;
|
|
1076
1206
|
response.message = message;
|
|
1077
1207
|
delete response.Message;
|
|
1078
|
-
return [2
|
|
1208
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1079
1209
|
}
|
|
1080
1210
|
});
|
|
1081
1211
|
}); };
|
|
@@ -1085,15 +1215,15 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
|
|
|
1085
1215
|
switch (_a.label) {
|
|
1086
1216
|
case 0:
|
|
1087
1217
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1088
|
-
return [2
|
|
1218
|
+
return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
|
|
1089
1219
|
}
|
|
1090
1220
|
contents = {
|
|
1091
1221
|
$metadata: deserializeMetadata(output),
|
|
1092
1222
|
};
|
|
1093
|
-
return [4
|
|
1223
|
+
return [4, collectBody(output.body, context)];
|
|
1094
1224
|
case 1:
|
|
1095
1225
|
_a.sent();
|
|
1096
|
-
return [2
|
|
1226
|
+
return [2, Promise.resolve(contents)];
|
|
1097
1227
|
}
|
|
1098
1228
|
});
|
|
1099
1229
|
}); };
|
|
@@ -1105,39 +1235,39 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
1105
1235
|
case 0:
|
|
1106
1236
|
_a = [__assign({}, output)];
|
|
1107
1237
|
_f = {};
|
|
1108
|
-
return [4
|
|
1238
|
+
return [4, parseBody(output.body, context)];
|
|
1109
1239
|
case 1:
|
|
1110
1240
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1111
1241
|
errorCode = "UnknownError";
|
|
1112
1242
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1113
1243
|
_b = errorCode;
|
|
1114
1244
|
switch (_b) {
|
|
1115
|
-
case "InternalServerException": return [3
|
|
1116
|
-
case "com.amazonaws.outposts#InternalServerException": return [3
|
|
1117
|
-
case "NotFoundException": return [3
|
|
1118
|
-
case "com.amazonaws.outposts#NotFoundException": return [3
|
|
1119
|
-
case "ValidationException": return [3
|
|
1120
|
-
case "com.amazonaws.outposts#ValidationException": return [3
|
|
1245
|
+
case "InternalServerException": return [3, 2];
|
|
1246
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 2];
|
|
1247
|
+
case "NotFoundException": return [3, 4];
|
|
1248
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 4];
|
|
1249
|
+
case "ValidationException": return [3, 6];
|
|
1250
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
1121
1251
|
}
|
|
1122
|
-
return [3
|
|
1252
|
+
return [3, 8];
|
|
1123
1253
|
case 2:
|
|
1124
1254
|
_c = [{}];
|
|
1125
|
-
return [4
|
|
1255
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1126
1256
|
case 3:
|
|
1127
1257
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1128
|
-
return [3
|
|
1258
|
+
return [3, 9];
|
|
1129
1259
|
case 4:
|
|
1130
1260
|
_d = [{}];
|
|
1131
|
-
return [4
|
|
1261
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1132
1262
|
case 5:
|
|
1133
1263
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1134
|
-
return [3
|
|
1264
|
+
return [3, 9];
|
|
1135
1265
|
case 6:
|
|
1136
1266
|
_e = [{}];
|
|
1137
|
-
return [4
|
|
1267
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1138
1268
|
case 7:
|
|
1139
1269
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1140
|
-
return [3
|
|
1270
|
+
return [3, 9];
|
|
1141
1271
|
case 8:
|
|
1142
1272
|
parsedBody = parsedOutput.body;
|
|
1143
1273
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -1147,7 +1277,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
1147
1277
|
message = response.message || response.Message || errorCode;
|
|
1148
1278
|
response.message = message;
|
|
1149
1279
|
delete response.Message;
|
|
1150
|
-
return [2
|
|
1280
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1151
1281
|
}
|
|
1152
1282
|
});
|
|
1153
1283
|
}); };
|
|
@@ -1164,7 +1294,7 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
|
|
|
1164
1294
|
if (data.Message !== undefined && data.Message !== null) {
|
|
1165
1295
|
contents.Message = __expectString(data.Message);
|
|
1166
1296
|
}
|
|
1167
|
-
return [2
|
|
1297
|
+
return [2, contents];
|
|
1168
1298
|
});
|
|
1169
1299
|
}); };
|
|
1170
1300
|
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1188,7 +1318,7 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
|
|
|
1188
1318
|
if (data.ResourceType !== undefined && data.ResourceType !== null) {
|
|
1189
1319
|
contents.ResourceType = __expectString(data.ResourceType);
|
|
1190
1320
|
}
|
|
1191
|
-
return [2
|
|
1321
|
+
return [2, contents];
|
|
1192
1322
|
});
|
|
1193
1323
|
}); };
|
|
1194
1324
|
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1204,7 +1334,7 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
|
|
|
1204
1334
|
if (data.Message !== undefined && data.Message !== null) {
|
|
1205
1335
|
contents.Message = __expectString(data.Message);
|
|
1206
1336
|
}
|
|
1207
|
-
return [2
|
|
1337
|
+
return [2, contents];
|
|
1208
1338
|
});
|
|
1209
1339
|
}); };
|
|
1210
1340
|
var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1220,7 +1350,7 @@ var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput,
|
|
|
1220
1350
|
if (data.Message !== undefined && data.Message !== null) {
|
|
1221
1351
|
contents.Message = __expectString(data.Message);
|
|
1222
1352
|
}
|
|
1223
|
-
return [2
|
|
1353
|
+
return [2, contents];
|
|
1224
1354
|
});
|
|
1225
1355
|
}); };
|
|
1226
1356
|
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1236,7 +1366,7 @@ var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (pa
|
|
|
1236
1366
|
if (data.Message !== undefined && data.Message !== null) {
|
|
1237
1367
|
contents.Message = __expectString(data.Message);
|
|
1238
1368
|
}
|
|
1239
|
-
return [2
|
|
1369
|
+
return [2, contents];
|
|
1240
1370
|
});
|
|
1241
1371
|
}); };
|
|
1242
1372
|
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1252,9 +1382,22 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
|
|
|
1252
1382
|
if (data.Message !== undefined && data.Message !== null) {
|
|
1253
1383
|
contents.Message = __expectString(data.Message);
|
|
1254
1384
|
}
|
|
1255
|
-
return [2
|
|
1385
|
+
return [2, contents];
|
|
1256
1386
|
});
|
|
1257
1387
|
}); };
|
|
1388
|
+
var serializeAws_restJson1LineItemRequest = function (input, context) {
|
|
1389
|
+
return __assign(__assign({}, (input.CatalogItemId !== undefined && input.CatalogItemId !== null && { CatalogItemId: input.CatalogItemId })), (input.Quantity !== undefined && input.Quantity !== null && { Quantity: input.Quantity }));
|
|
1390
|
+
};
|
|
1391
|
+
var serializeAws_restJson1LineItemRequestListDefinition = function (input, context) {
|
|
1392
|
+
return input
|
|
1393
|
+
.filter(function (e) { return e != null; })
|
|
1394
|
+
.map(function (entry) {
|
|
1395
|
+
if (entry === null) {
|
|
1396
|
+
return null;
|
|
1397
|
+
}
|
|
1398
|
+
return serializeAws_restJson1LineItemRequest(entry, context);
|
|
1399
|
+
});
|
|
1400
|
+
};
|
|
1258
1401
|
var serializeAws_restJson1TagMap = function (input, context) {
|
|
1259
1402
|
return Object.entries(input).reduce(function (acc, _a) {
|
|
1260
1403
|
var _b;
|
|
@@ -1280,6 +1423,41 @@ var deserializeAws_restJson1InstanceTypeListDefinition = function (output, conte
|
|
|
1280
1423
|
return deserializeAws_restJson1InstanceTypeItem(entry, context);
|
|
1281
1424
|
});
|
|
1282
1425
|
};
|
|
1426
|
+
var deserializeAws_restJson1LineItem = function (output, context) {
|
|
1427
|
+
return {
|
|
1428
|
+
CatalogItemId: __expectString(output.CatalogItemId),
|
|
1429
|
+
LineItemId: __expectString(output.LineItemId),
|
|
1430
|
+
Quantity: __expectInt32(output.Quantity),
|
|
1431
|
+
Status: __expectString(output.Status),
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1434
|
+
var deserializeAws_restJson1LineItemListDefinition = function (output, context) {
|
|
1435
|
+
return (output || [])
|
|
1436
|
+
.filter(function (e) { return e != null; })
|
|
1437
|
+
.map(function (entry) {
|
|
1438
|
+
if (entry === null) {
|
|
1439
|
+
return null;
|
|
1440
|
+
}
|
|
1441
|
+
return deserializeAws_restJson1LineItem(entry, context);
|
|
1442
|
+
});
|
|
1443
|
+
};
|
|
1444
|
+
var deserializeAws_restJson1Order = function (output, context) {
|
|
1445
|
+
return {
|
|
1446
|
+
LineItems: output.LineItems !== undefined && output.LineItems !== null
|
|
1447
|
+
? deserializeAws_restJson1LineItemListDefinition(output.LineItems, context)
|
|
1448
|
+
: undefined,
|
|
1449
|
+
OrderFulfilledDate: output.OrderFulfilledDate !== undefined && output.OrderFulfilledDate !== null
|
|
1450
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderFulfilledDate)))
|
|
1451
|
+
: undefined,
|
|
1452
|
+
OrderId: __expectString(output.OrderId),
|
|
1453
|
+
OrderSubmissionDate: output.OrderSubmissionDate !== undefined && output.OrderSubmissionDate !== null
|
|
1454
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderSubmissionDate)))
|
|
1455
|
+
: undefined,
|
|
1456
|
+
OutpostId: __expectString(output.OutpostId),
|
|
1457
|
+
PaymentOption: __expectString(output.PaymentOption),
|
|
1458
|
+
Status: __expectString(output.Status),
|
|
1459
|
+
};
|
|
1460
|
+
};
|
|
1283
1461
|
var deserializeAws_restJson1Outpost = function (output, context) {
|
|
1284
1462
|
return {
|
|
1285
1463
|
AvailabilityZone: __expectString(output.AvailabilityZone),
|
|
@@ -1348,7 +1526,6 @@ var deserializeMetadata = function (output) {
|
|
|
1348
1526
|
cfId: output.headers["x-amz-cf-id"],
|
|
1349
1527
|
});
|
|
1350
1528
|
};
|
|
1351
|
-
// Collect low-level response body stream to Uint8Array.
|
|
1352
1529
|
var collectBody = function (streamBody, context) {
|
|
1353
1530
|
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1354
1531
|
if (streamBody instanceof Uint8Array) {
|
|
@@ -1356,7 +1533,6 @@ var collectBody = function (streamBody, context) {
|
|
|
1356
1533
|
}
|
|
1357
1534
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1358
1535
|
};
|
|
1359
|
-
// Encode Uint8Array data into string with utf-8.
|
|
1360
1536
|
var collectBodyString = function (streamBody, context) {
|
|
1361
1537
|
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1362
1538
|
};
|
|
@@ -1375,9 +1551,6 @@ var parseBody = function (streamBody, context) {
|
|
|
1375
1551
|
return {};
|
|
1376
1552
|
});
|
|
1377
1553
|
};
|
|
1378
|
-
/**
|
|
1379
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
1380
|
-
*/
|
|
1381
1554
|
var loadRestJsonErrorCode = function (output, data) {
|
|
1382
1555
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1383
1556
|
var sanitizeErrorCode = function (rawValue) {
|