@aws-sdk/client-outposts 3.181.0 → 3.183.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 +8 -0
- package/dist-es/Outposts.js +106 -113
- package/dist-es/OutpostsClient.js +22 -28
- package/dist-es/commands/CancelOrderCommand.js +21 -28
- package/dist-es/commands/CreateOrderCommand.js +21 -28
- package/dist-es/commands/CreateOutpostCommand.js +21 -28
- package/dist-es/commands/CreateSiteCommand.js +21 -28
- package/dist-es/commands/DeleteOutpostCommand.js +21 -28
- package/dist-es/commands/DeleteSiteCommand.js +21 -28
- package/dist-es/commands/GetCatalogItemCommand.js +21 -28
- package/dist-es/commands/GetConnectionCommand.js +21 -28
- package/dist-es/commands/GetOrderCommand.js +21 -28
- package/dist-es/commands/GetOutpostCommand.js +21 -28
- package/dist-es/commands/GetOutpostInstanceTypesCommand.js +21 -28
- package/dist-es/commands/GetSiteAddressCommand.js +21 -28
- package/dist-es/commands/GetSiteCommand.js +21 -28
- package/dist-es/commands/ListAssetsCommand.js +21 -28
- package/dist-es/commands/ListCatalogItemsCommand.js +21 -28
- package/dist-es/commands/ListOrdersCommand.js +21 -28
- package/dist-es/commands/ListOutpostsCommand.js +21 -28
- package/dist-es/commands/ListSitesCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/StartConnectionCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateOutpostCommand.js +21 -28
- package/dist-es/commands/UpdateSiteAddressCommand.js +21 -28
- package/dist-es/commands/UpdateSiteCommand.js +21 -28
- package/dist-es/commands/UpdateSiteRackPhysicalPropertiesCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/OutpostsServiceException.js +5 -10
- package/dist-es/models/models_0.js +281 -144
- package/dist-es/pagination/GetOutpostInstanceTypesPaginator.js +25 -68
- package/dist-es/pagination/ListAssetsPaginator.js +25 -68
- package/dist-es/pagination/ListCatalogItemsPaginator.js +25 -68
- package/dist-es/pagination/ListOrdersPaginator.js +25 -68
- package/dist-es/pagination/ListOutpostsPaginator.js +25 -68
- package/dist-es/pagination/ListSitesPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1870 -2638
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,2592 +1,1840 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { AccessDeniedException, ConflictException, InternalServerException, NotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
5
4
|
import { OutpostsServiceException as __BaseException } from "../models/OutpostsServiceException";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
method: "POST",
|
|
21
|
-
headers: headers,
|
|
22
|
-
path: resolvedPath,
|
|
23
|
-
body: body,
|
|
24
|
-
})];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}); };
|
|
28
|
-
export var serializeAws_restJson1CreateOrderCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
30
|
-
return __generator(this, function (_c) {
|
|
31
|
-
switch (_c.label) {
|
|
32
|
-
case 0: return [4, context.endpoint()];
|
|
33
|
-
case 1:
|
|
34
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
35
|
-
headers = {
|
|
36
|
-
"content-type": "application/json",
|
|
37
|
-
};
|
|
38
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/orders";
|
|
39
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.LineItems != null && {
|
|
40
|
-
LineItems: serializeAws_restJson1LineItemRequestListDefinition(input.LineItems, context),
|
|
41
|
-
})), (input.OutpostIdentifier != null && { OutpostIdentifier: input.OutpostIdentifier })), (input.PaymentOption != null && { PaymentOption: input.PaymentOption })), (input.PaymentTerm != null && { PaymentTerm: input.PaymentTerm })));
|
|
42
|
-
return [2, new __HttpRequest({
|
|
43
|
-
protocol: protocol,
|
|
44
|
-
hostname: hostname,
|
|
45
|
-
port: port,
|
|
46
|
-
method: "POST",
|
|
47
|
-
headers: headers,
|
|
48
|
-
path: resolvedPath,
|
|
49
|
-
body: body,
|
|
50
|
-
})];
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}); };
|
|
54
|
-
export var serializeAws_restJson1CreateOutpostCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
56
|
-
return __generator(this, function (_c) {
|
|
57
|
-
switch (_c.label) {
|
|
58
|
-
case 0: return [4, context.endpoint()];
|
|
59
|
-
case 1:
|
|
60
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
61
|
-
headers = {
|
|
62
|
-
"content-type": "application/json",
|
|
63
|
-
};
|
|
64
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/outposts";
|
|
65
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone })), (input.AvailabilityZoneId != null && { AvailabilityZoneId: input.AvailabilityZoneId })), (input.Description != null && { Description: input.Description })), (input.Name != null && { Name: input.Name })), (input.SiteId != null && { SiteId: input.SiteId })), (input.SupportedHardwareType != null && { SupportedHardwareType: input.SupportedHardwareType })), (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
66
|
-
return [2, new __HttpRequest({
|
|
67
|
-
protocol: protocol,
|
|
68
|
-
hostname: hostname,
|
|
69
|
-
port: port,
|
|
70
|
-
method: "POST",
|
|
71
|
-
headers: headers,
|
|
72
|
-
path: resolvedPath,
|
|
73
|
-
body: body,
|
|
74
|
-
})];
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}); };
|
|
78
|
-
export var serializeAws_restJson1CreateSiteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
79
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
80
|
-
return __generator(this, function (_c) {
|
|
81
|
-
switch (_c.label) {
|
|
82
|
-
case 0: return [4, context.endpoint()];
|
|
83
|
-
case 1:
|
|
84
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
85
|
-
headers = {
|
|
86
|
-
"content-type": "application/json",
|
|
87
|
-
};
|
|
88
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites";
|
|
89
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.Name != null && { Name: input.Name })), (input.Notes != null && { Notes: input.Notes })), (input.OperatingAddress != null && {
|
|
90
|
-
OperatingAddress: serializeAws_restJson1Address(input.OperatingAddress, context),
|
|
91
|
-
})), (input.RackPhysicalProperties != null && {
|
|
92
|
-
RackPhysicalProperties: serializeAws_restJson1RackPhysicalProperties(input.RackPhysicalProperties, context),
|
|
93
|
-
})), (input.ShippingAddress != null && {
|
|
94
|
-
ShippingAddress: serializeAws_restJson1Address(input.ShippingAddress, context),
|
|
95
|
-
})), (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
96
|
-
return [2, new __HttpRequest({
|
|
97
|
-
protocol: protocol,
|
|
98
|
-
hostname: hostname,
|
|
99
|
-
port: port,
|
|
100
|
-
method: "POST",
|
|
101
|
-
headers: headers,
|
|
102
|
-
path: resolvedPath,
|
|
103
|
-
body: body,
|
|
104
|
-
})];
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}); };
|
|
108
|
-
export var serializeAws_restJson1DeleteOutpostCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
109
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
110
|
-
return __generator(this, function (_c) {
|
|
111
|
-
switch (_c.label) {
|
|
112
|
-
case 0: return [4, context.endpoint()];
|
|
113
|
-
case 1:
|
|
114
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
115
|
-
headers = {};
|
|
116
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/outposts/{OutpostId}";
|
|
117
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "OutpostId", function () { return input.OutpostId; }, "{OutpostId}", false);
|
|
118
|
-
return [2, new __HttpRequest({
|
|
119
|
-
protocol: protocol,
|
|
120
|
-
hostname: hostname,
|
|
121
|
-
port: port,
|
|
122
|
-
method: "DELETE",
|
|
123
|
-
headers: headers,
|
|
124
|
-
path: resolvedPath,
|
|
125
|
-
body: body,
|
|
126
|
-
})];
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}); };
|
|
130
|
-
export var serializeAws_restJson1DeleteSiteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
131
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
132
|
-
return __generator(this, function (_c) {
|
|
133
|
-
switch (_c.label) {
|
|
134
|
-
case 0: return [4, context.endpoint()];
|
|
135
|
-
case 1:
|
|
136
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
137
|
-
headers = {};
|
|
138
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}";
|
|
139
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", function () { return input.SiteId; }, "{SiteId}", false);
|
|
140
|
-
return [2, new __HttpRequest({
|
|
141
|
-
protocol: protocol,
|
|
142
|
-
hostname: hostname,
|
|
143
|
-
port: port,
|
|
144
|
-
method: "DELETE",
|
|
145
|
-
headers: headers,
|
|
146
|
-
path: resolvedPath,
|
|
147
|
-
body: body,
|
|
148
|
-
})];
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}); };
|
|
152
|
-
export var serializeAws_restJson1GetCatalogItemCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
153
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
154
|
-
return __generator(this, function (_c) {
|
|
155
|
-
switch (_c.label) {
|
|
156
|
-
case 0: return [4, context.endpoint()];
|
|
157
|
-
case 1:
|
|
158
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
159
|
-
headers = {};
|
|
160
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/catalog/item/{CatalogItemId}";
|
|
161
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "CatalogItemId", function () { return input.CatalogItemId; }, "{CatalogItemId}", false);
|
|
162
|
-
return [2, new __HttpRequest({
|
|
163
|
-
protocol: protocol,
|
|
164
|
-
hostname: hostname,
|
|
165
|
-
port: port,
|
|
166
|
-
method: "GET",
|
|
167
|
-
headers: headers,
|
|
168
|
-
path: resolvedPath,
|
|
169
|
-
body: body,
|
|
170
|
-
})];
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
}); };
|
|
174
|
-
export var serializeAws_restJson1GetConnectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
175
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
176
|
-
return __generator(this, function (_c) {
|
|
177
|
-
switch (_c.label) {
|
|
178
|
-
case 0: return [4, context.endpoint()];
|
|
179
|
-
case 1:
|
|
180
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
181
|
-
headers = {};
|
|
182
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/connections/{ConnectionId}";
|
|
183
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ConnectionId", function () { return input.ConnectionId; }, "{ConnectionId}", false);
|
|
184
|
-
return [2, new __HttpRequest({
|
|
185
|
-
protocol: protocol,
|
|
186
|
-
hostname: hostname,
|
|
187
|
-
port: port,
|
|
188
|
-
method: "GET",
|
|
189
|
-
headers: headers,
|
|
190
|
-
path: resolvedPath,
|
|
191
|
-
body: body,
|
|
192
|
-
})];
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
}); };
|
|
196
|
-
export var serializeAws_restJson1GetOrderCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
197
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
198
|
-
return __generator(this, function (_c) {
|
|
199
|
-
switch (_c.label) {
|
|
200
|
-
case 0: return [4, context.endpoint()];
|
|
201
|
-
case 1:
|
|
202
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
203
|
-
headers = {};
|
|
204
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/orders/{OrderId}";
|
|
205
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "OrderId", function () { return input.OrderId; }, "{OrderId}", false);
|
|
206
|
-
return [2, new __HttpRequest({
|
|
207
|
-
protocol: protocol,
|
|
208
|
-
hostname: hostname,
|
|
209
|
-
port: port,
|
|
210
|
-
method: "GET",
|
|
211
|
-
headers: headers,
|
|
212
|
-
path: resolvedPath,
|
|
213
|
-
body: body,
|
|
214
|
-
})];
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}); };
|
|
218
|
-
export var serializeAws_restJson1GetOutpostCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
219
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
220
|
-
return __generator(this, function (_c) {
|
|
221
|
-
switch (_c.label) {
|
|
222
|
-
case 0: return [4, context.endpoint()];
|
|
223
|
-
case 1:
|
|
224
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
225
|
-
headers = {};
|
|
226
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/outposts/{OutpostId}";
|
|
227
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "OutpostId", function () { return input.OutpostId; }, "{OutpostId}", false);
|
|
228
|
-
return [2, new __HttpRequest({
|
|
229
|
-
protocol: protocol,
|
|
230
|
-
hostname: hostname,
|
|
231
|
-
port: port,
|
|
232
|
-
method: "GET",
|
|
233
|
-
headers: headers,
|
|
234
|
-
path: resolvedPath,
|
|
235
|
-
body: body,
|
|
236
|
-
})];
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
}); };
|
|
240
|
-
export var serializeAws_restJson1GetOutpostInstanceTypesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
241
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
242
|
-
return __generator(this, function (_c) {
|
|
243
|
-
switch (_c.label) {
|
|
244
|
-
case 0: return [4, context.endpoint()];
|
|
245
|
-
case 1:
|
|
246
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
247
|
-
headers = {};
|
|
248
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/outposts/{OutpostId}/instanceTypes";
|
|
249
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "OutpostId", function () { return input.OutpostId; }, "{OutpostId}", false);
|
|
250
|
-
query = map({
|
|
251
|
-
NextToken: [, input.NextToken],
|
|
252
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
253
|
-
});
|
|
254
|
-
return [2, new __HttpRequest({
|
|
255
|
-
protocol: protocol,
|
|
256
|
-
hostname: hostname,
|
|
257
|
-
port: port,
|
|
258
|
-
method: "GET",
|
|
259
|
-
headers: headers,
|
|
260
|
-
path: resolvedPath,
|
|
261
|
-
query: query,
|
|
262
|
-
body: body,
|
|
263
|
-
})];
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
}); };
|
|
267
|
-
export var serializeAws_restJson1GetSiteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
269
|
-
return __generator(this, function (_c) {
|
|
270
|
-
switch (_c.label) {
|
|
271
|
-
case 0: return [4, context.endpoint()];
|
|
272
|
-
case 1:
|
|
273
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
274
|
-
headers = {};
|
|
275
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}";
|
|
276
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", function () { return input.SiteId; }, "{SiteId}", false);
|
|
277
|
-
return [2, new __HttpRequest({
|
|
278
|
-
protocol: protocol,
|
|
279
|
-
hostname: hostname,
|
|
280
|
-
port: port,
|
|
281
|
-
method: "GET",
|
|
282
|
-
headers: headers,
|
|
283
|
-
path: resolvedPath,
|
|
284
|
-
body: body,
|
|
285
|
-
})];
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
}); };
|
|
289
|
-
export var serializeAws_restJson1GetSiteAddressCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
290
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
291
|
-
return __generator(this, function (_c) {
|
|
292
|
-
switch (_c.label) {
|
|
293
|
-
case 0: return [4, context.endpoint()];
|
|
294
|
-
case 1:
|
|
295
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
296
|
-
headers = {};
|
|
297
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}/address";
|
|
298
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", function () { return input.SiteId; }, "{SiteId}", false);
|
|
299
|
-
query = map({
|
|
300
|
-
AddressType: [, input.AddressType],
|
|
301
|
-
});
|
|
302
|
-
return [2, new __HttpRequest({
|
|
303
|
-
protocol: protocol,
|
|
304
|
-
hostname: hostname,
|
|
305
|
-
port: port,
|
|
306
|
-
method: "GET",
|
|
307
|
-
headers: headers,
|
|
308
|
-
path: resolvedPath,
|
|
309
|
-
query: query,
|
|
310
|
-
body: body,
|
|
311
|
-
})];
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
}); };
|
|
315
|
-
export var serializeAws_restJson1ListAssetsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
316
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
317
|
-
return __generator(this, function (_c) {
|
|
318
|
-
switch (_c.label) {
|
|
319
|
-
case 0: return [4, context.endpoint()];
|
|
320
|
-
case 1:
|
|
321
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
322
|
-
headers = {};
|
|
323
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/outposts/{OutpostIdentifier}/assets";
|
|
324
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "OutpostIdentifier", function () { return input.OutpostIdentifier; }, "{OutpostIdentifier}", false);
|
|
325
|
-
query = map({
|
|
326
|
-
HostIdFilter: [
|
|
327
|
-
function () { return input.HostIdFilter !== void 0; },
|
|
328
|
-
function () { return (input.HostIdFilter || []).map(function (_entry) { return _entry; }); },
|
|
329
|
-
],
|
|
330
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
331
|
-
NextToken: [, input.NextToken],
|
|
332
|
-
});
|
|
333
|
-
return [2, new __HttpRequest({
|
|
334
|
-
protocol: protocol,
|
|
335
|
-
hostname: hostname,
|
|
336
|
-
port: port,
|
|
337
|
-
method: "GET",
|
|
338
|
-
headers: headers,
|
|
339
|
-
path: resolvedPath,
|
|
340
|
-
query: query,
|
|
341
|
-
body: body,
|
|
342
|
-
})];
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
}); };
|
|
346
|
-
export var serializeAws_restJson1ListCatalogItemsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
347
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
348
|
-
return __generator(this, function (_c) {
|
|
349
|
-
switch (_c.label) {
|
|
350
|
-
case 0: return [4, context.endpoint()];
|
|
351
|
-
case 1:
|
|
352
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
353
|
-
headers = {};
|
|
354
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/catalog/items";
|
|
355
|
-
query = map({
|
|
356
|
-
NextToken: [, input.NextToken],
|
|
357
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
358
|
-
ItemClassFilter: [
|
|
359
|
-
function () { return input.ItemClassFilter !== void 0; },
|
|
360
|
-
function () { return (input.ItemClassFilter || []).map(function (_entry) { return _entry; }); },
|
|
361
|
-
],
|
|
362
|
-
SupportedStorageFilter: [
|
|
363
|
-
function () { return input.SupportedStorageFilter !== void 0; },
|
|
364
|
-
function () { return (input.SupportedStorageFilter || []).map(function (_entry) { return _entry; }); },
|
|
365
|
-
],
|
|
366
|
-
EC2FamilyFilter: [
|
|
367
|
-
function () { return input.EC2FamilyFilter !== void 0; },
|
|
368
|
-
function () { return (input.EC2FamilyFilter || []).map(function (_entry) { return _entry; }); },
|
|
369
|
-
],
|
|
370
|
-
});
|
|
371
|
-
return [2, new __HttpRequest({
|
|
372
|
-
protocol: protocol,
|
|
373
|
-
hostname: hostname,
|
|
374
|
-
port: port,
|
|
375
|
-
method: "GET",
|
|
376
|
-
headers: headers,
|
|
377
|
-
path: resolvedPath,
|
|
378
|
-
query: query,
|
|
379
|
-
body: body,
|
|
380
|
-
})];
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
}); };
|
|
384
|
-
export var serializeAws_restJson1ListOrdersCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
385
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
386
|
-
return __generator(this, function (_c) {
|
|
387
|
-
switch (_c.label) {
|
|
388
|
-
case 0: return [4, context.endpoint()];
|
|
389
|
-
case 1:
|
|
390
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
391
|
-
headers = {};
|
|
392
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-orders";
|
|
393
|
-
query = map({
|
|
394
|
-
OutpostIdentifierFilter: [, input.OutpostIdentifierFilter],
|
|
395
|
-
NextToken: [, input.NextToken],
|
|
396
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
397
|
-
});
|
|
398
|
-
return [2, new __HttpRequest({
|
|
399
|
-
protocol: protocol,
|
|
400
|
-
hostname: hostname,
|
|
401
|
-
port: port,
|
|
402
|
-
method: "GET",
|
|
403
|
-
headers: headers,
|
|
404
|
-
path: resolvedPath,
|
|
405
|
-
query: query,
|
|
406
|
-
body: body,
|
|
407
|
-
})];
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
}); };
|
|
411
|
-
export var serializeAws_restJson1ListOutpostsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
412
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
413
|
-
return __generator(this, function (_c) {
|
|
414
|
-
switch (_c.label) {
|
|
415
|
-
case 0: return [4, context.endpoint()];
|
|
416
|
-
case 1:
|
|
417
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
418
|
-
headers = {};
|
|
419
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/outposts";
|
|
420
|
-
query = map({
|
|
421
|
-
NextToken: [, input.NextToken],
|
|
422
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
423
|
-
LifeCycleStatusFilter: [
|
|
424
|
-
function () { return input.LifeCycleStatusFilter !== void 0; },
|
|
425
|
-
function () { return (input.LifeCycleStatusFilter || []).map(function (_entry) { return _entry; }); },
|
|
426
|
-
],
|
|
427
|
-
AvailabilityZoneFilter: [
|
|
428
|
-
function () { return input.AvailabilityZoneFilter !== void 0; },
|
|
429
|
-
function () { return (input.AvailabilityZoneFilter || []).map(function (_entry) { return _entry; }); },
|
|
430
|
-
],
|
|
431
|
-
AvailabilityZoneIdFilter: [
|
|
432
|
-
function () { return input.AvailabilityZoneIdFilter !== void 0; },
|
|
433
|
-
function () { return (input.AvailabilityZoneIdFilter || []).map(function (_entry) { return _entry; }); },
|
|
434
|
-
],
|
|
435
|
-
});
|
|
436
|
-
return [2, new __HttpRequest({
|
|
437
|
-
protocol: protocol,
|
|
438
|
-
hostname: hostname,
|
|
439
|
-
port: port,
|
|
440
|
-
method: "GET",
|
|
441
|
-
headers: headers,
|
|
442
|
-
path: resolvedPath,
|
|
443
|
-
query: query,
|
|
444
|
-
body: body,
|
|
445
|
-
})];
|
|
446
|
-
}
|
|
447
|
-
});
|
|
448
|
-
}); };
|
|
449
|
-
export var serializeAws_restJson1ListSitesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
450
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
451
|
-
return __generator(this, function (_c) {
|
|
452
|
-
switch (_c.label) {
|
|
453
|
-
case 0: return [4, context.endpoint()];
|
|
454
|
-
case 1:
|
|
455
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
456
|
-
headers = {};
|
|
457
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites";
|
|
458
|
-
query = map({
|
|
459
|
-
NextToken: [, input.NextToken],
|
|
460
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
461
|
-
OperatingAddressCountryCodeFilter: [
|
|
462
|
-
function () { return input.OperatingAddressCountryCodeFilter !== void 0; },
|
|
463
|
-
function () { return (input.OperatingAddressCountryCodeFilter || []).map(function (_entry) { return _entry; }); },
|
|
464
|
-
],
|
|
465
|
-
OperatingAddressStateOrRegionFilter: [
|
|
466
|
-
function () { return input.OperatingAddressStateOrRegionFilter !== void 0; },
|
|
467
|
-
function () { return (input.OperatingAddressStateOrRegionFilter || []).map(function (_entry) { return _entry; }); },
|
|
468
|
-
],
|
|
469
|
-
OperatingAddressCityFilter: [
|
|
470
|
-
function () { return input.OperatingAddressCityFilter !== void 0; },
|
|
471
|
-
function () { return (input.OperatingAddressCityFilter || []).map(function (_entry) { return _entry; }); },
|
|
472
|
-
],
|
|
473
|
-
});
|
|
474
|
-
return [2, new __HttpRequest({
|
|
475
|
-
protocol: protocol,
|
|
476
|
-
hostname: hostname,
|
|
477
|
-
port: port,
|
|
478
|
-
method: "GET",
|
|
479
|
-
headers: headers,
|
|
480
|
-
path: resolvedPath,
|
|
481
|
-
query: query,
|
|
482
|
-
body: body,
|
|
483
|
-
})];
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
}); };
|
|
487
|
-
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
488
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
489
|
-
return __generator(this, function (_c) {
|
|
490
|
-
switch (_c.label) {
|
|
491
|
-
case 0: return [4, context.endpoint()];
|
|
492
|
-
case 1:
|
|
493
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
494
|
-
headers = {};
|
|
495
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
496
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
497
|
-
return [2, new __HttpRequest({
|
|
498
|
-
protocol: protocol,
|
|
499
|
-
hostname: hostname,
|
|
500
|
-
port: port,
|
|
501
|
-
method: "GET",
|
|
502
|
-
headers: headers,
|
|
503
|
-
path: resolvedPath,
|
|
504
|
-
body: body,
|
|
505
|
-
})];
|
|
506
|
-
}
|
|
507
|
-
});
|
|
508
|
-
}); };
|
|
509
|
-
export var serializeAws_restJson1StartConnectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
510
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
511
|
-
return __generator(this, function (_c) {
|
|
512
|
-
switch (_c.label) {
|
|
513
|
-
case 0: return [4, context.endpoint()];
|
|
514
|
-
case 1:
|
|
515
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
516
|
-
headers = {
|
|
517
|
-
"content-type": "application/json",
|
|
518
|
-
};
|
|
519
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/connections";
|
|
520
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.AssetId != null && { AssetId: input.AssetId })), (input.ClientPublicKey != null && { ClientPublicKey: input.ClientPublicKey })), (input.DeviceSerialNumber != null && { DeviceSerialNumber: input.DeviceSerialNumber })), (input.NetworkInterfaceDeviceIndex != null && {
|
|
521
|
-
NetworkInterfaceDeviceIndex: input.NetworkInterfaceDeviceIndex,
|
|
522
|
-
})));
|
|
523
|
-
return [2, new __HttpRequest({
|
|
524
|
-
protocol: protocol,
|
|
525
|
-
hostname: hostname,
|
|
526
|
-
port: port,
|
|
527
|
-
method: "POST",
|
|
528
|
-
headers: headers,
|
|
529
|
-
path: resolvedPath,
|
|
530
|
-
body: body,
|
|
531
|
-
})];
|
|
532
|
-
}
|
|
533
|
-
});
|
|
534
|
-
}); };
|
|
535
|
-
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
536
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
537
|
-
return __generator(this, function (_c) {
|
|
538
|
-
switch (_c.label) {
|
|
539
|
-
case 0: return [4, context.endpoint()];
|
|
540
|
-
case 1:
|
|
541
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
542
|
-
headers = {
|
|
543
|
-
"content-type": "application/json",
|
|
544
|
-
};
|
|
545
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
546
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
547
|
-
body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
548
|
-
return [2, new __HttpRequest({
|
|
549
|
-
protocol: protocol,
|
|
550
|
-
hostname: hostname,
|
|
551
|
-
port: port,
|
|
552
|
-
method: "POST",
|
|
553
|
-
headers: headers,
|
|
554
|
-
path: resolvedPath,
|
|
555
|
-
body: body,
|
|
556
|
-
})];
|
|
557
|
-
}
|
|
558
|
-
});
|
|
559
|
-
}); };
|
|
560
|
-
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
561
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
562
|
-
return __generator(this, function (_c) {
|
|
563
|
-
switch (_c.label) {
|
|
564
|
-
case 0: return [4, context.endpoint()];
|
|
565
|
-
case 1:
|
|
566
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
567
|
-
headers = {};
|
|
568
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
569
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
570
|
-
query = map({
|
|
571
|
-
tagKeys: [function () { return input.TagKeys !== void 0; }, function () { return (input.TagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
572
|
-
});
|
|
573
|
-
return [2, new __HttpRequest({
|
|
574
|
-
protocol: protocol,
|
|
575
|
-
hostname: hostname,
|
|
576
|
-
port: port,
|
|
577
|
-
method: "DELETE",
|
|
578
|
-
headers: headers,
|
|
579
|
-
path: resolvedPath,
|
|
580
|
-
query: query,
|
|
581
|
-
body: body,
|
|
582
|
-
})];
|
|
583
|
-
}
|
|
5
|
+
export const serializeAws_restJson1CancelOrderCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {};
|
|
8
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/orders/{OrderId}/cancel";
|
|
9
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "OrderId", () => input.OrderId, "{OrderId}", false);
|
|
10
|
+
let body;
|
|
11
|
+
return new __HttpRequest({
|
|
12
|
+
protocol,
|
|
13
|
+
hostname,
|
|
14
|
+
port,
|
|
15
|
+
method: "POST",
|
|
16
|
+
headers,
|
|
17
|
+
path: resolvedPath,
|
|
18
|
+
body,
|
|
584
19
|
});
|
|
585
|
-
}
|
|
586
|
-
export
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
20
|
+
};
|
|
21
|
+
export const serializeAws_restJson1CreateOrderCommand = async (input, context) => {
|
|
22
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
23
|
+
const headers = {
|
|
24
|
+
"content-type": "application/json",
|
|
25
|
+
};
|
|
26
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/orders";
|
|
27
|
+
let body;
|
|
28
|
+
body = JSON.stringify({
|
|
29
|
+
...(input.LineItems != null && {
|
|
30
|
+
LineItems: serializeAws_restJson1LineItemRequestListDefinition(input.LineItems, context),
|
|
31
|
+
}),
|
|
32
|
+
...(input.OutpostIdentifier != null && { OutpostIdentifier: input.OutpostIdentifier }),
|
|
33
|
+
...(input.PaymentOption != null && { PaymentOption: input.PaymentOption }),
|
|
34
|
+
...(input.PaymentTerm != null && { PaymentTerm: input.PaymentTerm }),
|
|
35
|
+
});
|
|
36
|
+
return new __HttpRequest({
|
|
37
|
+
protocol,
|
|
38
|
+
hostname,
|
|
39
|
+
port,
|
|
40
|
+
method: "POST",
|
|
41
|
+
headers,
|
|
42
|
+
path: resolvedPath,
|
|
43
|
+
body,
|
|
609
44
|
});
|
|
610
|
-
}
|
|
611
|
-
export
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
45
|
+
};
|
|
46
|
+
export const serializeAws_restJson1CreateOutpostCommand = async (input, context) => {
|
|
47
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
48
|
+
const headers = {
|
|
49
|
+
"content-type": "application/json",
|
|
50
|
+
};
|
|
51
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/outposts";
|
|
52
|
+
let body;
|
|
53
|
+
body = JSON.stringify({
|
|
54
|
+
...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }),
|
|
55
|
+
...(input.AvailabilityZoneId != null && { AvailabilityZoneId: input.AvailabilityZoneId }),
|
|
56
|
+
...(input.Description != null && { Description: input.Description }),
|
|
57
|
+
...(input.Name != null && { Name: input.Name }),
|
|
58
|
+
...(input.SiteId != null && { SiteId: input.SiteId }),
|
|
59
|
+
...(input.SupportedHardwareType != null && { SupportedHardwareType: input.SupportedHardwareType }),
|
|
60
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
61
|
+
});
|
|
62
|
+
return new __HttpRequest({
|
|
63
|
+
protocol,
|
|
64
|
+
hostname,
|
|
65
|
+
port,
|
|
66
|
+
method: "POST",
|
|
67
|
+
headers,
|
|
68
|
+
path: resolvedPath,
|
|
69
|
+
body,
|
|
634
70
|
});
|
|
635
|
-
}
|
|
636
|
-
export
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
71
|
+
};
|
|
72
|
+
export const serializeAws_restJson1CreateSiteCommand = async (input, context) => {
|
|
73
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
74
|
+
const headers = {
|
|
75
|
+
"content-type": "application/json",
|
|
76
|
+
};
|
|
77
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites";
|
|
78
|
+
let body;
|
|
79
|
+
body = JSON.stringify({
|
|
80
|
+
...(input.Description != null && { Description: input.Description }),
|
|
81
|
+
...(input.Name != null && { Name: input.Name }),
|
|
82
|
+
...(input.Notes != null && { Notes: input.Notes }),
|
|
83
|
+
...(input.OperatingAddress != null && {
|
|
84
|
+
OperatingAddress: serializeAws_restJson1Address(input.OperatingAddress, context),
|
|
85
|
+
}),
|
|
86
|
+
...(input.RackPhysicalProperties != null && {
|
|
87
|
+
RackPhysicalProperties: serializeAws_restJson1RackPhysicalProperties(input.RackPhysicalProperties, context),
|
|
88
|
+
}),
|
|
89
|
+
...(input.ShippingAddress != null && {
|
|
90
|
+
ShippingAddress: serializeAws_restJson1Address(input.ShippingAddress, context),
|
|
91
|
+
}),
|
|
92
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
93
|
+
});
|
|
94
|
+
return new __HttpRequest({
|
|
95
|
+
protocol,
|
|
96
|
+
hostname,
|
|
97
|
+
port,
|
|
98
|
+
method: "POST",
|
|
99
|
+
headers,
|
|
100
|
+
path: resolvedPath,
|
|
101
|
+
body,
|
|
659
102
|
});
|
|
660
|
-
}
|
|
661
|
-
export
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
protocol: protocol,
|
|
676
|
-
hostname: hostname,
|
|
677
|
-
port: port,
|
|
678
|
-
method: "PATCH",
|
|
679
|
-
headers: headers,
|
|
680
|
-
path: resolvedPath,
|
|
681
|
-
body: body,
|
|
682
|
-
})];
|
|
683
|
-
}
|
|
103
|
+
};
|
|
104
|
+
export const serializeAws_restJson1DeleteOutpostCommand = async (input, context) => {
|
|
105
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
106
|
+
const headers = {};
|
|
107
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/outposts/{OutpostId}";
|
|
108
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "OutpostId", () => input.OutpostId, "{OutpostId}", false);
|
|
109
|
+
let body;
|
|
110
|
+
return new __HttpRequest({
|
|
111
|
+
protocol,
|
|
112
|
+
hostname,
|
|
113
|
+
port,
|
|
114
|
+
method: "DELETE",
|
|
115
|
+
headers,
|
|
116
|
+
path: resolvedPath,
|
|
117
|
+
body,
|
|
684
118
|
});
|
|
685
|
-
}
|
|
686
|
-
export
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
return [2, contents];
|
|
701
|
-
}
|
|
119
|
+
};
|
|
120
|
+
export const serializeAws_restJson1DeleteSiteCommand = async (input, context) => {
|
|
121
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
122
|
+
const headers = {};
|
|
123
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}";
|
|
124
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId, "{SiteId}", false);
|
|
125
|
+
let body;
|
|
126
|
+
return new __HttpRequest({
|
|
127
|
+
protocol,
|
|
128
|
+
hostname,
|
|
129
|
+
port,
|
|
130
|
+
method: "DELETE",
|
|
131
|
+
headers,
|
|
132
|
+
path: resolvedPath,
|
|
133
|
+
body,
|
|
702
134
|
});
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
case "AccessDeniedException": return [3, 2];
|
|
719
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
720
|
-
case "ConflictException": return [3, 4];
|
|
721
|
-
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
722
|
-
case "InternalServerException": return [3, 6];
|
|
723
|
-
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
724
|
-
case "NotFoundException": return [3, 8];
|
|
725
|
-
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
726
|
-
case "ValidationException": return [3, 10];
|
|
727
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
728
|
-
}
|
|
729
|
-
return [3, 12];
|
|
730
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
731
|
-
case 3: throw _d.sent();
|
|
732
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
733
|
-
case 5: throw _d.sent();
|
|
734
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
735
|
-
case 7: throw _d.sent();
|
|
736
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
737
|
-
case 9: throw _d.sent();
|
|
738
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
739
|
-
case 11: throw _d.sent();
|
|
740
|
-
case 12:
|
|
741
|
-
parsedBody = parsedOutput.body;
|
|
742
|
-
throwDefaultError({
|
|
743
|
-
output: output,
|
|
744
|
-
parsedBody: parsedBody,
|
|
745
|
-
exceptionCtor: __BaseException,
|
|
746
|
-
errorCode: errorCode,
|
|
747
|
-
});
|
|
748
|
-
_d.label = 13;
|
|
749
|
-
case 13: return [2];
|
|
750
|
-
}
|
|
135
|
+
};
|
|
136
|
+
export const serializeAws_restJson1GetCatalogItemCommand = async (input, context) => {
|
|
137
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
138
|
+
const headers = {};
|
|
139
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/catalog/item/{CatalogItemId}";
|
|
140
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "CatalogItemId", () => input.CatalogItemId, "{CatalogItemId}", false);
|
|
141
|
+
let body;
|
|
142
|
+
return new __HttpRequest({
|
|
143
|
+
protocol,
|
|
144
|
+
hostname,
|
|
145
|
+
port,
|
|
146
|
+
method: "GET",
|
|
147
|
+
headers,
|
|
148
|
+
path: resolvedPath,
|
|
149
|
+
body,
|
|
751
150
|
});
|
|
752
|
-
}
|
|
753
|
-
export
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
case 1:
|
|
768
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
769
|
-
if (data.Order != null) {
|
|
770
|
-
contents.Order = deserializeAws_restJson1Order(data.Order, context);
|
|
771
|
-
}
|
|
772
|
-
return [2, contents];
|
|
773
|
-
}
|
|
151
|
+
};
|
|
152
|
+
export const serializeAws_restJson1GetConnectionCommand = async (input, context) => {
|
|
153
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
154
|
+
const headers = {};
|
|
155
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connections/{ConnectionId}";
|
|
156
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ConnectionId", () => input.ConnectionId, "{ConnectionId}", false);
|
|
157
|
+
let body;
|
|
158
|
+
return new __HttpRequest({
|
|
159
|
+
protocol,
|
|
160
|
+
hostname,
|
|
161
|
+
port,
|
|
162
|
+
method: "GET",
|
|
163
|
+
headers,
|
|
164
|
+
path: resolvedPath,
|
|
165
|
+
body,
|
|
774
166
|
});
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
case "AccessDeniedException": return [3, 2];
|
|
791
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
792
|
-
case "ConflictException": return [3, 4];
|
|
793
|
-
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
794
|
-
case "InternalServerException": return [3, 6];
|
|
795
|
-
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
796
|
-
case "NotFoundException": return [3, 8];
|
|
797
|
-
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
798
|
-
case "ServiceQuotaExceededException": return [3, 10];
|
|
799
|
-
case "com.amazonaws.outposts#ServiceQuotaExceededException": return [3, 10];
|
|
800
|
-
case "ValidationException": return [3, 12];
|
|
801
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 12];
|
|
802
|
-
}
|
|
803
|
-
return [3, 14];
|
|
804
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
805
|
-
case 3: throw _d.sent();
|
|
806
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
807
|
-
case 5: throw _d.sent();
|
|
808
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
809
|
-
case 7: throw _d.sent();
|
|
810
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
811
|
-
case 9: throw _d.sent();
|
|
812
|
-
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
813
|
-
case 11: throw _d.sent();
|
|
814
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
815
|
-
case 13: throw _d.sent();
|
|
816
|
-
case 14:
|
|
817
|
-
parsedBody = parsedOutput.body;
|
|
818
|
-
throwDefaultError({
|
|
819
|
-
output: output,
|
|
820
|
-
parsedBody: parsedBody,
|
|
821
|
-
exceptionCtor: __BaseException,
|
|
822
|
-
errorCode: errorCode,
|
|
823
|
-
});
|
|
824
|
-
_d.label = 15;
|
|
825
|
-
case 15: return [2];
|
|
826
|
-
}
|
|
167
|
+
};
|
|
168
|
+
export const serializeAws_restJson1GetOrderCommand = async (input, context) => {
|
|
169
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
170
|
+
const headers = {};
|
|
171
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/orders/{OrderId}";
|
|
172
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "OrderId", () => input.OrderId, "{OrderId}", false);
|
|
173
|
+
let body;
|
|
174
|
+
return new __HttpRequest({
|
|
175
|
+
protocol,
|
|
176
|
+
hostname,
|
|
177
|
+
port,
|
|
178
|
+
method: "GET",
|
|
179
|
+
headers,
|
|
180
|
+
path: resolvedPath,
|
|
181
|
+
body,
|
|
827
182
|
});
|
|
828
|
-
}
|
|
829
|
-
export
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
case 1:
|
|
844
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
845
|
-
if (data.Outpost != null) {
|
|
846
|
-
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
847
|
-
}
|
|
848
|
-
return [2, contents];
|
|
849
|
-
}
|
|
183
|
+
};
|
|
184
|
+
export const serializeAws_restJson1GetOutpostCommand = async (input, context) => {
|
|
185
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
186
|
+
const headers = {};
|
|
187
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/outposts/{OutpostId}";
|
|
188
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "OutpostId", () => input.OutpostId, "{OutpostId}", false);
|
|
189
|
+
let body;
|
|
190
|
+
return new __HttpRequest({
|
|
191
|
+
protocol,
|
|
192
|
+
hostname,
|
|
193
|
+
port,
|
|
194
|
+
method: "GET",
|
|
195
|
+
headers,
|
|
196
|
+
path: resolvedPath,
|
|
197
|
+
body,
|
|
850
198
|
});
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
872
|
-
case "NotFoundException": return [3, 8];
|
|
873
|
-
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
874
|
-
case "ServiceQuotaExceededException": return [3, 10];
|
|
875
|
-
case "com.amazonaws.outposts#ServiceQuotaExceededException": return [3, 10];
|
|
876
|
-
case "ValidationException": return [3, 12];
|
|
877
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 12];
|
|
878
|
-
}
|
|
879
|
-
return [3, 14];
|
|
880
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
881
|
-
case 3: throw _d.sent();
|
|
882
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
883
|
-
case 5: throw _d.sent();
|
|
884
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
885
|
-
case 7: throw _d.sent();
|
|
886
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
887
|
-
case 9: throw _d.sent();
|
|
888
|
-
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
889
|
-
case 11: throw _d.sent();
|
|
890
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
891
|
-
case 13: throw _d.sent();
|
|
892
|
-
case 14:
|
|
893
|
-
parsedBody = parsedOutput.body;
|
|
894
|
-
throwDefaultError({
|
|
895
|
-
output: output,
|
|
896
|
-
parsedBody: parsedBody,
|
|
897
|
-
exceptionCtor: __BaseException,
|
|
898
|
-
errorCode: errorCode,
|
|
899
|
-
});
|
|
900
|
-
_d.label = 15;
|
|
901
|
-
case 15: return [2];
|
|
902
|
-
}
|
|
199
|
+
};
|
|
200
|
+
export const serializeAws_restJson1GetOutpostInstanceTypesCommand = async (input, context) => {
|
|
201
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
202
|
+
const headers = {};
|
|
203
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/outposts/{OutpostId}/instanceTypes";
|
|
204
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "OutpostId", () => input.OutpostId, "{OutpostId}", false);
|
|
205
|
+
const query = map({
|
|
206
|
+
NextToken: [, input.NextToken],
|
|
207
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
208
|
+
});
|
|
209
|
+
let body;
|
|
210
|
+
return new __HttpRequest({
|
|
211
|
+
protocol,
|
|
212
|
+
hostname,
|
|
213
|
+
port,
|
|
214
|
+
method: "GET",
|
|
215
|
+
headers,
|
|
216
|
+
path: resolvedPath,
|
|
217
|
+
query,
|
|
218
|
+
body,
|
|
903
219
|
});
|
|
904
|
-
}
|
|
905
|
-
export
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
case 1:
|
|
920
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
921
|
-
if (data.Site != null) {
|
|
922
|
-
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
923
|
-
}
|
|
924
|
-
return [2, contents];
|
|
925
|
-
}
|
|
220
|
+
};
|
|
221
|
+
export const serializeAws_restJson1GetSiteCommand = async (input, context) => {
|
|
222
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
223
|
+
const headers = {};
|
|
224
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}";
|
|
225
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId, "{SiteId}", false);
|
|
226
|
+
let body;
|
|
227
|
+
return new __HttpRequest({
|
|
228
|
+
protocol,
|
|
229
|
+
hostname,
|
|
230
|
+
port,
|
|
231
|
+
method: "GET",
|
|
232
|
+
headers,
|
|
233
|
+
path: resolvedPath,
|
|
234
|
+
body,
|
|
926
235
|
});
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
case "InternalServerException": return [3, 6];
|
|
947
|
-
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
948
|
-
case "ServiceQuotaExceededException": return [3, 8];
|
|
949
|
-
case "com.amazonaws.outposts#ServiceQuotaExceededException": return [3, 8];
|
|
950
|
-
case "ValidationException": return [3, 10];
|
|
951
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
952
|
-
}
|
|
953
|
-
return [3, 12];
|
|
954
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
955
|
-
case 3: throw _d.sent();
|
|
956
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
957
|
-
case 5: throw _d.sent();
|
|
958
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
959
|
-
case 7: throw _d.sent();
|
|
960
|
-
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
961
|
-
case 9: throw _d.sent();
|
|
962
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
963
|
-
case 11: throw _d.sent();
|
|
964
|
-
case 12:
|
|
965
|
-
parsedBody = parsedOutput.body;
|
|
966
|
-
throwDefaultError({
|
|
967
|
-
output: output,
|
|
968
|
-
parsedBody: parsedBody,
|
|
969
|
-
exceptionCtor: __BaseException,
|
|
970
|
-
errorCode: errorCode,
|
|
971
|
-
});
|
|
972
|
-
_d.label = 13;
|
|
973
|
-
case 13: return [2];
|
|
974
|
-
}
|
|
236
|
+
};
|
|
237
|
+
export const serializeAws_restJson1GetSiteAddressCommand = async (input, context) => {
|
|
238
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
239
|
+
const headers = {};
|
|
240
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/address";
|
|
241
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId, "{SiteId}", false);
|
|
242
|
+
const query = map({
|
|
243
|
+
AddressType: [, input.AddressType],
|
|
244
|
+
});
|
|
245
|
+
let body;
|
|
246
|
+
return new __HttpRequest({
|
|
247
|
+
protocol,
|
|
248
|
+
hostname,
|
|
249
|
+
port,
|
|
250
|
+
method: "GET",
|
|
251
|
+
headers,
|
|
252
|
+
path: resolvedPath,
|
|
253
|
+
query,
|
|
254
|
+
body,
|
|
975
255
|
});
|
|
976
|
-
}
|
|
977
|
-
export
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
256
|
+
};
|
|
257
|
+
export const serializeAws_restJson1ListAssetsCommand = async (input, context) => {
|
|
258
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
259
|
+
const headers = {};
|
|
260
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/outposts/{OutpostIdentifier}/assets";
|
|
261
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "OutpostIdentifier", () => input.OutpostIdentifier, "{OutpostIdentifier}", false);
|
|
262
|
+
const query = map({
|
|
263
|
+
HostIdFilter: [
|
|
264
|
+
() => input.HostIdFilter !== void 0,
|
|
265
|
+
() => (input.HostIdFilter || []).map((_entry) => _entry),
|
|
266
|
+
],
|
|
267
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
268
|
+
NextToken: [, input.NextToken],
|
|
269
|
+
});
|
|
270
|
+
let body;
|
|
271
|
+
return new __HttpRequest({
|
|
272
|
+
protocol,
|
|
273
|
+
hostname,
|
|
274
|
+
port,
|
|
275
|
+
method: "GET",
|
|
276
|
+
headers,
|
|
277
|
+
path: resolvedPath,
|
|
278
|
+
query,
|
|
279
|
+
body,
|
|
993
280
|
});
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1026
|
-
case 7: throw _d.sent();
|
|
1027
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1028
|
-
case 9: throw _d.sent();
|
|
1029
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1030
|
-
case 11: throw _d.sent();
|
|
1031
|
-
case 12:
|
|
1032
|
-
parsedBody = parsedOutput.body;
|
|
1033
|
-
throwDefaultError({
|
|
1034
|
-
output: output,
|
|
1035
|
-
parsedBody: parsedBody,
|
|
1036
|
-
exceptionCtor: __BaseException,
|
|
1037
|
-
errorCode: errorCode,
|
|
1038
|
-
});
|
|
1039
|
-
_d.label = 13;
|
|
1040
|
-
case 13: return [2];
|
|
1041
|
-
}
|
|
281
|
+
};
|
|
282
|
+
export const serializeAws_restJson1ListCatalogItemsCommand = async (input, context) => {
|
|
283
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
284
|
+
const headers = {};
|
|
285
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/catalog/items";
|
|
286
|
+
const query = map({
|
|
287
|
+
NextToken: [, input.NextToken],
|
|
288
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
289
|
+
ItemClassFilter: [
|
|
290
|
+
() => input.ItemClassFilter !== void 0,
|
|
291
|
+
() => (input.ItemClassFilter || []).map((_entry) => _entry),
|
|
292
|
+
],
|
|
293
|
+
SupportedStorageFilter: [
|
|
294
|
+
() => input.SupportedStorageFilter !== void 0,
|
|
295
|
+
() => (input.SupportedStorageFilter || []).map((_entry) => _entry),
|
|
296
|
+
],
|
|
297
|
+
EC2FamilyFilter: [
|
|
298
|
+
() => input.EC2FamilyFilter !== void 0,
|
|
299
|
+
() => (input.EC2FamilyFilter || []).map((_entry) => _entry),
|
|
300
|
+
],
|
|
301
|
+
});
|
|
302
|
+
let body;
|
|
303
|
+
return new __HttpRequest({
|
|
304
|
+
protocol,
|
|
305
|
+
hostname,
|
|
306
|
+
port,
|
|
307
|
+
method: "GET",
|
|
308
|
+
headers,
|
|
309
|
+
path: resolvedPath,
|
|
310
|
+
query,
|
|
311
|
+
body,
|
|
1042
312
|
});
|
|
1043
|
-
}
|
|
1044
|
-
export
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
313
|
+
};
|
|
314
|
+
export const serializeAws_restJson1ListOrdersCommand = async (input, context) => {
|
|
315
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
316
|
+
const headers = {};
|
|
317
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-orders";
|
|
318
|
+
const query = map({
|
|
319
|
+
OutpostIdentifierFilter: [, input.OutpostIdentifierFilter],
|
|
320
|
+
NextToken: [, input.NextToken],
|
|
321
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
322
|
+
});
|
|
323
|
+
let body;
|
|
324
|
+
return new __HttpRequest({
|
|
325
|
+
protocol,
|
|
326
|
+
hostname,
|
|
327
|
+
port,
|
|
328
|
+
method: "GET",
|
|
329
|
+
headers,
|
|
330
|
+
path: resolvedPath,
|
|
331
|
+
query,
|
|
332
|
+
body,
|
|
1060
333
|
});
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1093
|
-
case 7: throw _d.sent();
|
|
1094
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1095
|
-
case 9: throw _d.sent();
|
|
1096
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1097
|
-
case 11: throw _d.sent();
|
|
1098
|
-
case 12:
|
|
1099
|
-
parsedBody = parsedOutput.body;
|
|
1100
|
-
throwDefaultError({
|
|
1101
|
-
output: output,
|
|
1102
|
-
parsedBody: parsedBody,
|
|
1103
|
-
exceptionCtor: __BaseException,
|
|
1104
|
-
errorCode: errorCode,
|
|
1105
|
-
});
|
|
1106
|
-
_d.label = 13;
|
|
1107
|
-
case 13: return [2];
|
|
1108
|
-
}
|
|
334
|
+
};
|
|
335
|
+
export const serializeAws_restJson1ListOutpostsCommand = async (input, context) => {
|
|
336
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
337
|
+
const headers = {};
|
|
338
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/outposts";
|
|
339
|
+
const query = map({
|
|
340
|
+
NextToken: [, input.NextToken],
|
|
341
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
342
|
+
LifeCycleStatusFilter: [
|
|
343
|
+
() => input.LifeCycleStatusFilter !== void 0,
|
|
344
|
+
() => (input.LifeCycleStatusFilter || []).map((_entry) => _entry),
|
|
345
|
+
],
|
|
346
|
+
AvailabilityZoneFilter: [
|
|
347
|
+
() => input.AvailabilityZoneFilter !== void 0,
|
|
348
|
+
() => (input.AvailabilityZoneFilter || []).map((_entry) => _entry),
|
|
349
|
+
],
|
|
350
|
+
AvailabilityZoneIdFilter: [
|
|
351
|
+
() => input.AvailabilityZoneIdFilter !== void 0,
|
|
352
|
+
() => (input.AvailabilityZoneIdFilter || []).map((_entry) => _entry),
|
|
353
|
+
],
|
|
354
|
+
});
|
|
355
|
+
let body;
|
|
356
|
+
return new __HttpRequest({
|
|
357
|
+
protocol,
|
|
358
|
+
hostname,
|
|
359
|
+
port,
|
|
360
|
+
method: "GET",
|
|
361
|
+
headers,
|
|
362
|
+
path: resolvedPath,
|
|
363
|
+
query,
|
|
364
|
+
body,
|
|
1109
365
|
});
|
|
1110
|
-
}
|
|
1111
|
-
export
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
366
|
+
};
|
|
367
|
+
export const serializeAws_restJson1ListSitesCommand = async (input, context) => {
|
|
368
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
369
|
+
const headers = {};
|
|
370
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites";
|
|
371
|
+
const query = map({
|
|
372
|
+
NextToken: [, input.NextToken],
|
|
373
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
374
|
+
OperatingAddressCountryCodeFilter: [
|
|
375
|
+
() => input.OperatingAddressCountryCodeFilter !== void 0,
|
|
376
|
+
() => (input.OperatingAddressCountryCodeFilter || []).map((_entry) => _entry),
|
|
377
|
+
],
|
|
378
|
+
OperatingAddressStateOrRegionFilter: [
|
|
379
|
+
() => input.OperatingAddressStateOrRegionFilter !== void 0,
|
|
380
|
+
() => (input.OperatingAddressStateOrRegionFilter || []).map((_entry) => _entry),
|
|
381
|
+
],
|
|
382
|
+
OperatingAddressCityFilter: [
|
|
383
|
+
() => input.OperatingAddressCityFilter !== void 0,
|
|
384
|
+
() => (input.OperatingAddressCityFilter || []).map((_entry) => _entry),
|
|
385
|
+
],
|
|
386
|
+
});
|
|
387
|
+
let body;
|
|
388
|
+
return new __HttpRequest({
|
|
389
|
+
protocol,
|
|
390
|
+
hostname,
|
|
391
|
+
port,
|
|
392
|
+
method: "GET",
|
|
393
|
+
headers,
|
|
394
|
+
path: resolvedPath,
|
|
395
|
+
query,
|
|
396
|
+
body,
|
|
1132
397
|
});
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
case "InternalServerException": return [3, 2];
|
|
1149
|
-
case "com.amazonaws.outposts#InternalServerException": return [3, 2];
|
|
1150
|
-
case "NotFoundException": return [3, 4];
|
|
1151
|
-
case "com.amazonaws.outposts#NotFoundException": return [3, 4];
|
|
1152
|
-
case "ValidationException": return [3, 6];
|
|
1153
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
1154
|
-
}
|
|
1155
|
-
return [3, 8];
|
|
1156
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1157
|
-
case 3: throw _d.sent();
|
|
1158
|
-
case 4: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1159
|
-
case 5: throw _d.sent();
|
|
1160
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1161
|
-
case 7: throw _d.sent();
|
|
1162
|
-
case 8:
|
|
1163
|
-
parsedBody = parsedOutput.body;
|
|
1164
|
-
throwDefaultError({
|
|
1165
|
-
output: output,
|
|
1166
|
-
parsedBody: parsedBody,
|
|
1167
|
-
exceptionCtor: __BaseException,
|
|
1168
|
-
errorCode: errorCode,
|
|
1169
|
-
});
|
|
1170
|
-
_d.label = 9;
|
|
1171
|
-
case 9: return [2];
|
|
1172
|
-
}
|
|
398
|
+
};
|
|
399
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
400
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
401
|
+
const headers = {};
|
|
402
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
403
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
404
|
+
let body;
|
|
405
|
+
return new __HttpRequest({
|
|
406
|
+
protocol,
|
|
407
|
+
hostname,
|
|
408
|
+
port,
|
|
409
|
+
method: "GET",
|
|
410
|
+
headers,
|
|
411
|
+
path: resolvedPath,
|
|
412
|
+
body,
|
|
1173
413
|
});
|
|
1174
|
-
}
|
|
1175
|
-
export
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
}
|
|
414
|
+
};
|
|
415
|
+
export const serializeAws_restJson1StartConnectionCommand = async (input, context) => {
|
|
416
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
417
|
+
const headers = {
|
|
418
|
+
"content-type": "application/json",
|
|
419
|
+
};
|
|
420
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connections";
|
|
421
|
+
let body;
|
|
422
|
+
body = JSON.stringify({
|
|
423
|
+
...(input.AssetId != null && { AssetId: input.AssetId }),
|
|
424
|
+
...(input.ClientPublicKey != null && { ClientPublicKey: input.ClientPublicKey }),
|
|
425
|
+
...(input.DeviceSerialNumber != null && { DeviceSerialNumber: input.DeviceSerialNumber }),
|
|
426
|
+
...(input.NetworkInterfaceDeviceIndex != null && {
|
|
427
|
+
NetworkInterfaceDeviceIndex: input.NetworkInterfaceDeviceIndex,
|
|
428
|
+
}),
|
|
429
|
+
});
|
|
430
|
+
return new __HttpRequest({
|
|
431
|
+
protocol,
|
|
432
|
+
hostname,
|
|
433
|
+
port,
|
|
434
|
+
method: "POST",
|
|
435
|
+
headers,
|
|
436
|
+
path: resolvedPath,
|
|
437
|
+
body,
|
|
1199
438
|
});
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
case "com.amazonaws.outposts#NotFoundException": return [3, 6];
|
|
1221
|
-
case "ValidationException": return [3, 8];
|
|
1222
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
1223
|
-
}
|
|
1224
|
-
return [3, 10];
|
|
1225
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1226
|
-
case 3: throw _d.sent();
|
|
1227
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1228
|
-
case 5: throw _d.sent();
|
|
1229
|
-
case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1230
|
-
case 7: throw _d.sent();
|
|
1231
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1232
|
-
case 9: throw _d.sent();
|
|
1233
|
-
case 10:
|
|
1234
|
-
parsedBody = parsedOutput.body;
|
|
1235
|
-
throwDefaultError({
|
|
1236
|
-
output: output,
|
|
1237
|
-
parsedBody: parsedBody,
|
|
1238
|
-
exceptionCtor: __BaseException,
|
|
1239
|
-
errorCode: errorCode,
|
|
1240
|
-
});
|
|
1241
|
-
_d.label = 11;
|
|
1242
|
-
case 11: return [2];
|
|
1243
|
-
}
|
|
439
|
+
};
|
|
440
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
441
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
442
|
+
const headers = {
|
|
443
|
+
"content-type": "application/json",
|
|
444
|
+
};
|
|
445
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
446
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
447
|
+
let body;
|
|
448
|
+
body = JSON.stringify({
|
|
449
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
450
|
+
});
|
|
451
|
+
return new __HttpRequest({
|
|
452
|
+
protocol,
|
|
453
|
+
hostname,
|
|
454
|
+
port,
|
|
455
|
+
method: "POST",
|
|
456
|
+
headers,
|
|
457
|
+
path: resolvedPath,
|
|
458
|
+
body,
|
|
1244
459
|
});
|
|
1245
|
-
}
|
|
1246
|
-
export
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
}
|
|
1265
|
-
return [2, contents];
|
|
1266
|
-
}
|
|
460
|
+
};
|
|
461
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
462
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
463
|
+
const headers = {};
|
|
464
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
465
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
466
|
+
const query = map({
|
|
467
|
+
tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],
|
|
468
|
+
});
|
|
469
|
+
let body;
|
|
470
|
+
return new __HttpRequest({
|
|
471
|
+
protocol,
|
|
472
|
+
hostname,
|
|
473
|
+
port,
|
|
474
|
+
method: "DELETE",
|
|
475
|
+
headers,
|
|
476
|
+
path: resolvedPath,
|
|
477
|
+
query,
|
|
478
|
+
body,
|
|
1267
479
|
});
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
return [3, 8];
|
|
1291
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1292
|
-
case 3: throw _d.sent();
|
|
1293
|
-
case 4: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1294
|
-
case 5: throw _d.sent();
|
|
1295
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1296
|
-
case 7: throw _d.sent();
|
|
1297
|
-
case 8:
|
|
1298
|
-
parsedBody = parsedOutput.body;
|
|
1299
|
-
throwDefaultError({
|
|
1300
|
-
output: output,
|
|
1301
|
-
parsedBody: parsedBody,
|
|
1302
|
-
exceptionCtor: __BaseException,
|
|
1303
|
-
errorCode: errorCode,
|
|
1304
|
-
});
|
|
1305
|
-
_d.label = 9;
|
|
1306
|
-
case 9: return [2];
|
|
1307
|
-
}
|
|
480
|
+
};
|
|
481
|
+
export const serializeAws_restJson1UpdateOutpostCommand = async (input, context) => {
|
|
482
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
483
|
+
const headers = {
|
|
484
|
+
"content-type": "application/json",
|
|
485
|
+
};
|
|
486
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/outposts/{OutpostId}";
|
|
487
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "OutpostId", () => input.OutpostId, "{OutpostId}", false);
|
|
488
|
+
let body;
|
|
489
|
+
body = JSON.stringify({
|
|
490
|
+
...(input.Description != null && { Description: input.Description }),
|
|
491
|
+
...(input.Name != null && { Name: input.Name }),
|
|
492
|
+
...(input.SupportedHardwareType != null && { SupportedHardwareType: input.SupportedHardwareType }),
|
|
493
|
+
});
|
|
494
|
+
return new __HttpRequest({
|
|
495
|
+
protocol,
|
|
496
|
+
hostname,
|
|
497
|
+
port,
|
|
498
|
+
method: "PATCH",
|
|
499
|
+
headers,
|
|
500
|
+
path: resolvedPath,
|
|
501
|
+
body,
|
|
1308
502
|
});
|
|
1309
|
-
}
|
|
1310
|
-
export
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
503
|
+
};
|
|
504
|
+
export const serializeAws_restJson1UpdateSiteCommand = async (input, context) => {
|
|
505
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
506
|
+
const headers = {
|
|
507
|
+
"content-type": "application/json",
|
|
508
|
+
};
|
|
509
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}";
|
|
510
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId, "{SiteId}", false);
|
|
511
|
+
let body;
|
|
512
|
+
body = JSON.stringify({
|
|
513
|
+
...(input.Description != null && { Description: input.Description }),
|
|
514
|
+
...(input.Name != null && { Name: input.Name }),
|
|
515
|
+
...(input.Notes != null && { Notes: input.Notes }),
|
|
516
|
+
});
|
|
517
|
+
return new __HttpRequest({
|
|
518
|
+
protocol,
|
|
519
|
+
hostname,
|
|
520
|
+
port,
|
|
521
|
+
method: "PATCH",
|
|
522
|
+
headers,
|
|
523
|
+
path: resolvedPath,
|
|
524
|
+
body,
|
|
1331
525
|
});
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
case "ValidationException": return [3, 8];
|
|
1354
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
1355
|
-
}
|
|
1356
|
-
return [3, 10];
|
|
1357
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1358
|
-
case 3: throw _d.sent();
|
|
1359
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1360
|
-
case 5: throw _d.sent();
|
|
1361
|
-
case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1362
|
-
case 7: throw _d.sent();
|
|
1363
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1364
|
-
case 9: throw _d.sent();
|
|
1365
|
-
case 10:
|
|
1366
|
-
parsedBody = parsedOutput.body;
|
|
1367
|
-
throwDefaultError({
|
|
1368
|
-
output: output,
|
|
1369
|
-
parsedBody: parsedBody,
|
|
1370
|
-
exceptionCtor: __BaseException,
|
|
1371
|
-
errorCode: errorCode,
|
|
1372
|
-
});
|
|
1373
|
-
_d.label = 11;
|
|
1374
|
-
case 11: return [2];
|
|
1375
|
-
}
|
|
526
|
+
};
|
|
527
|
+
export const serializeAws_restJson1UpdateSiteAddressCommand = async (input, context) => {
|
|
528
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
529
|
+
const headers = {
|
|
530
|
+
"content-type": "application/json",
|
|
531
|
+
};
|
|
532
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/address";
|
|
533
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId, "{SiteId}", false);
|
|
534
|
+
let body;
|
|
535
|
+
body = JSON.stringify({
|
|
536
|
+
...(input.Address != null && { Address: serializeAws_restJson1Address(input.Address, context) }),
|
|
537
|
+
...(input.AddressType != null && { AddressType: input.AddressType }),
|
|
538
|
+
});
|
|
539
|
+
return new __HttpRequest({
|
|
540
|
+
protocol,
|
|
541
|
+
hostname,
|
|
542
|
+
port,
|
|
543
|
+
method: "PUT",
|
|
544
|
+
headers,
|
|
545
|
+
path: resolvedPath,
|
|
546
|
+
body,
|
|
1376
547
|
});
|
|
1377
|
-
}
|
|
1378
|
-
export
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
}
|
|
1406
|
-
return [2, contents];
|
|
1407
|
-
}
|
|
548
|
+
};
|
|
549
|
+
export const serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = async (input, context) => {
|
|
550
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
551
|
+
const headers = {
|
|
552
|
+
"content-type": "application/json",
|
|
553
|
+
};
|
|
554
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/rackPhysicalProperties";
|
|
555
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId, "{SiteId}", false);
|
|
556
|
+
let body;
|
|
557
|
+
body = JSON.stringify({
|
|
558
|
+
...(input.FiberOpticCableType != null && { FiberOpticCableType: input.FiberOpticCableType }),
|
|
559
|
+
...(input.MaximumSupportedWeightLbs != null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs }),
|
|
560
|
+
...(input.OpticalStandard != null && { OpticalStandard: input.OpticalStandard }),
|
|
561
|
+
...(input.PowerConnector != null && { PowerConnector: input.PowerConnector }),
|
|
562
|
+
...(input.PowerDrawKva != null && { PowerDrawKva: input.PowerDrawKva }),
|
|
563
|
+
...(input.PowerFeedDrop != null && { PowerFeedDrop: input.PowerFeedDrop }),
|
|
564
|
+
...(input.PowerPhase != null && { PowerPhase: input.PowerPhase }),
|
|
565
|
+
...(input.UplinkCount != null && { UplinkCount: input.UplinkCount }),
|
|
566
|
+
...(input.UplinkGbps != null && { UplinkGbps: input.UplinkGbps }),
|
|
567
|
+
});
|
|
568
|
+
return new __HttpRequest({
|
|
569
|
+
protocol,
|
|
570
|
+
hostname,
|
|
571
|
+
port,
|
|
572
|
+
method: "PATCH",
|
|
573
|
+
headers,
|
|
574
|
+
path: resolvedPath,
|
|
575
|
+
body,
|
|
1408
576
|
});
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
_a = [__assign({}, output)];
|
|
1417
|
-
_c = {};
|
|
1418
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1419
|
-
case 1:
|
|
1420
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1421
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1422
|
-
_b = errorCode;
|
|
1423
|
-
switch (_b) {
|
|
1424
|
-
case "AccessDeniedException": return [3, 2];
|
|
1425
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
1426
|
-
case "InternalServerException": return [3, 4];
|
|
1427
|
-
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
1428
|
-
case "NotFoundException": return [3, 6];
|
|
1429
|
-
case "com.amazonaws.outposts#NotFoundException": return [3, 6];
|
|
1430
|
-
case "ValidationException": return [3, 8];
|
|
1431
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
1432
|
-
}
|
|
1433
|
-
return [3, 10];
|
|
1434
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1435
|
-
case 3: throw _d.sent();
|
|
1436
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1437
|
-
case 5: throw _d.sent();
|
|
1438
|
-
case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1439
|
-
case 7: throw _d.sent();
|
|
1440
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1441
|
-
case 9: throw _d.sent();
|
|
1442
|
-
case 10:
|
|
1443
|
-
parsedBody = parsedOutput.body;
|
|
1444
|
-
throwDefaultError({
|
|
1445
|
-
output: output,
|
|
1446
|
-
parsedBody: parsedBody,
|
|
1447
|
-
exceptionCtor: __BaseException,
|
|
1448
|
-
errorCode: errorCode,
|
|
1449
|
-
});
|
|
1450
|
-
_d.label = 11;
|
|
1451
|
-
case 11: return [2];
|
|
1452
|
-
}
|
|
577
|
+
};
|
|
578
|
+
export const deserializeAws_restJson1CancelOrderCommand = async (output, context) => {
|
|
579
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
580
|
+
return deserializeAws_restJson1CancelOrderCommandError(output, context);
|
|
581
|
+
}
|
|
582
|
+
const contents = map({
|
|
583
|
+
$metadata: deserializeMetadata(output),
|
|
1453
584
|
});
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
585
|
+
await collectBody(output.body, context);
|
|
586
|
+
return contents;
|
|
587
|
+
};
|
|
588
|
+
const deserializeAws_restJson1CancelOrderCommandError = async (output, context) => {
|
|
589
|
+
const parsedOutput = {
|
|
590
|
+
...output,
|
|
591
|
+
body: await parseErrorBody(output.body, context),
|
|
592
|
+
};
|
|
593
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
594
|
+
switch (errorCode) {
|
|
595
|
+
case "AccessDeniedException":
|
|
596
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
597
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
598
|
+
case "ConflictException":
|
|
599
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
600
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
601
|
+
case "InternalServerException":
|
|
602
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
603
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
604
|
+
case "NotFoundException":
|
|
605
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
606
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
607
|
+
case "ValidationException":
|
|
608
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
609
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
610
|
+
default:
|
|
611
|
+
const parsedBody = parsedOutput.body;
|
|
612
|
+
throwDefaultError({
|
|
613
|
+
output,
|
|
614
|
+
parsedBody,
|
|
615
|
+
exceptionCtor: __BaseException,
|
|
616
|
+
errorCode,
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
export const deserializeAws_restJson1CreateOrderCommand = async (output, context) => {
|
|
621
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
622
|
+
return deserializeAws_restJson1CreateOrderCommandError(output, context);
|
|
623
|
+
}
|
|
624
|
+
const contents = map({
|
|
625
|
+
$metadata: deserializeMetadata(output),
|
|
1476
626
|
});
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
return
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
627
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
628
|
+
if (data.Order != null) {
|
|
629
|
+
contents.Order = deserializeAws_restJson1Order(data.Order, context);
|
|
630
|
+
}
|
|
631
|
+
return contents;
|
|
632
|
+
};
|
|
633
|
+
const deserializeAws_restJson1CreateOrderCommandError = async (output, context) => {
|
|
634
|
+
const parsedOutput = {
|
|
635
|
+
...output,
|
|
636
|
+
body: await parseErrorBody(output.body, context),
|
|
637
|
+
};
|
|
638
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
639
|
+
switch (errorCode) {
|
|
640
|
+
case "AccessDeniedException":
|
|
641
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
642
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
643
|
+
case "ConflictException":
|
|
644
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
645
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
646
|
+
case "InternalServerException":
|
|
647
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
648
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
649
|
+
case "NotFoundException":
|
|
650
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
651
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
652
|
+
case "ServiceQuotaExceededException":
|
|
653
|
+
case "com.amazonaws.outposts#ServiceQuotaExceededException":
|
|
654
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
655
|
+
case "ValidationException":
|
|
656
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
657
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
658
|
+
default:
|
|
659
|
+
const parsedBody = parsedOutput.body;
|
|
660
|
+
throwDefaultError({
|
|
661
|
+
output,
|
|
662
|
+
parsedBody,
|
|
663
|
+
exceptionCtor: __BaseException,
|
|
664
|
+
errorCode,
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
export const deserializeAws_restJson1CreateOutpostCommand = async (output, context) => {
|
|
669
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
670
|
+
return deserializeAws_restJson1CreateOutpostCommandError(output, context);
|
|
671
|
+
}
|
|
672
|
+
const contents = map({
|
|
673
|
+
$metadata: deserializeMetadata(output),
|
|
1521
674
|
});
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
675
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
676
|
+
if (data.Outpost != null) {
|
|
677
|
+
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
678
|
+
}
|
|
679
|
+
return contents;
|
|
680
|
+
};
|
|
681
|
+
const deserializeAws_restJson1CreateOutpostCommandError = async (output, context) => {
|
|
682
|
+
const parsedOutput = {
|
|
683
|
+
...output,
|
|
684
|
+
body: await parseErrorBody(output.body, context),
|
|
685
|
+
};
|
|
686
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
687
|
+
switch (errorCode) {
|
|
688
|
+
case "AccessDeniedException":
|
|
689
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
690
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
691
|
+
case "ConflictException":
|
|
692
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
693
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
694
|
+
case "InternalServerException":
|
|
695
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
696
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
697
|
+
case "NotFoundException":
|
|
698
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
699
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
700
|
+
case "ServiceQuotaExceededException":
|
|
701
|
+
case "com.amazonaws.outposts#ServiceQuotaExceededException":
|
|
702
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
703
|
+
case "ValidationException":
|
|
704
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
705
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
706
|
+
default:
|
|
707
|
+
const parsedBody = parsedOutput.body;
|
|
708
|
+
throwDefaultError({
|
|
709
|
+
output,
|
|
710
|
+
parsedBody,
|
|
711
|
+
exceptionCtor: __BaseException,
|
|
712
|
+
errorCode,
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
export const deserializeAws_restJson1CreateSiteCommand = async (output, context) => {
|
|
717
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
718
|
+
return deserializeAws_restJson1CreateSiteCommandError(output, context);
|
|
719
|
+
}
|
|
720
|
+
const contents = map({
|
|
721
|
+
$metadata: deserializeMetadata(output),
|
|
1550
722
|
});
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
return
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
723
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
724
|
+
if (data.Site != null) {
|
|
725
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
726
|
+
}
|
|
727
|
+
return contents;
|
|
728
|
+
};
|
|
729
|
+
const deserializeAws_restJson1CreateSiteCommandError = async (output, context) => {
|
|
730
|
+
const parsedOutput = {
|
|
731
|
+
...output,
|
|
732
|
+
body: await parseErrorBody(output.body, context),
|
|
733
|
+
};
|
|
734
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
735
|
+
switch (errorCode) {
|
|
736
|
+
case "AccessDeniedException":
|
|
737
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
738
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
739
|
+
case "ConflictException":
|
|
740
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
741
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
742
|
+
case "InternalServerException":
|
|
743
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
744
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
745
|
+
case "ServiceQuotaExceededException":
|
|
746
|
+
case "com.amazonaws.outposts#ServiceQuotaExceededException":
|
|
747
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
748
|
+
case "ValidationException":
|
|
749
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
750
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
751
|
+
default:
|
|
752
|
+
const parsedBody = parsedOutput.body;
|
|
753
|
+
throwDefaultError({
|
|
754
|
+
output,
|
|
755
|
+
parsedBody,
|
|
756
|
+
exceptionCtor: __BaseException,
|
|
757
|
+
errorCode,
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
export const deserializeAws_restJson1DeleteOutpostCommand = async (output, context) => {
|
|
762
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
763
|
+
return deserializeAws_restJson1DeleteOutpostCommandError(output, context);
|
|
764
|
+
}
|
|
765
|
+
const contents = map({
|
|
766
|
+
$metadata: deserializeMetadata(output),
|
|
1595
767
|
});
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
768
|
+
await collectBody(output.body, context);
|
|
769
|
+
return contents;
|
|
770
|
+
};
|
|
771
|
+
const deserializeAws_restJson1DeleteOutpostCommandError = async (output, context) => {
|
|
772
|
+
const parsedOutput = {
|
|
773
|
+
...output,
|
|
774
|
+
body: await parseErrorBody(output.body, context),
|
|
775
|
+
};
|
|
776
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
777
|
+
switch (errorCode) {
|
|
778
|
+
case "AccessDeniedException":
|
|
779
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
780
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
781
|
+
case "ConflictException":
|
|
782
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
783
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
784
|
+
case "InternalServerException":
|
|
785
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
786
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
787
|
+
case "NotFoundException":
|
|
788
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
789
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
790
|
+
case "ValidationException":
|
|
791
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
792
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
793
|
+
default:
|
|
794
|
+
const parsedBody = parsedOutput.body;
|
|
795
|
+
throwDefaultError({
|
|
796
|
+
output,
|
|
797
|
+
parsedBody,
|
|
798
|
+
exceptionCtor: __BaseException,
|
|
799
|
+
errorCode,
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
export const deserializeAws_restJson1DeleteSiteCommand = async (output, context) => {
|
|
804
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
805
|
+
return deserializeAws_restJson1DeleteSiteCommandError(output, context);
|
|
806
|
+
}
|
|
807
|
+
const contents = map({
|
|
808
|
+
$metadata: deserializeMetadata(output),
|
|
1621
809
|
});
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
_d.label = 11;
|
|
1664
|
-
case 11: return [2];
|
|
1665
|
-
}
|
|
810
|
+
await collectBody(output.body, context);
|
|
811
|
+
return contents;
|
|
812
|
+
};
|
|
813
|
+
const deserializeAws_restJson1DeleteSiteCommandError = async (output, context) => {
|
|
814
|
+
const parsedOutput = {
|
|
815
|
+
...output,
|
|
816
|
+
body: await parseErrorBody(output.body, context),
|
|
817
|
+
};
|
|
818
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
819
|
+
switch (errorCode) {
|
|
820
|
+
case "AccessDeniedException":
|
|
821
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
822
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
823
|
+
case "ConflictException":
|
|
824
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
825
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
826
|
+
case "InternalServerException":
|
|
827
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
828
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
829
|
+
case "NotFoundException":
|
|
830
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
831
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
832
|
+
case "ValidationException":
|
|
833
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
834
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
835
|
+
default:
|
|
836
|
+
const parsedBody = parsedOutput.body;
|
|
837
|
+
throwDefaultError({
|
|
838
|
+
output,
|
|
839
|
+
parsedBody,
|
|
840
|
+
exceptionCtor: __BaseException,
|
|
841
|
+
errorCode,
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
export const deserializeAws_restJson1GetCatalogItemCommand = async (output, context) => {
|
|
846
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
847
|
+
return deserializeAws_restJson1GetCatalogItemCommandError(output, context);
|
|
848
|
+
}
|
|
849
|
+
const contents = map({
|
|
850
|
+
$metadata: deserializeMetadata(output),
|
|
1666
851
|
});
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
852
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
853
|
+
if (data.CatalogItem != null) {
|
|
854
|
+
contents.CatalogItem = deserializeAws_restJson1CatalogItem(data.CatalogItem, context);
|
|
855
|
+
}
|
|
856
|
+
return contents;
|
|
857
|
+
};
|
|
858
|
+
const deserializeAws_restJson1GetCatalogItemCommandError = async (output, context) => {
|
|
859
|
+
const parsedOutput = {
|
|
860
|
+
...output,
|
|
861
|
+
body: await parseErrorBody(output.body, context),
|
|
862
|
+
};
|
|
863
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
864
|
+
switch (errorCode) {
|
|
865
|
+
case "InternalServerException":
|
|
866
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
867
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
868
|
+
case "NotFoundException":
|
|
869
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
870
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
871
|
+
case "ValidationException":
|
|
872
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
873
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
874
|
+
default:
|
|
875
|
+
const parsedBody = parsedOutput.body;
|
|
876
|
+
throwDefaultError({
|
|
877
|
+
output,
|
|
878
|
+
parsedBody,
|
|
879
|
+
exceptionCtor: __BaseException,
|
|
880
|
+
errorCode,
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
export const deserializeAws_restJson1GetConnectionCommand = async (output, context) => {
|
|
885
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
886
|
+
return deserializeAws_restJson1GetConnectionCommandError(output, context);
|
|
887
|
+
}
|
|
888
|
+
const contents = map({
|
|
889
|
+
$metadata: deserializeMetadata(output),
|
|
1692
890
|
});
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
891
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
892
|
+
if (data.ConnectionDetails != null) {
|
|
893
|
+
contents.ConnectionDetails = deserializeAws_restJson1ConnectionDetails(data.ConnectionDetails, context);
|
|
894
|
+
}
|
|
895
|
+
if (data.ConnectionId != null) {
|
|
896
|
+
contents.ConnectionId = __expectString(data.ConnectionId);
|
|
897
|
+
}
|
|
898
|
+
return contents;
|
|
899
|
+
};
|
|
900
|
+
const deserializeAws_restJson1GetConnectionCommandError = async (output, context) => {
|
|
901
|
+
const parsedOutput = {
|
|
902
|
+
...output,
|
|
903
|
+
body: await parseErrorBody(output.body, context),
|
|
904
|
+
};
|
|
905
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
906
|
+
switch (errorCode) {
|
|
907
|
+
case "AccessDeniedException":
|
|
908
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
909
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
910
|
+
case "InternalServerException":
|
|
911
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
912
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
913
|
+
case "NotFoundException":
|
|
914
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
915
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
916
|
+
case "ValidationException":
|
|
917
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
918
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
919
|
+
default:
|
|
920
|
+
const parsedBody = parsedOutput.body;
|
|
921
|
+
throwDefaultError({
|
|
922
|
+
output,
|
|
923
|
+
parsedBody,
|
|
924
|
+
exceptionCtor: __BaseException,
|
|
925
|
+
errorCode,
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
export const deserializeAws_restJson1GetOrderCommand = async (output, context) => {
|
|
930
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
931
|
+
return deserializeAws_restJson1GetOrderCommandError(output, context);
|
|
932
|
+
}
|
|
933
|
+
const contents = map({
|
|
934
|
+
$metadata: deserializeMetadata(output),
|
|
1733
935
|
});
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
936
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
937
|
+
if (data.Order != null) {
|
|
938
|
+
contents.Order = deserializeAws_restJson1Order(data.Order, context);
|
|
939
|
+
}
|
|
940
|
+
return contents;
|
|
941
|
+
};
|
|
942
|
+
const deserializeAws_restJson1GetOrderCommandError = async (output, context) => {
|
|
943
|
+
const parsedOutput = {
|
|
944
|
+
...output,
|
|
945
|
+
body: await parseErrorBody(output.body, context),
|
|
946
|
+
};
|
|
947
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
948
|
+
switch (errorCode) {
|
|
949
|
+
case "InternalServerException":
|
|
950
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
951
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
952
|
+
case "NotFoundException":
|
|
953
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
954
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
955
|
+
case "ValidationException":
|
|
956
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
957
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
958
|
+
default:
|
|
959
|
+
const parsedBody = parsedOutput.body;
|
|
960
|
+
throwDefaultError({
|
|
961
|
+
output,
|
|
962
|
+
parsedBody,
|
|
963
|
+
exceptionCtor: __BaseException,
|
|
964
|
+
errorCode,
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
export const deserializeAws_restJson1GetOutpostCommand = async (output, context) => {
|
|
969
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
970
|
+
return deserializeAws_restJson1GetOutpostCommandError(output, context);
|
|
971
|
+
}
|
|
972
|
+
const contents = map({
|
|
973
|
+
$metadata: deserializeMetadata(output),
|
|
1759
974
|
});
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
return
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
_d.label = 11;
|
|
1802
|
-
case 11: return [2];
|
|
1803
|
-
}
|
|
975
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
976
|
+
if (data.Outpost != null) {
|
|
977
|
+
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
978
|
+
}
|
|
979
|
+
return contents;
|
|
980
|
+
};
|
|
981
|
+
const deserializeAws_restJson1GetOutpostCommandError = async (output, context) => {
|
|
982
|
+
const parsedOutput = {
|
|
983
|
+
...output,
|
|
984
|
+
body: await parseErrorBody(output.body, context),
|
|
985
|
+
};
|
|
986
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
987
|
+
switch (errorCode) {
|
|
988
|
+
case "AccessDeniedException":
|
|
989
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
990
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
991
|
+
case "InternalServerException":
|
|
992
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
993
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
994
|
+
case "NotFoundException":
|
|
995
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
996
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
997
|
+
case "ValidationException":
|
|
998
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
999
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1000
|
+
default:
|
|
1001
|
+
const parsedBody = parsedOutput.body;
|
|
1002
|
+
throwDefaultError({
|
|
1003
|
+
output,
|
|
1004
|
+
parsedBody,
|
|
1005
|
+
exceptionCtor: __BaseException,
|
|
1006
|
+
errorCode,
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
export const deserializeAws_restJson1GetOutpostInstanceTypesCommand = async (output, context) => {
|
|
1011
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1012
|
+
return deserializeAws_restJson1GetOutpostInstanceTypesCommandError(output, context);
|
|
1013
|
+
}
|
|
1014
|
+
const contents = map({
|
|
1015
|
+
$metadata: deserializeMetadata(output),
|
|
1804
1016
|
});
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1017
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1018
|
+
if (data.InstanceTypes != null) {
|
|
1019
|
+
contents.InstanceTypes = deserializeAws_restJson1InstanceTypeListDefinition(data.InstanceTypes, context);
|
|
1020
|
+
}
|
|
1021
|
+
if (data.NextToken != null) {
|
|
1022
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1023
|
+
}
|
|
1024
|
+
if (data.OutpostArn != null) {
|
|
1025
|
+
contents.OutpostArn = __expectString(data.OutpostArn);
|
|
1026
|
+
}
|
|
1027
|
+
if (data.OutpostId != null) {
|
|
1028
|
+
contents.OutpostId = __expectString(data.OutpostId);
|
|
1029
|
+
}
|
|
1030
|
+
return contents;
|
|
1031
|
+
};
|
|
1032
|
+
const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (output, context) => {
|
|
1033
|
+
const parsedOutput = {
|
|
1034
|
+
...output,
|
|
1035
|
+
body: await parseErrorBody(output.body, context),
|
|
1036
|
+
};
|
|
1037
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1038
|
+
switch (errorCode) {
|
|
1039
|
+
case "AccessDeniedException":
|
|
1040
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1041
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1042
|
+
case "InternalServerException":
|
|
1043
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1044
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1045
|
+
case "NotFoundException":
|
|
1046
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1047
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1048
|
+
case "ValidationException":
|
|
1049
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1050
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1051
|
+
default:
|
|
1052
|
+
const parsedBody = parsedOutput.body;
|
|
1053
|
+
throwDefaultError({
|
|
1054
|
+
output,
|
|
1055
|
+
parsedBody,
|
|
1056
|
+
exceptionCtor: __BaseException,
|
|
1057
|
+
errorCode,
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
export const deserializeAws_restJson1GetSiteCommand = async (output, context) => {
|
|
1062
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1063
|
+
return deserializeAws_restJson1GetSiteCommandError(output, context);
|
|
1064
|
+
}
|
|
1065
|
+
const contents = map({
|
|
1066
|
+
$metadata: deserializeMetadata(output),
|
|
1830
1067
|
});
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
return
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1068
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1069
|
+
if (data.Site != null) {
|
|
1070
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
1071
|
+
}
|
|
1072
|
+
return contents;
|
|
1073
|
+
};
|
|
1074
|
+
const deserializeAws_restJson1GetSiteCommandError = async (output, context) => {
|
|
1075
|
+
const parsedOutput = {
|
|
1076
|
+
...output,
|
|
1077
|
+
body: await parseErrorBody(output.body, context),
|
|
1078
|
+
};
|
|
1079
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1080
|
+
switch (errorCode) {
|
|
1081
|
+
case "AccessDeniedException":
|
|
1082
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1083
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1084
|
+
case "InternalServerException":
|
|
1085
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1086
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1087
|
+
case "NotFoundException":
|
|
1088
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1089
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1090
|
+
case "ValidationException":
|
|
1091
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1092
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1093
|
+
default:
|
|
1094
|
+
const parsedBody = parsedOutput.body;
|
|
1095
|
+
throwDefaultError({
|
|
1096
|
+
output,
|
|
1097
|
+
parsedBody,
|
|
1098
|
+
exceptionCtor: __BaseException,
|
|
1099
|
+
errorCode,
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
export const deserializeAws_restJson1GetSiteAddressCommand = async (output, context) => {
|
|
1104
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1105
|
+
return deserializeAws_restJson1GetSiteAddressCommandError(output, context);
|
|
1106
|
+
}
|
|
1107
|
+
const contents = map({
|
|
1108
|
+
$metadata: deserializeMetadata(output),
|
|
1871
1109
|
});
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1110
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1111
|
+
if (data.Address != null) {
|
|
1112
|
+
contents.Address = deserializeAws_restJson1Address(data.Address, context);
|
|
1113
|
+
}
|
|
1114
|
+
if (data.AddressType != null) {
|
|
1115
|
+
contents.AddressType = __expectString(data.AddressType);
|
|
1116
|
+
}
|
|
1117
|
+
if (data.SiteId != null) {
|
|
1118
|
+
contents.SiteId = __expectString(data.SiteId);
|
|
1119
|
+
}
|
|
1120
|
+
return contents;
|
|
1121
|
+
};
|
|
1122
|
+
const deserializeAws_restJson1GetSiteAddressCommandError = async (output, context) => {
|
|
1123
|
+
const parsedOutput = {
|
|
1124
|
+
...output,
|
|
1125
|
+
body: await parseErrorBody(output.body, context),
|
|
1126
|
+
};
|
|
1127
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1128
|
+
switch (errorCode) {
|
|
1129
|
+
case "AccessDeniedException":
|
|
1130
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1131
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1132
|
+
case "InternalServerException":
|
|
1133
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1134
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1135
|
+
case "NotFoundException":
|
|
1136
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1137
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1138
|
+
case "ValidationException":
|
|
1139
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1140
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1141
|
+
default:
|
|
1142
|
+
const parsedBody = parsedOutput.body;
|
|
1143
|
+
throwDefaultError({
|
|
1144
|
+
output,
|
|
1145
|
+
parsedBody,
|
|
1146
|
+
exceptionCtor: __BaseException,
|
|
1147
|
+
errorCode,
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
};
|
|
1151
|
+
export const deserializeAws_restJson1ListAssetsCommand = async (output, context) => {
|
|
1152
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1153
|
+
return deserializeAws_restJson1ListAssetsCommandError(output, context);
|
|
1154
|
+
}
|
|
1155
|
+
const contents = map({
|
|
1156
|
+
$metadata: deserializeMetadata(output),
|
|
1897
1157
|
});
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1158
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1159
|
+
if (data.Assets != null) {
|
|
1160
|
+
contents.Assets = deserializeAws_restJson1AssetListDefinition(data.Assets, context);
|
|
1161
|
+
}
|
|
1162
|
+
if (data.NextToken != null) {
|
|
1163
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1164
|
+
}
|
|
1165
|
+
return contents;
|
|
1166
|
+
};
|
|
1167
|
+
const deserializeAws_restJson1ListAssetsCommandError = async (output, context) => {
|
|
1168
|
+
const parsedOutput = {
|
|
1169
|
+
...output,
|
|
1170
|
+
body: await parseErrorBody(output.body, context),
|
|
1171
|
+
};
|
|
1172
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1173
|
+
switch (errorCode) {
|
|
1174
|
+
case "AccessDeniedException":
|
|
1175
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1176
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1177
|
+
case "InternalServerException":
|
|
1178
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1179
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1180
|
+
case "NotFoundException":
|
|
1181
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1182
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1183
|
+
case "ValidationException":
|
|
1184
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1185
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1186
|
+
default:
|
|
1187
|
+
const parsedBody = parsedOutput.body;
|
|
1188
|
+
throwDefaultError({
|
|
1189
|
+
output,
|
|
1190
|
+
parsedBody,
|
|
1191
|
+
exceptionCtor: __BaseException,
|
|
1192
|
+
errorCode,
|
|
1193
|
+
});
|
|
1194
|
+
}
|
|
1195
|
+
};
|
|
1196
|
+
export const deserializeAws_restJson1ListCatalogItemsCommand = async (output, context) => {
|
|
1197
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1198
|
+
return deserializeAws_restJson1ListCatalogItemsCommandError(output, context);
|
|
1199
|
+
}
|
|
1200
|
+
const contents = map({
|
|
1201
|
+
$metadata: deserializeMetadata(output),
|
|
1938
1202
|
});
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1203
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1204
|
+
if (data.CatalogItems != null) {
|
|
1205
|
+
contents.CatalogItems = deserializeAws_restJson1CatalogItemListDefinition(data.CatalogItems, context);
|
|
1206
|
+
}
|
|
1207
|
+
if (data.NextToken != null) {
|
|
1208
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1209
|
+
}
|
|
1210
|
+
return contents;
|
|
1211
|
+
};
|
|
1212
|
+
const deserializeAws_restJson1ListCatalogItemsCommandError = async (output, context) => {
|
|
1213
|
+
const parsedOutput = {
|
|
1214
|
+
...output,
|
|
1215
|
+
body: await parseErrorBody(output.body, context),
|
|
1216
|
+
};
|
|
1217
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1218
|
+
switch (errorCode) {
|
|
1219
|
+
case "InternalServerException":
|
|
1220
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1221
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1222
|
+
case "NotFoundException":
|
|
1223
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1224
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1225
|
+
case "ValidationException":
|
|
1226
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1227
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1228
|
+
default:
|
|
1229
|
+
const parsedBody = parsedOutput.body;
|
|
1230
|
+
throwDefaultError({
|
|
1231
|
+
output,
|
|
1232
|
+
parsedBody,
|
|
1233
|
+
exceptionCtor: __BaseException,
|
|
1234
|
+
errorCode,
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
export const deserializeAws_restJson1ListOrdersCommand = async (output, context) => {
|
|
1239
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1240
|
+
return deserializeAws_restJson1ListOrdersCommandError(output, context);
|
|
1241
|
+
}
|
|
1242
|
+
const contents = map({
|
|
1243
|
+
$metadata: deserializeMetadata(output),
|
|
1961
1244
|
});
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
1245
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1246
|
+
if (data.NextToken != null) {
|
|
1247
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1248
|
+
}
|
|
1249
|
+
if (data.Orders != null) {
|
|
1250
|
+
contents.Orders = deserializeAws_restJson1OrderSummaryListDefinition(data.Orders, context);
|
|
1251
|
+
}
|
|
1252
|
+
return contents;
|
|
1253
|
+
};
|
|
1254
|
+
const deserializeAws_restJson1ListOrdersCommandError = async (output, context) => {
|
|
1255
|
+
const parsedOutput = {
|
|
1256
|
+
...output,
|
|
1257
|
+
body: await parseErrorBody(output.body, context),
|
|
1258
|
+
};
|
|
1259
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1260
|
+
switch (errorCode) {
|
|
1261
|
+
case "AccessDeniedException":
|
|
1262
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1263
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1264
|
+
case "InternalServerException":
|
|
1265
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1266
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1267
|
+
case "NotFoundException":
|
|
1268
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1269
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1270
|
+
case "ValidationException":
|
|
1271
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1272
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1273
|
+
default:
|
|
1274
|
+
const parsedBody = parsedOutput.body;
|
|
1275
|
+
throwDefaultError({
|
|
1276
|
+
output,
|
|
1277
|
+
parsedBody,
|
|
1278
|
+
exceptionCtor: __BaseException,
|
|
1279
|
+
errorCode,
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
export const deserializeAws_restJson1ListOutpostsCommand = async (output, context) => {
|
|
1284
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1285
|
+
return deserializeAws_restJson1ListOutpostsCommandError(output, context);
|
|
1286
|
+
}
|
|
1287
|
+
const contents = map({
|
|
1288
|
+
$metadata: deserializeMetadata(output),
|
|
2002
1289
|
});
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
1290
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1291
|
+
if (data.NextToken != null) {
|
|
1292
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1293
|
+
}
|
|
1294
|
+
if (data.Outposts != null) {
|
|
1295
|
+
contents.Outposts = deserializeAws_restJson1outpostListDefinition(data.Outposts, context);
|
|
1296
|
+
}
|
|
1297
|
+
return contents;
|
|
1298
|
+
};
|
|
1299
|
+
const deserializeAws_restJson1ListOutpostsCommandError = async (output, context) => {
|
|
1300
|
+
const parsedOutput = {
|
|
1301
|
+
...output,
|
|
1302
|
+
body: await parseErrorBody(output.body, context),
|
|
1303
|
+
};
|
|
1304
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1305
|
+
switch (errorCode) {
|
|
1306
|
+
case "AccessDeniedException":
|
|
1307
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1308
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1309
|
+
case "InternalServerException":
|
|
1310
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1311
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1312
|
+
case "ValidationException":
|
|
1313
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1314
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1315
|
+
default:
|
|
1316
|
+
const parsedBody = parsedOutput.body;
|
|
1317
|
+
throwDefaultError({
|
|
1318
|
+
output,
|
|
1319
|
+
parsedBody,
|
|
1320
|
+
exceptionCtor: __BaseException,
|
|
1321
|
+
errorCode,
|
|
1322
|
+
});
|
|
1323
|
+
}
|
|
1324
|
+
};
|
|
1325
|
+
export const deserializeAws_restJson1ListSitesCommand = async (output, context) => {
|
|
1326
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1327
|
+
return deserializeAws_restJson1ListSitesCommandError(output, context);
|
|
1328
|
+
}
|
|
1329
|
+
const contents = map({
|
|
1330
|
+
$metadata: deserializeMetadata(output),
|
|
2028
1331
|
});
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
_d.label = 11;
|
|
2071
|
-
case 11: return [2];
|
|
2072
|
-
}
|
|
1332
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1333
|
+
if (data.NextToken != null) {
|
|
1334
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1335
|
+
}
|
|
1336
|
+
if (data.Sites != null) {
|
|
1337
|
+
contents.Sites = deserializeAws_restJson1siteListDefinition(data.Sites, context);
|
|
1338
|
+
}
|
|
1339
|
+
return contents;
|
|
1340
|
+
};
|
|
1341
|
+
const deserializeAws_restJson1ListSitesCommandError = async (output, context) => {
|
|
1342
|
+
const parsedOutput = {
|
|
1343
|
+
...output,
|
|
1344
|
+
body: await parseErrorBody(output.body, context),
|
|
1345
|
+
};
|
|
1346
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1347
|
+
switch (errorCode) {
|
|
1348
|
+
case "AccessDeniedException":
|
|
1349
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1350
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1351
|
+
case "InternalServerException":
|
|
1352
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1353
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1354
|
+
case "ValidationException":
|
|
1355
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1356
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1357
|
+
default:
|
|
1358
|
+
const parsedBody = parsedOutput.body;
|
|
1359
|
+
throwDefaultError({
|
|
1360
|
+
output,
|
|
1361
|
+
parsedBody,
|
|
1362
|
+
exceptionCtor: __BaseException,
|
|
1363
|
+
errorCode,
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1366
|
+
};
|
|
1367
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
1368
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1369
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
1370
|
+
}
|
|
1371
|
+
const contents = map({
|
|
1372
|
+
$metadata: deserializeMetadata(output),
|
|
2073
1373
|
});
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
1374
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1375
|
+
if (data.Tags != null) {
|
|
1376
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
1377
|
+
}
|
|
1378
|
+
return contents;
|
|
1379
|
+
};
|
|
1380
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
1381
|
+
const parsedOutput = {
|
|
1382
|
+
...output,
|
|
1383
|
+
body: await parseErrorBody(output.body, context),
|
|
1384
|
+
};
|
|
1385
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1386
|
+
switch (errorCode) {
|
|
1387
|
+
case "InternalServerException":
|
|
1388
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1389
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1390
|
+
case "NotFoundException":
|
|
1391
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1392
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1393
|
+
case "ValidationException":
|
|
1394
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1395
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1396
|
+
default:
|
|
1397
|
+
const parsedBody = parsedOutput.body;
|
|
1398
|
+
throwDefaultError({
|
|
1399
|
+
output,
|
|
1400
|
+
parsedBody,
|
|
1401
|
+
exceptionCtor: __BaseException,
|
|
1402
|
+
errorCode,
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
};
|
|
1406
|
+
export const deserializeAws_restJson1StartConnectionCommand = async (output, context) => {
|
|
1407
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1408
|
+
return deserializeAws_restJson1StartConnectionCommandError(output, context);
|
|
1409
|
+
}
|
|
1410
|
+
const contents = map({
|
|
1411
|
+
$metadata: deserializeMetadata(output),
|
|
2091
1412
|
});
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
1413
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1414
|
+
if (data.ConnectionId != null) {
|
|
1415
|
+
contents.ConnectionId = __expectString(data.ConnectionId);
|
|
1416
|
+
}
|
|
1417
|
+
if (data.UnderlayIpAddress != null) {
|
|
1418
|
+
contents.UnderlayIpAddress = __expectString(data.UnderlayIpAddress);
|
|
1419
|
+
}
|
|
1420
|
+
return contents;
|
|
1421
|
+
};
|
|
1422
|
+
const deserializeAws_restJson1StartConnectionCommandError = async (output, context) => {
|
|
1423
|
+
const parsedOutput = {
|
|
1424
|
+
...output,
|
|
1425
|
+
body: await parseErrorBody(output.body, context),
|
|
1426
|
+
};
|
|
1427
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1428
|
+
switch (errorCode) {
|
|
1429
|
+
case "AccessDeniedException":
|
|
1430
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1431
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1432
|
+
case "InternalServerException":
|
|
1433
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1434
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1435
|
+
case "NotFoundException":
|
|
1436
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1437
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1438
|
+
case "ValidationException":
|
|
1439
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1440
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1441
|
+
default:
|
|
1442
|
+
const parsedBody = parsedOutput.body;
|
|
1443
|
+
throwDefaultError({
|
|
1444
|
+
output,
|
|
1445
|
+
parsedBody,
|
|
1446
|
+
exceptionCtor: __BaseException,
|
|
1447
|
+
errorCode,
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
1452
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1453
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
1454
|
+
}
|
|
1455
|
+
const contents = map({
|
|
1456
|
+
$metadata: deserializeMetadata(output),
|
|
2132
1457
|
});
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
1458
|
+
await collectBody(output.body, context);
|
|
1459
|
+
return contents;
|
|
1460
|
+
};
|
|
1461
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
1462
|
+
const parsedOutput = {
|
|
1463
|
+
...output,
|
|
1464
|
+
body: await parseErrorBody(output.body, context),
|
|
1465
|
+
};
|
|
1466
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1467
|
+
switch (errorCode) {
|
|
1468
|
+
case "InternalServerException":
|
|
1469
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1470
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1471
|
+
case "NotFoundException":
|
|
1472
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1473
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1474
|
+
case "ValidationException":
|
|
1475
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1476
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1477
|
+
default:
|
|
1478
|
+
const parsedBody = parsedOutput.body;
|
|
1479
|
+
throwDefaultError({
|
|
1480
|
+
output,
|
|
1481
|
+
parsedBody,
|
|
1482
|
+
exceptionCtor: __BaseException,
|
|
1483
|
+
errorCode,
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
1488
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1489
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
1490
|
+
}
|
|
1491
|
+
const contents = map({
|
|
1492
|
+
$metadata: deserializeMetadata(output),
|
|
2150
1493
|
});
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
errorCode: errorCode,
|
|
2187
|
-
});
|
|
2188
|
-
_d.label = 9;
|
|
2189
|
-
case 9: return [2];
|
|
2190
|
-
}
|
|
1494
|
+
await collectBody(output.body, context);
|
|
1495
|
+
return contents;
|
|
1496
|
+
};
|
|
1497
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
1498
|
+
const parsedOutput = {
|
|
1499
|
+
...output,
|
|
1500
|
+
body: await parseErrorBody(output.body, context),
|
|
1501
|
+
};
|
|
1502
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1503
|
+
switch (errorCode) {
|
|
1504
|
+
case "InternalServerException":
|
|
1505
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1506
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1507
|
+
case "NotFoundException":
|
|
1508
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1509
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1510
|
+
case "ValidationException":
|
|
1511
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1512
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1513
|
+
default:
|
|
1514
|
+
const parsedBody = parsedOutput.body;
|
|
1515
|
+
throwDefaultError({
|
|
1516
|
+
output,
|
|
1517
|
+
parsedBody,
|
|
1518
|
+
exceptionCtor: __BaseException,
|
|
1519
|
+
errorCode,
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
export const deserializeAws_restJson1UpdateOutpostCommand = async (output, context) => {
|
|
1524
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1525
|
+
return deserializeAws_restJson1UpdateOutpostCommandError(output, context);
|
|
1526
|
+
}
|
|
1527
|
+
const contents = map({
|
|
1528
|
+
$metadata: deserializeMetadata(output),
|
|
2191
1529
|
});
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
1530
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1531
|
+
if (data.Outpost != null) {
|
|
1532
|
+
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
1533
|
+
}
|
|
1534
|
+
return contents;
|
|
1535
|
+
};
|
|
1536
|
+
const deserializeAws_restJson1UpdateOutpostCommandError = async (output, context) => {
|
|
1537
|
+
const parsedOutput = {
|
|
1538
|
+
...output,
|
|
1539
|
+
body: await parseErrorBody(output.body, context),
|
|
1540
|
+
};
|
|
1541
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1542
|
+
switch (errorCode) {
|
|
1543
|
+
case "AccessDeniedException":
|
|
1544
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1545
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1546
|
+
case "ConflictException":
|
|
1547
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
1548
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1549
|
+
case "InternalServerException":
|
|
1550
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1551
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1552
|
+
case "NotFoundException":
|
|
1553
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1554
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1555
|
+
case "ValidationException":
|
|
1556
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1557
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1558
|
+
default:
|
|
1559
|
+
const parsedBody = parsedOutput.body;
|
|
1560
|
+
throwDefaultError({
|
|
1561
|
+
output,
|
|
1562
|
+
parsedBody,
|
|
1563
|
+
exceptionCtor: __BaseException,
|
|
1564
|
+
errorCode,
|
|
1565
|
+
});
|
|
1566
|
+
}
|
|
1567
|
+
};
|
|
1568
|
+
export const deserializeAws_restJson1UpdateSiteCommand = async (output, context) => {
|
|
1569
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1570
|
+
return deserializeAws_restJson1UpdateSiteCommandError(output, context);
|
|
1571
|
+
}
|
|
1572
|
+
const contents = map({
|
|
1573
|
+
$metadata: deserializeMetadata(output),
|
|
2214
1574
|
});
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
return
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
});
|
|
2260
|
-
_d.label = 13;
|
|
2261
|
-
case 13: return [2];
|
|
2262
|
-
}
|
|
1575
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1576
|
+
if (data.Site != null) {
|
|
1577
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
1578
|
+
}
|
|
1579
|
+
return contents;
|
|
1580
|
+
};
|
|
1581
|
+
const deserializeAws_restJson1UpdateSiteCommandError = async (output, context) => {
|
|
1582
|
+
const parsedOutput = {
|
|
1583
|
+
...output,
|
|
1584
|
+
body: await parseErrorBody(output.body, context),
|
|
1585
|
+
};
|
|
1586
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1587
|
+
switch (errorCode) {
|
|
1588
|
+
case "AccessDeniedException":
|
|
1589
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1590
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1591
|
+
case "ConflictException":
|
|
1592
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
1593
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1594
|
+
case "InternalServerException":
|
|
1595
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1596
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1597
|
+
case "NotFoundException":
|
|
1598
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1599
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1600
|
+
case "ValidationException":
|
|
1601
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1602
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1603
|
+
default:
|
|
1604
|
+
const parsedBody = parsedOutput.body;
|
|
1605
|
+
throwDefaultError({
|
|
1606
|
+
output,
|
|
1607
|
+
parsedBody,
|
|
1608
|
+
exceptionCtor: __BaseException,
|
|
1609
|
+
errorCode,
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1612
|
+
};
|
|
1613
|
+
export const deserializeAws_restJson1UpdateSiteAddressCommand = async (output, context) => {
|
|
1614
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1615
|
+
return deserializeAws_restJson1UpdateSiteAddressCommandError(output, context);
|
|
1616
|
+
}
|
|
1617
|
+
const contents = map({
|
|
1618
|
+
$metadata: deserializeMetadata(output),
|
|
2263
1619
|
});
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
1620
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1621
|
+
if (data.Address != null) {
|
|
1622
|
+
contents.Address = deserializeAws_restJson1Address(data.Address, context);
|
|
1623
|
+
}
|
|
1624
|
+
if (data.AddressType != null) {
|
|
1625
|
+
contents.AddressType = __expectString(data.AddressType);
|
|
1626
|
+
}
|
|
1627
|
+
return contents;
|
|
1628
|
+
};
|
|
1629
|
+
const deserializeAws_restJson1UpdateSiteAddressCommandError = async (output, context) => {
|
|
1630
|
+
const parsedOutput = {
|
|
1631
|
+
...output,
|
|
1632
|
+
body: await parseErrorBody(output.body, context),
|
|
1633
|
+
};
|
|
1634
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1635
|
+
switch (errorCode) {
|
|
1636
|
+
case "AccessDeniedException":
|
|
1637
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1638
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1639
|
+
case "ConflictException":
|
|
1640
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
1641
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1642
|
+
case "InternalServerException":
|
|
1643
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1644
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1645
|
+
case "NotFoundException":
|
|
1646
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1647
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1648
|
+
case "ValidationException":
|
|
1649
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1650
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1651
|
+
default:
|
|
1652
|
+
const parsedBody = parsedOutput.body;
|
|
1653
|
+
throwDefaultError({
|
|
1654
|
+
output,
|
|
1655
|
+
parsedBody,
|
|
1656
|
+
exceptionCtor: __BaseException,
|
|
1657
|
+
errorCode,
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
};
|
|
1661
|
+
export const deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = async (output, context) => {
|
|
1662
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1663
|
+
return deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError(output, context);
|
|
1664
|
+
}
|
|
1665
|
+
const contents = map({
|
|
1666
|
+
$metadata: deserializeMetadata(output),
|
|
2286
1667
|
});
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
return
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
1668
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1669
|
+
if (data.Site != null) {
|
|
1670
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
1671
|
+
}
|
|
1672
|
+
return contents;
|
|
1673
|
+
};
|
|
1674
|
+
const deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError = async (output, context) => {
|
|
1675
|
+
const parsedOutput = {
|
|
1676
|
+
...output,
|
|
1677
|
+
body: await parseErrorBody(output.body, context),
|
|
1678
|
+
};
|
|
1679
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1680
|
+
switch (errorCode) {
|
|
1681
|
+
case "AccessDeniedException":
|
|
1682
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1683
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1684
|
+
case "ConflictException":
|
|
1685
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
1686
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1687
|
+
case "InternalServerException":
|
|
1688
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1689
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1690
|
+
case "NotFoundException":
|
|
1691
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1692
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1693
|
+
case "ValidationException":
|
|
1694
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1695
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1696
|
+
default:
|
|
1697
|
+
const parsedBody = parsedOutput.body;
|
|
1698
|
+
throwDefaultError({
|
|
1699
|
+
output,
|
|
1700
|
+
parsedBody,
|
|
1701
|
+
exceptionCtor: __BaseException,
|
|
1702
|
+
errorCode,
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1706
|
+
const map = __map;
|
|
1707
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
1708
|
+
const contents = map({});
|
|
1709
|
+
const data = parsedOutput.body;
|
|
1710
|
+
if (data.Message != null) {
|
|
1711
|
+
contents.Message = __expectString(data.Message);
|
|
1712
|
+
}
|
|
1713
|
+
const exception = new AccessDeniedException({
|
|
1714
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1715
|
+
...contents,
|
|
2335
1716
|
});
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
if (data.Address != null) {
|
|
2354
|
-
contents.Address = deserializeAws_restJson1Address(data.Address, context);
|
|
2355
|
-
}
|
|
2356
|
-
if (data.AddressType != null) {
|
|
2357
|
-
contents.AddressType = __expectString(data.AddressType);
|
|
2358
|
-
}
|
|
2359
|
-
return [2, contents];
|
|
2360
|
-
}
|
|
1717
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1718
|
+
};
|
|
1719
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1720
|
+
const contents = map({});
|
|
1721
|
+
const data = parsedOutput.body;
|
|
1722
|
+
if (data.Message != null) {
|
|
1723
|
+
contents.Message = __expectString(data.Message);
|
|
1724
|
+
}
|
|
1725
|
+
if (data.ResourceId != null) {
|
|
1726
|
+
contents.ResourceId = __expectString(data.ResourceId);
|
|
1727
|
+
}
|
|
1728
|
+
if (data.ResourceType != null) {
|
|
1729
|
+
contents.ResourceType = __expectString(data.ResourceType);
|
|
1730
|
+
}
|
|
1731
|
+
const exception = new ConflictException({
|
|
1732
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1733
|
+
...contents,
|
|
2361
1734
|
});
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2374
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2375
|
-
_b = errorCode;
|
|
2376
|
-
switch (_b) {
|
|
2377
|
-
case "AccessDeniedException": return [3, 2];
|
|
2378
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
2379
|
-
case "ConflictException": return [3, 4];
|
|
2380
|
-
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
2381
|
-
case "InternalServerException": return [3, 6];
|
|
2382
|
-
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
2383
|
-
case "NotFoundException": return [3, 8];
|
|
2384
|
-
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
2385
|
-
case "ValidationException": return [3, 10];
|
|
2386
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
2387
|
-
}
|
|
2388
|
-
return [3, 12];
|
|
2389
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2390
|
-
case 3: throw _d.sent();
|
|
2391
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2392
|
-
case 5: throw _d.sent();
|
|
2393
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2394
|
-
case 7: throw _d.sent();
|
|
2395
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2396
|
-
case 9: throw _d.sent();
|
|
2397
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2398
|
-
case 11: throw _d.sent();
|
|
2399
|
-
case 12:
|
|
2400
|
-
parsedBody = parsedOutput.body;
|
|
2401
|
-
throwDefaultError({
|
|
2402
|
-
output: output,
|
|
2403
|
-
parsedBody: parsedBody,
|
|
2404
|
-
exceptionCtor: __BaseException,
|
|
2405
|
-
errorCode: errorCode,
|
|
2406
|
-
});
|
|
2407
|
-
_d.label = 13;
|
|
2408
|
-
case 13: return [2];
|
|
2409
|
-
}
|
|
1735
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1736
|
+
};
|
|
1737
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
1738
|
+
const contents = map({});
|
|
1739
|
+
const data = parsedOutput.body;
|
|
1740
|
+
if (data.Message != null) {
|
|
1741
|
+
contents.Message = __expectString(data.Message);
|
|
1742
|
+
}
|
|
1743
|
+
const exception = new InternalServerException({
|
|
1744
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1745
|
+
...contents,
|
|
2410
1746
|
});
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
});
|
|
2423
|
-
_a = __expectNonNull;
|
|
2424
|
-
_b = __expectObject;
|
|
2425
|
-
return [4, parseBody(output.body, context)];
|
|
2426
|
-
case 1:
|
|
2427
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2428
|
-
if (data.Site != null) {
|
|
2429
|
-
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
2430
|
-
}
|
|
2431
|
-
return [2, contents];
|
|
2432
|
-
}
|
|
1747
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1748
|
+
};
|
|
1749
|
+
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1750
|
+
const contents = map({});
|
|
1751
|
+
const data = parsedOutput.body;
|
|
1752
|
+
if (data.Message != null) {
|
|
1753
|
+
contents.Message = __expectString(data.Message);
|
|
1754
|
+
}
|
|
1755
|
+
const exception = new NotFoundException({
|
|
1756
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1757
|
+
...contents,
|
|
2433
1758
|
});
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2446
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2447
|
-
_b = errorCode;
|
|
2448
|
-
switch (_b) {
|
|
2449
|
-
case "AccessDeniedException": return [3, 2];
|
|
2450
|
-
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
2451
|
-
case "ConflictException": return [3, 4];
|
|
2452
|
-
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
2453
|
-
case "InternalServerException": return [3, 6];
|
|
2454
|
-
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
2455
|
-
case "NotFoundException": return [3, 8];
|
|
2456
|
-
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
2457
|
-
case "ValidationException": return [3, 10];
|
|
2458
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
2459
|
-
}
|
|
2460
|
-
return [3, 12];
|
|
2461
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2462
|
-
case 3: throw _d.sent();
|
|
2463
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2464
|
-
case 5: throw _d.sent();
|
|
2465
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2466
|
-
case 7: throw _d.sent();
|
|
2467
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2468
|
-
case 9: throw _d.sent();
|
|
2469
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2470
|
-
case 11: throw _d.sent();
|
|
2471
|
-
case 12:
|
|
2472
|
-
parsedBody = parsedOutput.body;
|
|
2473
|
-
throwDefaultError({
|
|
2474
|
-
output: output,
|
|
2475
|
-
parsedBody: parsedBody,
|
|
2476
|
-
exceptionCtor: __BaseException,
|
|
2477
|
-
errorCode: errorCode,
|
|
2478
|
-
});
|
|
2479
|
-
_d.label = 13;
|
|
2480
|
-
case 13: return [2];
|
|
2481
|
-
}
|
|
1759
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1760
|
+
};
|
|
1761
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1762
|
+
const contents = map({});
|
|
1763
|
+
const data = parsedOutput.body;
|
|
1764
|
+
if (data.Message != null) {
|
|
1765
|
+
contents.Message = __expectString(data.Message);
|
|
1766
|
+
}
|
|
1767
|
+
const exception = new ServiceQuotaExceededException({
|
|
1768
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1769
|
+
...contents,
|
|
2482
1770
|
});
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2495
|
-
});
|
|
2496
|
-
}); };
|
|
2497
|
-
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2498
|
-
var contents, data, exception;
|
|
2499
|
-
return __generator(this, function (_a) {
|
|
2500
|
-
contents = map({});
|
|
2501
|
-
data = parsedOutput.body;
|
|
2502
|
-
if (data.Message != null) {
|
|
2503
|
-
contents.Message = __expectString(data.Message);
|
|
2504
|
-
}
|
|
2505
|
-
if (data.ResourceId != null) {
|
|
2506
|
-
contents.ResourceId = __expectString(data.ResourceId);
|
|
2507
|
-
}
|
|
2508
|
-
if (data.ResourceType != null) {
|
|
2509
|
-
contents.ResourceType = __expectString(data.ResourceType);
|
|
2510
|
-
}
|
|
2511
|
-
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2512
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2513
|
-
});
|
|
2514
|
-
}); };
|
|
2515
|
-
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2516
|
-
var contents, data, exception;
|
|
2517
|
-
return __generator(this, function (_a) {
|
|
2518
|
-
contents = map({});
|
|
2519
|
-
data = parsedOutput.body;
|
|
2520
|
-
if (data.Message != null) {
|
|
2521
|
-
contents.Message = __expectString(data.Message);
|
|
2522
|
-
}
|
|
2523
|
-
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2524
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2525
|
-
});
|
|
2526
|
-
}); };
|
|
2527
|
-
var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2528
|
-
var contents, data, exception;
|
|
2529
|
-
return __generator(this, function (_a) {
|
|
2530
|
-
contents = map({});
|
|
2531
|
-
data = parsedOutput.body;
|
|
2532
|
-
if (data.Message != null) {
|
|
2533
|
-
contents.Message = __expectString(data.Message);
|
|
2534
|
-
}
|
|
2535
|
-
exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2536
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2537
|
-
});
|
|
2538
|
-
}); };
|
|
2539
|
-
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2540
|
-
var contents, data, exception;
|
|
2541
|
-
return __generator(this, function (_a) {
|
|
2542
|
-
contents = map({});
|
|
2543
|
-
data = parsedOutput.body;
|
|
2544
|
-
if (data.Message != null) {
|
|
2545
|
-
contents.Message = __expectString(data.Message);
|
|
2546
|
-
}
|
|
2547
|
-
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2548
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2549
|
-
});
|
|
2550
|
-
}); };
|
|
2551
|
-
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2552
|
-
var contents, data, exception;
|
|
2553
|
-
return __generator(this, function (_a) {
|
|
2554
|
-
contents = map({});
|
|
2555
|
-
data = parsedOutput.body;
|
|
2556
|
-
if (data.Message != null) {
|
|
2557
|
-
contents.Message = __expectString(data.Message);
|
|
2558
|
-
}
|
|
2559
|
-
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2560
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1771
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1772
|
+
};
|
|
1773
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1774
|
+
const contents = map({});
|
|
1775
|
+
const data = parsedOutput.body;
|
|
1776
|
+
if (data.Message != null) {
|
|
1777
|
+
contents.Message = __expectString(data.Message);
|
|
1778
|
+
}
|
|
1779
|
+
const exception = new ValidationException({
|
|
1780
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1781
|
+
...contents,
|
|
2561
1782
|
});
|
|
2562
|
-
|
|
2563
|
-
var serializeAws_restJson1Address = function (input, context) {
|
|
2564
|
-
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AddressLine1 != null && { AddressLine1: input.AddressLine1 })), (input.AddressLine2 != null && { AddressLine2: input.AddressLine2 })), (input.AddressLine3 != null && { AddressLine3: input.AddressLine3 })), (input.City != null && { City: input.City })), (input.ContactName != null && { ContactName: input.ContactName })), (input.ContactPhoneNumber != null && { ContactPhoneNumber: input.ContactPhoneNumber })), (input.CountryCode != null && { CountryCode: input.CountryCode })), (input.DistrictOrCounty != null && { DistrictOrCounty: input.DistrictOrCounty })), (input.Municipality != null && { Municipality: input.Municipality })), (input.PostalCode != null && { PostalCode: input.PostalCode })), (input.StateOrRegion != null && { StateOrRegion: input.StateOrRegion }));
|
|
1783
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
2565
1784
|
};
|
|
2566
|
-
|
|
2567
|
-
return
|
|
1785
|
+
const serializeAws_restJson1Address = (input, context) => {
|
|
1786
|
+
return {
|
|
1787
|
+
...(input.AddressLine1 != null && { AddressLine1: input.AddressLine1 }),
|
|
1788
|
+
...(input.AddressLine2 != null && { AddressLine2: input.AddressLine2 }),
|
|
1789
|
+
...(input.AddressLine3 != null && { AddressLine3: input.AddressLine3 }),
|
|
1790
|
+
...(input.City != null && { City: input.City }),
|
|
1791
|
+
...(input.ContactName != null && { ContactName: input.ContactName }),
|
|
1792
|
+
...(input.ContactPhoneNumber != null && { ContactPhoneNumber: input.ContactPhoneNumber }),
|
|
1793
|
+
...(input.CountryCode != null && { CountryCode: input.CountryCode }),
|
|
1794
|
+
...(input.DistrictOrCounty != null && { DistrictOrCounty: input.DistrictOrCounty }),
|
|
1795
|
+
...(input.Municipality != null && { Municipality: input.Municipality }),
|
|
1796
|
+
...(input.PostalCode != null && { PostalCode: input.PostalCode }),
|
|
1797
|
+
...(input.StateOrRegion != null && { StateOrRegion: input.StateOrRegion }),
|
|
1798
|
+
};
|
|
1799
|
+
};
|
|
1800
|
+
const serializeAws_restJson1LineItemRequest = (input, context) => {
|
|
1801
|
+
return {
|
|
1802
|
+
...(input.CatalogItemId != null && { CatalogItemId: input.CatalogItemId }),
|
|
1803
|
+
...(input.Quantity != null && { Quantity: input.Quantity }),
|
|
1804
|
+
};
|
|
2568
1805
|
};
|
|
2569
|
-
|
|
1806
|
+
const serializeAws_restJson1LineItemRequestListDefinition = (input, context) => {
|
|
2570
1807
|
return input
|
|
2571
|
-
.filter(
|
|
2572
|
-
.map(
|
|
1808
|
+
.filter((e) => e != null)
|
|
1809
|
+
.map((entry) => {
|
|
2573
1810
|
return serializeAws_restJson1LineItemRequest(entry, context);
|
|
2574
1811
|
});
|
|
2575
1812
|
};
|
|
2576
|
-
|
|
2577
|
-
return
|
|
1813
|
+
const serializeAws_restJson1RackPhysicalProperties = (input, context) => {
|
|
1814
|
+
return {
|
|
1815
|
+
...(input.FiberOpticCableType != null && { FiberOpticCableType: input.FiberOpticCableType }),
|
|
1816
|
+
...(input.MaximumSupportedWeightLbs != null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs }),
|
|
1817
|
+
...(input.OpticalStandard != null && { OpticalStandard: input.OpticalStandard }),
|
|
1818
|
+
...(input.PowerConnector != null && { PowerConnector: input.PowerConnector }),
|
|
1819
|
+
...(input.PowerDrawKva != null && { PowerDrawKva: input.PowerDrawKva }),
|
|
1820
|
+
...(input.PowerFeedDrop != null && { PowerFeedDrop: input.PowerFeedDrop }),
|
|
1821
|
+
...(input.PowerPhase != null && { PowerPhase: input.PowerPhase }),
|
|
1822
|
+
...(input.UplinkCount != null && { UplinkCount: input.UplinkCount }),
|
|
1823
|
+
...(input.UplinkGbps != null && { UplinkGbps: input.UplinkGbps }),
|
|
1824
|
+
};
|
|
2578
1825
|
};
|
|
2579
|
-
|
|
2580
|
-
return Object.entries(input).reduce(
|
|
2581
|
-
var _b;
|
|
2582
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1826
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1827
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2583
1828
|
if (value === null) {
|
|
2584
1829
|
return acc;
|
|
2585
1830
|
}
|
|
2586
|
-
return
|
|
1831
|
+
return {
|
|
1832
|
+
...acc,
|
|
1833
|
+
[key]: value,
|
|
1834
|
+
};
|
|
2587
1835
|
}, {});
|
|
2588
1836
|
};
|
|
2589
|
-
|
|
1837
|
+
const deserializeAws_restJson1Address = (output, context) => {
|
|
2590
1838
|
return {
|
|
2591
1839
|
AddressLine1: __expectString(output.AddressLine1),
|
|
2592
1840
|
AddressLine2: __expectString(output.AddressLine2),
|
|
@@ -2601,7 +1849,7 @@ var deserializeAws_restJson1Address = function (output, context) {
|
|
|
2601
1849
|
StateOrRegion: __expectString(output.StateOrRegion),
|
|
2602
1850
|
};
|
|
2603
1851
|
};
|
|
2604
|
-
|
|
1852
|
+
const deserializeAws_restJson1AssetInfo = (output, context) => {
|
|
2605
1853
|
return {
|
|
2606
1854
|
AssetId: __expectString(output.AssetId),
|
|
2607
1855
|
AssetLocation: output.AssetLocation != null ? deserializeAws_restJson1AssetLocation(output.AssetLocation, context) : undefined,
|
|
@@ -2612,10 +1860,10 @@ var deserializeAws_restJson1AssetInfo = function (output, context) {
|
|
|
2612
1860
|
RackId: __expectString(output.RackId),
|
|
2613
1861
|
};
|
|
2614
1862
|
};
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
.filter(
|
|
2618
|
-
.map(
|
|
1863
|
+
const deserializeAws_restJson1AssetListDefinition = (output, context) => {
|
|
1864
|
+
const retVal = (output || [])
|
|
1865
|
+
.filter((e) => e != null)
|
|
1866
|
+
.map((entry) => {
|
|
2619
1867
|
if (entry === null) {
|
|
2620
1868
|
return null;
|
|
2621
1869
|
}
|
|
@@ -2623,12 +1871,12 @@ var deserializeAws_restJson1AssetListDefinition = function (output, context) {
|
|
|
2623
1871
|
});
|
|
2624
1872
|
return retVal;
|
|
2625
1873
|
};
|
|
2626
|
-
|
|
1874
|
+
const deserializeAws_restJson1AssetLocation = (output, context) => {
|
|
2627
1875
|
return {
|
|
2628
1876
|
RackElevation: __limitedParseFloat32(output.RackElevation),
|
|
2629
1877
|
};
|
|
2630
1878
|
};
|
|
2631
|
-
|
|
1879
|
+
const deserializeAws_restJson1CatalogItem = (output, context) => {
|
|
2632
1880
|
return {
|
|
2633
1881
|
CatalogItemId: __expectString(output.CatalogItemId),
|
|
2634
1882
|
EC2Capacities: output.EC2Capacities != null
|
|
@@ -2645,10 +1893,10 @@ var deserializeAws_restJson1CatalogItem = function (output, context) {
|
|
|
2645
1893
|
WeightLbs: __expectInt32(output.WeightLbs),
|
|
2646
1894
|
};
|
|
2647
1895
|
};
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
.filter(
|
|
2651
|
-
.map(
|
|
1896
|
+
const deserializeAws_restJson1CatalogItemListDefinition = (output, context) => {
|
|
1897
|
+
const retVal = (output || [])
|
|
1898
|
+
.filter((e) => e != null)
|
|
1899
|
+
.map((entry) => {
|
|
2652
1900
|
if (entry === null) {
|
|
2653
1901
|
return null;
|
|
2654
1902
|
}
|
|
@@ -2656,10 +1904,10 @@ var deserializeAws_restJson1CatalogItemListDefinition = function (output, contex
|
|
|
2656
1904
|
});
|
|
2657
1905
|
return retVal;
|
|
2658
1906
|
};
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
.filter(
|
|
2662
|
-
.map(
|
|
1907
|
+
const deserializeAws_restJson1CIDRList = (output, context) => {
|
|
1908
|
+
const retVal = (output || [])
|
|
1909
|
+
.filter((e) => e != null)
|
|
1910
|
+
.map((entry) => {
|
|
2663
1911
|
if (entry === null) {
|
|
2664
1912
|
return null;
|
|
2665
1913
|
}
|
|
@@ -2667,12 +1915,12 @@ var deserializeAws_restJson1CIDRList = function (output, context) {
|
|
|
2667
1915
|
});
|
|
2668
1916
|
return retVal;
|
|
2669
1917
|
};
|
|
2670
|
-
|
|
1918
|
+
const deserializeAws_restJson1ComputeAttributes = (output, context) => {
|
|
2671
1919
|
return {
|
|
2672
1920
|
HostId: __expectString(output.HostId),
|
|
2673
1921
|
};
|
|
2674
1922
|
};
|
|
2675
|
-
|
|
1923
|
+
const deserializeAws_restJson1ConnectionDetails = (output, context) => {
|
|
2676
1924
|
return {
|
|
2677
1925
|
AllowedIps: output.AllowedIps != null ? deserializeAws_restJson1CIDRList(output.AllowedIps, context) : undefined,
|
|
2678
1926
|
ClientPublicKey: __expectString(output.ClientPublicKey),
|
|
@@ -2682,17 +1930,17 @@ var deserializeAws_restJson1ConnectionDetails = function (output, context) {
|
|
|
2682
1930
|
ServerTunnelAddress: __expectString(output.ServerTunnelAddress),
|
|
2683
1931
|
};
|
|
2684
1932
|
};
|
|
2685
|
-
|
|
1933
|
+
const deserializeAws_restJson1EC2Capacity = (output, context) => {
|
|
2686
1934
|
return {
|
|
2687
1935
|
Family: __expectString(output.Family),
|
|
2688
1936
|
MaxSize: __expectString(output.MaxSize),
|
|
2689
1937
|
Quantity: __expectString(output.Quantity),
|
|
2690
1938
|
};
|
|
2691
1939
|
};
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
.filter(
|
|
2695
|
-
.map(
|
|
1940
|
+
const deserializeAws_restJson1EC2CapacityListDefinition = (output, context) => {
|
|
1941
|
+
const retVal = (output || [])
|
|
1942
|
+
.filter((e) => e != null)
|
|
1943
|
+
.map((entry) => {
|
|
2696
1944
|
if (entry === null) {
|
|
2697
1945
|
return null;
|
|
2698
1946
|
}
|
|
@@ -2700,15 +1948,15 @@ var deserializeAws_restJson1EC2CapacityListDefinition = function (output, contex
|
|
|
2700
1948
|
});
|
|
2701
1949
|
return retVal;
|
|
2702
1950
|
};
|
|
2703
|
-
|
|
1951
|
+
const deserializeAws_restJson1InstanceTypeItem = (output, context) => {
|
|
2704
1952
|
return {
|
|
2705
1953
|
InstanceType: __expectString(output.InstanceType),
|
|
2706
1954
|
};
|
|
2707
1955
|
};
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
.filter(
|
|
2711
|
-
.map(
|
|
1956
|
+
const deserializeAws_restJson1InstanceTypeListDefinition = (output, context) => {
|
|
1957
|
+
const retVal = (output || [])
|
|
1958
|
+
.filter((e) => e != null)
|
|
1959
|
+
.map((entry) => {
|
|
2712
1960
|
if (entry === null) {
|
|
2713
1961
|
return null;
|
|
2714
1962
|
}
|
|
@@ -2716,7 +1964,7 @@ var deserializeAws_restJson1InstanceTypeListDefinition = function (output, conte
|
|
|
2716
1964
|
});
|
|
2717
1965
|
return retVal;
|
|
2718
1966
|
};
|
|
2719
|
-
|
|
1967
|
+
const deserializeAws_restJson1LineItem = (output, context) => {
|
|
2720
1968
|
return {
|
|
2721
1969
|
AssetInformationList: output.AssetInformationList != null
|
|
2722
1970
|
? deserializeAws_restJson1LineItemAssetInformationList(output.AssetInformationList, context)
|
|
@@ -2730,7 +1978,7 @@ var deserializeAws_restJson1LineItem = function (output, context) {
|
|
|
2730
1978
|
Status: __expectString(output.Status),
|
|
2731
1979
|
};
|
|
2732
1980
|
};
|
|
2733
|
-
|
|
1981
|
+
const deserializeAws_restJson1LineItemAssetInformation = (output, context) => {
|
|
2734
1982
|
return {
|
|
2735
1983
|
AssetId: __expectString(output.AssetId),
|
|
2736
1984
|
MacAddressList: output.MacAddressList != null
|
|
@@ -2738,10 +1986,10 @@ var deserializeAws_restJson1LineItemAssetInformation = function (output, context
|
|
|
2738
1986
|
: undefined,
|
|
2739
1987
|
};
|
|
2740
1988
|
};
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
.filter(
|
|
2744
|
-
.map(
|
|
1989
|
+
const deserializeAws_restJson1LineItemAssetInformationList = (output, context) => {
|
|
1990
|
+
const retVal = (output || [])
|
|
1991
|
+
.filter((e) => e != null)
|
|
1992
|
+
.map((entry) => {
|
|
2745
1993
|
if (entry === null) {
|
|
2746
1994
|
return null;
|
|
2747
1995
|
}
|
|
@@ -2749,10 +1997,10 @@ var deserializeAws_restJson1LineItemAssetInformationList = function (output, con
|
|
|
2749
1997
|
});
|
|
2750
1998
|
return retVal;
|
|
2751
1999
|
};
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
.filter(
|
|
2755
|
-
.map(
|
|
2000
|
+
const deserializeAws_restJson1LineItemListDefinition = (output, context) => {
|
|
2001
|
+
const retVal = (output || [])
|
|
2002
|
+
.filter((e) => e != null)
|
|
2003
|
+
.map((entry) => {
|
|
2756
2004
|
if (entry === null) {
|
|
2757
2005
|
return null;
|
|
2758
2006
|
}
|
|
@@ -2760,20 +2008,21 @@ var deserializeAws_restJson1LineItemListDefinition = function (output, context)
|
|
|
2760
2008
|
});
|
|
2761
2009
|
return retVal;
|
|
2762
2010
|
};
|
|
2763
|
-
|
|
2764
|
-
return Object.entries(output).reduce(
|
|
2765
|
-
var _b;
|
|
2766
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2011
|
+
const deserializeAws_restJson1LineItemStatusCounts = (output, context) => {
|
|
2012
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2767
2013
|
if (value === null) {
|
|
2768
2014
|
return acc;
|
|
2769
2015
|
}
|
|
2770
|
-
return
|
|
2016
|
+
return {
|
|
2017
|
+
...acc,
|
|
2018
|
+
[key]: __expectInt32(value),
|
|
2019
|
+
};
|
|
2771
2020
|
}, {});
|
|
2772
2021
|
};
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
.filter(
|
|
2776
|
-
.map(
|
|
2022
|
+
const deserializeAws_restJson1MacAddressList = (output, context) => {
|
|
2023
|
+
const retVal = (output || [])
|
|
2024
|
+
.filter((e) => e != null)
|
|
2025
|
+
.map((entry) => {
|
|
2777
2026
|
if (entry === null) {
|
|
2778
2027
|
return null;
|
|
2779
2028
|
}
|
|
@@ -2781,7 +2030,7 @@ var deserializeAws_restJson1MacAddressList = function (output, context) {
|
|
|
2781
2030
|
});
|
|
2782
2031
|
return retVal;
|
|
2783
2032
|
};
|
|
2784
|
-
|
|
2033
|
+
const deserializeAws_restJson1Order = (output, context) => {
|
|
2785
2034
|
return {
|
|
2786
2035
|
LineItems: output.LineItems != null ? deserializeAws_restJson1LineItemListDefinition(output.LineItems, context) : undefined,
|
|
2787
2036
|
OrderFulfilledDate: output.OrderFulfilledDate != null
|
|
@@ -2796,7 +2045,7 @@ var deserializeAws_restJson1Order = function (output, context) {
|
|
|
2796
2045
|
Status: __expectString(output.Status),
|
|
2797
2046
|
};
|
|
2798
2047
|
};
|
|
2799
|
-
|
|
2048
|
+
const deserializeAws_restJson1OrderSummary = (output, context) => {
|
|
2800
2049
|
return {
|
|
2801
2050
|
LineItemCountsByStatus: output.LineItemCountsByStatus != null
|
|
2802
2051
|
? deserializeAws_restJson1LineItemStatusCounts(output.LineItemCountsByStatus, context)
|
|
@@ -2813,10 +2062,10 @@ var deserializeAws_restJson1OrderSummary = function (output, context) {
|
|
|
2813
2062
|
Status: __expectString(output.Status),
|
|
2814
2063
|
};
|
|
2815
2064
|
};
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
.filter(
|
|
2819
|
-
.map(
|
|
2065
|
+
const deserializeAws_restJson1OrderSummaryListDefinition = (output, context) => {
|
|
2066
|
+
const retVal = (output || [])
|
|
2067
|
+
.filter((e) => e != null)
|
|
2068
|
+
.map((entry) => {
|
|
2820
2069
|
if (entry === null) {
|
|
2821
2070
|
return null;
|
|
2822
2071
|
}
|
|
@@ -2824,7 +2073,7 @@ var deserializeAws_restJson1OrderSummaryListDefinition = function (output, conte
|
|
|
2824
2073
|
});
|
|
2825
2074
|
return retVal;
|
|
2826
2075
|
};
|
|
2827
|
-
|
|
2076
|
+
const deserializeAws_restJson1Outpost = (output, context) => {
|
|
2828
2077
|
return {
|
|
2829
2078
|
AvailabilityZone: __expectString(output.AvailabilityZone),
|
|
2830
2079
|
AvailabilityZoneId: __expectString(output.AvailabilityZoneId),
|
|
@@ -2840,10 +2089,10 @@ var deserializeAws_restJson1Outpost = function (output, context) {
|
|
|
2840
2089
|
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
2841
2090
|
};
|
|
2842
2091
|
};
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
.filter(
|
|
2846
|
-
.map(
|
|
2092
|
+
const deserializeAws_restJson1outpostListDefinition = (output, context) => {
|
|
2093
|
+
const retVal = (output || [])
|
|
2094
|
+
.filter((e) => e != null)
|
|
2095
|
+
.map((entry) => {
|
|
2847
2096
|
if (entry === null) {
|
|
2848
2097
|
return null;
|
|
2849
2098
|
}
|
|
@@ -2851,7 +2100,7 @@ var deserializeAws_restJson1outpostListDefinition = function (output, context) {
|
|
|
2851
2100
|
});
|
|
2852
2101
|
return retVal;
|
|
2853
2102
|
};
|
|
2854
|
-
|
|
2103
|
+
const deserializeAws_restJson1RackPhysicalProperties = (output, context) => {
|
|
2855
2104
|
return {
|
|
2856
2105
|
FiberOpticCableType: __expectString(output.FiberOpticCableType),
|
|
2857
2106
|
MaximumSupportedWeightLbs: __expectString(output.MaximumSupportedWeightLbs),
|
|
@@ -2864,13 +2113,13 @@ var deserializeAws_restJson1RackPhysicalProperties = function (output, context)
|
|
|
2864
2113
|
UplinkGbps: __expectString(output.UplinkGbps),
|
|
2865
2114
|
};
|
|
2866
2115
|
};
|
|
2867
|
-
|
|
2116
|
+
const deserializeAws_restJson1ShipmentInformation = (output, context) => {
|
|
2868
2117
|
return {
|
|
2869
2118
|
ShipmentCarrier: __expectString(output.ShipmentCarrier),
|
|
2870
2119
|
ShipmentTrackingNumber: __expectString(output.ShipmentTrackingNumber),
|
|
2871
2120
|
};
|
|
2872
2121
|
};
|
|
2873
|
-
|
|
2122
|
+
const deserializeAws_restJson1Site = (output, context) => {
|
|
2874
2123
|
return {
|
|
2875
2124
|
AccountId: __expectString(output.AccountId),
|
|
2876
2125
|
Description: __expectString(output.Description),
|
|
@@ -2887,10 +2136,10 @@ var deserializeAws_restJson1Site = function (output, context) {
|
|
|
2887
2136
|
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
2888
2137
|
};
|
|
2889
2138
|
};
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
.filter(
|
|
2893
|
-
.map(
|
|
2139
|
+
const deserializeAws_restJson1siteListDefinition = (output, context) => {
|
|
2140
|
+
const retVal = (output || [])
|
|
2141
|
+
.filter((e) => e != null)
|
|
2142
|
+
.map((entry) => {
|
|
2894
2143
|
if (entry === null) {
|
|
2895
2144
|
return null;
|
|
2896
2145
|
}
|
|
@@ -2898,10 +2147,10 @@ var deserializeAws_restJson1siteListDefinition = function (output, context) {
|
|
|
2898
2147
|
});
|
|
2899
2148
|
return retVal;
|
|
2900
2149
|
};
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
.filter(
|
|
2904
|
-
.map(
|
|
2150
|
+
const deserializeAws_restJson1SupportedStorageList = (output, context) => {
|
|
2151
|
+
const retVal = (output || [])
|
|
2152
|
+
.filter((e) => e != null)
|
|
2153
|
+
.map((entry) => {
|
|
2905
2154
|
if (entry === null) {
|
|
2906
2155
|
return null;
|
|
2907
2156
|
}
|
|
@@ -2909,10 +2158,10 @@ var deserializeAws_restJson1SupportedStorageList = function (output, context) {
|
|
|
2909
2158
|
});
|
|
2910
2159
|
return retVal;
|
|
2911
2160
|
};
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
.filter(
|
|
2915
|
-
.map(
|
|
2161
|
+
const deserializeAws_restJson1SupportedUplinkGbpsListDefinition = (output, context) => {
|
|
2162
|
+
const retVal = (output || [])
|
|
2163
|
+
.filter((e) => e != null)
|
|
2164
|
+
.map((entry) => {
|
|
2916
2165
|
if (entry === null) {
|
|
2917
2166
|
return null;
|
|
2918
2167
|
}
|
|
@@ -2920,67 +2169,50 @@ var deserializeAws_restJson1SupportedUplinkGbpsListDefinition = function (output
|
|
|
2920
2169
|
});
|
|
2921
2170
|
return retVal;
|
|
2922
2171
|
};
|
|
2923
|
-
|
|
2924
|
-
return Object.entries(output).reduce(
|
|
2925
|
-
var _b;
|
|
2926
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2172
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
2173
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2927
2174
|
if (value === null) {
|
|
2928
2175
|
return acc;
|
|
2929
2176
|
}
|
|
2930
|
-
return
|
|
2177
|
+
return {
|
|
2178
|
+
...acc,
|
|
2179
|
+
[key]: __expectString(value),
|
|
2180
|
+
};
|
|
2931
2181
|
}, {});
|
|
2932
2182
|
};
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
});
|
|
2941
|
-
};
|
|
2942
|
-
var collectBody = function (streamBody, context) {
|
|
2943
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
2183
|
+
const deserializeMetadata = (output) => ({
|
|
2184
|
+
httpStatusCode: output.statusCode,
|
|
2185
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
2186
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2187
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
2188
|
+
});
|
|
2189
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
2944
2190
|
if (streamBody instanceof Uint8Array) {
|
|
2945
2191
|
return Promise.resolve(streamBody);
|
|
2946
2192
|
}
|
|
2947
2193
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2948
2194
|
};
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2195
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2196
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
2197
|
+
value !== null &&
|
|
2198
|
+
value !== "" &&
|
|
2199
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2200
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2201
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2202
|
+
if (encoded.length) {
|
|
2203
|
+
return JSON.parse(encoded);
|
|
2204
|
+
}
|
|
2205
|
+
return {};
|
|
2206
|
+
});
|
|
2207
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
2208
|
+
const value = await parseBody(errorBody, context);
|
|
2209
|
+
value.message = value.message ?? value.Message;
|
|
2210
|
+
return value;
|
|
2958
2211
|
};
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
}
|
|
2964
|
-
return {};
|
|
2965
|
-
});
|
|
2966
|
-
};
|
|
2967
|
-
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2968
|
-
var value;
|
|
2969
|
-
var _a;
|
|
2970
|
-
return __generator(this, function (_b) {
|
|
2971
|
-
switch (_b.label) {
|
|
2972
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
2973
|
-
case 1:
|
|
2974
|
-
value = _b.sent();
|
|
2975
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2976
|
-
return [2, value];
|
|
2977
|
-
}
|
|
2978
|
-
});
|
|
2979
|
-
}); };
|
|
2980
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
2981
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2982
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
2983
|
-
var cleanValue = rawValue;
|
|
2212
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
2213
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2214
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
2215
|
+
let cleanValue = rawValue;
|
|
2984
2216
|
if (typeof cleanValue === "number") {
|
|
2985
2217
|
cleanValue = cleanValue.toString();
|
|
2986
2218
|
}
|
|
@@ -2995,7 +2227,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2995
2227
|
}
|
|
2996
2228
|
return cleanValue;
|
|
2997
2229
|
};
|
|
2998
|
-
|
|
2230
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2999
2231
|
if (headerKey !== undefined) {
|
|
3000
2232
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3001
2233
|
}
|