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