@aws-sdk/client-account 3.303.0 → 3.309.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/dist-cjs/commands/DeleteAlternateContactCommand.js +2 -2
- package/dist-cjs/commands/DisableRegionCommand.js +2 -2
- package/dist-cjs/commands/EnableRegionCommand.js +2 -2
- package/dist-cjs/commands/GetAlternateContactCommand.js +2 -2
- package/dist-cjs/commands/GetContactInformationCommand.js +2 -2
- package/dist-cjs/commands/GetRegionOptStatusCommand.js +2 -2
- package/dist-cjs/commands/ListRegionsCommand.js +2 -2
- package/dist-cjs/commands/PutAlternateContactCommand.js +2 -2
- package/dist-cjs/commands/PutContactInformationCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +118 -118
- package/dist-es/commands/DeleteAlternateContactCommand.js +3 -3
- package/dist-es/commands/DisableRegionCommand.js +3 -3
- package/dist-es/commands/EnableRegionCommand.js +3 -3
- package/dist-es/commands/GetAlternateContactCommand.js +3 -3
- package/dist-es/commands/GetContactInformationCommand.js +3 -3
- package/dist-es/commands/GetRegionOptStatusCommand.js +3 -3
- package/dist-es/commands/ListRegionsCommand.js +3 -3
- package/dist-es/commands/PutAlternateContactCommand.js +3 -3
- package/dist-es/commands/PutContactInformationCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +99 -99
- package/dist-types/protocols/Aws_restJson1.d.ts +72 -18
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +18 -18
- package/package.json +29 -29
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.de_PutContactInformationCommand = exports.de_PutAlternateContactCommand = exports.de_ListRegionsCommand = exports.de_GetRegionOptStatusCommand = exports.de_GetContactInformationCommand = exports.de_GetAlternateContactCommand = exports.de_EnableRegionCommand = exports.de_DisableRegionCommand = exports.de_DeleteAlternateContactCommand = exports.se_PutContactInformationCommand = exports.se_PutAlternateContactCommand = exports.se_ListRegionsCommand = exports.se_GetRegionOptStatusCommand = exports.se_GetContactInformationCommand = exports.se_GetAlternateContactCommand = exports.se_EnableRegionCommand = exports.se_DisableRegionCommand = exports.se_DeleteAlternateContactCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const AccountServiceException_1 = require("../models/AccountServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const
|
|
8
|
+
const se_DeleteAlternateContactCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {
|
|
11
11
|
"content-type": "application/json",
|
|
@@ -26,8 +26,8 @@ const serializeAws_restJson1DeleteAlternateContactCommand = async (input, contex
|
|
|
26
26
|
body,
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
exports.
|
|
30
|
-
const
|
|
29
|
+
exports.se_DeleteAlternateContactCommand = se_DeleteAlternateContactCommand;
|
|
30
|
+
const se_DisableRegionCommand = async (input, context) => {
|
|
31
31
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
32
32
|
const headers = {
|
|
33
33
|
"content-type": "application/json",
|
|
@@ -48,8 +48,8 @@ const serializeAws_restJson1DisableRegionCommand = async (input, context) => {
|
|
|
48
48
|
body,
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
exports.
|
|
52
|
-
const
|
|
51
|
+
exports.se_DisableRegionCommand = se_DisableRegionCommand;
|
|
52
|
+
const se_EnableRegionCommand = async (input, context) => {
|
|
53
53
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
54
|
const headers = {
|
|
55
55
|
"content-type": "application/json",
|
|
@@ -70,8 +70,8 @@ const serializeAws_restJson1EnableRegionCommand = async (input, context) => {
|
|
|
70
70
|
body,
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
-
exports.
|
|
74
|
-
const
|
|
73
|
+
exports.se_EnableRegionCommand = se_EnableRegionCommand;
|
|
74
|
+
const se_GetAlternateContactCommand = async (input, context) => {
|
|
75
75
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
76
76
|
const headers = {
|
|
77
77
|
"content-type": "application/json",
|
|
@@ -92,8 +92,8 @@ const serializeAws_restJson1GetAlternateContactCommand = async (input, context)
|
|
|
92
92
|
body,
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
|
-
exports.
|
|
96
|
-
const
|
|
95
|
+
exports.se_GetAlternateContactCommand = se_GetAlternateContactCommand;
|
|
96
|
+
const se_GetContactInformationCommand = async (input, context) => {
|
|
97
97
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
98
98
|
const headers = {
|
|
99
99
|
"content-type": "application/json",
|
|
@@ -113,8 +113,8 @@ const serializeAws_restJson1GetContactInformationCommand = async (input, context
|
|
|
113
113
|
body,
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
|
-
exports.
|
|
117
|
-
const
|
|
116
|
+
exports.se_GetContactInformationCommand = se_GetContactInformationCommand;
|
|
117
|
+
const se_GetRegionOptStatusCommand = async (input, context) => {
|
|
118
118
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
119
119
|
const headers = {
|
|
120
120
|
"content-type": "application/json",
|
|
@@ -135,8 +135,8 @@ const serializeAws_restJson1GetRegionOptStatusCommand = async (input, context) =
|
|
|
135
135
|
body,
|
|
136
136
|
});
|
|
137
137
|
};
|
|
138
|
-
exports.
|
|
139
|
-
const
|
|
138
|
+
exports.se_GetRegionOptStatusCommand = se_GetRegionOptStatusCommand;
|
|
139
|
+
const se_ListRegionsCommand = async (input, context) => {
|
|
140
140
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
141
141
|
const headers = {
|
|
142
142
|
"content-type": "application/json",
|
|
@@ -148,7 +148,7 @@ const serializeAws_restJson1ListRegionsCommand = async (input, context) => {
|
|
|
148
148
|
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
149
149
|
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
150
150
|
...(input.RegionOptStatusContains != null && {
|
|
151
|
-
RegionOptStatusContains:
|
|
151
|
+
RegionOptStatusContains: se_RegionOptStatusList(input.RegionOptStatusContains, context),
|
|
152
152
|
}),
|
|
153
153
|
});
|
|
154
154
|
return new protocol_http_1.HttpRequest({
|
|
@@ -161,8 +161,8 @@ const serializeAws_restJson1ListRegionsCommand = async (input, context) => {
|
|
|
161
161
|
body,
|
|
162
162
|
});
|
|
163
163
|
};
|
|
164
|
-
exports.
|
|
165
|
-
const
|
|
164
|
+
exports.se_ListRegionsCommand = se_ListRegionsCommand;
|
|
165
|
+
const se_PutAlternateContactCommand = async (input, context) => {
|
|
166
166
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
167
167
|
const headers = {
|
|
168
168
|
"content-type": "application/json",
|
|
@@ -187,8 +187,8 @@ const serializeAws_restJson1PutAlternateContactCommand = async (input, context)
|
|
|
187
187
|
body,
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
|
-
exports.
|
|
191
|
-
const
|
|
190
|
+
exports.se_PutAlternateContactCommand = se_PutAlternateContactCommand;
|
|
191
|
+
const se_PutContactInformationCommand = async (input, context) => {
|
|
192
192
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
193
193
|
const headers = {
|
|
194
194
|
"content-type": "application/json",
|
|
@@ -198,7 +198,7 @@ const serializeAws_restJson1PutContactInformationCommand = async (input, context
|
|
|
198
198
|
body = JSON.stringify({
|
|
199
199
|
...(input.AccountId != null && { AccountId: input.AccountId }),
|
|
200
200
|
...(input.ContactInformation != null && {
|
|
201
|
-
ContactInformation:
|
|
201
|
+
ContactInformation: se_ContactInformation(input.ContactInformation, context),
|
|
202
202
|
}),
|
|
203
203
|
});
|
|
204
204
|
return new protocol_http_1.HttpRequest({
|
|
@@ -211,10 +211,10 @@ const serializeAws_restJson1PutContactInformationCommand = async (input, context
|
|
|
211
211
|
body,
|
|
212
212
|
});
|
|
213
213
|
};
|
|
214
|
-
exports.
|
|
215
|
-
const
|
|
214
|
+
exports.se_PutContactInformationCommand = se_PutContactInformationCommand;
|
|
215
|
+
const de_DeleteAlternateContactCommand = async (output, context) => {
|
|
216
216
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
217
|
-
return
|
|
217
|
+
return de_DeleteAlternateContactCommandError(output, context);
|
|
218
218
|
}
|
|
219
219
|
const contents = map({
|
|
220
220
|
$metadata: deserializeMetadata(output),
|
|
@@ -222,8 +222,8 @@ const deserializeAws_restJson1DeleteAlternateContactCommand = async (output, con
|
|
|
222
222
|
await collectBody(output.body, context);
|
|
223
223
|
return contents;
|
|
224
224
|
};
|
|
225
|
-
exports.
|
|
226
|
-
const
|
|
225
|
+
exports.de_DeleteAlternateContactCommand = de_DeleteAlternateContactCommand;
|
|
226
|
+
const de_DeleteAlternateContactCommandError = async (output, context) => {
|
|
227
227
|
const parsedOutput = {
|
|
228
228
|
...output,
|
|
229
229
|
body: await parseErrorBody(output.body, context),
|
|
@@ -232,19 +232,19 @@ const deserializeAws_restJson1DeleteAlternateContactCommandError = async (output
|
|
|
232
232
|
switch (errorCode) {
|
|
233
233
|
case "AccessDeniedException":
|
|
234
234
|
case "com.amazonaws.account#AccessDeniedException":
|
|
235
|
-
throw await
|
|
235
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
236
236
|
case "InternalServerException":
|
|
237
237
|
case "com.amazonaws.account#InternalServerException":
|
|
238
|
-
throw await
|
|
238
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
239
239
|
case "ResourceNotFoundException":
|
|
240
240
|
case "com.amazonaws.account#ResourceNotFoundException":
|
|
241
|
-
throw await
|
|
241
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
242
242
|
case "TooManyRequestsException":
|
|
243
243
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
244
|
-
throw await
|
|
244
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
245
245
|
case "ValidationException":
|
|
246
246
|
case "com.amazonaws.account#ValidationException":
|
|
247
|
-
throw await
|
|
247
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
248
248
|
default:
|
|
249
249
|
const parsedBody = parsedOutput.body;
|
|
250
250
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -255,9 +255,9 @@ const deserializeAws_restJson1DeleteAlternateContactCommandError = async (output
|
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
const
|
|
258
|
+
const de_DisableRegionCommand = async (output, context) => {
|
|
259
259
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
260
|
-
return
|
|
260
|
+
return de_DisableRegionCommandError(output, context);
|
|
261
261
|
}
|
|
262
262
|
const contents = map({
|
|
263
263
|
$metadata: deserializeMetadata(output),
|
|
@@ -265,8 +265,8 @@ const deserializeAws_restJson1DisableRegionCommand = async (output, context) =>
|
|
|
265
265
|
await collectBody(output.body, context);
|
|
266
266
|
return contents;
|
|
267
267
|
};
|
|
268
|
-
exports.
|
|
269
|
-
const
|
|
268
|
+
exports.de_DisableRegionCommand = de_DisableRegionCommand;
|
|
269
|
+
const de_DisableRegionCommandError = async (output, context) => {
|
|
270
270
|
const parsedOutput = {
|
|
271
271
|
...output,
|
|
272
272
|
body: await parseErrorBody(output.body, context),
|
|
@@ -275,19 +275,19 @@ const deserializeAws_restJson1DisableRegionCommandError = async (output, context
|
|
|
275
275
|
switch (errorCode) {
|
|
276
276
|
case "AccessDeniedException":
|
|
277
277
|
case "com.amazonaws.account#AccessDeniedException":
|
|
278
|
-
throw await
|
|
278
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
279
279
|
case "ConflictException":
|
|
280
280
|
case "com.amazonaws.account#ConflictException":
|
|
281
|
-
throw await
|
|
281
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
282
282
|
case "InternalServerException":
|
|
283
283
|
case "com.amazonaws.account#InternalServerException":
|
|
284
|
-
throw await
|
|
284
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
285
285
|
case "TooManyRequestsException":
|
|
286
286
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
287
|
-
throw await
|
|
287
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
288
288
|
case "ValidationException":
|
|
289
289
|
case "com.amazonaws.account#ValidationException":
|
|
290
|
-
throw await
|
|
290
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
291
291
|
default:
|
|
292
292
|
const parsedBody = parsedOutput.body;
|
|
293
293
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -298,9 +298,9 @@ const deserializeAws_restJson1DisableRegionCommandError = async (output, context
|
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
|
-
const
|
|
301
|
+
const de_EnableRegionCommand = async (output, context) => {
|
|
302
302
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
303
|
-
return
|
|
303
|
+
return de_EnableRegionCommandError(output, context);
|
|
304
304
|
}
|
|
305
305
|
const contents = map({
|
|
306
306
|
$metadata: deserializeMetadata(output),
|
|
@@ -308,8 +308,8 @@ const deserializeAws_restJson1EnableRegionCommand = async (output, context) => {
|
|
|
308
308
|
await collectBody(output.body, context);
|
|
309
309
|
return contents;
|
|
310
310
|
};
|
|
311
|
-
exports.
|
|
312
|
-
const
|
|
311
|
+
exports.de_EnableRegionCommand = de_EnableRegionCommand;
|
|
312
|
+
const de_EnableRegionCommandError = async (output, context) => {
|
|
313
313
|
const parsedOutput = {
|
|
314
314
|
...output,
|
|
315
315
|
body: await parseErrorBody(output.body, context),
|
|
@@ -318,19 +318,19 @@ const deserializeAws_restJson1EnableRegionCommandError = async (output, context)
|
|
|
318
318
|
switch (errorCode) {
|
|
319
319
|
case "AccessDeniedException":
|
|
320
320
|
case "com.amazonaws.account#AccessDeniedException":
|
|
321
|
-
throw await
|
|
321
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
322
322
|
case "ConflictException":
|
|
323
323
|
case "com.amazonaws.account#ConflictException":
|
|
324
|
-
throw await
|
|
324
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
325
325
|
case "InternalServerException":
|
|
326
326
|
case "com.amazonaws.account#InternalServerException":
|
|
327
|
-
throw await
|
|
327
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
328
328
|
case "TooManyRequestsException":
|
|
329
329
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
330
|
-
throw await
|
|
330
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
331
331
|
case "ValidationException":
|
|
332
332
|
case "com.amazonaws.account#ValidationException":
|
|
333
|
-
throw await
|
|
333
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
334
334
|
default:
|
|
335
335
|
const parsedBody = parsedOutput.body;
|
|
336
336
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -341,21 +341,21 @@ const deserializeAws_restJson1EnableRegionCommandError = async (output, context)
|
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
|
-
const
|
|
344
|
+
const de_GetAlternateContactCommand = async (output, context) => {
|
|
345
345
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
346
|
-
return
|
|
346
|
+
return de_GetAlternateContactCommandError(output, context);
|
|
347
347
|
}
|
|
348
348
|
const contents = map({
|
|
349
349
|
$metadata: deserializeMetadata(output),
|
|
350
350
|
});
|
|
351
351
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
352
352
|
if (data.AlternateContact != null) {
|
|
353
|
-
contents.AlternateContact =
|
|
353
|
+
contents.AlternateContact = de_AlternateContact(data.AlternateContact, context);
|
|
354
354
|
}
|
|
355
355
|
return contents;
|
|
356
356
|
};
|
|
357
|
-
exports.
|
|
358
|
-
const
|
|
357
|
+
exports.de_GetAlternateContactCommand = de_GetAlternateContactCommand;
|
|
358
|
+
const de_GetAlternateContactCommandError = async (output, context) => {
|
|
359
359
|
const parsedOutput = {
|
|
360
360
|
...output,
|
|
361
361
|
body: await parseErrorBody(output.body, context),
|
|
@@ -364,19 +364,19 @@ const deserializeAws_restJson1GetAlternateContactCommandError = async (output, c
|
|
|
364
364
|
switch (errorCode) {
|
|
365
365
|
case "AccessDeniedException":
|
|
366
366
|
case "com.amazonaws.account#AccessDeniedException":
|
|
367
|
-
throw await
|
|
367
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
368
368
|
case "InternalServerException":
|
|
369
369
|
case "com.amazonaws.account#InternalServerException":
|
|
370
|
-
throw await
|
|
370
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
371
371
|
case "ResourceNotFoundException":
|
|
372
372
|
case "com.amazonaws.account#ResourceNotFoundException":
|
|
373
|
-
throw await
|
|
373
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
374
374
|
case "TooManyRequestsException":
|
|
375
375
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
376
|
-
throw await
|
|
376
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
377
377
|
case "ValidationException":
|
|
378
378
|
case "com.amazonaws.account#ValidationException":
|
|
379
|
-
throw await
|
|
379
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
380
380
|
default:
|
|
381
381
|
const parsedBody = parsedOutput.body;
|
|
382
382
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -387,21 +387,21 @@ const deserializeAws_restJson1GetAlternateContactCommandError = async (output, c
|
|
|
387
387
|
});
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
|
-
const
|
|
390
|
+
const de_GetContactInformationCommand = async (output, context) => {
|
|
391
391
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
392
|
-
return
|
|
392
|
+
return de_GetContactInformationCommandError(output, context);
|
|
393
393
|
}
|
|
394
394
|
const contents = map({
|
|
395
395
|
$metadata: deserializeMetadata(output),
|
|
396
396
|
});
|
|
397
397
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
398
398
|
if (data.ContactInformation != null) {
|
|
399
|
-
contents.ContactInformation =
|
|
399
|
+
contents.ContactInformation = de_ContactInformation(data.ContactInformation, context);
|
|
400
400
|
}
|
|
401
401
|
return contents;
|
|
402
402
|
};
|
|
403
|
-
exports.
|
|
404
|
-
const
|
|
403
|
+
exports.de_GetContactInformationCommand = de_GetContactInformationCommand;
|
|
404
|
+
const de_GetContactInformationCommandError = async (output, context) => {
|
|
405
405
|
const parsedOutput = {
|
|
406
406
|
...output,
|
|
407
407
|
body: await parseErrorBody(output.body, context),
|
|
@@ -410,19 +410,19 @@ const deserializeAws_restJson1GetContactInformationCommandError = async (output,
|
|
|
410
410
|
switch (errorCode) {
|
|
411
411
|
case "AccessDeniedException":
|
|
412
412
|
case "com.amazonaws.account#AccessDeniedException":
|
|
413
|
-
throw await
|
|
413
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
414
414
|
case "InternalServerException":
|
|
415
415
|
case "com.amazonaws.account#InternalServerException":
|
|
416
|
-
throw await
|
|
416
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
417
417
|
case "ResourceNotFoundException":
|
|
418
418
|
case "com.amazonaws.account#ResourceNotFoundException":
|
|
419
|
-
throw await
|
|
419
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
420
420
|
case "TooManyRequestsException":
|
|
421
421
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
422
|
-
throw await
|
|
422
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
423
423
|
case "ValidationException":
|
|
424
424
|
case "com.amazonaws.account#ValidationException":
|
|
425
|
-
throw await
|
|
425
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
426
426
|
default:
|
|
427
427
|
const parsedBody = parsedOutput.body;
|
|
428
428
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -433,9 +433,9 @@ const deserializeAws_restJson1GetContactInformationCommandError = async (output,
|
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
|
-
const
|
|
436
|
+
const de_GetRegionOptStatusCommand = async (output, context) => {
|
|
437
437
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
438
|
-
return
|
|
438
|
+
return de_GetRegionOptStatusCommandError(output, context);
|
|
439
439
|
}
|
|
440
440
|
const contents = map({
|
|
441
441
|
$metadata: deserializeMetadata(output),
|
|
@@ -449,8 +449,8 @@ const deserializeAws_restJson1GetRegionOptStatusCommand = async (output, context
|
|
|
449
449
|
}
|
|
450
450
|
return contents;
|
|
451
451
|
};
|
|
452
|
-
exports.
|
|
453
|
-
const
|
|
452
|
+
exports.de_GetRegionOptStatusCommand = de_GetRegionOptStatusCommand;
|
|
453
|
+
const de_GetRegionOptStatusCommandError = async (output, context) => {
|
|
454
454
|
const parsedOutput = {
|
|
455
455
|
...output,
|
|
456
456
|
body: await parseErrorBody(output.body, context),
|
|
@@ -459,16 +459,16 @@ const deserializeAws_restJson1GetRegionOptStatusCommandError = async (output, co
|
|
|
459
459
|
switch (errorCode) {
|
|
460
460
|
case "AccessDeniedException":
|
|
461
461
|
case "com.amazonaws.account#AccessDeniedException":
|
|
462
|
-
throw await
|
|
462
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
463
463
|
case "InternalServerException":
|
|
464
464
|
case "com.amazonaws.account#InternalServerException":
|
|
465
|
-
throw await
|
|
465
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
466
466
|
case "TooManyRequestsException":
|
|
467
467
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
468
|
-
throw await
|
|
468
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
469
469
|
case "ValidationException":
|
|
470
470
|
case "com.amazonaws.account#ValidationException":
|
|
471
|
-
throw await
|
|
471
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
472
472
|
default:
|
|
473
473
|
const parsedBody = parsedOutput.body;
|
|
474
474
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -479,9 +479,9 @@ const deserializeAws_restJson1GetRegionOptStatusCommandError = async (output, co
|
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
|
-
const
|
|
482
|
+
const de_ListRegionsCommand = async (output, context) => {
|
|
483
483
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
484
|
-
return
|
|
484
|
+
return de_ListRegionsCommandError(output, context);
|
|
485
485
|
}
|
|
486
486
|
const contents = map({
|
|
487
487
|
$metadata: deserializeMetadata(output),
|
|
@@ -491,12 +491,12 @@ const deserializeAws_restJson1ListRegionsCommand = async (output, context) => {
|
|
|
491
491
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
492
492
|
}
|
|
493
493
|
if (data.Regions != null) {
|
|
494
|
-
contents.Regions =
|
|
494
|
+
contents.Regions = de_RegionOptList(data.Regions, context);
|
|
495
495
|
}
|
|
496
496
|
return contents;
|
|
497
497
|
};
|
|
498
|
-
exports.
|
|
499
|
-
const
|
|
498
|
+
exports.de_ListRegionsCommand = de_ListRegionsCommand;
|
|
499
|
+
const de_ListRegionsCommandError = async (output, context) => {
|
|
500
500
|
const parsedOutput = {
|
|
501
501
|
...output,
|
|
502
502
|
body: await parseErrorBody(output.body, context),
|
|
@@ -505,16 +505,16 @@ const deserializeAws_restJson1ListRegionsCommandError = async (output, context)
|
|
|
505
505
|
switch (errorCode) {
|
|
506
506
|
case "AccessDeniedException":
|
|
507
507
|
case "com.amazonaws.account#AccessDeniedException":
|
|
508
|
-
throw await
|
|
508
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
509
509
|
case "InternalServerException":
|
|
510
510
|
case "com.amazonaws.account#InternalServerException":
|
|
511
|
-
throw await
|
|
511
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
512
512
|
case "TooManyRequestsException":
|
|
513
513
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
514
|
-
throw await
|
|
514
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
515
515
|
case "ValidationException":
|
|
516
516
|
case "com.amazonaws.account#ValidationException":
|
|
517
|
-
throw await
|
|
517
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
518
518
|
default:
|
|
519
519
|
const parsedBody = parsedOutput.body;
|
|
520
520
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -525,9 +525,9 @@ const deserializeAws_restJson1ListRegionsCommandError = async (output, context)
|
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
|
-
const
|
|
528
|
+
const de_PutAlternateContactCommand = async (output, context) => {
|
|
529
529
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
530
|
-
return
|
|
530
|
+
return de_PutAlternateContactCommandError(output, context);
|
|
531
531
|
}
|
|
532
532
|
const contents = map({
|
|
533
533
|
$metadata: deserializeMetadata(output),
|
|
@@ -535,8 +535,8 @@ const deserializeAws_restJson1PutAlternateContactCommand = async (output, contex
|
|
|
535
535
|
await collectBody(output.body, context);
|
|
536
536
|
return contents;
|
|
537
537
|
};
|
|
538
|
-
exports.
|
|
539
|
-
const
|
|
538
|
+
exports.de_PutAlternateContactCommand = de_PutAlternateContactCommand;
|
|
539
|
+
const de_PutAlternateContactCommandError = async (output, context) => {
|
|
540
540
|
const parsedOutput = {
|
|
541
541
|
...output,
|
|
542
542
|
body: await parseErrorBody(output.body, context),
|
|
@@ -545,16 +545,16 @@ const deserializeAws_restJson1PutAlternateContactCommandError = async (output, c
|
|
|
545
545
|
switch (errorCode) {
|
|
546
546
|
case "AccessDeniedException":
|
|
547
547
|
case "com.amazonaws.account#AccessDeniedException":
|
|
548
|
-
throw await
|
|
548
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
549
549
|
case "InternalServerException":
|
|
550
550
|
case "com.amazonaws.account#InternalServerException":
|
|
551
|
-
throw await
|
|
551
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
552
552
|
case "TooManyRequestsException":
|
|
553
553
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
554
|
-
throw await
|
|
554
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
555
555
|
case "ValidationException":
|
|
556
556
|
case "com.amazonaws.account#ValidationException":
|
|
557
|
-
throw await
|
|
557
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
558
558
|
default:
|
|
559
559
|
const parsedBody = parsedOutput.body;
|
|
560
560
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -565,9 +565,9 @@ const deserializeAws_restJson1PutAlternateContactCommandError = async (output, c
|
|
|
565
565
|
});
|
|
566
566
|
}
|
|
567
567
|
};
|
|
568
|
-
const
|
|
568
|
+
const de_PutContactInformationCommand = async (output, context) => {
|
|
569
569
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
570
|
-
return
|
|
570
|
+
return de_PutContactInformationCommandError(output, context);
|
|
571
571
|
}
|
|
572
572
|
const contents = map({
|
|
573
573
|
$metadata: deserializeMetadata(output),
|
|
@@ -575,8 +575,8 @@ const deserializeAws_restJson1PutContactInformationCommand = async (output, cont
|
|
|
575
575
|
await collectBody(output.body, context);
|
|
576
576
|
return contents;
|
|
577
577
|
};
|
|
578
|
-
exports.
|
|
579
|
-
const
|
|
578
|
+
exports.de_PutContactInformationCommand = de_PutContactInformationCommand;
|
|
579
|
+
const de_PutContactInformationCommandError = async (output, context) => {
|
|
580
580
|
const parsedOutput = {
|
|
581
581
|
...output,
|
|
582
582
|
body: await parseErrorBody(output.body, context),
|
|
@@ -585,16 +585,16 @@ const deserializeAws_restJson1PutContactInformationCommandError = async (output,
|
|
|
585
585
|
switch (errorCode) {
|
|
586
586
|
case "AccessDeniedException":
|
|
587
587
|
case "com.amazonaws.account#AccessDeniedException":
|
|
588
|
-
throw await
|
|
588
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
589
589
|
case "InternalServerException":
|
|
590
590
|
case "com.amazonaws.account#InternalServerException":
|
|
591
|
-
throw await
|
|
591
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
592
592
|
case "TooManyRequestsException":
|
|
593
593
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
594
|
-
throw await
|
|
594
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
595
595
|
case "ValidationException":
|
|
596
596
|
case "com.amazonaws.account#ValidationException":
|
|
597
|
-
throw await
|
|
597
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
598
598
|
default:
|
|
599
599
|
const parsedBody = parsedOutput.body;
|
|
600
600
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -606,7 +606,7 @@ const deserializeAws_restJson1PutContactInformationCommandError = async (output,
|
|
|
606
606
|
}
|
|
607
607
|
};
|
|
608
608
|
const map = smithy_client_1.map;
|
|
609
|
-
const
|
|
609
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
610
610
|
const contents = map({});
|
|
611
611
|
const data = parsedOutput.body;
|
|
612
612
|
if (data.message != null) {
|
|
@@ -618,7 +618,7 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
618
618
|
});
|
|
619
619
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
620
620
|
};
|
|
621
|
-
const
|
|
621
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
622
622
|
const contents = map({});
|
|
623
623
|
const data = parsedOutput.body;
|
|
624
624
|
if (data.message != null) {
|
|
@@ -630,7 +630,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
630
630
|
});
|
|
631
631
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
632
632
|
};
|
|
633
|
-
const
|
|
633
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
634
634
|
const contents = map({});
|
|
635
635
|
const data = parsedOutput.body;
|
|
636
636
|
if (data.message != null) {
|
|
@@ -642,7 +642,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
642
642
|
});
|
|
643
643
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
644
644
|
};
|
|
645
|
-
const
|
|
645
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
646
646
|
const contents = map({});
|
|
647
647
|
const data = parsedOutput.body;
|
|
648
648
|
if (data.message != null) {
|
|
@@ -654,7 +654,7 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
654
654
|
});
|
|
655
655
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
656
656
|
};
|
|
657
|
-
const
|
|
657
|
+
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
658
658
|
const contents = map({});
|
|
659
659
|
const data = parsedOutput.body;
|
|
660
660
|
if (data.message != null) {
|
|
@@ -666,11 +666,11 @@ const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOu
|
|
|
666
666
|
});
|
|
667
667
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
668
668
|
};
|
|
669
|
-
const
|
|
669
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
670
670
|
const contents = map({});
|
|
671
671
|
const data = parsedOutput.body;
|
|
672
672
|
if (data.fieldList != null) {
|
|
673
|
-
contents.fieldList =
|
|
673
|
+
contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context);
|
|
674
674
|
}
|
|
675
675
|
if (data.message != null) {
|
|
676
676
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
@@ -684,7 +684,7 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
684
684
|
});
|
|
685
685
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
686
686
|
};
|
|
687
|
-
const
|
|
687
|
+
const se_ContactInformation = (input, context) => {
|
|
688
688
|
return {
|
|
689
689
|
...(input.AddressLine1 != null && { AddressLine1: input.AddressLine1 }),
|
|
690
690
|
...(input.AddressLine2 != null && { AddressLine2: input.AddressLine2 }),
|
|
@@ -700,14 +700,14 @@ const serializeAws_restJson1ContactInformation = (input, context) => {
|
|
|
700
700
|
...(input.WebsiteUrl != null && { WebsiteUrl: input.WebsiteUrl }),
|
|
701
701
|
};
|
|
702
702
|
};
|
|
703
|
-
const
|
|
703
|
+
const se_RegionOptStatusList = (input, context) => {
|
|
704
704
|
return input
|
|
705
705
|
.filter((e) => e != null)
|
|
706
706
|
.map((entry) => {
|
|
707
707
|
return entry;
|
|
708
708
|
});
|
|
709
709
|
};
|
|
710
|
-
const
|
|
710
|
+
const de_AlternateContact = (output, context) => {
|
|
711
711
|
return {
|
|
712
712
|
AlternateContactType: (0, smithy_client_1.expectString)(output.AlternateContactType),
|
|
713
713
|
EmailAddress: (0, smithy_client_1.expectString)(output.EmailAddress),
|
|
@@ -716,7 +716,7 @@ const deserializeAws_restJson1AlternateContact = (output, context) => {
|
|
|
716
716
|
Title: (0, smithy_client_1.expectString)(output.Title),
|
|
717
717
|
};
|
|
718
718
|
};
|
|
719
|
-
const
|
|
719
|
+
const de_ContactInformation = (output, context) => {
|
|
720
720
|
return {
|
|
721
721
|
AddressLine1: (0, smithy_client_1.expectString)(output.AddressLine1),
|
|
722
722
|
AddressLine2: (0, smithy_client_1.expectString)(output.AddressLine2),
|
|
@@ -732,37 +732,37 @@ const deserializeAws_restJson1ContactInformation = (output, context) => {
|
|
|
732
732
|
WebsiteUrl: (0, smithy_client_1.expectString)(output.WebsiteUrl),
|
|
733
733
|
};
|
|
734
734
|
};
|
|
735
|
-
const
|
|
735
|
+
const de_Region = (output, context) => {
|
|
736
736
|
return {
|
|
737
737
|
RegionName: (0, smithy_client_1.expectString)(output.RegionName),
|
|
738
738
|
RegionOptStatus: (0, smithy_client_1.expectString)(output.RegionOptStatus),
|
|
739
739
|
};
|
|
740
740
|
};
|
|
741
|
-
const
|
|
741
|
+
const de_RegionOptList = (output, context) => {
|
|
742
742
|
const retVal = (output || [])
|
|
743
743
|
.filter((e) => e != null)
|
|
744
744
|
.map((entry) => {
|
|
745
745
|
if (entry === null) {
|
|
746
746
|
return null;
|
|
747
747
|
}
|
|
748
|
-
return
|
|
748
|
+
return de_Region(entry, context);
|
|
749
749
|
});
|
|
750
750
|
return retVal;
|
|
751
751
|
};
|
|
752
|
-
const
|
|
752
|
+
const de_ValidationExceptionField = (output, context) => {
|
|
753
753
|
return {
|
|
754
754
|
message: (0, smithy_client_1.expectString)(output.message),
|
|
755
755
|
name: (0, smithy_client_1.expectString)(output.name),
|
|
756
756
|
};
|
|
757
757
|
};
|
|
758
|
-
const
|
|
758
|
+
const de_ValidationExceptionFieldList = (output, context) => {
|
|
759
759
|
const retVal = (output || [])
|
|
760
760
|
.filter((e) => e != null)
|
|
761
761
|
.map((entry) => {
|
|
762
762
|
if (entry === null) {
|
|
763
763
|
return null;
|
|
764
764
|
}
|
|
765
|
-
return
|
|
765
|
+
return de_ValidationExceptionField(entry, context);
|
|
766
766
|
});
|
|
767
767
|
return retVal;
|
|
768
768
|
};
|