@aws-sdk/client-account 3.183.0 → 3.185.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 +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/Account.js +29 -22
- package/dist-es/AccountClient.js +28 -22
- package/dist-es/commands/DeleteAlternateContactCommand.js +29 -22
- package/dist-es/commands/GetAlternateContactCommand.js +28 -21
- package/dist-es/commands/GetContactInformationCommand.js +28 -21
- package/dist-es/commands/PutAlternateContactCommand.js +29 -22
- package/dist-es/commands/PutContactInformationCommand.js +29 -22
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/AccountServiceException.js +10 -5
- package/dist-es/models/models_0.js +67 -107
- package/dist-es/protocols/Aws_restJson1.js +551 -406
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +5 -5
|
@@ -1,405 +1,532 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { AccountServiceException as __BaseException } from "../models/AccountServiceException";
|
|
4
5
|
import { AccessDeniedException, InternalServerException, ResourceNotFoundException, TooManyRequestsException, ValidationException, } from "../models/models_0";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
export var serializeAws_restJson1DeleteAlternateContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
|
+
return __generator(this, function (_c) {
|
|
9
|
+
switch (_c.label) {
|
|
10
|
+
case 0: return [4, context.endpoint()];
|
|
11
|
+
case 1:
|
|
12
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
+
headers = {
|
|
14
|
+
"content-type": "application/json",
|
|
15
|
+
};
|
|
16
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/deleteAlternateContact";
|
|
17
|
+
body = JSON.stringify(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.AlternateContactType != null && { AlternateContactType: input.AlternateContactType })));
|
|
18
|
+
return [2, new __HttpRequest({
|
|
19
|
+
protocol: protocol,
|
|
20
|
+
hostname: hostname,
|
|
21
|
+
port: port,
|
|
22
|
+
method: "POST",
|
|
23
|
+
headers: headers,
|
|
24
|
+
path: resolvedPath,
|
|
25
|
+
body: body,
|
|
26
|
+
})];
|
|
27
|
+
}
|
|
15
28
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
29
|
+
}); };
|
|
30
|
+
export var serializeAws_restJson1GetAlternateContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
31
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
32
|
+
return __generator(this, function (_c) {
|
|
33
|
+
switch (_c.label) {
|
|
34
|
+
case 0: return [4, context.endpoint()];
|
|
35
|
+
case 1:
|
|
36
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
37
|
+
headers = {
|
|
38
|
+
"content-type": "application/json",
|
|
39
|
+
};
|
|
40
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/getAlternateContact";
|
|
41
|
+
body = JSON.stringify(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.AlternateContactType != null && { AlternateContactType: input.AlternateContactType })));
|
|
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
|
+
}
|
|
24
52
|
});
|
|
25
|
-
};
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
53
|
+
}); };
|
|
54
|
+
export var serializeAws_restJson1GetContactInformationCommand = 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 || "") + "/getContactInformation";
|
|
65
|
+
body = JSON.stringify(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })));
|
|
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
|
+
}
|
|
36
76
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
77
|
+
}); };
|
|
78
|
+
export var serializeAws_restJson1PutAlternateContactCommand = 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 || "") + "/putAlternateContact";
|
|
89
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.AlternateContactType != null && { AlternateContactType: input.AlternateContactType })), (input.EmailAddress != null && { EmailAddress: input.EmailAddress })), (input.Name != null && { Name: input.Name })), (input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber })), (input.Title != null && { Title: input.Title })));
|
|
90
|
+
return [2, new __HttpRequest({
|
|
91
|
+
protocol: protocol,
|
|
92
|
+
hostname: hostname,
|
|
93
|
+
port: port,
|
|
94
|
+
method: "POST",
|
|
95
|
+
headers: headers,
|
|
96
|
+
path: resolvedPath,
|
|
97
|
+
body: body,
|
|
98
|
+
})];
|
|
99
|
+
}
|
|
45
100
|
});
|
|
46
|
-
};
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
101
|
+
}); };
|
|
102
|
+
export var serializeAws_restJson1PutContactInformationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
103
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
104
|
+
return __generator(this, function (_c) {
|
|
105
|
+
switch (_c.label) {
|
|
106
|
+
case 0: return [4, context.endpoint()];
|
|
107
|
+
case 1:
|
|
108
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
109
|
+
headers = {
|
|
110
|
+
"content-type": "application/json",
|
|
111
|
+
};
|
|
112
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/putContactInformation";
|
|
113
|
+
body = JSON.stringify(__assign(__assign({}, (input.AccountId != null && { AccountId: input.AccountId })), (input.ContactInformation != null && {
|
|
114
|
+
ContactInformation: serializeAws_restJson1ContactInformation(input.ContactInformation, context),
|
|
115
|
+
})));
|
|
116
|
+
return [2, new __HttpRequest({
|
|
117
|
+
protocol: protocol,
|
|
118
|
+
hostname: hostname,
|
|
119
|
+
port: port,
|
|
120
|
+
method: "POST",
|
|
121
|
+
headers: headers,
|
|
122
|
+
path: resolvedPath,
|
|
123
|
+
body: body,
|
|
124
|
+
})];
|
|
125
|
+
}
|
|
56
126
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
127
|
+
}); };
|
|
128
|
+
export var deserializeAws_restJson1DeleteAlternateContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
129
|
+
var contents;
|
|
130
|
+
return __generator(this, function (_a) {
|
|
131
|
+
switch (_a.label) {
|
|
132
|
+
case 0:
|
|
133
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
134
|
+
return [2, deserializeAws_restJson1DeleteAlternateContactCommandError(output, context)];
|
|
135
|
+
}
|
|
136
|
+
contents = map({
|
|
137
|
+
$metadata: deserializeMetadata(output),
|
|
138
|
+
});
|
|
139
|
+
return [4, collectBody(output.body, context)];
|
|
140
|
+
case 1:
|
|
141
|
+
_a.sent();
|
|
142
|
+
return [2, contents];
|
|
143
|
+
}
|
|
65
144
|
});
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
145
|
+
}); };
|
|
146
|
+
var deserializeAws_restJson1DeleteAlternateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
147
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
148
|
+
var _c;
|
|
149
|
+
return __generator(this, function (_d) {
|
|
150
|
+
switch (_d.label) {
|
|
151
|
+
case 0:
|
|
152
|
+
_a = [__assign({}, output)];
|
|
153
|
+
_c = {};
|
|
154
|
+
return [4, parseErrorBody(output.body, context)];
|
|
155
|
+
case 1:
|
|
156
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
157
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
158
|
+
_b = errorCode;
|
|
159
|
+
switch (_b) {
|
|
160
|
+
case "AccessDeniedException": return [3, 2];
|
|
161
|
+
case "com.amazonaws.account#AccessDeniedException": return [3, 2];
|
|
162
|
+
case "InternalServerException": return [3, 4];
|
|
163
|
+
case "com.amazonaws.account#InternalServerException": return [3, 4];
|
|
164
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
165
|
+
case "com.amazonaws.account#ResourceNotFoundException": return [3, 6];
|
|
166
|
+
case "TooManyRequestsException": return [3, 8];
|
|
167
|
+
case "com.amazonaws.account#TooManyRequestsException": return [3, 8];
|
|
168
|
+
case "ValidationException": return [3, 10];
|
|
169
|
+
case "com.amazonaws.account#ValidationException": return [3, 10];
|
|
170
|
+
}
|
|
171
|
+
return [3, 12];
|
|
172
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
173
|
+
case 3: throw _d.sent();
|
|
174
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
175
|
+
case 5: throw _d.sent();
|
|
176
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
177
|
+
case 7: throw _d.sent();
|
|
178
|
+
case 8: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
179
|
+
case 9: throw _d.sent();
|
|
180
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
181
|
+
case 11: throw _d.sent();
|
|
182
|
+
case 12:
|
|
183
|
+
parsedBody = parsedOutput.body;
|
|
184
|
+
throwDefaultError({
|
|
185
|
+
output: output,
|
|
186
|
+
parsedBody: parsedBody,
|
|
187
|
+
exceptionCtor: __BaseException,
|
|
188
|
+
errorCode: errorCode,
|
|
189
|
+
});
|
|
190
|
+
_d.label = 13;
|
|
191
|
+
case 13: return [2];
|
|
192
|
+
}
|
|
81
193
|
});
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
194
|
+
}); };
|
|
195
|
+
export var deserializeAws_restJson1GetAlternateContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
196
|
+
var contents, data, _a, _b;
|
|
197
|
+
return __generator(this, function (_c) {
|
|
198
|
+
switch (_c.label) {
|
|
199
|
+
case 0:
|
|
200
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
201
|
+
return [2, deserializeAws_restJson1GetAlternateContactCommandError(output, context)];
|
|
202
|
+
}
|
|
203
|
+
contents = map({
|
|
204
|
+
$metadata: deserializeMetadata(output),
|
|
205
|
+
});
|
|
206
|
+
_a = __expectNonNull;
|
|
207
|
+
_b = __expectObject;
|
|
208
|
+
return [4, parseBody(output.body, context)];
|
|
209
|
+
case 1:
|
|
210
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
211
|
+
if (data.AlternateContact != null) {
|
|
212
|
+
contents.AlternateContact = deserializeAws_restJson1AlternateContact(data.AlternateContact, context);
|
|
213
|
+
}
|
|
214
|
+
return [2, contents];
|
|
215
|
+
}
|
|
90
216
|
});
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
217
|
+
}); };
|
|
218
|
+
var deserializeAws_restJson1GetAlternateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
219
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
220
|
+
var _c;
|
|
221
|
+
return __generator(this, function (_d) {
|
|
222
|
+
switch (_d.label) {
|
|
223
|
+
case 0:
|
|
224
|
+
_a = [__assign({}, output)];
|
|
225
|
+
_c = {};
|
|
226
|
+
return [4, parseErrorBody(output.body, context)];
|
|
227
|
+
case 1:
|
|
228
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
229
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
230
|
+
_b = errorCode;
|
|
231
|
+
switch (_b) {
|
|
232
|
+
case "AccessDeniedException": return [3, 2];
|
|
233
|
+
case "com.amazonaws.account#AccessDeniedException": return [3, 2];
|
|
234
|
+
case "InternalServerException": return [3, 4];
|
|
235
|
+
case "com.amazonaws.account#InternalServerException": return [3, 4];
|
|
236
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
237
|
+
case "com.amazonaws.account#ResourceNotFoundException": return [3, 6];
|
|
238
|
+
case "TooManyRequestsException": return [3, 8];
|
|
239
|
+
case "com.amazonaws.account#TooManyRequestsException": return [3, 8];
|
|
240
|
+
case "ValidationException": return [3, 10];
|
|
241
|
+
case "com.amazonaws.account#ValidationException": return [3, 10];
|
|
242
|
+
}
|
|
243
|
+
return [3, 12];
|
|
244
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
245
|
+
case 3: throw _d.sent();
|
|
246
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
247
|
+
case 5: throw _d.sent();
|
|
248
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
249
|
+
case 7: throw _d.sent();
|
|
250
|
+
case 8: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
251
|
+
case 9: throw _d.sent();
|
|
252
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
253
|
+
case 11: throw _d.sent();
|
|
254
|
+
case 12:
|
|
255
|
+
parsedBody = parsedOutput.body;
|
|
256
|
+
throwDefaultError({
|
|
257
|
+
output: output,
|
|
258
|
+
parsedBody: parsedBody,
|
|
259
|
+
exceptionCtor: __BaseException,
|
|
260
|
+
errorCode: errorCode,
|
|
261
|
+
});
|
|
262
|
+
_d.label = 13;
|
|
263
|
+
case 13: return [2];
|
|
264
|
+
}
|
|
104
265
|
});
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
266
|
+
}); };
|
|
267
|
+
export var deserializeAws_restJson1GetContactInformationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
|
+
var contents, data, _a, _b;
|
|
269
|
+
return __generator(this, function (_c) {
|
|
270
|
+
switch (_c.label) {
|
|
271
|
+
case 0:
|
|
272
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
273
|
+
return [2, deserializeAws_restJson1GetContactInformationCommandError(output, context)];
|
|
274
|
+
}
|
|
275
|
+
contents = map({
|
|
276
|
+
$metadata: deserializeMetadata(output),
|
|
277
|
+
});
|
|
278
|
+
_a = __expectNonNull;
|
|
279
|
+
_b = __expectObject;
|
|
280
|
+
return [4, parseBody(output.body, context)];
|
|
281
|
+
case 1:
|
|
282
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
283
|
+
if (data.ContactInformation != null) {
|
|
284
|
+
contents.ContactInformation = deserializeAws_restJson1ContactInformation(data.ContactInformation, context);
|
|
285
|
+
}
|
|
286
|
+
return [2, contents];
|
|
287
|
+
}
|
|
113
288
|
});
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
289
|
+
}); };
|
|
290
|
+
var deserializeAws_restJson1GetContactInformationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
291
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
292
|
+
var _c;
|
|
293
|
+
return __generator(this, function (_d) {
|
|
294
|
+
switch (_d.label) {
|
|
295
|
+
case 0:
|
|
296
|
+
_a = [__assign({}, output)];
|
|
297
|
+
_c = {};
|
|
298
|
+
return [4, parseErrorBody(output.body, context)];
|
|
299
|
+
case 1:
|
|
300
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
301
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
302
|
+
_b = errorCode;
|
|
303
|
+
switch (_b) {
|
|
304
|
+
case "AccessDeniedException": return [3, 2];
|
|
305
|
+
case "com.amazonaws.account#AccessDeniedException": return [3, 2];
|
|
306
|
+
case "InternalServerException": return [3, 4];
|
|
307
|
+
case "com.amazonaws.account#InternalServerException": return [3, 4];
|
|
308
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
309
|
+
case "com.amazonaws.account#ResourceNotFoundException": return [3, 6];
|
|
310
|
+
case "TooManyRequestsException": return [3, 8];
|
|
311
|
+
case "com.amazonaws.account#TooManyRequestsException": return [3, 8];
|
|
312
|
+
case "ValidationException": return [3, 10];
|
|
313
|
+
case "com.amazonaws.account#ValidationException": return [3, 10];
|
|
314
|
+
}
|
|
315
|
+
return [3, 12];
|
|
316
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
317
|
+
case 3: throw _d.sent();
|
|
318
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
319
|
+
case 5: throw _d.sent();
|
|
320
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
321
|
+
case 7: throw _d.sent();
|
|
322
|
+
case 8: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
323
|
+
case 9: throw _d.sent();
|
|
324
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
325
|
+
case 11: throw _d.sent();
|
|
326
|
+
case 12:
|
|
327
|
+
parsedBody = parsedOutput.body;
|
|
328
|
+
throwDefaultError({
|
|
329
|
+
output: output,
|
|
330
|
+
parsedBody: parsedBody,
|
|
331
|
+
exceptionCtor: __BaseException,
|
|
332
|
+
errorCode: errorCode,
|
|
333
|
+
});
|
|
334
|
+
_d.label = 13;
|
|
335
|
+
case 13: return [2];
|
|
336
|
+
}
|
|
121
337
|
});
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
case "com.amazonaws.account#ResourceNotFoundException":
|
|
140
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
141
|
-
case "TooManyRequestsException":
|
|
142
|
-
case "com.amazonaws.account#TooManyRequestsException":
|
|
143
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
144
|
-
case "ValidationException":
|
|
145
|
-
case "com.amazonaws.account#ValidationException":
|
|
146
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
147
|
-
default:
|
|
148
|
-
const parsedBody = parsedOutput.body;
|
|
149
|
-
throwDefaultError({
|
|
150
|
-
output,
|
|
151
|
-
parsedBody,
|
|
152
|
-
exceptionCtor: __BaseException,
|
|
153
|
-
errorCode,
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
export const deserializeAws_restJson1GetAlternateContactCommand = async (output, context) => {
|
|
158
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
159
|
-
return deserializeAws_restJson1GetAlternateContactCommandError(output, context);
|
|
160
|
-
}
|
|
161
|
-
const contents = map({
|
|
162
|
-
$metadata: deserializeMetadata(output),
|
|
338
|
+
}); };
|
|
339
|
+
export var deserializeAws_restJson1PutAlternateContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
340
|
+
var contents;
|
|
341
|
+
return __generator(this, function (_a) {
|
|
342
|
+
switch (_a.label) {
|
|
343
|
+
case 0:
|
|
344
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
345
|
+
return [2, deserializeAws_restJson1PutAlternateContactCommandError(output, context)];
|
|
346
|
+
}
|
|
347
|
+
contents = map({
|
|
348
|
+
$metadata: deserializeMetadata(output),
|
|
349
|
+
});
|
|
350
|
+
return [4, collectBody(output.body, context)];
|
|
351
|
+
case 1:
|
|
352
|
+
_a.sent();
|
|
353
|
+
return [2, contents];
|
|
354
|
+
}
|
|
163
355
|
});
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
return
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
356
|
+
}); };
|
|
357
|
+
var deserializeAws_restJson1PutAlternateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
358
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
359
|
+
var _c;
|
|
360
|
+
return __generator(this, function (_d) {
|
|
361
|
+
switch (_d.label) {
|
|
362
|
+
case 0:
|
|
363
|
+
_a = [__assign({}, output)];
|
|
364
|
+
_c = {};
|
|
365
|
+
return [4, parseErrorBody(output.body, context)];
|
|
366
|
+
case 1:
|
|
367
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
368
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
369
|
+
_b = errorCode;
|
|
370
|
+
switch (_b) {
|
|
371
|
+
case "AccessDeniedException": return [3, 2];
|
|
372
|
+
case "com.amazonaws.account#AccessDeniedException": return [3, 2];
|
|
373
|
+
case "InternalServerException": return [3, 4];
|
|
374
|
+
case "com.amazonaws.account#InternalServerException": return [3, 4];
|
|
375
|
+
case "TooManyRequestsException": return [3, 6];
|
|
376
|
+
case "com.amazonaws.account#TooManyRequestsException": return [3, 6];
|
|
377
|
+
case "ValidationException": return [3, 8];
|
|
378
|
+
case "com.amazonaws.account#ValidationException": return [3, 8];
|
|
379
|
+
}
|
|
380
|
+
return [3, 10];
|
|
381
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
382
|
+
case 3: throw _d.sent();
|
|
383
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
384
|
+
case 5: throw _d.sent();
|
|
385
|
+
case 6: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
386
|
+
case 7: throw _d.sent();
|
|
387
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
388
|
+
case 9: throw _d.sent();
|
|
389
|
+
case 10:
|
|
390
|
+
parsedBody = parsedOutput.body;
|
|
391
|
+
throwDefaultError({
|
|
392
|
+
output: output,
|
|
393
|
+
parsedBody: parsedBody,
|
|
394
|
+
exceptionCtor: __BaseException,
|
|
395
|
+
errorCode: errorCode,
|
|
396
|
+
});
|
|
397
|
+
_d.label = 11;
|
|
398
|
+
case 11: return [2];
|
|
399
|
+
}
|
|
208
400
|
});
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
case "com.amazonaws.account#InternalServerException":
|
|
227
|
-
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
228
|
-
case "ResourceNotFoundException":
|
|
229
|
-
case "com.amazonaws.account#ResourceNotFoundException":
|
|
230
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
231
|
-
case "TooManyRequestsException":
|
|
232
|
-
case "com.amazonaws.account#TooManyRequestsException":
|
|
233
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
234
|
-
case "ValidationException":
|
|
235
|
-
case "com.amazonaws.account#ValidationException":
|
|
236
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
237
|
-
default:
|
|
238
|
-
const parsedBody = parsedOutput.body;
|
|
239
|
-
throwDefaultError({
|
|
240
|
-
output,
|
|
241
|
-
parsedBody,
|
|
242
|
-
exceptionCtor: __BaseException,
|
|
243
|
-
errorCode,
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
export const deserializeAws_restJson1PutAlternateContactCommand = async (output, context) => {
|
|
248
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
249
|
-
return deserializeAws_restJson1PutAlternateContactCommandError(output, context);
|
|
250
|
-
}
|
|
251
|
-
const contents = map({
|
|
252
|
-
$metadata: deserializeMetadata(output),
|
|
401
|
+
}); };
|
|
402
|
+
export var deserializeAws_restJson1PutContactInformationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
403
|
+
var contents;
|
|
404
|
+
return __generator(this, function (_a) {
|
|
405
|
+
switch (_a.label) {
|
|
406
|
+
case 0:
|
|
407
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
408
|
+
return [2, deserializeAws_restJson1PutContactInformationCommandError(output, context)];
|
|
409
|
+
}
|
|
410
|
+
contents = map({
|
|
411
|
+
$metadata: deserializeMetadata(output),
|
|
412
|
+
});
|
|
413
|
+
return [4, collectBody(output.body, context)];
|
|
414
|
+
case 1:
|
|
415
|
+
_a.sent();
|
|
416
|
+
return [2, contents];
|
|
417
|
+
}
|
|
253
418
|
});
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
419
|
+
}); };
|
|
420
|
+
var deserializeAws_restJson1PutContactInformationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
421
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
422
|
+
var _c;
|
|
423
|
+
return __generator(this, function (_d) {
|
|
424
|
+
switch (_d.label) {
|
|
425
|
+
case 0:
|
|
426
|
+
_a = [__assign({}, output)];
|
|
427
|
+
_c = {};
|
|
428
|
+
return [4, parseErrorBody(output.body, context)];
|
|
429
|
+
case 1:
|
|
430
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
431
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
432
|
+
_b = errorCode;
|
|
433
|
+
switch (_b) {
|
|
434
|
+
case "AccessDeniedException": return [3, 2];
|
|
435
|
+
case "com.amazonaws.account#AccessDeniedException": return [3, 2];
|
|
436
|
+
case "InternalServerException": return [3, 4];
|
|
437
|
+
case "com.amazonaws.account#InternalServerException": return [3, 4];
|
|
438
|
+
case "TooManyRequestsException": return [3, 6];
|
|
439
|
+
case "com.amazonaws.account#TooManyRequestsException": return [3, 6];
|
|
440
|
+
case "ValidationException": return [3, 8];
|
|
441
|
+
case "com.amazonaws.account#ValidationException": return [3, 8];
|
|
442
|
+
}
|
|
443
|
+
return [3, 10];
|
|
444
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
445
|
+
case 3: throw _d.sent();
|
|
446
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
447
|
+
case 5: throw _d.sent();
|
|
448
|
+
case 6: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
449
|
+
case 7: throw _d.sent();
|
|
450
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
451
|
+
case 9: throw _d.sent();
|
|
452
|
+
case 10:
|
|
453
|
+
parsedBody = parsedOutput.body;
|
|
454
|
+
throwDefaultError({
|
|
455
|
+
output: output,
|
|
456
|
+
parsedBody: parsedBody,
|
|
457
|
+
exceptionCtor: __BaseException,
|
|
458
|
+
errorCode: errorCode,
|
|
459
|
+
});
|
|
460
|
+
_d.label = 11;
|
|
461
|
+
case 11: return [2];
|
|
462
|
+
}
|
|
292
463
|
});
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
306
|
-
case "InternalServerException":
|
|
307
|
-
case "com.amazonaws.account#InternalServerException":
|
|
308
|
-
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
309
|
-
case "TooManyRequestsException":
|
|
310
|
-
case "com.amazonaws.account#TooManyRequestsException":
|
|
311
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
312
|
-
case "ValidationException":
|
|
313
|
-
case "com.amazonaws.account#ValidationException":
|
|
314
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
315
|
-
default:
|
|
316
|
-
const parsedBody = parsedOutput.body;
|
|
317
|
-
throwDefaultError({
|
|
318
|
-
output,
|
|
319
|
-
parsedBody,
|
|
320
|
-
exceptionCtor: __BaseException,
|
|
321
|
-
errorCode,
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
const map = __map;
|
|
326
|
-
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
327
|
-
const contents = map({});
|
|
328
|
-
const data = parsedOutput.body;
|
|
329
|
-
if (data.message != null) {
|
|
330
|
-
contents.message = __expectString(data.message);
|
|
331
|
-
}
|
|
332
|
-
const exception = new AccessDeniedException({
|
|
333
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
334
|
-
...contents,
|
|
464
|
+
}); };
|
|
465
|
+
var map = __map;
|
|
466
|
+
var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
467
|
+
var contents, data, exception;
|
|
468
|
+
return __generator(this, function (_a) {
|
|
469
|
+
contents = map({});
|
|
470
|
+
data = parsedOutput.body;
|
|
471
|
+
if (data.message != null) {
|
|
472
|
+
contents.message = __expectString(data.message);
|
|
473
|
+
}
|
|
474
|
+
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
475
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
335
476
|
});
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
346
|
-
|
|
477
|
+
}); };
|
|
478
|
+
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
479
|
+
var contents, data, exception;
|
|
480
|
+
return __generator(this, function (_a) {
|
|
481
|
+
contents = map({});
|
|
482
|
+
data = parsedOutput.body;
|
|
483
|
+
if (data.message != null) {
|
|
484
|
+
contents.message = __expectString(data.message);
|
|
485
|
+
}
|
|
486
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
487
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
347
488
|
});
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
358
|
-
|
|
489
|
+
}); };
|
|
490
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
491
|
+
var contents, data, exception;
|
|
492
|
+
return __generator(this, function (_a) {
|
|
493
|
+
contents = map({});
|
|
494
|
+
data = parsedOutput.body;
|
|
495
|
+
if (data.message != null) {
|
|
496
|
+
contents.message = __expectString(data.message);
|
|
497
|
+
}
|
|
498
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
499
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
359
500
|
});
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
370
|
-
|
|
501
|
+
}); };
|
|
502
|
+
var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
503
|
+
var contents, data, exception;
|
|
504
|
+
return __generator(this, function (_a) {
|
|
505
|
+
contents = map({});
|
|
506
|
+
data = parsedOutput.body;
|
|
507
|
+
if (data.message != null) {
|
|
508
|
+
contents.message = __expectString(data.message);
|
|
509
|
+
}
|
|
510
|
+
exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
511
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
371
512
|
});
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
382
|
-
|
|
513
|
+
}); };
|
|
514
|
+
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
515
|
+
var contents, data, exception;
|
|
516
|
+
return __generator(this, function (_a) {
|
|
517
|
+
contents = map({});
|
|
518
|
+
data = parsedOutput.body;
|
|
519
|
+
if (data.message != null) {
|
|
520
|
+
contents.message = __expectString(data.message);
|
|
521
|
+
}
|
|
522
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
523
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
383
524
|
});
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
return {
|
|
388
|
-
...(input.AddressLine1 != null && { AddressLine1: input.AddressLine1 }),
|
|
389
|
-
...(input.AddressLine2 != null && { AddressLine2: input.AddressLine2 }),
|
|
390
|
-
...(input.AddressLine3 != null && { AddressLine3: input.AddressLine3 }),
|
|
391
|
-
...(input.City != null && { City: input.City }),
|
|
392
|
-
...(input.CompanyName != null && { CompanyName: input.CompanyName }),
|
|
393
|
-
...(input.CountryCode != null && { CountryCode: input.CountryCode }),
|
|
394
|
-
...(input.DistrictOrCounty != null && { DistrictOrCounty: input.DistrictOrCounty }),
|
|
395
|
-
...(input.FullName != null && { FullName: input.FullName }),
|
|
396
|
-
...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
|
|
397
|
-
...(input.PostalCode != null && { PostalCode: input.PostalCode }),
|
|
398
|
-
...(input.StateOrRegion != null && { StateOrRegion: input.StateOrRegion }),
|
|
399
|
-
...(input.WebsiteUrl != null && { WebsiteUrl: input.WebsiteUrl }),
|
|
400
|
-
};
|
|
525
|
+
}); };
|
|
526
|
+
var serializeAws_restJson1ContactInformation = function (input, context) {
|
|
527
|
+
return __assign(__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.CompanyName != null && { CompanyName: input.CompanyName })), (input.CountryCode != null && { CountryCode: input.CountryCode })), (input.DistrictOrCounty != null && { DistrictOrCounty: input.DistrictOrCounty })), (input.FullName != null && { FullName: input.FullName })), (input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber })), (input.PostalCode != null && { PostalCode: input.PostalCode })), (input.StateOrRegion != null && { StateOrRegion: input.StateOrRegion })), (input.WebsiteUrl != null && { WebsiteUrl: input.WebsiteUrl }));
|
|
401
528
|
};
|
|
402
|
-
|
|
529
|
+
var deserializeAws_restJson1AlternateContact = function (output, context) {
|
|
403
530
|
return {
|
|
404
531
|
AlternateContactType: __expectString(output.AlternateContactType),
|
|
405
532
|
EmailAddress: __expectString(output.EmailAddress),
|
|
@@ -408,7 +535,7 @@ const deserializeAws_restJson1AlternateContact = (output, context) => {
|
|
|
408
535
|
Title: __expectString(output.Title),
|
|
409
536
|
};
|
|
410
537
|
};
|
|
411
|
-
|
|
538
|
+
var deserializeAws_restJson1ContactInformation = function (output, context) {
|
|
412
539
|
return {
|
|
413
540
|
AddressLine1: __expectString(output.AddressLine1),
|
|
414
541
|
AddressLine2: __expectString(output.AddressLine2),
|
|
@@ -424,39 +551,57 @@ const deserializeAws_restJson1ContactInformation = (output, context) => {
|
|
|
424
551
|
WebsiteUrl: __expectString(output.WebsiteUrl),
|
|
425
552
|
};
|
|
426
553
|
};
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
554
|
+
var deserializeMetadata = function (output) {
|
|
555
|
+
var _a, _b;
|
|
556
|
+
return ({
|
|
557
|
+
httpStatusCode: output.statusCode,
|
|
558
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
559
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
560
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
561
|
+
});
|
|
562
|
+
};
|
|
563
|
+
var collectBody = function (streamBody, context) {
|
|
564
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
434
565
|
if (streamBody instanceof Uint8Array) {
|
|
435
566
|
return Promise.resolve(streamBody);
|
|
436
567
|
}
|
|
437
568
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
438
569
|
};
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
value !== null &&
|
|
442
|
-
value !== "" &&
|
|
443
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
444
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
445
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
446
|
-
if (encoded.length) {
|
|
447
|
-
return JSON.parse(encoded);
|
|
448
|
-
}
|
|
449
|
-
return {};
|
|
450
|
-
});
|
|
451
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
452
|
-
const value = await parseBody(errorBody, context);
|
|
453
|
-
value.message = value.message ?? value.Message;
|
|
454
|
-
return value;
|
|
570
|
+
var collectBodyString = function (streamBody, context) {
|
|
571
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
455
572
|
};
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
573
|
+
var isSerializableHeaderValue = function (value) {
|
|
574
|
+
return value !== undefined &&
|
|
575
|
+
value !== null &&
|
|
576
|
+
value !== "" &&
|
|
577
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
578
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
579
|
+
};
|
|
580
|
+
var parseBody = function (streamBody, context) {
|
|
581
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
582
|
+
if (encoded.length) {
|
|
583
|
+
return JSON.parse(encoded);
|
|
584
|
+
}
|
|
585
|
+
return {};
|
|
586
|
+
});
|
|
587
|
+
};
|
|
588
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
589
|
+
var value;
|
|
590
|
+
var _a;
|
|
591
|
+
return __generator(this, function (_b) {
|
|
592
|
+
switch (_b.label) {
|
|
593
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
594
|
+
case 1:
|
|
595
|
+
value = _b.sent();
|
|
596
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
597
|
+
return [2, value];
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
}); };
|
|
601
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
602
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
603
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
604
|
+
var cleanValue = rawValue;
|
|
460
605
|
if (typeof cleanValue === "number") {
|
|
461
606
|
cleanValue = cleanValue.toString();
|
|
462
607
|
}
|
|
@@ -471,7 +616,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
471
616
|
}
|
|
472
617
|
return cleanValue;
|
|
473
618
|
};
|
|
474
|
-
|
|
619
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
475
620
|
if (headerKey !== undefined) {
|
|
476
621
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
477
622
|
}
|